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 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

Offchain object

Field
Description

assets

pairs

List of Pair objects

pool_type

String - offchain

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 time_in_seconds

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

Was this helpful?