OrderMatching
Last updated
Last updated
Order Matching
Name | Type | Required | Description |
---|---|---|---|
<a id="order>where the type Order
is
Name | Type | Required | Description |
---|---|---|---|
For example:
For more detail please refer to Golang example in SDK
type
String
yes
OrderMatching
accountId
yes
Initiator's account id. Only specific accounts can initiate this type of transaction on Layer3
subAccountId
yes
Initiator's subaccount id
taker
yes
taker order
maker
yes
maker order
feeToken
yes
Fee token, deducted from the initiator's subaccount
fee
yes
Fee returned via the estimateTransactionFee
API. The value should be packable
expectBaseAmount
yes
The maximum amount of base token that the initiator expects to be traded in this order matching, which cannot exceed the maximum amount that the maker and taker can actually trade. The value does not need to be packable
expectQuoteAmount
yes
The maximum amount of quote token that the initiator expects to be traded in this order matching, which cannot exceed the maximum amount that the maker and taker can actually trade. The value does not need to be packable
signature
yes
The pub key hash corresponding to the signature must be aligned with the initiator account
accountId
yes
The Account id
subAccountId
yes
The sub-account id
slotId
yes
slot id
nonce
Nonce
yes
slot nonce, Value range: [0, 2^24 - 1]
baseTokenId
yes
the base token, for example `BTC` in BTC/USDT pair
quoteTokenId
yes
The quote token, for example `USDT` in BTC/USDT pair
amount
String
yes
The string format of BigUint, the amount request in this order
price
yes
The string format of BigUint, the price request in this order, the value can't be zero
isSell
u8
yes
1:seller, 0: buyer
feeRates
[u8, u8]
yes
the fee of [maker, taker], 100 means 1.0%, the maximum 2.56%
hasSubsidy
u8
yes
1: true, 0: false. If maker has subsidy, the submitter will give maker subsidy
signature
yes
The ZkLink signature of this order