Einax Order types (BETA)

Mike Faber
3 min readDec 3, 2018

--

An order is an instruction to buy or sell on a token. These instructions can be simple or complicated and are sent directly to einax Exchange via web API.

1. Limit Buy Order

Limit Buy order is the simplest instruction telling exchange to Buy X amount of Tokens paying Y for each, where X — is amount to buy and Y — the price you willing to pay. After placing such order X*Y amount of liquidity will be locked on your account and order will be queued for execution. If you do not have enough liquidity to finance this order — an error will be displayed.

As soon as your order will be queued it will either be immediately matched with another order or placed in the order book as a “market maker” and will be displayed to other traders. Limit buy orders have the option to be “maker only”, meaning it will not be immediately matched with other orders. However, for testing purposes, this flag is disabled in the beta user interface.

2. Limit Sell Order

Limit Sell order is quite similar to Limit buy order. Upon placing Limit Sell order you are giving einax an instruction to sell X tokens for Y liquidity each. After placing Limit Sell order X tokens are locked on your account and your order will be queued for execution with the same rules as Limit Buy Order

3. Market Buy Orders

3.1 “Buy Me X tokens” — a simple instruction that orders einax to try and buy X amount of tokens regardless of the current price. As soon as such order is placed all your liquidity is being locked on your account and your order is queued for execution. As soon as such order registered it will begin buying from orders available in order book starting from that with the lowest price and earliest time of placement. Buying will be continued until X amount of tokens will be bought or user liquidity balance will reach 0. This option must be used with extreme caution and prior consideration as it can easily deplete your ETH or BTC balance.

“Buy Me X tokens” order will continue execution until one of the following conditions are met:

  • X tokens have been bought
  • There are no more sell orders available in the order book (in this case remaining liquidity balance will be returned to your available balance)
  • Liquidity balance is depleted (in this case you will receive less than X tokens for your order)

3.2 “Buy me tokens with X budget” — an instruction that orders einax to try and buy as many tokens as it is possible from cheapest orders in order book while spending no more then X of liquidity in the process. This is a safer version of “Buy me X tokens” order and will only continue buying tokens until certain liquidity threshold is met. It will never spend more liquidity then you are willing to spend.

4. Market Sell Orders

4.1 “Sell X tokens” — an instruction to sell X tokens using the prices available in open buy orders. As soon as Sell X tokens order received it will be immediately executed (i.e. X tokens will be sold to the highest bidders in the order book). Order execution will continue until one of the following conditions are met:

  • X tokens are sold to buyers
  • There are no more buyers to sell to (in this case — remaining unsold tokens are returned to your available balance)

4.1 “Sell tokens to receive X” — will instruct einax to sell tokens using the prices available in open buy orders until X liquidity has been acquired or all available tokens are sold. This order also has the potential to nullify your token balance if you won’t be careful. Order execution will continue until one of the following conditions are met:

  • X liquidity have been acquired during order execution
  • There are no more buyers to sell to (in this case — remaining unsold tokens are returned to your available balance)
  • There are no tokens left on your balance (in this case you will receive less than X amount of liquidity for your sell order)

IMPORTANT NOTICE:

EINAX WEB APPLICATION (WEBSITE) RECEIVES ORDER BOOK UPDATES EVERY SECOND BUT CAN NOT ACCOUNT FOR INFORMATION PROPAGATION DELAYS. THIS MEANS THAT WHAT YOU SEE IN ORDER BOOK MAY BE NOT REPRESENT THE REAL ORDER BOOK STATE. ALL NUMBERS PREFIXED WITH “~” SYMBOL BEING CALCULATED IN YOUR BROWSER USING LATEST RECEIVED ORDER BOOK STATE AND MAY VARY SIGNIFICANTLY AFTER ORDER EXECUTION.

Stop loss and other trigger-based programmable orders will be released at a later date.

--

--