Sales Order Detail Records

This documentation is for FX Sales 1.16 and below. From version 1.17 (27 Jan 2017), FX Sales requires backend adapters to implement the FX Integration API 3. For documentation on trade models and messages in FX Integration API 3, see FX Integration API.

This page describes the naming convention of order details records and the fields they contain.

Order details record

To request order details for an order, subscribe to the order’s order-details record.

Record subject

The subject follows this format, where <orderid> is the unique identifier of the order as returned by the order management system.

/PRIVATE/SALESORDERDETAILS/<orderid>

Record fields

The order details record contains the following fields.

Leg fields are pre-fixed with 'Lx_', where 'x' is the number of the leg.

Strategy fields
Field Name Value Example

Account

The trading account the order stategy was submitted under, in the form "<description>|<ID>"

My Account|Acc1

ActivationDate

The date on which the order was, or will be, activated. Valid values: 'GFA' or a date in the format 'yyyymmdd'.

'GFA' indicates the order has been active since it was accepted by the order management system.

20130606

ActivationTime

The time the strategy should activate, if ActivationDate has the format 'yyyymmdd'.

12:12:12

ActivationLocation

The timezone of the ActivationDate and ActivationTime, if the ActivationDate has a value in the form 'yyyymmdd'. See the "TZ" column of the table on this page: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

Europe/London

AlertType

A comma-separated list of zero or more alert types. Valid values: SMS, EMAIL.

SMS

CurrencyPair

The currency pair for all legs in this strategy.

GBPUSD

EditableFields

A comma-separated list of fields that may be edited.

For orders with multiple legs, the values will still be specific to each leg with the appropriate L*_ prefix.

L1_Amount, L2_Amount

ExpirationDate

The date the strategy should expire. Valid values: GTC, GFD, date in the format yyyymmdd.

GTC

Good 'till cancelled. The order should remain active until it is cancelled.

GFD

Good for day. The order should remain active for the current trading day only.

GTC

ExpirationTime

The time the strategy should be expire, if the ExpirationDate is in the format 'yyyymmdd'.

12:12:12

ExpirationLocation

The timezone of the ExpirationDate and ExpirationTime, if the ExpirationDate has a value in the form 'yyyymmdd'. See the "TZ" column of the table on this page: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

Europe/London

OrderCount

The number of orders (legs) in the strategy. A single order comprises one leg; an If-Done order comprises two legs; an If-Done-OCO order comprises three legs.

3

Remarks

Comment added by the sales user.

Call John when filled

SpotRateDPS

Precision of the spot rate, quoted as the 'scale' of the value: the number of significant figures to the right of the spot rate’s decimal point.

5

StrategyID

Unique identifier of the order strategy. This value is identical to order ID of the first leg (L1_Order, matches the OrderID of the first leg for multiple legged Orders.

5.1.174236

StrategyType

The strategy of this order. Valid values: SINGLE, IF-DONE, OCO, IF-DONE-OCO.

IF-DONE-OCO

TOBOUser

The user on whose behalf the order was submitted. Format: firstname.lastname

john.smith

Fields common to all legs (leg 1 shown as an example)
Field Name Value Example

L1_AllowedActions

Comma-separated list of actions allowed for this order leg. See AllowedActions field.

Deactivate

L1_Amount

The amount to trade

100000.00

L1_BuySell

The trade direction of the base currency, from the perspective of the user on whose behalf the order was submitted. Valid values: BUY, SELL.

SELL

L1_DealtCurrency

The currency that the amount is specified in

GBP

L1_ExecutionType

How this order should be executed. Valid values: CALL-ORDER, TAKE-PROFIT, STOP-LOSS, or MARKET.

CALL-ORDER is only valid for single-legged strategies.

TAKE-PROFIT

L1_FillRate

The rate at which the order will be filled (not including L1_Margin value)

1.50000

L1_Filled

The amount that has been filled for this leg

0

L1_Margin

The sales margin (markup) to be applied to the L1_FillRate value.

E.g. TrackingRate for the order strategy will be 1.50001 when:

  • L1_FillRate = 1.50000

  • L1_Margin = 0.00001

0.00001

L1_OrderID

The unique identifier of the order leg. The identifier is provided by the order management system.

5.1.174236

L1_Remaining

The amount remaining to be filled for this order leg.

100000.00

L1_Status

The current status of this order leg

Active

L1_StrategyID

Unique identifier for the order strategy. Multi-leg order strategies will share the same StrategyID value.

5.1.174236

L1_StrategyType

The strategy of this order. Valid values: SINGLE, OCO, IF-DONE, IF-DONE-OCO.

IF-DONE-OCO

L1_SubmittedBy

The sales user who submitted this order (on behalf of a client).

sales.trader@company.com

L1_SubmittedDateTime

The date and time when the trading system received the order. Format: YYYYMMDDhhmmss.

20160422151131

L1_SubmittedFor

The user on whose behalf the order was submitted.

trading_client_1

L1_Temperature

Numeric value representing how close the order leg fill-rate is to the market rate. The higher the number, the closer the order leg fill-rate is to the market rate.

1

Fields specific to leg 2
Field Name Value Example

L2_ParentID

The order ID of the parent leg (L1_OrderID).

5.1.174236

L2_RelationshipType

The relationship of this leg to the previous leg.

For example, the legs in an If-Done-OCO order have the following relationships:

  • The relationship of L2 to L1 is 'IF-DONE'

  • The relationship of L3 to L2 is 'OCO'

IF-DONE

Fields specific to leg 3
Field Name Value Example

L3_RelatedID

The order ID of the previous leg. For example, for an order with a third leg, this field holds the order ID of the second leg. This field is required for orders that have three legs or more.

5.1.174237

L3_RelationshipType

The relationship of this leg to the previous leg.

For example, the legs in an If-Done-OCO order have the following relationships:

  • The relationship of L2 to L1 is 'IF-DONE'

  • The relationship of L3 to L2 is 'OCO'

IF-DONE

AllowedActions field

The AllowedActions field contains a comma-separated list of zero or more values from this list:

Action Explanation

InactiveEdit

Edit action is NOT executable.

InactiveDeactivate

Deactivate button is visible but the action is NOT executable.

InactiveCancel

Cancel button is visible but the action is NOT executable.

InactiveActivate

Activate button is visible but the action is NOT executable.

Edit

Edit action is executable.

Deactivate

Deactivate button is visible and executable.

Cancel

Cancel button is visible and executable.

Activate

Activate button is visible and executable.

Example records

Examples for the following order types:

  • If-Done

  • If-Done-OCO

If-Done order

The table below lists the fields of the order details object for an If-Done Strategy order.

Strategy fields
Field Example Value

Account

RC Account1|RC Account 1

ActivationDate

GFA

AlertType

EMAIL

CurrencyPair

GBPUSD

EditableFields

L1_Amount

ExpirationDate

GTC

OrderCount

2

Remarks

Call John when filled

SpotRateDPS

5

StrategyID

5.1.174256

StrategyType

IF-DONE

TOBOUser

john.smith

The tables below show the leg fields of the order.

Leg fields
Leg 1: Field Leg 1: Example Leg 2: Field Leg 2: Example

L1_AllowedActions

Deactivate

L2_AllowedActions

InactiveCancel

L1_Amount

1000.00

L2_Amount

1000.00

L1_BuySell

SELL

L2_BuySell

BUY

L1_DealtCurrency

GBP

L2_DealtCurrency

GBP

L1_ExecutionType

TAKE-PROFIT

L2_ExecutionType

TAKE-PROFIT

L1_FillRate

1.50000

L2_FillRate

1.30000

L1_Filled

0

L2_Filled

0

L1_Margin

0.00010

L2_Margin

0.00010

L1_OrderID

5.1.174256

L2_OrderID

5.1.174257

L2_ParentID

5.1.174256

L2_RelationshipType

IFDONE

L1_Remaining

1000.00

L2_Remaining

1000.00

L1_Status

Active

L2_Status

Parent Active

L1_StrategyID

5.1.174256

L2_StrategyID

5.1.174256

L1_StrategyType

IF-DONE

L2_StrategyType

IF-DONE

L1_SubmittedBy

st1@caplin.com

L2_SubmittedBy

st1@caplin.com

L1_SubmittedDateTime

20160425143044

L2_SubmittedDateTime

20160425143051

L1_SubmittedFor

client_1

L2_SubmittedFor

client_1

L1_Temperature

1

L2_Temperature

7

If-Done-OCO order

The table below lists the fields of the order details object of an If-Done Strategy order.

Strategy fields
Field Example Value

Account

RC Account1|RC Account 1

ActivationDate

GFA

AlertType

EMAIL

CurrencyPair

GBPUSD

EditableFields

L1_Amount

ExpirationDate

GTC

OrderCount

3

Remarks

Call John when filled

SpotRateDPS

5

StrategyID

5.1.174236

StrategyType

IF-DONE-OCO

TOBOUser

john.smith

The tables below show the leg fields of the order.

Leg fields
Leg 1: Field Leg 1: Example Leg 2: Field Leg 2: Example Leg 3: Field Leg 3: Example

L1_AllowedActions

Deactivate

L2_AllowedActions

InactiveCancel

L3_AllowedActions

InactiveCancel

L1_Amount

1000.00

L2_Amount

1000.00

L3_Amount

1000.00

L1_BuySell

SELL

L2_BuySell

BUY

L3_BuySell

BUY

L1_DealtCurrency

GBP

L2_DealtCurrency

GBP

L3_DealtCurrency

GBP

L1_ExecutionType

TAKE-PROFIT

L2_ExecutionType

TAKE-PROFIT

L3_ExecutionType

STOP-LOSS

L1_FillRate

1.50000

L2_FillRate

1.30000

L3_FillRate

1.60000

L1_Filled

0

L2_Filled

0

L3_Filled

0

L1_Margin

0.00010

L2_Margin

0.00010

L3_Margin

0.00010

L1_OrderID

5.1.174236

L2_OrderID

5.1.174237

L3_OrderId

5.1.174237

L2_ParentID

5.1.174236

L3_RelatedID

5.1.174237

L2_RelationshipType

IFDONE

L3_RelationshipType

OCO

L1_Remaining

1000.00

L2_Remaining

1000.00

L3_Remaining

1000.00

L1_Status

Active

L2_Status

Parent Active

L3_Status

Parent Active

L1_StrategyID

5.1.174236

L2_StrategyID

5.1.174236

L3_StrategyID

5.1.174256

L1_StrategyType

IF-DONE-OCO

L2_StrategyType

IF-DONE-OCO

L3_StrategyType

IF-DONE-OCO

L1_SubmittedBy

st1@caplin.com

L2_SubmittedBy

st1@caplin.com

L3_SubmittedBy

st1@caplin.com

L1_SubmittedDateTime

20160422151131

L2_SubmittedDateTime

20160422151138

L3_SubmittedDateTime

20160422151138

L1_SubmittedFor

client_1

L2_SubmittedFor

client_1

L3_SubmittedFor

client_1

L1_Temperature

1

L2_Temperature

7

L3_Temperature

7