LogX Docs
  • LogX Aggregator
    • Trading Guide
      • Open Position - Market Order
      • Close Position - Market Order
      • Positions
      • Open Position - Limit Order
      • Close Position - Limit Order
      • Cancel Order
      • Orders
      • Open Position - TPSL Order
      • Close Position - TPSL Order
    • Functional Guide
      • Chains
      • Exchanges
      • Routing
      • Assets
      • Fees
    • Technical Guide
      • Architecture
      • Contracts
    • Protocol Details
      • Audits
      • APIs
      • Bug Bounty
  • LogX Perp Dex
    • Overview
    • Liquidity
      • Liquidity Providers
      • LLP Token
    • Chains and Pairs
    • Fee Structure
    • Incentives and Rewards
    • Contracts
      • Blast
    • Technical Overview
      • Open/Increase a market Position
      • Close/Decrease a Market position
      • Market Order Execution
      • Placing a Limit order
      • Limit and TPSL Order Execution
      • Liquidations
      • Adding/Removing Liquidity
      • Staking
  • Audit
Powered by GitBook
On this page
  1. LogX Perp Dex
  2. Technical Overview

Placing a Limit order

Other than market orders, LogX also supports opening limit and TPSL orders. The core function responsible for creating an order is OrderManager.createOrders and it accepts:

  • collateralDelta: amount of collateral tokens

  • indexToken: address of the index token you want to create an order for

  • sizeDelta: size by which you want to increase or decrease your position via this order

  • collateralToken: address of the collateral token

  • isLong: weather this is an order for a long or short position.

  • isIncreaseOrder: true if this is an order to increase a position, and false for decreasing a position.

  • _executionFee

  • limitPrice

  • tpPrice

  • slPrice

  • maxOrder

Note:

  1. For opening, just Limit order (can be open or close) specify only the limitPrice as the price at which you want to trigger your order and leave tpPrice and slPrice as 0. _executionFee should be >= OrderManager.minExecutionFeeLimitOrder in this case.

  2. For placing Take Profit or Stop Loss order, specify tpPrice and slPrice and leave limitPrice as 0.

  3. Only take profit orders; limitPrice: 0, tpPrice: trigger price for order execution, slPrice 0

  4. Only stop loss order; limitPrice: 0, tpPrice: 0, slPrice: trigger price for order execution

IMPORTANT: An order can either be a limit order or a tpsl order.

PreviousMarket Order ExecutionNextLimit and TPSL Order Execution

Last updated 1 year ago