Order Types

An Order is a set of instructions to buy or sell an asset on a decentralized exchange to preconfigured conditions.

Simply put, with orders you can buy and sell your latest Memecoins.

OrbTrader supports different order types which are so far only available in traditional finance and not on decentralized exchanges. Please make sure you understand the order types listed here, as they give you a very nice tool set for professional risk and position management.

In the below picture you see how to create new orders for a position. The type field lets you select the different order types explained below.

Important: There is no price on a Decentralized Exchange

A little forward might be necessary here, to understand the following order types. In general most decentralized exchanges like Uniswap, Sushiswap, Pancake, etc. (and all we support for now) work with the famous y * x = k model. For a technical very good explanation, read here more about that: https://dev.to/learnweb3/how-do-dexs-work-understand-uniswap-v1-by-deep-diving-into-the-math-and-code-learn-the-xyk-amm-curve-46hb or for a short version, read here: https://www.gemini.com/cryptopedia/amm-what-are-automated-market-makers#section-constant-product-formula

Why is this important for the orders? Because actually there is no price on a decentralized exchange. When you have 1 Billion token X and the current price is 0.01 ETH per token X, that doesnt mean, you will get 10.000.000 ETH for them. The amount you get depends on the above mentioned y * x = k formula and will in most cases decrease when you try to sell many tokens.

Most frontends like Uniswap refer to the decrease or increase in price as slippage.

Internally our orders always work with the exact amounts measured in the smallest unit WEI and zero slippage.


You buy 1.000 token X for 1 ETH. Your position is now worth 1 Eth.

Now some swaps happen, people buy more token X, OrbAnalytics sees all this swaps in real time and the value of your position is rising because in the liquidity pool are less X token and more ETH.

After each swap on chain, OrbTrader "simulates" that you swap your X token for ETH and checks, how much ETH you would get. This works basically because we know all the liquidity reserves and can reverse the y * x = k formula to tell you exactly at any point of time, the amount you would get.

Now your position is worth like 2 ETH, we see that due to our simulation, and can trigger the pending Order like a take profit to automatically sell your token.

We support different order types mentioned below, but the all always work based on this concept.

Order Types

In general there are two different types of orders. "Market orders" which will be executed immediately for the best available price and "Pending orders" also known as "Limit orders" which might have different constraints like a trigger price or a date.

  • Market Buy: This order buys the requested amount of token for the currently best available price in the liquidity pool with the most liquidity.

  • Market Sell: This order sells the given amount of token for the currently best available price in the liquidity pool with the most liquidity.

  • Take Profit: This order sells the requested amount of token with a market sell order when the total worth of the position hits a certain threshold. You can either close the whole position or a limited amount. When entering the take profit, you can set the trigger price, for technical traders who work with chart analysis, or you can just set a percentage value like 100% so double your money.

  • Stop Loss: This is basically the same as the take profit. It closes your position when the value of the position falls below a certain threshold value. That way you can manage your risks like a professional trader.

  • Trailing Stop: The trailing stop is a very interesting one especially for crypto token. Lets say you have a hyped new memecoin which is pumping like crazy and you want the max returns without risking losing your already made profits. Then you would define a trailing stop of like 10% and it automatically moves with the price of the asset. That way you can protect your gains and still profit from future price increases.

  • Buy Limit: This order buys the given amount of token for a maximum price which is below the current price. You would use it if you expect a dip to happen before you want to buy.

  • Buy Stop: This order buys the given amount of token for a maximum price which is higher then the current price, but only gets activated when the given trigger price is hit. This is for traders who expect a token price to rise to a certain resistance level in the chart, then fall again to the support, and then buy it.

Order Expiration

OrbTrader supports the following order expiration times.

  • immediate-or-cancel (IOC): This order gets executed right now or will be removed. This is our default order type and suitable for most orders.

  • good-'til-canceled (GTC): This order is valid until it is manually removed by the user. This makes sense when you have a certain market estimation which might change due to random external events like the SEC Gary running wild again.

  • good-'til-date (GTD): This order is valid until a given date. This order can be useful if you know that at certain events like a FED meeting, things might change.

You can use this order expirations together with the above order types to create other advanced order combinations known from traditional markets like fill-or-kill (FOK) or all-or-none (AON).

The future is bright...

We are also working on partially executing orders over different routes and liquidity pools and more advanced stuff like TWAP executions, direct order matching and orderflow management. This is more for professional investors and traders and will be announced soon. But offering you the best and fastest executions in the DeFi space is our ambitious goal.

Last updated