DEX API

查询限价单#

查询 DEX 限价单状态。

请求地址#

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

请求参数#

参数类型必传描述
orderHashString签名后数据

响应参数#

参数类型描述
createTimestring订单创建时间
expireTimestring当前订单生效截止时间
failureReasonstring错误信息 (如果有)
orderHashstring签名后数据
signaturestring钱包签名后的数据
chainIdstring链 ID (如1: Ethereum,更多可查看链 ID 列表)
makerAssetAddressstring创建订单的钱包地址
makerTokenAddressstring卖出币种合约地址
makingAmountstring卖出币数量
takerTokenAddressstring买入币种合约地址
takingAmountstring买入币数量
makerRatestringtakingAmount/makingAmount
takerRatestringmakingAmount/takingAmount
receiverstring默认情况下是零地址,接受者资产将被发送到限价订单创建者的地址。如果您设置了一个值,资产将会发送到当前的地址
remainingMakerAmountstring剩余可交易数量
saltstring随机数盐,作为幂等标识
当前时间戳 (秒值)
statusstring订单状态 (1 - 有效订单,2 - 暂时失效订单,3 - 被占用订单(正在上链),4 - 过期,5 - 取消,6 - 成功, 7 - 失败。 )
takerAssetAddressstring默认情况下是零地址,每个人都可以与当前限价订单成交。如果您设置了一个值,则限价订单将仅可在指定地址执行

请求示例#

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'

响应示例#

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":""
      }