D8X
  • D8X TL;DR
    • D8X Overview
    • Onboarding
      • Pick your D8X Frontend
      • Get Funds on X Layer
      • Get Funds on zkEVM
  • Contribute & Earn
    • White-label D8X
    • Traders
    • Liquidity Providers
    • Refer Traders
    • Order Executors
    • Liquidators
    • Governors
    • D8X Trading Competition
      • Week 1: 16th March 2025
      • Week 2: 23rd March 2025
      • Week 3: 30th of March 2025
      • Week 4: 6th of April
      • Week 5: 13th of April
      • Week 6: 20th of April
  • Perpetual Contracts Guide
    • Overview
    • Order Types
    • Fee Structure
    • Profit/Loss & Position Marking
    • Liquidity Pools & Liquidity Provision
    • Liquidations
    • Oracles
  • Contracts
    • Berachain
    • Arbitrum
    • Polygon ZKEVM
  • D8X Token
    • What is $D8X?
    • Supply
    • Utility
  • Node SDK
    • Getting Started
    • Modules
      • Market Data
      • Parent Class PerpetualDataHandler
      • Traders
      • Liquidity Providers
      • Liquidators
      • Order Executors
      • White-Label Partners
    • Market data API
  • SECURITY
    • Audits
  • Contact
    • Brand assets
    • Contact us
Powered by GitBook
On this page
  1. Perpetual Contracts Guide

Order Types

Last updated 1 year ago

For each trade on D8X, the AMM is the counterparty. The smart contract supports market orders and conditional orders with limit price and trigger price. This allows for a variety of order types. The execution of conditional orders is performed via a third party that is remunerated for their service with a fee that is paid by the trader. The order execution is processed by the smart contract only if the conditions specified in the order are met and the order is cryptographically signed by the trader.

Order Type
Description

Market

A regular order is executed by the smart contract at the best price

Stop orders are path independent because they can be executed only if both conditions (limit price and trigger price) are met.

Market orders and stop market orders are similar to market orders with slippage protection and stop limit orders respectively, where the limit prices are set to an extreme and the difference that market orders are "fill-or-kill".

Market with Slippage Protection

A tight limit price specified in the order protects the market order against slippage. If the limit price is not met, the order execution fails and the order is removed.

Limit

The AMM only allows for orders to be executed that result in a price better or equal to the specified limit.

Stop Limit (Path Independent)

If a trigger price is specified, the AMM only allows the trade to go through if both trigger, and limit price are met. Stop orders on D8X are path independent, that is, both conditions (trigger and limit) have to be met at the same time for the order to go through.

Stop Market (Path Independent)

The trader can specify a loose limit price in combination with a trigger price to mimic a stop market order. The trader will still get the best price available at the time the trigger is met.

Reduce Only

Traders can combine a "close-only flag" with all of the order types to ensure that the order execution leads to a smaller position size.

Fill Or Kill

Traders can add a fill or kill flag which will delete the order from the order-book if the execution failed

Time Delayed Orders

Orders can specify a time delay with a timestamp, such that the order is not executed before the block-timestamp is higher than the provided timestamp. This allows for the construction of Time-Weighted Average Price (TWAP) orders.