duality-labs / hapi-indexer

A Node.js based indexer for the Duality Cosmos chain
1 stars 0 forks source link

feat: add token tick liquidity route #21

Closed dib542 closed 1 year ago

dib542 commented 1 year ago

This PR adds a simple data fetching route for tick liquidity of tokenA in a pair of tokenA<>tokenB using path /liquidity/token/{tokenA}/{tokenB}, the tick indexes returned here would be of the form tickIndexBToA.

To fetch the tokenB side it is expected that a front end client should fetch with a path of /liquidity/token/{tokenB}/{tokenA}, the result will have inverted tickIndexes as this endpoint would return tick indexes of tickIndexAToB.