Apex Docs
  • Overview
  • How it works
    • The Basics of Perpetual Futures and Perpetual Protocol
    • APEX Limit Order Design
    • Comparison with order book exchanges
  • User Guide
    • Add xDai Chain to Your Wallet
    • Acquiring xDAI tokens
    • Getting USDC on xDai
    • Interacting with xDai
    • Spawn your smart wallet
    • Funding your smart wallet
    • Approve Spend
    • Fees
    • Creating Orders
      • Creating Limit orders
  • Order Types
    • Understanding Slippage
    • Market Orders
    • Limit Orders
    • Stop Orders
      • Stop Market
      • Stop Limit
      • Stop Market vs Stop Limit
      • Trailing Stop Orders
  • Developer Guide
    • Smart Contracts
      • Limit Order Book
      • Smart Wallet Factory
      • Smart Wallet
    • Keeper Bots
      • Overview
      • Running your own bot
      • Documentation
Powered by GitBook
On this page

Was this helpful?

  1. Order Types
  2. Stop Orders

Trailing Stop Orders

Trailing stop orders are similar to stop orders, the only difference is that the trigger price is dynamic. This means that you can set the trigger price to be a function of the subsequent trading prices.

APEX supports two types of trailing orders:

  • Absolute value trailing orders

  • Percentage trailing orders

Absolute value trailing orders are set an absolute value below (or above) the best (or worst) available price since the order was created.

Percentage value trailing orders are set a percentage value below (or above) the best (or worst) available price since the order was created.

Examples

Bitcoin is currently trading at 55k. Alice decides to buy bitcoin once it drops 10k from the highest point after she opens her order. She sets a trailing stop market buy order for a -10k trigger price. Assume bitcoin goes up to 65k, and then drops to 55k. Her market buy order would then be triggered.

Sushi is trading at 20 USD. Bob has a long sushi position open, and he wants to take profits once Sushi drops 10% from its highest trading price. Bob opens a reduce only trailing stop market sell order at 10%. Sushi goes up to 22 USD, but then drops back to 20 USD. At this point, Bob’s order gets executed by a keeper-bot.

PreviousStop Market vs Stop LimitNextDeveloper Guide

Last updated 3 years ago

Was this helpful?