Create order

method url:/api/third/hot/order/create

request type:POST

content type:application/x-www-form-urlencoded

need sign:true

detail:

request param:

param_name

param note

request type

required

data type

schema

pairName

query

true

string

clientOrderId

query

true

string

price

query

true

string

lever

query

true

integer(int32)

isLong

query

true

boolean

isMarket

query

true

boolean

positionType

3 one-way isloate 4 one-way cross

query

true

integer(int32)

quantity

query

true

string

matchType

1 GTC ;2 IOC ;3 FOK ;4 POST_ONLY ;

query

true

integer(int32)

timestamp

query

true

string

response param:

param_name

param note

type

schema

  cOrderId

string

  orderId

integer(int64)

  pairName

string

example:

1 Set request parameters, query params:

clientOrderId: "{{satTimestamp}}"
isLong: "True"
isMarket: "True"
lever: "20"
matchType: "2"
pairName: "ETH-USD"
positionType: "3"
price: "3100"
quantity: "0.02"
timestamp: "{{satTimestamp}}"

2 build request string

clientOrderId=1725693490018&isLong=True&isMarket=True&lever=20&matchType=2&pairName=ETH-USD&positionType=3&price=3100&quantity=0.02&timestamp=1725693490018

3 Sign the parameter string format, result:

0x7c8e2c2e5bfdd29f217e9bf1de4270c4c4aebe85ab09864cf3bef3bcf6f520d70b9e5c251280a2defe77cd5f3d6b64d938906317303a96955d8e3830af9ea03c1c

3 Assemble the complete request

curl --location --request POST 'https://zk-test.satori.finance/api/third/hot/order/create?clientOrderId=1725693490018&isLong=True&isMarket=True&lever=20&matchType=2&pairName=ETH-USD&positionType=3&price=3100&quantity=0.02&timestamp=1725693490018' \
--header 'APIKEY: st_fq6cvRF4fr5tnKiZfrIntRnLfrwxcXjcfr1y8FR7' \
--header 'X-SAPI-SIGN-TYPE: 2' \
--header 'signature: 0x7c8e2c2e5bfdd29f217e9bf1de4270c4c4aebe85ab09864cf3bef3bcf6f520d70b9e5c251280a2defe77cd5f3d6b64d938906317303a96955d8e3830af9ea03c1c' \
--header 'Content-Type: text/plain' \
--data ''

4 Return results

{
  "error": false,
  "code": 200,
  "msg": "SUCCESS",
  "data": {
    "pairName": "ETH-USD",
    "orderId": 178754443,
    "corderId": "1725693490018"
  },
  "sid": "1809520778222411777"
}

Error Code:

code

msg

2001

Illegal parameter:{param0}

2002

Required parameter:{param0}

2102

Insufficient balance:{param0}

2122

No hot assets have been frozen

2123

The amount to be frozen must be greater than 0

2124

Failed to process hot account

2201

Insufficient balance available

2301

Quantity cannot be less than {param0}

2302

Quantity cannot be greater than {param0}

2303

Lever cannot be less than {param0}

2304

Lever cannot be greater than {param0}

2305

The quantity of one-way positions cannot be greater than {param0}

2306

Total quantity of this contract positions cannot be greater than {param0}

2307

Contract stops trading

2310

The position margin mode is invalid, please try again.

2312

Decimal places out of limit

2316

10 minutes before delivery:Stop Open/Undo

2317

Order too small

2318

The hot account not support reverse position order!

2325

Position type not supported,Supported types are{param0}

2329

The server is updating, please wait a moment...

2330

No settlement coin found

2331

Market predict price was not obtained

Last updated