Cancel order

Rate limit: 5 every second

API Overview


HTTP method

DELETE

Path

/api/v3/order

Summary

Cancel order using order hash or client-side ID.

API description


HTTP Header

Field Type Required Description Example
X-API-KEY string Y ApiKey "HlkcGxbqBeaF76j4rvPaOasyfPwnkQ
6B6DQ6THZWbvrAGxzEdulXQvOKLrRW
ZLnN"
X-API-SIG string Y EDDSA Signature "0xeb14773e8a07d19bc4fe56e36d041dcb
0026bf21e05c7652f7e92160deaf5ea9
c4fe56e34773e86d041dcbeb1a07d19b
002652f7e92160deaf5e6bf21e05c7a9
002652f7e92160deaf5e6bf21e05c7a9
eb14773e8a07d19bc4fe56e36d041dcb"

Request parameters

Field Type Required Description Example
accountId integer Y Account ID 1
orderHash string N Order HASH "13375450901292179417
15497484957179306991
15173547203971250276
33242680470075859"
clientOrderId string N The unique order ID of the client "20200318000000001010"

Request example

HTTP
CURL
DELETE https://api3.loopring.io/api/v3/order?accountId=1&orderHash=13375450901292179417154974849571793069911517354720397125027633242680470075859&clientOrderId=20200318000000001010 HTTP/1.1
Host: api3.loopring.io
Connection: keep-alive
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: zh,en;q=0.9
X-API-KEY: sra1aavfa
X-API-SIG: dkkfinfasdf
curl -X DELETE -H "X-API-KEY:sra1aavfa" -H "X-API-SIG:dkkfinfasdf" https://api3.loopring.io/api/v3/order\?accountId\=1\&orderHash\=13375450901292179417154974849571793069911517354720397125027633242680470075859\&clientOrderId\=20200318000000001010

Response fields

Field Type Required Description Example
hash string Y Order hash of submit order response "13375450901292179417
15497484957179306991
15173547203971250276
33242680470075859"
clientOrderId string Y The clientOrderId of the submitted order "client_order_id"
status string Y Order status of submit order response
Allowable : ['processing', 'processed', 'cancelling', 'cancelled', 'expired', 'failed']
"cancelled"
isIdempotent boolean Y Idempotent of submit order response, submit same order again when order was UNKNOWN or WAIT_FREEZE_BALANCE in relayer, idempotent will be true
Allowable : [True, False]
"false"

Response example

{
    "hash" : "13375450901292179417154974849571793069911517354720397125027633242680470075859",
    "clientOrderId" : "client_order_id",
    "status" : "cancelled",
    "isIdempotent" : false
}

Status code

Value Description
100000 Unknown error
104001 Empty ApiKey
102117 No orders to cancel
102118 Failed to cancel orders, please try again later
104002 Invalid ApiKey
104003 Invalid Account ID

results matching ""

    No results matching ""