AutoDeleveraging
AutoDeleveraging encode
Name | Rule |
---|---|
type | 1byte with the value |
accountId | 4 bytes |
subAccountId | 1 byte |
subAccountNonce | 4 bytes |
oraclePrices | 31 bytes, encode the |
adlAccountId | 4 bytes |
pairId | 1 byte |
adlSize | 5 bytes, refer to |
adlPrice | 15 bytes, encode to big endian bytes, then pass to the |
fee | 2 bytes, refer to |
feeToken | 2 bytes |
ContractPrice encode
Name | Rule |
---|---|
pariId | 1 byte |
marketPrice | 15 bytes, encode in big endian, then pass to the |
MarginPrice encode
Name | Rule |
---|---|
tokenId | 2 byte, change to |
marketPrice | 15 bytes, encode in big endian, then pass to the |
Example
For the auto deleveraging as below:
Last updated