Implement trail api
Merge with nick