Order Types

Market Order

Market order executes immediately at the current best available price, aiming for the fastest possible transaction completion. This type of order is best for users who prioritize the speed of execution over achieving a specific price and who seek to quickly open or close positions.

BUY order fulfill price = current oracle price * (100% + price spread)

SELL order fulfill price = current oracle price * (100% - price spread)

User can set the slippage (and thereby set the stop price) of the market order

stop price =

BUY order: UI current price * (100% + slippage%)

SELL order: UI current price * (100% - slippage%)

market order execution will fail if

BUY order: fulfill price > stop price

SELL order: fulfill price < stop price

Limit Order

Limit order functions as a command to buy or sell an asset at a specified price or better. Unlike market orders, which execute immediately at the current market price, limit orders are set at a predetermined price and only execute when the market price meets or exceeds this price threshold. This mechanism offers traders control over their entry and exit points in highly volatile perp markets, allowing for strategic placement of trades relative to their market outlook and risk tolerance.

In Drake, user send a limit order specifying the fulfill price. Drake sets the order’s trigger price accordingly

BUY order trigger price = fulfill price * (100% - price spread)

SELL order trigger price = fulfill price * (100% + price spread)

(see price spread section for details)

(The order will be executed as market order immediately if the current price has already reached trigger price.)

The limit order then will be appended to the user’s portfolio. Once the token price has reached the trigger price, Drake will execute the order using the fulfill price.

Stop Market Order

Stop market order is a type of order that becomes active and turns into a market order only when the market price reaches a predetermined trigger price. This order type is primarily used as a risk management tool, allowing traders to limit potential losses or protect profits in highly volatile markets.

In Drake, user sends a stop market order specifying the trigger price and the slippage. Drake sets the order’s stop price accordingly based on the current price and the slippage.

(The order will be executed as market order immediately if the current price has already reached trigger price.)

stop price =

BUY order: UI current price * (100% + slippage%)

SELL order: UI current price * (100% - slippage%)

market order execution will fail if

BUY order: fulfill price > stop price

SELL order: fulfill price < stop price

The stop market order then will be appended to the user’s portfolio. Once the token price has reached the trigger price, Drake will execute the order as a market order with fulfill price:

BUY order fulfill price = current oracle price * (100% + price spread)

SELL order fulfill price = current oracle price * (100% - price spread)

(see price spread section for details)