Batch create orders
method url: /api/third/hot/order/batchCreate
request type:POST
data type:application/json
need sign:true
detail:
request example:
{
"orders": [
{
"clientOrderId": "",
"isLong": true,
"isMarket": true,
"lever": 0,
"matchType": 0,
"pairName": "",
"positionType": 0,
"price": "",
"quantity": ""
}
],
"timestamp": ""
}
request param:
param_name
param note
type
required
data type
schema
orders
order list (limit 20)
true
array
order
param_name
param note
type
required
data type
schema
clientOrderId
true
string
isLong
true
boolean
isMarket
true
boolean
lever
true
integer
matchType
1 GTC ;2 IOC ;3 FOK ;4 POST_ONLY ;
true
integer
pairName
true
string
positionType
3 one-way isloate 4 one-way cross
true
integer
price
false
string
quantity
true
string
timestamp
true
string
Accept-Language
zh-CN、en-US、
header
false
string
APIKEY
header
true
string
signature
header
true
string
response param【list】:
param_name
param note
type
schema
cOrderId
string
orderId
integer(int64)
pairName
string
example:
1 Set request parameters, json body[No spaces.]:
{"orders":[{"clientOrderId":"1725696393685","isLong":true,"isMarket":true,"lever":20,"matchType":2,"pairName":"ETH-USD","positionType":3,"price":"3100","quantity":"0.02"},{"clientOrderId":"1725696393685","isLong":false,"isMarket":false,"lever":1,"matchType":1,"pairName":"ETH-USD","positionType":3,"price":"3500","quantity":"0.02"},{"clientOrderId":"1725696393685","isLong":false,"isMarket":false,"lever":1,"matchType":1,"pairName":"ETH-USD","positionType":3,"price":"3500","quantity":"0.02"}],"timestamp":"1725696393685"}
2 Sign the json string, result:
0x89d41d5762b114bfc2a698f1af59f622e93249a3228dfef07970f7d975e919fb12c339db8f628252773d00aa68b10732ffd45424976950e47db0da874bc7cc6a1b
3 Assemble the complete request
curl --location 'https://zk-test.satori.finance/api/third/hot/order/batchCreate' \
--header 'APIKEY: st_fq6cvRF4fr5tnKiZfrIntRnLfrwxcXjcfr1y8FR7' \
--header 'X-SAPI-SIGN-TYPE: 2' \
--header 'signature: 0x89d41d5762b114bfc2a698f1af59f622e93249a3228dfef07970f7d975e919fb12c339db8f628252773d00aa68b10732ffd45424976950e47db0da874bc7cc6a1b' \
--header 'Content-Type: application/json' \
--data '{"orders":[{"clientOrderId":"1725696393685","isLong":true,"isMarket":true,"lever":20,"matchType":2,"pairName":"ETH-USD","positionType":3,"price":"3100","quantity":"0.02"},{"clientOrderId":"1725696393685","isLong":false,"isMarket":false,"lever":1,"matchType":1,"pairName":"ETH-USD","positionType":3,"price":"3500","quantity":"0.02"},{"clientOrderId":"1725696393685","isLong":false,"isMarket":false,"lever":1,"matchType":1,"pairName":"ETH-USD","positionType":3,"price":"3500","quantity":"0.02"}],"timestamp":"1725696393685"}'
4 Return results
{
"error": false,
"code": 200,
"msg": "SUCCESS",
"data": [{
"pairName": "ETH-USD",
"orderId": 178785303,
"corderId": "1725696393685"
}, {
"pairName": "ETH-USD",
"orderId": 178785304,
"corderId": "1725696393685"
}, {
"pairName": "ETH-USD",
"orderId": 178785305,
"corderId": "1725696393685"
}],
"sid": "1809523822859296769"
}
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{0}
2329
The server is updating, please wait a moment...
2330
No settlement coin found
2331
Market predict price was not obtained
Last updated