DEX API
Limit order list

Limit order list#

Query list of DEX limit order.

Request address#

GET https://www.okx.com/api/v5/dex/aggregator/limit-order/all

Request parameters#

ParameterTypeRequiredDescription
chainIdStringYesChain ID (e.g., 1 for Ethereum. See Chain IDs)
pageStringNoPagination step, default: 1 (page = offset / limit)
limitStringNoNumber of limit orders to receive (default: 100, max: 500)
statusesStringNoAn array of statuses by which limit orders will be filtered. Valid statuses include: 1 - Valid orders, 2 - Temporarily invalid orders, 3 - Occupied orders , 4 - Expired, 5 - Cancelled, 6 - Success, 7 - Failed orders.
takerAssetStringNoAddress of the taker asset
makerAssetStringNoAddress of the maker asset

Response parameters#

ParameterTypeDescription
chainIdstringchainID (e.g. 1: Ethereum, see list of chain IDs for more)
createTimestringOrder creation time
expireTimestringCurrent order’s effective deadline
makerAssetAddressstringThe wallet address for current transaction
makerRatestringtakingAmount/makingAmount
makerTokenAddressstringThe contract address of a token to be sold
makingAmountstringThe number of a token to be sold
orderHashstringorderHash
receiverstringDefault is zero address, and the recipient’s assets will be sent to the address of the limit order creator. If you set a value, the asset will be sent to the current address.
remainingMakerAmountstringRemaining tradable quantity
saltstringrandom number salt as idempotent identifier
Current timestamp (second value)
signaturestringsignature
statusstringOrder status (0: available, 1: temporarily disabled, 3: unavailable, 4 order fully filled)
takerTokenAddressstringThe contract address of a token to be bought
takingAmountstringThe number of a token to be bought
takerRatestringmakingAmount/takingAmount
takerAssetAddressstringDefault is zero address, and everyone can fill the current limit order. If you set a value, the limit order will only be executable at the specified address.

Request example#

shell
curl --location --request GET 'https://www.okx.com/api/v5/dex/aggregator/limit-order/all?chainId=137' \
--header 'OK-ACCESS-PROJECT: 86af********d1bc' \
--header 'OK-ACCESS-KEY: 37c541a1-****-****-****-10fe7a038418' \
--header 'OK-ACCESS-SIGN: leaV********3uw=' \
--header 'OK-ACCESS-PASSPHRASE: 1****6' \
--header 'OK-ACCESS-TIMESTAMP: 2023-10-18T12:21:41.274Z'

Response example#

200
{
        "code": "0",
        "data":[
              {
                "chainId": "137",
                "createTime": "2023-12-07 17:54:20",
                "expireTime": "2023-12-10 13:59:31",
                "makerAssetAddress": "0xc171a1caa36b1c9e2c56fe71a24ceac127ff5ae4",
                "makerRate": "16.700084079252467628",
                "makerTokenAddress": "0x53e0bca35ec356bd5dddfebbd1fc0fd03fabad39",
                "makingAmount": "2.095797831550000000",
                "orderHash": "0x618d6abcde06366ae5bd70e8fc661443bd7f9da5073305b39273f1b426cda443",
                "receiver": "",
                "remainingMakerAmount": "2.095797831550000000",
                "salt": "1701942829",
                "signature": "0x867ad0143a04bbee935fde6fcd2a4ddb6cf734a0c6d59352cd5d769d366caf2b25f4480e83d4e9b31274314ec24b88b04686c4df0ad4658b898fd56d630c049e1b",
                "status": "3",
                "takerAssetAddress": "0x0000000000000000000000000000000000000000",
                "takerRate": "0.059879938044285714",
                "takerTokenAddress": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
                "takingAmount": "35.000000000000000000"
              },
              {
                "chainId": "137",
                "createTime": "2023-11-09 16:54:40",
                "expireTime": "2023-11-15 21:30:49",
                "makerAssetAddress": "0xc171a1caa36b1c9e2c56fe71a24ceac127ff5ae4",
                "makerRate": "17.142857142857142857",
                "makerTokenAddress": "0x53e0bca35ec356bd5dddfebbd1fc0fd03fabad39",
                "makingAmount": "0.700000000000000000",
                "orderHash": "0xf834d285a8bee9c4edf2d3de4acff5acbc350bafe81d0491fc2448d6122a98ee",
                "receiver": "0x0a0de421eb2d6cbef3b81a9d5561f6d2f26c3d07",
                "remainingMakerAmount": "0.000000000000000000",
                "salt": "1699520029",
                "signature": "0xe028369231a0c7d8224c68001bdf16fcdbd3a92ca05d3f50fc880b6688c0980626dc4ac76c5c25276a0197a0db92fd358959d231e31d6eb78488bf34f709edbc1c",
                "status": "3",
                "takerAssetAddress": "0x0000000000000000000000000000000000000000",
                "takerRate": "0.058333333333333333",
                "takerTokenAddress": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
                "takingAmount": "12.000000000000000000"
              },
              {
                "chainId": "137",
                "createTime": "2023-12-06 11:17:01",
                "expireTime": "2023-12-20 10:36:05",
                "makerAssetAddress": "0xc171a1caa36b1c9e2c56fe71a24ceac127ff5ae4",
                "makerRate": "16.700084079252467628",
                "makerTokenAddress": "0x53e0bca35ec356bd5dddfebbd1fc0fd03fabad39",
                "makingAmount": "2.095797831550000000",
                "orderHash": "0xe1cb49dad5d3b23585c9f99cd75d10a87be70b7f59aa92e04fc5f1fa9023f93c",
                "receiver": "",
                "remainingMakerAmount": "2.095797831550000000",
                "salt": "1701832383",
                "signature": "0x6880a1c3b7c05d1a1c027494512090390789ebae7211ba5a087fe29161394b9320f6ac4eee14ce404902743668d6d1a50170c3c906d47fe0fdcec45a25b111a71b",
                "status": "3",
                "takerAssetAddress": "0x0000000000000000000000000000000000000000",
                "takerRate": "0.059879938044285714",
                "takerTokenAddress": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
                "takingAmount": "35.000000000000000000"
              },
              {
                "chainId": "137",
                "createTime": "2023-12-07 16:02:14",
                "expireTime": "2023-12-10 13:59:31",
                "makerAssetAddress": "0xc171a1caa36b1c9e2c56fe71a24ceac127ff5ae4",
                "makerRate": "16.700084079252467628",
                "makerTokenAddress": "0x53e0bca35ec356bd5dddfebbd1fc0fd03fabad39",
                "makingAmount": "2.095797831550000000",
                "orderHash": "0x555199460dea70eed738b4e782929c8e1e02f9abfaea31494ce90ba300306292",
                "receiver": "",
                "remainingMakerAmount": "2.095797831550000000",
                "salt": "1701936038",
                "signature": "0x7b00c8b608cb9769c37825f41248d4e5b1502ee705c4255b5074f544482177724a7227daed6cd7acb199e2a46436dc76e71ee16d5c751bd4eb8d2d65e18b7ae21c",
                "status": "3",
                "takerAssetAddress": "0x0000000000000000000000000000000000000000",
                "takerRate": "0.059879938044285714",
                "takerTokenAddress": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
                "takingAmount": "35.000000000000000000"
              },
              {
                "chainId": "137",
                "createTime": "2023-12-07 17:18:00",
                "expireTime": "2023-12-10 13:59:31",
                "makerAssetAddress": "0xc171a1caa36b1c9e2c56fe71a24ceac127ff5ae4",
                "makerRate": "16.700084079252467628",
                "makerTokenAddress": "0x53e0bca35ec356bd5dddfebbd1fc0fd03fabad39",
                "makingAmount": "2.095797831550000000",
                "orderHash": "0x596d7bd82d82d9766154f9c1884963c06a8d4d26991cd7f9b2448cbdde750a27",
                "receiver": "",
                "remainingMakerAmount": "2.095797831550000000",
                "salt": "1701940627",
                "signature": "0x8185c0bc38ee22ac6cfd9eee078f0526b47c2b31d31f5fdaaa66b8c1ddef930960a1206939fcbf9074471bdeb0fe4875e313616e838ba378096fef6e8fb408491c",
                "status": "3",
                "takerAssetAddress": "0x0000000000000000000000000000000000000000",
                "takerRate": "0.059879938044285714",
                "takerTokenAddress": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
                "takingAmount": "35.000000000000000000"
              }
        ],
        "msg": ""
      }