Skip to content

Latest commit

 

History

History
60 lines (47 loc) · 1 KB

7-auto-deleveraging.md

File metadata and controls

60 lines (47 loc) · 1 KB

type ContractPrice

ContractPrice(
    int pairId,
    String marketPrice,
)

input:

  • pairId: The contract pair id defined by zkLink.
  • marketPrice: The market price of the contract pair

type SpotPriceInfo

SpotPriceInfo(
    int tokenId,
    String price,
)

input:

  • tokenId: The token id defined by zkLink.
  • price: The spot price of the token.

type AutoDeleveraging

AutoDeleveraging transaction type.

AutoDeleveraging(
    int accountId,
	int subAccountId,
	int subAccountNonce,
	List<ContractPrice> contractPrices,
	List<SpotPriceInfo> marginPrices,
	int adlAccountId,
	int pairId,
	String adlSize,
	String adlPrice,
	String fee,
	int feeToken,
)

func sign

void sign(ZkLinkSigner zkLinkSigner)

Sign transaction with given ZkLinkSigner

func toJson

String toJson()

Get the json str of AutoDeleveraging