AutoDeleveraging
Name
Type
Required
Description
type
String
yes
The value is "AutoDeleveraging"
oraclePrices
struct
yes
contains all infomation about contract price and margin price
adlSize
BigUint
yes
The ADL size, the value can't be zero
signature
yes
The pub key hash corresponding to the signature must be aligned with the initiator account
where the ContractPrice and SpotPriceInfo defined as below:
For example:
{
"type": "AutoDeleveraging",
"accountId": 0,
"subAccountId": 0,
"subAccountNonce": 0,
"oraclePrices": {
"contractPrices": [
{
"pairId": 1,
"marketPrice": "100"
}
],
"marginPrices": [
{
"tokenId": 1,
"price": "100"
}
]
},
"adlAccountId": 0,
"pairId": 0,
"adlSize": "0",
"adlPrice": "0",
"fee": "100",
"feeToken": 1,
"signature": {
"pubKey": "0x43cbec0bf142a942df9db99d27bd4ceeb8f4e75f9444b4cee4e3170965854404",
"signature": "366e759d61a5052073e13147ed3e8e1642dfea10cd423bbb9a795932a15a4c122fa5e71c35a7d59198fa2d7ed28bb1f44e5c5392049607347855243ddc027d00"
}
}Sign autoDeleveraging
For more detail please refer to Golang example in SDK
For more detail please refer to javascript example
Last updated
Was this helpful?