Pool
If you already have an API key for authentication, we recommend using Pool v2 instead as it does not support API key authentication.
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
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
Pool 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 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
Get the offchain data for Polygon chain (chain_id=137)
Request
curl -X GET "https://api.clipper.exchange/rfq/pool?chain_id=137&fieldset=offchain-data" -H "Authorization: Basic dGVzdDp0ZXN0MTIzNA=="
Response
{
"pool": {
"chain_id": 137,
"address": "0x6Bfce69d1Df30FD2B2C8e478EDEC9dAa643Ae3B8",
"num_assets": 6,
"k": 0.115,
"time_in_seconds": 60,
"default_time_in_seconds": 60,
"swaps_enabled": true
},
"assets": [
{
"name": "ETH",
"address": "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619",
"price_in_usd": 1656.9150000000002,
"listing_weight": 125
},
{
"name": "MATIC",
"address": "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",
"price_in_usd": 0.56802,
"listing_weight": 100
},
{
"name": "WBTC",
"address": "0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6",
"price_in_usd": 27405.915,
"listing_weight": 178
},
{
"name": "USDC",
"address": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
"price_in_usd": 1.0,
"listing_weight": 178
},
{
"name": "DAI",
"address": "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",
"price_in_usd": 1.0,
"listing_weight": 250
},
{
"name": "USDT",
"address": "0xc2132D05D31c914a87C6611C10748AEb04B58e8F",
"price_in_usd": 1.0,
"listing_weight": 305
}
],
"pairs": [
{
"assets": [
"ETH",
"MATIC"
],
"fee_in_basis_points": 12.0
},
{
"assets": [
"ETH",
"WBTC"
],
"fee_in_basis_points": 6.0
},
{
"assets": [
"ETH",
"USDC"
],
"fee_in_basis_points": 8.0
},
{
"assets": [
"ETH",
"DAI"
],
"fee_in_basis_points": 8.0
},
{
"assets": [
"ETH",
"USDT"
],
"fee_in_basis_points": 8.0
},
{
"assets": [
"MATIC",
"WBTC"
],
"fee_in_basis_points": 12.0
},
{
"assets": [
"MATIC",
"USDC"
],
"fee_in_basis_points": 12.0
},
{
"assets": [
"MATIC",
"DAI"
],
"fee_in_basis_points": 12.0
},
{
"assets": [
"MATIC",
"USDT"
],
"fee_in_basis_points": 12.0
},
{
"assets": [
"WBTC",
"USDC"
],
"fee_in_basis_points": 8.0
},
{
"assets": [
"WBTC",
"DAI"
],
"fee_in_basis_points": 8.0
},
{
"assets": [
"WBTC",
"USDT"
],
"fee_in_basis_points": 8.0
},
{
"assets": [
"USDC",
"DAI"
],
"fee_in_basis_points": 5.0
},
{
"assets": [
"USDC",
"USDT"
],
"fee_in_basis_points": 5.0
},
{
"assets": [
"DAI",
"USDT"
],
"fee_in_basis_points": 5.0
}
],
"pool_type": "offchain"
}
Last updated
Was this helpful?