Submit a signed order to the Orderbook.
In order to replace an existing order with a new one, the appData
must contain a valid replacement order
UID,
then the indicated order is cancelled, and a new one placed. This
allows an old order to be cancelled and a new one to be created in one
atomic operation with a single signature.
Related docs:
The order to create.
Data a user provides when creating a new order.
see OrderParameters::sellToken
"0x6810e776880c02933d47db1b9fc05908e5386b96"
see OrderParameters::buyToken
"0x6810e776880c02933d47db1b9fc05908e5386b96"
see OrderParameters::sellAmount
"1234567890"
see OrderParameters::buyAmount
"1234567890"
see OrderParameters::validTo
see OrderParameters::feeAmount
"1234567890"
see OrderParameters::kind
buy, sell see OrderParameters::partiallyFillable
How was the order signed?
eip712, ethsign, presign, eip1271 A signature.
"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
This field comes in two forms for backward compatibility. The hash form will eventually stop being accepted.
"{\"version\":\"0.9.0\",\"metadata\":{}}"
see OrderParameters::receiver
"0x6810e776880c02933d47db1b9fc05908e5386b96"
see OrderParameters::sellTokenBalance
erc20, internal, external see OrderParameters::buyTokenBalance
erc20, internal If set, the backend enforces that this address matches what is decoded as the signer of the signature. This helps catch errors with invalid signature encodings as the backend might otherwise silently work with an unexpected address that for example does not have any balance.
"0x6810e776880c02933d47db1b9fc05908e5386b96"
Orders can optionally include a quote ID. This way the order can be linked to a quote and enable providing more metadata when analysing order slippage.
May be set for debugging purposes. If set, this field is compared to what the backend internally calculates as the app data hash based on the contents of appData. If the hash does not match, an error is returned. If this field is set, then appData MUST be a string encoding of a JSON object.
"0x0000000000000000000000000000000000000000000000000000000000000000"
If set to true, full sell amount will be checked during allowance and balance checking. This will ensure the account has correct allowance and available balance for the order to be created.
Order has been accepted.
Unique identifier for the order: 56 bytes encoded as hex with 0x
prefix.
Bytes 0..32 are the order digest, bytes 30..52 the owner address and
bytes 52..56 the expiry (validTo) as a uint32 unix epoch timestamp.
"0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a"