DEX API
Query limit order

Query limit order#

Query status of a DEX limit order.

Request address#

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

Request parameters#

ParameterTypeRequiredDescription
orderHashStringYesorderHash

Response parameters#

ParameterTypeDescription
createTimestringOrder creation time
expireTimestringCurrent order’s effective deadline
failureReasonstringError message (if any)
orderHashstringorderHash
signaturestringsignature
chainIdstringchainID (e.g. 1: Ethereum, see list of chain IDs for more)
makerAssetAddressstringThe wallet address for current transaction
makerTokenAddressstringThe contract address of a token to be sold
makingAmountstringThe number of a token to be sold
takerTokenAddressstringThe contract address of a token to be bought
takingAmountstringThe number of a token to be bought
makerRatestringtakingAmount/makingAmount
takerRatestringmakingAmount/takingAmount
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)
statusstringOrder status (1 - Valid orders, 2 - Temporarily invalid orders, 3 - Occupied orders , 4 - Expired, 5 - Cancelled, 6 - Success, 7 - Failed orders.)
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/detail?orderHash=0xf1852a5c82b9ff8919aaacce31325f4a778603471c2e8fa8d80583824c21e97a' \
--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":{
            "createTime":"2023-10-13 14:22:47",
            "chainId":"137",
            "makerAssetAddress":"0xc171a1caA36b1c9e2C56fE71A24cEAC127FF5ae4",
            "makerRate":"2.000000000000000000",
            "makerTokenAddress":"0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
            "makingAmount":"3.000000000000000000",
            "takingAmount":"6.000000000000000000",
            "receiver":"",
            "remainingMakerAmount":"2.500000000000000000",
            "salt":"1697032618",
            "status":"1",
            "takerAssetAddress":"0x0000000000000000000000000000000000000000",
            "takerRate":"0.5",
            "takerTokenAddress":"0xc2132d05d31c914a87c6611c10748aeb04b58e8f"
            "expireTime":"2023-10-20 14:41:00",
            "failureReason":"",
            "orderHash":"0xf1852a5c82b9ff8919aaacce31325f4a778603471c2e8fa8d80583824c21e97a",
            "signature":"0x78645ba7ed8c0266e01e46302160aad94537dbac9a0c751b9c315a516f44f54765acd11c11ffc88c9dd7f74fa63c606506ab145f94592bbbcb3cf2bac1cb13a01b"
        },
        "msg":""
      }