Retrieve a list of AMM pools. This includes the latest status of each pool.
poolTypeHashes is used to query the current status of trading pools, supports batch queries.
| orderBy | string or null Enum: "tvl" "dayTxsCount" "dayVolume" "dayApr" Sorting criteria used to order the results. |
| pageNo required | integer <int64> >= 0 Page number of the results to retrieve. |
| pageSize required | integer <int64> >= 0 Number of items per page. |
| poolTypeHashes | Array of strings or null (HexBytesArray32) Type Hash of the pool. If this parameter is set to null, all created pools are returned. |
| searchKey | string or null Used to search pools by token symbol or token hash. |
| sort | string or null Enum: "aes" "desc" Sorting direction. |
{- "orderBy": "tvl",
- "pageNo": 0,
- "pageSize": 0,
- "poolTypeHashes": [
- "0x178fb47b597a56d48b549226aff59f750b4784250c7f40f781b64ef090a8a0a7"
], - "searchKey": "string",
- "sort": "aes"
}{- "code": 0,
- "data": {
- "list": [
- {
- "assetX": {
- "decimals": 8,
- "isWhiteList": true,
- "name": "Seal",
- "symbol": "Seal",
- "typeCellDep": {
- "depType": "code",
- "outPoint": {
- "index": 0,
- "txHash": "0x178fb47b597a56d48b549226aff59f750b4784250c7f40f781b64ef090a8a0a7"
}
}, - "typeHash": "0x178fb47b597a56d48b549226aff59f750b4784250c7f40f781b64ef090a8a0a7",
- "typeScript": {
- "args": "0x",
- "codeHash": "0x178fb47b597a56d48b549226aff59f750b4784250c7f40f781b64ef090a8a0a7",
- "hashType": 0
}, - "reserve": "11333233"
}, - "assetY": {
- "decimals": 8,
- "isWhiteList": true,
- "name": "Seal",
- "symbol": "Seal",
- "typeCellDep": {
- "depType": "code",
- "outPoint": {
- "index": 0,
- "txHash": "0x178fb47b597a56d48b549226aff59f750b4784250c7f40f781b64ef090a8a0a7"
}
}, - "typeHash": "0x178fb47b597a56d48b549226aff59f750b4784250c7f40f781b64ef090a8a0a7",
- "typeScript": {
- "args": "0x",
- "codeHash": "0x178fb47b597a56d48b549226aff59f750b4784250c7f40f781b64ef090a8a0a7",
- "hashType": 0
}, - "reserve": "11333233"
}, - "basedAsset": 0,
- "batchId": 123,
- "dayApr": "11333233.33",
- "dayFees": "10.33",
- "dayTxsCount": "100",
- "dayVolume": "11333233.33",
- "dayVolumeChangeRate": "-0.2",
- "feeRate": 30,
- "protocolLpAmount": "11333233",
- "totalLpSupply": "11333233",
- "tvl": "11333233.33",
- "tvlChangeRate": "-0.4",
- "typeHash": "0x178fb47b597a56d48b549226aff59f750b4784250c7f40f781b64ef090a8a0a7"
}
], - "totalCount": 0
}, - "message": "success"
}Retrieve a list of transactions. This function supports querying all transactions, transactions specific to a specific pool, and transactions linked to a specific address.
You can query transactions for a specific trading pool using either poolTypeHash alone or a combination of assetXTypeHash and assetYTypeHash. It is recommended to use poolTypeHash.
| address | string or null The CKB address to query. |
| assetXTypeHash | string or null |
| assetYTypeHash | string or null |
| intentStatuses | Array of integers or null (IntentStatus) Enum: 0 1 2 3 Transaction statuses. @values: Pending (0), Success (1), Refunded (2), Rejected (3) |
| intentTypes | Array of integers or null (ReqIntentType) Enum: 0 1 2 3 Types of transactions. @values: Create pool (0), Add liquidity (1), Remove liquidity (2), Swap (3). |
| pageNo required | integer <int64> >= 0 Page number of the results to retrieve. |
| pageSize required | integer <int64> >= 0 Number of items per page. |
| poolTypeHash | string or null |
{- "address": "ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqgkc73ca6f608u2m27e26f7ky0hahwyc3cq4r88h",
- "assetXTypeHash": "0x178fb47b597a56d48b549226aff59f750b4784250c7f40f781b64ef090a8a0a7",
- "assetYTypeHash": "0x178fb47b597a56d48b549226aff59f750b4784250c7f40f781b64ef090a8a0a7",
- "intentStatuses": [
- 0
], - "intentTypes": [
- 0
], - "pageNo": 0,
- "pageSize": 0,
- "poolTypeHash": "0x178fb47b597a56d48b549226aff59f750b4784250c7f40f781b64ef090a8a0a7"
}{- "code": 0,
- "data": {
- "list": [
- {
- "basedAsset": {
- "amount": "1.0",
- "symbol": "CKB"
}, - "completedTime": 0,
- "errorCode": 0,
- "errorMsg": "string",
- "index": 0,
- "intentType": 0,
- "otherAsset": {
- "amount": "1.0",
- "symbol": "CKB"
}, - "ownerAddress": "string",
- "payAssets": [
- {
- "amount": "1.0",
- "symbol": "CKB"
}
], - "poolTxHash": "0x178fb47b597a56d48b549226aff59f750b4784250c7f40f781b64ef090a8a0a7",
- "receiveAssets": [
- {
- "amount": "1.0",
- "symbol": "CKB"
}
], - "status": 0,
- "txHash": "0x178fb47b597a56d48b549226aff59f750b4784250c7f40f781b64ef090a8a0a7",
- "value": "19339.938"
}
], - "totalCount": 0
}, - "message": "success"
}Retrieves K-line (candlestick) data. Currently, the use of this function is not recommended.
You can query transactions for a specific trading pool using either poolTypeHash alone or a combination of assetXTypeHash and assetYTypeHash. It is recommended to use poolTypeHash.
| asset_x_type_hash | string or null |
| asset_y_type_hash | string or null |
| pool_type_hash | string or null |
| candlestickType required | integer (CandlestickType) Enum: 0 1 2 3 4 5 6 7 K-line time interval. @values:
|
{- "asset_x_type_hash": "0x178fb47b597a56d48b549226aff59f750b4784250c7f40f781b64ef090a8a0a7",
- "asset_y_type_hash": "0x178fb47b597a56d48b549226aff59f750b4784250c7f40f781b64ef090a8a0a7",
- "pool_type_hash": "0x178fb47b597a56d48b549226aff59f750b4784250c7f40f781b64ef090a8a0a7",
- "candlestickType": 0
}{- "code": 0,
- "data": {
- "list": [
- {
- "basedAssetAmount": "11333233.33",
- "basedAssetLogo": "string",
- "basedAssetSymbol": "string",
- "dayVolume": "1937.38",
- "otherAssetAmount": "11333233.33",
- "otherAssetLogo": "string",
- "otherAssetSymbol": "string",
- "time": 1718173636752,
- "tvl": "111.10"
}
]
}, - "message": "success"
}