Order structure
price: price of the quote asset (for example 2801.23)
if the order is passive, the order will be placed into the book at this price
if the order removes liquidity from the book (ie. is non-passive), the order will be matched against orders in the book till the protection price (slippage).
quantity: matchable amount of order
can be expressed as the quantity of the base token (base_qty) or quote token (quote_qty)
maker: address of the trader
constraints:
number_of_swaps_allowed: specify the maximum amount of trades the taker order can allow after it becomes unmatchable
duration_valid: amount of seconds after created_time order is valid
created_time: epoch time in seconds for when the order was created
As each trade will cost gas, this number_of_swaps_allowed limitation allows the taker to limit gas consumption by specifying the maximum amount of swaps allowed on their order. Currently the max number clients can set equals to 255
Exchange doesn't accept stale orders or orders that have created_time in the future. If you encounter issues please check if your machine clock aligned with the world clock
stp:
NONE = 0
EXPIRE_TAKER = 1
EXPIRE_MAKER = 2
EXPIRE_BOTH = 3
nonce:
orders that have nonces lower than the one defined by the user in the contract are considered invalid and cannot be matched (contract will fail to match it on rollup phase)
min_receive_amount: slippage semantic, applicable only for taker Router orders
router_signer: address that signs this order on behalf of the Router, set to 0x0 in case of no router
flags:
full_fill_only: specify if the order must be fully filled or it will be cancelled
best_level_only: specify if the order can be filled only on the current best level
post_only: can order be passive
is_sell_side: order side
is_market_order: is the order a limit order or a market order
to_ecosystem_book:
True -> order matchable only in the Ecosystem Book
False -> order matchable only in the Router Book
external_funds: source of funds to perform the trade:
True -> funds are from the balance of erc20 token
False -> funds are from the balance on the Exhcange
ticker: ticker
the first symbol corresponds to the base token
the second symbol corresponds to the quote token
fee: order fees
specify how much taker/maker fixed fees goes to the Exchange
specify how much taker fixed fees goes to the Router
specify how much gas fees goes to the Exchange for taker orders
Note: passive orders do not incur any gas fees
salt: random salt provided by the user
sign: sign of order hash of its typed message by order_signer private key
router_sign: sign of order hash of its typed message by router_signer private key
source: order origin, from where order originates (for example "layerakira" or any other frontend)
Last updated