Cancel Product Order
Last updated
Last updated
When no productIds are provided**:** 12 cancellations/min or 2 cancellations/sec per wallet. (weight=50)
When productIds are provided: 600 / (5 * total productIds) cancellations per minute per wallet. (weight=5*total productIds)
tx
object
Yes
tx.sender
string
Yes
Hex string representing the subaccount’s 32 bytes (address + subaccount name) of the tx sender.
tx.productIds
number[]
Yes
A list of product IDs to cancel orders for.
tx.nonce
string
Yes
signature
string
Yes
digest
string
No
Hex string representing a hash of the CancellationProducts
object.
The solidity typed data struct that needs to be signed is:
sender
: a bytes32
sent as a hex string; includes the address and the subaccount identifier
productIds
: a list of product Ids for which to cancel all subaccount orders. When left empty, orders from all products will be cancelled.
nonce
: used to differentiate between the same cancellation multiple times, and a user trying to place a cancellation with the same parameters twice. Sent as a string. Encodes two bit of information:
Most significant 44
bits encoding the recv_time
in milliseconds after which the cancellation should be ignored by the matching engine; the engine will accept cancellations where current_time < recv_time <= current_time + 100000
Least significant 20
bits are a random integer used to avoid hash collisions
For example, to place a cancellation with a random integer of 1000
, and a discard time 50 ms from now, we would send a nonce of (timestamp_ms() + 50) << 20 + 1000
Cancel product orders transaction object. See section for details on transaction fields.
Used to differentiate between the same cancellation multiple times. See section for more details.
Signed transaction. See section for more details.
See more details and examples in our page.
Success
Failure