Orders(table)

Brief

The section describes the "Orders" table.

Details

The table contains information related with order placement and order statuses.

Name

Type

Description

OrderID

String

The unique number of the order. The number is unique within the connection (Real or Demo).

You can search by this column.

RequestID

String

The unique identifier of the request to create an order or the last change of the order request. The identifier is unique within the connection (Real or Demo).

Please note that RequestID in unique for a request, not for an order. One request can create multiple orders. For example, if an entry order is created with stops and limit orders attached, the table will contain a number of orders with the same RequestID.

You can search by this column.

AccountID

String

The unique number of the account the order is placed from. The number is unique within the connection (Real or Demo). In Order2Go, an account is always referred to by its AccountID.

You can search by this column.

AccountName

String

The unique name of the account the order is placed from. This is the name that is displayed to the FX Trading Station user.

OfferID

String

The unique number of the instrument the order is placed for.

You can search by this column.

Instrument

String

The symbol indicating the instrument the order is placed for. For example, EUR/USD, USD/JPY, GBP/USD.

TradeID

String

The unique number of the position to be opened or closed by the order. The number is unique within the connection (Real or Demo).

NetQuantity

Boolean

For SE/LE orders (see Orders.Type column), defines whether the order is Net stop/limit or regular stop/limit. For open market orders, defines whether the order is "Close All by Instrument" or a regular open market order.

BS

String

The trade operation. Possible values:

B

The order is placed to buy the instrument.

S

The order is placed to sell the instrument.

Stage

String

Defines whether the order is placed to open or to close the position. Possible values:

O

The order is placed to open the position.

C

The order is placed to close the position.

Side

Integer

Defines whether the order is immediate (i.e. executed immediately upon trader's request) or conditional (i.e. executed only when the market reaches the price specified by the trader). If the order is conditional, this parameter also indicates the position of the order price relative to the current market price. Possible values:

0

The order is immediate.

-1

The order is conditional, the price of the order is below the current market price.

1

The order is conditional, the price of the order is above the current market price.

Type

String

The type of the order. Possible values:

S

Stop.

L

Limit.

SE

Entry Stop.

LE

Entry Limit.

C

Close.

O

Open.

M

Margin Call.

FixStatus

String

The state of the order, based on the FIX protocol. Possible values:

W

Waiting.

P

In process.

I

Dealer intervention.

Q

Requoted.

U

Pending calculated.

E

Executing.

C

Cancelled.

R

Rejected.

T

Expired.

F

Executed.

G

Not Available.

Lot

Integer

Forex: The amount of the order expressed in the base currency of the instrument. For example, 20,000 for EUR/USD means that the amount of the order is 20,000 Euros, for USD/JPY - 20,000 US dollars, etc.

CFD: With CFD, the amount of the order is expressed in the number of contracts. For example, 5000 for SILVER means that this order/position is for 5000 contracts of SILVER.

AmountK

Double

Forex: The amount of the order (in thousands) as specified by the FX Trading Station user. For example, 20 for EUR/USD means that the amount of the order is 20,000 Euros, for USD/JPY - 20,000 US dollars, etc.

CFD: The number of contracts (in thousands). For example, the order/position for 5000 contracts will display 5 in this field.

Rate

Double

The price the order is placed at.

The parameter can have a zero value in case of open/close market order (i.e. when the order must be executed at any available price).

The value can be a distance (in pips) to the open or close price in case of pegged stop/limit orders (use the TypeSL column to define whether the stop/limit order is set as a distance).

Stop

Double

The price of the associated stop order (the loss-limit level). Makes sense for opening orders (Entry or Market). If there is no associated stop order or there is an associated pegged stop order, the value of the parameter is "0".

The value can be a distance (in pips) to the open or close price in case of pegged stop orders (use the TypeStop column to define whether the associated stop order is set as a distance).

Does not function for United States based accounts. The value of this field is always "0" for FIFO accounts.

Limit

Double

The price of the associated limit order (the profit-limit level). Makes sense for opening orders (Entry or Market). If there is no associated limit order or there is an associated pegged limit order, the value of the parameter is "0".

The value can be a distance (in pips) to the open or close price in case of pegged limit orders (use the TypeLimit column to define whether the associated limit order is set as a distance).

Does not function for United States based accounts. The value of this field is always "0" for FIFO accounts.

Time

DateTime

The date and time of the last update of the order. The date and time are in the EST/EDT time.

IsBuy

Boolean

Defines whether the order is placed to buy or to sell the instrument. Possible values:

True

Buy.

False

Sell.

IsConditionalOrder

Boolean

Defines whether the order is a conditional order. Possible values:

True

The order is conditional.

False

The order is not conditional.

IsEntryOrder

Boolean

True

The order is an entry order.

False

The order is not an entry order.

Lifetime

Integer

The time (in seconds) during which the trader must accept or reject the order requoted by the dealer. This is applicable only to immediate orders in the "requoted" state. For all other orders, the value is "0".

AtMarket

String

The distance (in pips) from the order Rate within which the trader allows the order to be executed. If the market price moves beyond the allowed distance, the order must not be executed. The parameter is applicable only to open/close range orders (i.e. when the order must be executed at any price within the price range specified by the trader, or not executed at all).

TrlMinMove

Integer

The size of the market movement, expressed pips, after which the trailing stop must be moved to follow the market. The column is applicable only to stop orders with the trailing stop mode.

1 is for dynamic trailing stop. The trailing stop mode can be detected using the following condition: TrlRate ~= 0.

Distance

Integer

The distance (in pips) from the market price to the price specified in the stop order when the stop order is set. This is the distance that must be kept the same when the stop order automatically adjusts itself as the market price changes in the trader's favor (i.e. when the trailing stop feature is activated).

GTC

String

The parameter defines whether the order is good-till-cancelled (remains active until the trader cancels it or until the trade is executed). Possible values:

Y

The order is good-till-cancelled.

Empty value

The order is not good-till-cancelled, i.e. must be executed immediately or not executed at all.

Kind

String

The type of the account the order is placed from. Possible values:

32

Trading account.

36

Managed account.

38

Controlled account.

QTXT

String

The text comment that can be added to the order.

StopOrderID

String

The unique number of the associated stop order. The number is unique within the connection (Real or Demo). Makes sense for opening orders (Entry or Market). If there is no associated stop order, the parameter has an empty value.

Does not function for United States based accounts. The value of this parameter is always empty for FIFO accounts.

LimitOrderID

String

The unique number of the associated limit order. The number is unique within the connection (Real or Demo). Makes sense for opening orders (Entry or Market). If there is no associated limit order, the parameter has the empty value.

Does not function for United States based accounts. The value of this parameter is always empty for FIFO accounts.

TypeSL

Integer

Defines the way the stop or limit order is set. Makes sense for stop and limit orders. Possible values:

1

The stop/limit order is set as an absolute rate (a regular stop/limit order).

2

The stop/limit order is set as a distance (in pips) to the open price (the pegged stop/limit order).

3

The stop/limit order is set as a distance (in pips) to the close price (the pegged stop/limit order).

TypeStop

Integer

Defines the way the associated stop order is set. Makes sense for opening orders (entry and market). Possible values:

0

The associated stop order is not specified.

1

The associated stop order is set as an absolute rate (a regular stop order).

2

The associated stop order is set as a distance (in pips) to the open price (the pegged stop order).

3

The associated stop order is set as a distance (in pips) to the close price (the pegged stop order).

TypeLimit

Integer

Defines the way the associated limit order is set. Makes sense for opening orders (entry and market). Possible values:

0

The associated limit order is not specified.

1

The associated limit order is set as an absolute rate (a regular limit order).

2

The associated limit order is set as a distance (in pips) to the open price (the pegged limit order).

3

The associated limit order is set as a distance (in pips) to the close price (the pegged limit order).

ContingencyID

String

The unique identifier of the contingency group. All the orders included into the contingency group will have the same contingency identifier. The contingency group can be: OCO (one-cancel-others), OTO (one-triggers-others) or ELS (entry-stop-limit). Please note that for OTO and ELS contingency groups the root order is not included into the group, only dependent orders are.

The order can be included into one contingency group at the time.

The type of the contingency group is specified in ContingencyType column of the table.

ContingencyType

Integer

The type of the contingency group:

0

The order is not included into any contingency group.

1

The order is a part of OCO (one-cancel-others) contingency group.

2

The order is a dependent order of OTO (one-triggers-others) contingency group. To find the root order of the group please use OrderIdPrimary column of the table.

3

The order is a stop or limit order inside ELS (entry-stop-limit) contingency group. To find the root entry or market order (it is it not executed yet) please use OrderIdPrimary column of the table.

OrderIdPrimary

String

The reference to the root order of the OTO or ELS contingency group.

WorkingIndicator

Boolean

The boolean flag indicating whether the order is currently active and can be executed when the market condition is met.

This flag can be false in the following cases: stop or limit orders attached to an entry order, a dependent order of OTO or ELS group when the root order of the contingency group is not executed yet.

back