DODO Docs
Search…
⌃K

Cancel Order

URL

https://api.dodoex.io/limit-order/cancel

Request

Method

POST

Request Example

curl --location --request POST 'https://api.dodoex.io/limit-order/cancel' \
--header 'Authorization: ${token}' \
--header 'User-Agent: DODO-${your_id}' \
--data-raw '{
"network": "rinkeby",
"address": "0x709f0d38142e7f8d95a21529b9ad576555bd6755",
"id": 33,
"sign": "0xd13b9ce1b72b606918bde9276d3bc10114f1b2dc743c996f",
"signkey": "888",
"signtime": 169212345
}'

Request Params

name
param type
type
option
default
description
Authorization
header
string
require
the auth token
User-Agent
header
string
require
the [User-Agent] you have requested
id
body
integer
require
order id
network
body
string
require
network name,enum:['ethereum', 'bsc', 'polygon', 'rinkeby']
address
body
string
require
your wallet address
sign
body
string
require
signature
signkey
body
string
require
sign key
signtime
body
string
require
sign unix timestamp

Get sign

const ethers = require("ethers");
const signtime = Math.floor(new Date().getTime() / 1000);
const signkey = `${process.env.CUSTOM_KEY} ${signtime}`;
const privateKey = Buffer.from(
process.env.YOUR_PK,
"hex"
);
(async () => {
const wallet = new ethers.Wallet(privateKey);
const address = await wallet.getAddress();
const signature = await wallet.signMessage(signkey);
console.log(signature)
})()

Response

Success

code: 200
content:
{
"code": 0,
"message": "success",
"data": null
}

Fail

code: 200
content:
{
"code": 10001,
"message": "Invalid signature time.",
"data": "Invalid signature time."
}

Response Params

name
type
description
code
integer
status code: 0: ok, 1000x: error
message
string
status description
data
object