Pool v2
This endpoint provides comprehensive information about all the pools on the selected chain, including details about its assets, the contract address of its liquidity pool, and other relevant data. This information is crucial for making off-chain calculations and predicting quotes.
URL
Request
chain
Integer - Required ID of the chain
chain_id=137
pool_address
str - Optional The address of the pool. If not provided, all pools on the selected chain will be returned.
pool_address=0x655eDCE464CC797526600a462A8154650EEe4B77
time_in_seconds
Integer - Optional
The time duration for which a quote will be available. This value is used to calculate the fees; as you decrease the time, you will see lower fees.
By default, the system sets a predefined value.
Note: For on-chain data, this field is not considered.
time_in_seconds=30
fieldset
String - Optional Determines whether the API should make calls to the blockchain to return on-chain data.
Accepted Value: offchain-data
If the parameter is not provided, it will default to handling on-chain data.
fieldset=offchain-data
Response
On-chain object
pools
pool_type
String - offchain
Pool Data on-chain object
pool
assets
Pool on-chain object
chain_id
Integer - ID of the chain
address
String(ETH address) - Clipper contract address of the pool, is the address used when executing a transaction
num_assets
Integer - The total of assets available in the chain
value_in_usd
Float - Value of the pool in USD (***REVIEW TEMO)
swaps_enabled
Bool - Represents if the swaps are available for the chain
Asset on-chain object
name
String - The name of the asset, this value should be used when making a quote
address
String(ETH address) - The contract address of the asset
price_in_usd
Float - Current price in dollars for the asset
value_in_usd
Float - Value of the pool in USD
target_value_in_usd
Float - USD target value for this asset in the pool
Off-chain object
pools
pool_type
String - offchain
Pool Data off-chain object
pool
assets
pairs
Pool off-chain object
chain_id
Integer - ID of the chain
address
String(ETH address) - Clipper contract address of the pool, is the address used when executing a transaction
num_assets
Integer - The total of assets available in the chain
k
Float - K factor
time_in_seconds
Integer - Number of seconds were used to calculate the fees of a swap, this number indicates the number of seconds that quotes are live
default_time_in_seconds
Integer - Default number of seconds that quotes are live, is value used to calculate fees when don't send the query param time_in_seconds
swaps_enabled
Bool - Represents if the swaps are available for the chain
Asset off-chain object
name
String - The name of the asset, this value should be used when making a quote
address
String(ETH address) - The contract address of the asset
price_in_usd
Float - Current price in dollars for the asset
listing_weight
Integer - asset weight within the pool
Pair object
assets
List[str] - Pair of assets available to make a swap - e.g: ["ETH", "MATIC"]
fee_in_basis_points
Float - Fee for make a swap between the pair
Examples
1.Get the offchain data for Polygon chain (chain_id=137)
Request
Response
Get the on-chain data for mainnet chain (chain_id=1)
Request
Response
Last updated
Was this helpful?