# Query Pool Rate

This endpoint allows you to retrieve the current swap rate for a selected token and the total liquidity in the pool for that trading pair. Its main uses are:

* Displaying the swap rate to users
* Calculating the estimated amount obtainable from a swap

## POST /api/pool/liquid/liquid\_info

> Get Liquidity Pool Trading Pair Information

```json
{"openapi":"3.0.1","info":{"title":"Backend API","version":"1.0.0"},"tags":[{"name":"dotswap-ext/info"}],"servers":[{"url":"http://127.0.0.1:8090","description":"Local"}],"paths":{"/api/pool/liquid/liquid_info":{"post":{"summary":"Get Liquidity Pool Trading Pair Information","deprecated":false,"description":"","tags":["dotswap-ext/info"],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tick1":{"type":"object","properties":{"coin_type":{"type":"string"},"tick":{"type":"string"},"token_id":{"type":"string"}},"required":["coin_type","tick","token_id"]},"tick2":{"type":"object","properties":{"coin_type":{"type":"string"},"tick":{"type":"string"},"token_id":{"type":"string"}},"required":["coin_type","tick","token_id"]}},"required":["tick1","tick2"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"msg":{"type":"string"},"data":{"type":"object","properties":{"tick1":{"type":"object","properties":{"coin_type":{"type":"string"},"tick":{"type":"string"},"token_id":{"type":"string"}},"required":["coin_type","tick","token_id"]},"tick2":{"type":"object","properties":{"coin_type":{"type":"string"},"tick":{"type":"string"},"token_id":{"type":"string"}},"required":["coin_type","tick","token_id"]},"tick1_amount":{"type":"string"},"tick2_amount":{"type":"string"},"liquid_fee_buy_percent":{"type":"string","title":"Buy LP fee rate (a -> b)"},"liquid_fee_sell_percent":{"type":"string","title":"Sell LP fee rate (b -> a)"},"platform_fee_buy_percent":{"type":"string","title":"Buy platform fee rate (a -> b)"},"platform_fee_sell_percent":{"type":"string","title":"Sell platform fee rate (b -> a)"},"tick1_per_tick2":{"type":"string"},"tick2_per_tick1":{"type":"string"}},"required":["tick1","tick2","tick1_amount","tick2_amount","liquid_fee_buy_percent","liquid_fee_sell_percent","platform_fee_buy_percent","platform_fee_sell_percent","tick1_per_tick2","tick2_per_tick1"]},"req_id":{"type":"string"}},"required":["code","msg","data","req_id"]}}}}}}}}}
```

{% hint style="info" %}

1. If you receive a 'LiquidPair not found' error (code: 10180006), it indicates that no liquidity pool exists for this trading pair.
   {% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.on.nexus/dotswap/developers/nexus-protocol/global/rate.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
