Get Token Liquidity
Returns on-chain liquidity depth in USD for one or more tokens.
Returns on-chain liquidity depth in USD for one or more tokens. Use this to assess whether a given position size is practical before routing a swap.
Parameters
chain_idreqintegerEVM-compatible chain ID (path parameter).
tokenreqstringToken contract address. Use 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for the native token.
Separate multiple addresses with commas.
Request
curl 'https://api.nordstern.finance/liquidity/8453?token=0x4200000000000000000000000000000000000006,0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' \
-H "Referer: https://yourdomain.com"const tokens = [
"0x4200000000000000000000000000000000000006",
"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
];
const response = await fetch(
`https://api.nordstern.finance/liquidity/8453?token=${tokens.join(",")}`,
{ headers: { "Referer": "https://yourdomain.com" } }
);
const liquidity = await response.json();
console.log(liquidity);import requests
url = "https://api.nordstern.finance/liquidity/8453"
params = {
"token": ",".join([
"0x4200000000000000000000000000000000000006",
"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
])
}
headers = {"Referer": "https://yourdomain.com"}
response = requests.get(url, params=params, headers=headers)
print(response.json())Response
A flat JSON object keyed by token address. Each value is a number representing total on-chain
liquidity depth in USD across all DEX pools on the requested chain. A higher value means larger
swaps can be executed with less price impact.
[tokenAddress]number | nullTotal on-chain liquidity in USD. null if the token is not recognised on this chain.
{
"0x4200000000000000000000000000000000000006": 1000000000,
"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913": 41055139.11223521
}Use liquidity depth as a pre-flight check before requesting a swap route. If the liquidity for a token is significantly lower than your intended swap size, expect high price impact or the quote failing.
Errors
| Code | Meaning |
|---|---|
400 | Missing token parameter, or chain_id is not a number. The plain-text response body describes the issue. |
404 | Chain ID not supported. |