[Position] Query position list
method url:/api/third/hot/order/selectContractPositionList
request type:POST
content type:application/x-www-form-urlencoded
need sign:true
detail:
request param:
param_name
param note
type
required
data type
schema
pairName
query
true
string
pageNo
query
false
integer(int64)
pageSize
limit 100
query
false
integer(int64)
timestamp
query
true
string
response param:(list)
param_name
param note
type
schema
amount
number
closingQuantity
number
contractPairId
integer(int64)
createTime
string(date-time)
createTimeStamp
integer(int64)
entrustId
integer(int64)
id
integer(int64)
isLong
true/false
boolean
lever
integer(int32)
lossPrice
number
lossType
0_none;1_current price;2_mark price;
integer(int32)
marginAmount
number
marginCallAmount
number
openingPrice
number
positionType
3 one-way isloate 4 one-way cross
integer(int32)
profitPrice
number
profitType
0_none;1_current price;2_mark price;
integer(int32)
quantity
number
realizedPnl
number
remainingCloseQuantity
number
restrictPrice
number
status
1 Holding position; 2 Capital fee settlement;
integer(int32)
symbol
string
tariffAmount
number
unrealizedPnl
number
isDual
boolean
faceMultiplier
number
accountCoinId
integer(int64)
accountCoinSymbol
string
accountSettleDecimal
integer(int32)
tradeCoinDecimal
integer(int32)
lights
the auto reduce mark
integer(int32)
isDelivery
boolean
deliveryTime
string(date-time)
deliveryTimeStamp
integer(int64)
settleShowDecimal
integer(int32)
tradeCoinIcon
string
settleCoinIcon
string
example:
1 Set request parameters, query params:
pairName:ETH-USD
timestamp:1714987964592
pageNo:1
pageSize:1
2 Build the Parameters
pageNo=1&pageSize=2&pairName=ETH-USD×tamp=1725868384990
3 Sign the parameter string format, result:
0x5b074aac7a618b9b8f6b38228d78e871e9e65b2d72eb179a7dc117f4b35988bf0f06780649fc8682769b98d409aa9b983c24adb30d7e64b4ae4f95c428c8598e1c
4 Assemble the complete request
curl --location --request POST 'https://zk-test.satori.finance/api/third/hot/order/selectContractPositionList?pageNo=1&pageSize=2&pairName=ETH-USD×tamp=1725868384990' \
--header 'APIKEY: st_fq6cvRF4fr5tnKiZfrIntRnLfrwxcXjcfr1y8FR7' \
--header 'X-SAPI-SIGN-TYPE: 2' \
--header 'signature: 0x5b074aac7a618b9b8f6b38228d78e871e9e65b2d72eb179a7dc117f4b35988bf0f06780649fc8682769b98d409aa9b983c24adb30d7e64b4ae4f95c428c8598e1c' \
--header 'Content-Type: text/plain' \
--data ''
5 Return results
{
"error": false,
"code": 200,
"msg": "SUCCESS",
"data": [
{
"id": 4796701,
"positionType": 3,
"entrustId": 178754443,
"contractPairId": 1,
"symbol": "ETH-USD",
"isDual": null,
"faceMultiplier": null,
"accountCoinId": null,
"accountCoinSymbol": null,
"accountSettleDecimal": null,
"tradeCoinDecimal": null,
"isLong": true,
"openingPrice": "2300.045",
"quantity": "0.06",
"closingQuantity": "0",
"remainingCloseQuantity": "0.06",
"amount": "138.0027",
"marginCallAmount": "7.5",
"tariffAmount": "-0.179974",
"lever": 20,
"marginAmount": "47.390168",
"restrictPrice": "1547.709113",
"unrealizedPnl": null,
"realizedPnl": null,
"profitType": 0,
"profitPrice": "0",
"lossType": 0,
"lossPrice": "0",
"lights": 5,
"status": 1,
"createTime": "2024-09-07 07:18:13",
"createTimeStamp": null,
"isDelivery": null,
"deliveryTime": null,
"deliveryTimeStamp": null,
"settleShowDecimal": null,
"tradeCoinIcon": null,
"settleCoinIcon": null
}
],
"sid": "1809704168838144001"
}
Error Code:
code
msg
2001
Illegal parameter:{param0}
Last updated