Skip to main content
Version: 1.2.0

Liquidity REST API

Endpoints the node exposes under /centerchain/liquidity/*.

Endpoints​

GET /centerchain/liquidity/v1/ibc-denoms​

NameInTypeRequiredDescription
pagination.keyquerystring (byte)nokey is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.
pagination.offsetquerystring (uint64)nooffset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.
pagination.limitquerystring (uint64)nolimit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.
pagination.count_totalquerybooleannocount_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.
pagination.reversequerybooleannoreverse is set to true if results are to be returned in the descending order.

Response 200: centerchain.liquidity.v1.QueryIBCDenomsResponse

GET /centerchain/liquidity/v1/ibc-denoms/{denom}​

NameInTypeRequiredDescription
denompathstringyes

Response 200: centerchain.liquidity.v1.QueryIBCDenomResponse

GET /centerchain/liquidity/v1/params​

Response 200: centerchain.liquidity.v1.QueryParamsResponse

GET /centerchain/liquidity/v1/pools​

NameInTypeRequiredDescription
pagination.keyquerystring (byte)nokey is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.
pagination.offsetquerystring (uint64)nooffset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.
pagination.limitquerystring (uint64)nolimit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.
pagination.count_totalquerybooleannocount_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.
pagination.reversequerybooleannoreverse is set to true if results are to be returned in the descending order.

Response 200: centerchain.liquidity.v1.QueryPoolsResponse

GET /centerchain/liquidity/v1/pools/by-pair/{denom_a}/{denom_b}​

NameInTypeRequiredDescription
denom_apathstringyes
denom_bpathstringyes

Response 200: centerchain.liquidity.v1.QueryPoolByPairResponse

GET /centerchain/liquidity/v1/pools/{pool_id}​

NameInTypeRequiredDescription
pool_idpathstring (uint64)yes

Response 200: centerchain.liquidity.v1.QueryPoolResponse

GET /centerchain/liquidity/v1/pools/{pool_id}/balances​

NameInTypeRequiredDescription
pool_idpathstring (uint64)yes

Response 200: centerchain.liquidity.v1.QueryPoolAccountBalancesResponse

GET /centerchain/liquidity/v1/pools/{pool_id}/emissions​

NameInTypeRequiredDescription
pool_idpathstring (uint64)yes

Response 200: centerchain.liquidity.v1.QueryEmissionScheduleResponse

GET /centerchain/liquidity/v1/pools/{pool_id}/farm/{owner}​

NameInTypeRequiredDescription
pool_idpathstring (uint64)yes
ownerpathstringyes

Response 200: centerchain.liquidity.v1.QueryFarmPositionResponse

GET /centerchain/liquidity/v1/pools/{pool_id}/pending​

NameInTypeRequiredDescription
pool_idpathstring (uint64)yes

Response 200: centerchain.liquidity.v1.QueryPendingUpdatesResponse

GET /centerchain/liquidity/v1/pools/{pool_id}/shares​

NameInTypeRequiredDescription
pool_idpathstring (uint64)yes

Response 200: centerchain.liquidity.v1.QueryPoolSharesResponse

POST /centerchain/liquidity/v1/pools/{pool_id}/simulate_swap_exact_amount_in​

NameInTypeRequiredDescription
pool_idpathstring (uint64)yes
bodybodycenterchain.liquidity.v1.Query.SimulateSwapExactAmountInBodyyes

Response 200: centerchain.liquidity.v1.QuerySimulateSwapExactAmountInResponse

POST /centerchain/liquidity/v1/pools/{pool_id}/simulate_swap_exact_amount_out​

NameInTypeRequiredDescription
pool_idpathstring (uint64)yes
bodybodycenterchain.liquidity.v1.Query.SimulateSwapExactAmountOutBodyyes

Response 200: centerchain.liquidity.v1.QuerySimulateSwapExactAmountOutResponse