Add/reduce margin

method url:/api/third/order/callMarginAmount

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

positionId

query

true

integer(int64)

call

add-true;reduce-false

query

true

boolean

marginAmount

query

true

string

timestamp

query

true

string

response param:

param_name

param note

type

schema

data

boolean

example:

1 Set request parameters, query params:

call:True
marginAmount:10
positionId:4796701
timestamp:1725865751805

2 Build the Parameters

call=True&marginAmount=10&positionId=4796701&timestamp=1725865751805

3 Sign the parameter string format, result:

0x3e7a622d3319fe5abff048ade714170c01b5d1b3d9c3b0e40e89fce896a9807a5e396145575e34dbb562637481efa9acb5b62f9a53382ec4329753042866a2651c

4 Assemble the complete request

curl --location --request POST 'https://zk-test.satori.finance/api/third/order/callMarginAmount?call=True&marginAmount=10&positionId=4796701&timestamp=1725865751805' \
--header 'APIKEY: st_fq6cvRF4fr5tnKiZfrIntRnLfrwxcXjcfr1y8FR7' \
--header 'X-SAPI-SIGN-TYPE: 2' \
--header 'signature: 0x3e7a622d3319fe5abff048ade714170c01b5d1b3d9c3b0e40e89fce896a9807a5e396145575e34dbb562637481efa9acb5b62f9a53382ec4329753042866a2651c' \
--header 'Content-Type: text/plain' \
--data ''

5 Return results

{
    "error": false,
    "code": 200,
    "msg": "SUCCESS",
    "data": true,
    "sid": "1809701408555147265"
}

Error Code:

code

msg

1001

system error:{param0}

2001

Illegal parameter:{param0}

2002

Required parameter:{param0}

2008

Frequent requests:{param0}

2102

Insufficient balance:{param0}

2104

Position expired

2105

Insufficient position margin

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

2315

Margin calls are not allowed in this mode

Last updated