Pool
This endpoint provides comprehensive information about a clipper pool, including details on its assets, the contract address of its liquidity pool, and other pertinent data. This information is crucial for making off-chain calculations and predicting quotes.
Request
Query Param | Description | Example |
---|---|---|
chain_id | Integer - Required ID of the chain. | chain_id=137 - Polygon chain_id=1 - Ethereum mainnet |
time_in_seconds | Integer - Optional The time will be available a quote, it is used for calculate the fees, as you lower the time you will see lower fees. By default it will set a system value. For onchain data this field is not consider | time_in_seconds=30 |
fieldset | String - Optional Determines if should makes calls to blockchain to return onchain data. Accepted Value: "offchain-data" If the param is not added it will handle as onchain data | fieldset=offchain-data |
Response
Offchain object
Field | Description |
---|---|
pool | |
assets | List of Asset objects |
pairs | List of Pair objects |
pool_type | String - |
Pool object
Field | Description |
---|---|
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 |
swaps_enabled | Bool - Represents if the swaps are available for the chain |
Asset object
Field | Description |
---|---|
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
Field | Description |
---|---|
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
Get the offchain data for Polygon chain (chain_id=137)
Request
Response
Last updated