Sway Charts API Documentation
  • REST API Specification
    • Getting Started
      • Introduction
      • Errors
      • API Versioning
      • Conditional Requests & Updates
      • Entity Versioning
      • Data Types and Formats
      • Rate Limits & Throttling
    • Authentication & Authorization
      • HMAC Authentication
      • POST Create Session Token
      • POST Ping
      • POST Logout
    • Trading
      • POST Place Order
      • PUT Modify Order
      • DELETE Cancel Order
    • Reference Data
      • GET List Instruments
      • List Instrument Details
    • Users and Accounts
      • GET Get Users
      • GET List Account Portfolio
      • GET List Open Positions
      • GET List Open Orders
      • GET List Cash Transfers
      • GET POST List Orders
      • GET List Account Metrics
      • GET List Account Events
    • Market Data
      • POST Request Market Data
    • Conversion Rates
      • POST Get Conversion Rates
    • Cash Transaction
      • Single Order Request
      • Order Group Request
      • Order Response
      • Instrument
      • Instrument Details
      • Trading Session
      • Limit Value
      • Margin Rate
      • Margin Tier
      • User Details
      • Account Details
      • Account Portfolio
      • Balance
      • Position
      • Order
      • Order Leg
      • Execution
      • Cash Transfer
      • Historic Order List
      • Account Metrics
      • Position Metrics
      • Currency Metrics
      • Account Event
      • Market Data Request
      • Market Data Event Type
      • Market Data List
      • Quote
      • Candle
      • Conversion Rate
    • Revision History
Powered by GitBook
On this page
  1. REST API Specification
  2. Cash Transaction

Order Leg

PreviousOrderNextExecution

Last updated 1 year ago

CtrlK
  • string Position Effect
  • string Position Code
  • number Quantity
  • Order Link
  • string Link Type
Field
Value
Type

instrument

Symbol of the order’s instrument

String, required

positionEffect

The effect of this order on a position

String, optional

positionCode

ID of a position that should be modified by this order

String, optional

price

Price of the order

, required

legRatio

Always 1.0

, required

quantity

Initial quantity of the order in units (not in lots)

, required

filledQuantity

Quantity filled so far in units (not in lots). If no fills took place, this field equals to 0.0.

, required

remainingQuantity

Quantity available for further execution (in units).

, required

averagePrice

Volume-weighted average price of all fills for this leg. The value is 0.0 if there are no fills yet.

, required

string Position Effect

Indicates whether the resulting position after a trade should be a new position or the trade should close an existing position. Required for position-based trading. If the value is Close, the positionCode field is also present.

Possible values:

  • OPEN

  • CLOSE

string Position Code

ID of a position that should be modified by this order. Used for position based trading. Present when positionEffect is Close and omitted otherwise.

number Quantity

Initial quantity of the order in units (not in lots) as specified in a "Place" request.

This value is not present if this is an attached Limit or Stop "closing" order linked to a position. In this case the positionCode field is present and positionEffect is "Close". It means initial quantity of the order equals to the quantity of the position.

If this is a Market order closing the position, it may have quantity set to be able to partially close the position. If quantity is omitted for Market order with the "Closing" position effect, then whole position will be closed.

Order Link

Field
Value
Type

linkType

Type of the link

String, required

linkedOrder

Internal unique string code of the linked order. Corresponds to the orderCode field in the object

String, required

linkedClientOrderId

Unique order id of the linked order. Corresponds to the clientOrderId field in the object

String, required

string Link Type

One of the following values:

  • PARENT – this order is a parent of the linked one

  • CHILD – this order is a child of the linked one

  • OCO – this order is a member of an OCO group with the linked one.

Number
Number
Number
Number
Number
Number
Order
Order