Skip to main content
All CollectionsPerpetualsOrders
Perpetual order types on dYdX Chain
Perpetual order types on dYdX Chain

Perpetual order types on dYdX Chain

dYdX Operations Services Ltd. avatar
Written by dYdX Operations Services Ltd.
Updated over a month ago

As part of the default settings of the v4 open source software (”dYdX Chain”), dYdX Chain supports 6 different order types:

  • Market Order

  • Limit Order

  • Stop Market Order

  • Stop Limit Order

  • Take Profit Market Order

  • Take Profit Limit Order

Market Order

What is A market order and how it works:

A Market Order is an order to buy or sell a given asset and will execute immediately at the best price dependent on the liquidity on the other side of the order book. By default, the front end submits market orders as Immediate-or-Cancel orders, meaning the order will fill immediately (matched against the other side of the order book) and any part that isn’t filled will be canceled. Market orders are also used to close positions. For closing positions, the order is submitted as an Immediate-or-Cancel order. To place a Market Order, traders can:

How to place a Market order:

To place a market order:

  1. Select Market in the trade box

  2. Select Buy or Sell

  3. Enter an Amount to trade or drag the Leverage Slider to the desired position leverage

Definitions:

Amount - this is the amount to buy or sell. This is the amount a trader’s position will increase or decrease by when the order is filled, not the trader’s resulting position amount.

Leverage — Leverage controls how much of a trader’s position is borrowed. The higher the leverage is, the smaller the trader’s margin deposit is and the more funds are borrowed to open a position. Borrowing more funds is riskier, amplifying both a trader’s gains and losses, while also giving positions a riskier liquidation price.

Limit Order

What is Limit Order and how it works:

A Limit Order is an order to buy or sell a given asset at a specified (or better) price. A limit order to buy will only execute at the limit price or lower, and a limit order to sell will only execute at the limit price or higher. To place a Limit Order, traders can:

How to place a Limit order:

To place a Limit order:

  1. Select Limit in the trade box

  2. Select Buy or Sell

  3. Enter an Amount - this is the total trade size

  4. Enter a Limit Price - this sets the maximum or minimum price at which a trader is willing to buy or sell, this order can only be filled at the specific limit order or better.

NOTE:

Limit orders have a default Good Til Date of 28 days which can be changed.

Advanced Limit Order Options

As part of the default settings of the v4 open source software, traders can also use advanced options such as Good-Til-Date, Immediate or Cancel, or Post-Only. When selecting a limit order, traders can expand the Advanced section to reveal the following Time in Force and Execution policies:

  • Good Til Date: This order will be placed on the order book and automatically expires at the specified date.

  • Immediate-or-Cancel: This order will fill immediately (matched against the other side of the order book) and any part that isn’t filled will be canceled.

  • Post-Only: This order is either placed in the order book or cancelled if any part of the order matches an existing order. The Post-Only option guarantees that the trader will will pay the maker fee and not the taker fee.

Stop Market Order

What is a Stop Market order and how it works:

A Stop Market Order protects against losses by closing a trader’s position once the Oracle Price or the last traded price* crosses the trigger price. The trigger price can be triggered by either the Oracle Price or the last traded price*. Stop market orders can be used to limit losses on a trader’s positions by automatically closing them when the price falls below (for longs) or rises above (for shorts) the trigger price.

Once triggered, the resulting market order will be immediately filled at the best price on the books.

How to place a Stop Market Order:

To place a Stop market order:

  1. Select Stop Market under the Stop dropdown menu

  2. Select Buy or Sell

  3. Enter an Amount - this is the total trade size

  4. Enter the desired Trigger Price - the order will trigger when the Oracle Price reaches this amount

*Remember! The last traded price in a confirmed block is clamped by a min and max PPM value from the oracle price. This is used to protect users and prevent conditional orders from being triggered by the last traded price when it drifts significantly from the oracle price. Proto

Advanced Stop Market Order Options

As part of the default settings of the v4 open source software, traders can edit the Good Til Time under the Advanced section in the trade box.

Max slippage is 10% for all markets.

Traders may have multiple stop orders open for a given position.

Stop Limit Order

What is a Stop Limit order and how it works:

A Stop Limit Order will execute only when the Oracle Price or the last traded price* crosses a specified Trigger Price. The trigger price can be triggered by either the Oracle Price or the last traded price*. Stop limit orders can be used to limit losses on a trader’s positions by automatically closing them when the price falls below (for longs) or rises above (for shorts) the trigger price.

Once triggered, the resulting limit order may either be immediately filled or may rest on the orderbook at the limit price. The limit price operates exactly the same as for normal limit orders.

How to place a Stop Limit Order:

To place a Stop limit order:

  1. Select Stop Limit under the Stop dropdown menu

  2. Select Buy or Sell

  3. Enter an Amount - this is the total trade size

  4. Enter the desired Trigger Price - the order will trigger when the Oracle Price reaches this amount

  5. Enter the desired Limit Price - this will be the limit price of the limit order that is placed once the stop order triggers

*the last traded price in a confirmed block is clamped by a min and max PPM value from the oracle price. This is used to protect users and prevent conditional orders from being triggered by the last traded price when it drifts significantly from the oracle price. Proto

Advanced Stop Limit Order Options

As part of the default settings of the v4 open source software, traders can also use advanced options such as Good-Til-Date, Immediate or Cancel, or Post-Only.

Traders may have multiple stop orders open for a given position.

Take Profit Market Order

Take Profit Market orders allow traders to set targets and protect profits on positions by specifying a price at which to close an open position for profit. Take profit market orders lock in profits by closing a trader’s position once the Oracle Price or last traded price* crosses the trigger price.

For a long position, a trader places a stop above the current market price. For a short position, a trader places the stop below the current market price. Stop limit orders can be used to limit losses on a trader’s positions by automatically closing them when the price falls below (for longs) or rises above (for shorts) the trigger price.

How to place a Take Profit Market Order:

To place a Take profit market order:

  1. Select Take Profit Market under the Stop dropdown menu

  2. Select Buy or Sell

  3. Enter an Amount - this is the total trade size

  4. Enter the desired Trigger Price

*Remember! The last traded price in a confirmed block is clamped by a min and max PPM value from the oracle price. This is used to protect users and prevent conditional orders from being triggered by the last traded price when it drifts significantly from the oracle price. Proto

Advanced Take Profit Market Order Options

As part of the default settings of the v4 open source software, traders can edit the Good Til Time under the Advanced section in the trade box.

The default max slippage is 10% for all markets.

Take Profit Limit Order

What is a Take profit Market order and how it works:

Take Profit Limit orders allow traders to set targets and protect profits on positions by specifying a price at which to close an open position for profit. Take profit limit orders enable profit taking like take profit market orders, but with the versatility and control of a limit order.

For a long position, a trader places a take profit limit above the current market price. For a short position, a trader places the trigger below the current market price. If the Oracle Price or last traded price* rises/drops to take-profit point, the T/P order changes from 'Untriggered' -> 'Open', and then behaves as a traditional limit order. Take-profit orders are best used by short-term traders interested in managing their risk. This is because they can get out of a trade as soon as their planned profit target is reached and not risk a possible future downturn in the market.

*the last traded price in a confirmed block is clamped by a min and max PPM value from the oracle price. This is used to protect users and prevent conditional orders from being triggered by the last traded price when it drifts significantly from the oracle price. Proto

How to place a Take Profit Limit Order:

To place a Take profit limit order:

  1. Select Take Profit Limit under the Stop dropdown menu

  2. Select Buy or Sell

  3. Enter an Amount - this is the total trade size

  4. Enter the desired Trigger Price

  5. Enter the desired Limit Price

Advanced Take Profit Limit Order Options

As part of the default settings of the v4 open source software, traders can edit the Good Til Time under the Advanced section in the trade box. Traders can also add options like Default (Good-Til-Date), Immediate-Or-Cancel, or Post-Only.

  • Default (Good Til Date) - This order will be placed on the order book and automatically expires at the specified date. This option is not available for stop / take profit market orders.

  • Immediate-or-Cancel - This order will fill immediately (matched against the other side of the order book) and any part that isn’t filled will be canceled.

  • Post-Only - This order is either placed in the order book or cancelled if any part of the order matches an existing order. The Post-Only option guarantees that the trader will will pay the maker fee and not the taker fee.

Disclaimer and Terms

This document may provide information with respect to the dYdX Chain software, and/or non-mandatory guidelines and suggestions that may help with using dYdX Chain software. dYdX Operations Services Ltd. does not run dYdX Chain validators nor operate or control the dYdX Chain network. dYdX Operations Services Ltd. is not responsible for any actions taken by other third parties who use dYdX Chain software. dYdX Operations Services Ltd. services and products are not available to persons or entities who reside in, are located in, are incorporated in, or have registered offices in the United States or Canada, or Restricted Persons (as defined in the Terms of Use). The content provided herein does not constitute, and should not be considered, or relied upon as, financial advice, legal advice, tax advice, investment advice or advice of any other nature, and you agree that you are responsible to conduct independent research, perform due diligence and engage a professional advisor prior to taking any financial, tax, legal or investment action related to the foregoing content. The information contained herein, and any use of products or services provided by dYdX Operations Services Ltd., are subject to the Terms of Use.

Did this answer your question?