sequencer-api (0.1.17)

Download OpenAPI specification:Download

License:

api

pool_list

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.

Request Body schema: application/json
required
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.

Responses

Request samples

Content type
application/json
{
  • "orderBy": "tvl",
  • "pageNo": 0,
  • "pageSize": 0,
  • "poolTypeHashes": [
    ],
  • "searchKey": "string",
  • "sort": "aes"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    },
  • "message": "success"
}

transaction_list

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.

Request Body schema: application/json
required
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

Responses

Request samples

Content type
application/json
{
  • "address": "ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqgkc73ca6f608u2m27e26f7ky0hahwyc3cq4r88h",
  • "assetXTypeHash": "0x178fb47b597a56d48b549226aff59f750b4784250c7f40f781b64ef090a8a0a7",
  • "assetYTypeHash": "0x178fb47b597a56d48b549226aff59f750b4784250c7f40f781b64ef090a8a0a7",
  • "intentStatuses": [
    ],
  • "intentTypes": [
    ],
  • "pageNo": 0,
  • "pageSize": 0,
  • "poolTypeHash": "0x178fb47b597a56d48b549226aff59f750b4784250c7f40f781b64ef090a8a0a7"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    },
  • "message": "success"
}

get_candlestick

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.

Request Body schema: application/json
required
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:

  • 0: pool info for 4 hours
  • 1: pool info for 1 day
  • 2: pool info for 7 days
  • 3: pool info for 30 days
  • 4: pool info for all time
  • 5: pool daily volume
  • 6: platform tvl for 7 days
  • 7: platform tvl for all

Responses

Request samples

Content type
application/json
{
  • "asset_x_type_hash": "0x178fb47b597a56d48b549226aff59f750b4784250c7f40f781b64ef090a8a0a7",
  • "asset_y_type_hash": "0x178fb47b597a56d48b549226aff59f750b4784250c7f40f781b64ef090a8a0a7",
  • "pool_type_hash": "0x178fb47b597a56d48b549226aff59f750b4784250c7f40f781b64ef090a8a0a7",
  • "candlestickType": 0
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    },
  • "message": "success"
}