Trade model: Edit Strategy

This page describes the FX Integration API’s Edit Strategy trade model, as defined in the file config/OrdersAdapter/Blade/DataSource/etc/trademodels.xml in the FX Integration API Kit.

This documentation is for the FX Integration API 3.36.0.

Trade models are XML-defined state machines used by the Java Trading API, the C Trading API, and Caplin Trader’s Trading API to manage trading workflows. For more information on trade model XML definitions, see the Trade model XML schema reference.

State diagram

The state diagram for the Edit Strategy trade model is shown below. To simplify the diagram, the Error state has been omitted.

InitialEditOpenSentEditPendingEditableClientCloseSentSavingCompleteClientClosedEditOpenEditOpenAckEditAcceptClientCloseRefreshSaveSaveAcceptValidationErrorClientCloseSaveAndCompleteClientCloseAckLegendTransitions initiated by the client are inyellow.Transitions initiated by the server are inblue.

Messages: client → server

Trade-channel messages sent by StreamLink clients to the FX API DataSource.

EditOpen
MsgType
String
Example: EditOpen
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
TradingSubProtocol
string
OrderID
string
The id of the order.
Save
OrderDetails
LegDetails Ln
Ln_OrderID
string
The id of the order.
Ln_Amount
decimal
The amount of a trade or order in the DealtCurrency.
Ln_MonitorSide
string
The side that should be monitored for an order to be triggered.
Ln_DealtCurrency
string
The currency of the Amount of a trade or order.
Ln_BuySell
string
The direction of the trade. This always refers to the BaseCurrency, NOT the DealtCurrency.
Ln_ExecutionType
string
The order type. Caplin supported types are [BENCHMARK, CALL_ORDER, MARKET, PEGGED, STOP_LOSS, TAKE_PROFIT]
Ln_BenchmarkType
string
The benchmark order name. For example, ECB.
Ln_LimitPrice
decimal
The price at which a leg should fill.
Ln_Margin
decimal
The amount of margin
Ln_Remarks
string
The clients or trader's comments on an order leg - visible to both the Client and the Trader
Ln_TraderRemarks
string
The trader's comments on an order leg - visible to only the Trader
Ln_ChildLegId
integer
Ln_ChildRelationship
string
Ln_PartnerLegId
integer
Ln_PartnerRelationship
string
Ln_LoopLegId
integer
Ln_FillRate
string
Ln_Discretion
decimal
Number of points the trader has discretion to fill the order
Ln_OrderTenor
string
The tenor the order will settle on for Forward and NDF orders. Either OrderTenor or OrderSettlementDate should be provided but not both.
Ln_OrderSettlementDate
date
The settlement date the order will settle on for Forward and NDF orders. Either OrderTenor or OrderSettlementDate should be provided but not both.
CurrencyPair
string
The currency pair for the trade. For example, EURUSD
Account
string
Example: Garfields|GARF
The account a trade or order has been submitted against. The format is <description>|<name> or <name>|<name>
ActivationType
string
How the order should be activated. Caplin supported statuses are [GFA, EXPLICIT]
ActivationDateTime
datetime
Example: 2013-07-24T17:13:59.985
The time and date the order will become active. This is in ISO-8601 format.
ActivationDisplayTimeZone
timezone
Example: Europe/London
The timezone that the activation time and date should be formatted to for display. This is in the TZ database format.
ExpirationType
string
How the order should be deactivated. Caplin supported statuses are [IOC, GTC, GFD, FOK, EXPLICIT]
ExpirationDateTime
datetime
Example: 2013-07-24T17:13:59.985
The time and date the order will be deactivated. This is in ISO-8601 format.
ExpirationDisplayTimeZone
timezone
Example: Europe/London
The timezone that the expiration time and date should be formatted to for display. This is in the TZ database format.
AlertType
string
The type of alert that an order will send. Caplin supported statuses are [EMAIL, SMS].
TOBOUser
string
Example: client@customer.co.za
The user the trade is on behalf of. For example, if the logged in user dealer1@novobank.co.za wishes to make a trade on behalf of user client@customer.co.za, then the value of this field will be client@customer.co.za.
StrategyType
string
The strategy the order was submitted with. This field should not be used by the front end for structuring orders. Comma separated list of Caplin supported values are [SINGLE, IF-DONE-OCO, OCO, IF-DONE, IF-TIMEOUT, IF-DONE-LOOP, LOOP]. OTHER denotes a strategy type that is unsupported.
AlertPhoneNumber1
string
Phone number that should be called when an order event occurs
AlertPhoneNumber2
string
Phone number that should be called when an order event occurs
AlertPhoneNumber3
string
Phone number that should be called when an order event occurs
AlertPhoneNumber4
string
Phone number that should be called when an order event occurs
AlertPhoneNumber5
string
Phone number that should be called when an order event occurs
AlertPhoneNumber6
string
Phone number that should be called when an order event occurs
AlertPhoneNumber7
string
Phone number that should be called when an order event occurs
AlertPhoneNumber8
string
Phone number that should be called when an order event occurs
AlertPhoneNumber9
string
Phone number that should be called when an order event occurs
AlertPhoneNumber10
string
Phone number that should be called when an order event occurs
AlertEmailAddress1
string
Email address that should be mailed when an order event occurs
AlertEmailAddress2
string
Email address that should be mailed when an order event occurs
AlertEmailAddress3
string
Email address that should be mailed when an order event occurs
AlertEmailAddress4
string
Email address that should be mailed when an order event occurs
AlertEmailAddress5
string
Email address that should be mailed when an order event occurs
AlertEmailAddress6
string
Email address that should be mailed when an order event occurs
AlertEmailAddress7
string
Email address that should be mailed when an order event occurs
AlertEmailAddress8
string
Email address that should be mailed when an order event occurs
AlertEmailAddress9
string
Email address that should be mailed when an order event occurs
AlertEmailAddress10
string
Email address that should be mailed when an order event occurs
ActivationDate
string
What date the strategy should be activated.
ActivationTime
string
What time the strategy should be activated if the ActivationDate was in the format of yyyymmdd.
ActivationLocation
string
Example: Europe/London
When location should be used to evaluate the time to activate if the ActivationDate was in the format of yyyymmdd.
ActivationUTCOffset
string
ExpirationDate
string
What date the strategy should expire.
ExpirationTime
string
What time the strategy should be activated if the ExpirationDate was in the format of yyyymmdd.
ExpirationLocation
string
When location should be used to evaluate the time to expire if the ExpirationDate was in the format of yyyymmdd.
ExpirationUTCOffset
string
MsgType
String
Example: Save
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
CurrencyPair
string
The currency pair for the trade. For example, EURUSD
Account
string
Example: Garfields|GARF
The account a trade or order has been submitted against. The format is <description>|<name> or <name>|<name>
ActivationType
string
How the order should be activated. Caplin supported statuses are [GFA, EXPLICIT]
ActivationDateTime
datetime
Example: 2013-07-24T17:13:59.985
The time and date the order will become active. This is in ISO-8601 format.
ActivationDisplayTimeZone
timezone
Example: Europe/London
The timezone that the activation time and date should be formatted to for display. This is in the TZ database format.
ExpirationType
string
How the order should be deactivated. Caplin supported statuses are [IOC, GTC, GFD, FOK, EXPLICIT]
ExpirationDateTime
datetime
Example: 2013-07-24T17:13:59.985
The time and date the order will be deactivated. This is in ISO-8601 format.
ExpirationDisplayTimeZone
timezone
Example: Europe/London
The timezone that the expiration time and date should be formatted to for display. This is in the TZ database format.
AlertType
string
The type of alert that an order will send. Caplin supported statuses are [EMAIL, SMS].
TOBOUser
string
Example: client@customer.co.za
The user the trade is on behalf of. For example, if the logged in user dealer1@novobank.co.za wishes to make a trade on behalf of user client@customer.co.za, then the value of this field will be client@customer.co.za.
StrategyType
string
The strategy the order was submitted with. This field should not be used by the front end for structuring orders. Comma separated list of Caplin supported values are [SINGLE, IF-DONE-OCO, OCO, IF-DONE, IF-TIMEOUT, IF-DONE-LOOP, LOOP]. OTHER denotes a strategy type that is unsupported.
AlertPhoneNumber1
string
Phone number that should be called when an order event occurs
AlertPhoneNumber2
string
Phone number that should be called when an order event occurs
AlertPhoneNumber3
string
Phone number that should be called when an order event occurs
AlertPhoneNumber4
string
Phone number that should be called when an order event occurs
AlertPhoneNumber5
string
Phone number that should be called when an order event occurs
AlertPhoneNumber6
string
Phone number that should be called when an order event occurs
AlertPhoneNumber7
string
Phone number that should be called when an order event occurs
AlertPhoneNumber8
string
Phone number that should be called when an order event occurs
AlertPhoneNumber9
string
Phone number that should be called when an order event occurs
AlertPhoneNumber10
string
Phone number that should be called when an order event occurs
AlertEmailAddress1
string
Email address that should be mailed when an order event occurs
AlertEmailAddress2
string
Email address that should be mailed when an order event occurs
AlertEmailAddress3
string
Email address that should be mailed when an order event occurs
AlertEmailAddress4
string
Email address that should be mailed when an order event occurs
AlertEmailAddress5
string
Email address that should be mailed when an order event occurs
AlertEmailAddress6
string
Email address that should be mailed when an order event occurs
AlertEmailAddress7
string
Email address that should be mailed when an order event occurs
AlertEmailAddress8
string
Email address that should be mailed when an order event occurs
AlertEmailAddress9
string
Email address that should be mailed when an order event occurs
AlertEmailAddress10
string
Email address that should be mailed when an order event occurs
ActivationDate
string
What date the strategy should be activated.
ActivationTime
string
What time the strategy should be activated if the ActivationDate was in the format of yyyymmdd.
ActivationLocation
string
Example: Europe/London
When location should be used to evaluate the time to activate if the ActivationDate was in the format of yyyymmdd.
ActivationUTCOffset
string
ExpirationDate
string
What date the strategy should expire.
ExpirationTime
string
What time the strategy should be activated if the ExpirationDate was in the format of yyyymmdd.
ExpirationLocation
string
When location should be used to evaluate the time to expire if the ExpirationDate was in the format of yyyymmdd.
ExpirationUTCOffset
string
ClientClose
MsgType
String
Example: ClientClose
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model

Messages: server → client

Trade-channel messages sent by the FX API DataSource to StreamLink clients.

ClientCloseAck
MsgType
String
Example: ClientCloseAck
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
EditAccept Order Details
CommonFields
CurrencyPair
string
The currency pair for the trade. For example, EURUSD
Account
string
Example: Garfields|GARF
The account a trade or order has been submitted against. The format is <description>|<name> or <name>|<name>
AllowedActions
string
Comma separated list of Caplin supported values [Edit, Deactivate, Cancel, Activate, InactiveEdit, InactiveDeactivate, InactiveCancel, InactiveActivate]
ActivationType
string
How the order should be activated. Caplin supported statuses are [GFA, EXPLICIT]
ActivationDateTime
datetime
Example: 2013-07-24T17:13:59.985
The time and date the order will become active. This is in ISO-8601 format.
ActivationDisplayTimeZone
timezone
Example: Europe/London
The timezone that the activation time and date should be formatted to for display. This is in the TZ database format.
ExpirationType
string
How the order should be deactivated. Caplin supported statuses are [IOC, GTC, GFD, FOK, EXPLICIT]
ExpirationDateTime
datetime
Example: 2013-07-24T17:13:59.985
The time and date the order will be deactivated. This is in ISO-8601 format.
ExpirationDisplayTimeZone
timezone
Example: Europe/London
The timezone that the expiration time and date should be formatted to for display. This is in the TZ database format.
AlertType
string
The type of alert that an order will send. Caplin supported statuses are [EMAIL, SMS].
StrategyType
string
The strategy the order was submitted with. This field should not be used by the front end for structuring orders. Comma separated list of Caplin supported values are [SINGLE, IF-DONE-OCO, OCO, IF-DONE, IF-TIMEOUT, IF-DONE-LOOP, LOOP]. OTHER denotes a strategy type that is unsupported.
TraderUsername
string
Example: sales_trader@novobank.co.za
The user who entered the trade. This may be on behalf of themselves, or on behalf of someone else. For example, if the logged in user dealer1@novobank.co.za wishes to make a trade on behalf of user client@customer.co.za, then the value of this field will be dealer1@novobank.co.za. If the user client@customer.co.za makes a trade on behalf of themselves it will be client@customer.co.za.
TOBOUser
string
Example: client@customer.co.za
The user the trade is on behalf of. For example, if the logged in user dealer1@novobank.co.za wishes to make a trade on behalf of user client@customer.co.za, then the value of this field will be client@customer.co.za.
OrderCount
integer
OrderID
string
The id of the order.
ActivationDate
string
What date the strategy should be activated.
ActivationTime
string
What time the strategy should be activated if the ActivationDate was in the format of yyyymmdd.
ActivationLocation
string
Example: Europe/London
When location should be used to evaluate the time to activate if the ActivationDate was in the format of yyyymmdd.
ActivationUTCOffset
string
ExpirationDate
string
What date the strategy should expire.
ExpirationTime
string
What time the strategy should be activated if the ExpirationDate was in the format of yyyymmdd.
ExpirationLocation
string
When location should be used to evaluate the time to expire if the ExpirationDate was in the format of yyyymmdd.
ExpirationUTCOffset
string
ProximityPercentage
decimal
A percentage indicator of an Order's proximity to the market.
AlertFields
AlertPhoneNumber1
string
Phone number that should be called when an order event occurs
AlertPhoneNumber2
string
Phone number that should be called when an order event occurs
AlertPhoneNumber3
string
Phone number that should be called when an order event occurs
AlertPhoneNumber4
string
Phone number that should be called when an order event occurs
AlertPhoneNumber5
string
Phone number that should be called when an order event occurs
AlertPhoneNumber6
string
Phone number that should be called when an order event occurs
AlertPhoneNumber7
string
Phone number that should be called when an order event occurs
AlertPhoneNumber8
string
Phone number that should be called when an order event occurs
AlertPhoneNumber9
string
Phone number that should be called when an order event occurs
AlertPhoneNumber10
string
Phone number that should be called when an order event occurs
AlertEmailAddress1
string
Email address that should be mailed when an order event occurs
AlertEmailAddress2
string
Email address that should be mailed when an order event occurs
AlertEmailAddress3
string
Email address that should be mailed when an order event occurs
AlertEmailAddress4
string
Email address that should be mailed when an order event occurs
AlertEmailAddress5
string
Email address that should be mailed when an order event occurs
AlertEmailAddress6
string
Email address that should be mailed when an order event occurs
AlertEmailAddress7
string
Email address that should be mailed when an order event occurs
AlertEmailAddress8
string
Email address that should be mailed when an order event occurs
AlertEmailAddress9
string
Email address that should be mailed when an order event occurs
AlertEmailAddress10
string
Email address that should be mailed when an order event occurs
LegFields Ln
Ln_Editable
boolean
Whether a trade or order is editable.
Ln_OrderID
string
The id of the order.
Ln_Status
string
Use OrderStatus instead.
Ln_OrderStatus
string
Caplin supported statuses are [PENDING-ACCEPT, PENDING-ACTIVATION, ACTIVE, PARENT-ACTIVE, PENDING-DEACTIVATION, DEACTIVATED, EXPIRED, COMPLETED, REJECTED, PENDING-CANCEL, CANCELLED, CANCELLED-BY-PARTNER]
Ln_SubmittedDateTime
datetime
The time and date a trade was submitted
Ln_LastActionBy
string
The last person or system to perform an action on an order.
Ln_LastActionDateTime
datetime
The time and date of the last action on an order.
Ln_Amount
decimal
The amount of a trade or order in the DealtCurrency.
Ln_Filled
decimal
The amount of an order that has been filled.
Ln_Remaining
decimal
The amount of an order that has not been filled.
Ln_MonitorSide
string
The side that should be monitored for an order to be triggered.
Ln_DealtCurrency
string
The currency of the Amount of a trade or order.
Ln_BuySell
string
The direction of the trade. This always refers to the BaseCurrency, NOT the DealtCurrency.
Ln_ExecutionType
string
The order type. Caplin supported types are [BENCHMARK, CALL_ORDER, MARKET, PEGGED, STOP_LOSS, TAKE_PROFIT]
Ln_BenchmarkType
string
The benchmark order name. For example, ECB.
Ln_LimitPrice
decimal
The price at which a leg should fill.
Ln_Remarks
string
The clients or trader's comments on an order leg - visible to both the Client and the Trader
Ln_ChildLegId
integer
Ln_ChildRelationship
string
Ln_PartnerLegId
integer
Ln_PartnerRelationship
string
Ln_LoopLegId
integer
Ln_FillRate
string
Ln_OrderTenor
string
The tenor the order will settle on for Forward and NDF orders. Either OrderTenor or OrderSettlementDate should be provided but not both.
Ln_OrderSettlementDate
date
The settlement date the order will settle on for Forward and NDF orders. Either OrderTenor or OrderSettlementDate should be provided but not both.
Ln_OrderFixingDate
date
The date an NDF order will fix on if filled.
EditAccept Order Sales Details
OrderDetails
CommonFields
CurrencyPair
string
The currency pair for the trade. For example, EURUSD
Account
string
Example: Garfields|GARF
The account a trade or order has been submitted against. The format is <description>|<name> or <name>|<name>
AllowedActions
string
Comma separated list of Caplin supported values [Edit, Deactivate, Cancel, Activate, InactiveEdit, InactiveDeactivate, InactiveCancel, InactiveActivate]
ActivationType
string
How the order should be activated. Caplin supported statuses are [GFA, EXPLICIT]
ActivationDateTime
datetime
Example: 2013-07-24T17:13:59.985
The time and date the order will become active. This is in ISO-8601 format.
ActivationDisplayTimeZone
timezone
Example: Europe/London
The timezone that the activation time and date should be formatted to for display. This is in the TZ database format.
ExpirationType
string
How the order should be deactivated. Caplin supported statuses are [IOC, GTC, GFD, FOK, EXPLICIT]
ExpirationDateTime
datetime
Example: 2013-07-24T17:13:59.985
The time and date the order will be deactivated. This is in ISO-8601 format.
ExpirationDisplayTimeZone
timezone
Example: Europe/London
The timezone that the expiration time and date should be formatted to for display. This is in the TZ database format.
AlertType
string
The type of alert that an order will send. Caplin supported statuses are [EMAIL, SMS].
StrategyType
string
The strategy the order was submitted with. This field should not be used by the front end for structuring orders. Comma separated list of Caplin supported values are [SINGLE, IF-DONE-OCO, OCO, IF-DONE, IF-TIMEOUT, IF-DONE-LOOP, LOOP]. OTHER denotes a strategy type that is unsupported.
TraderUsername
string
Example: sales_trader@novobank.co.za
The user who entered the trade. This may be on behalf of themselves, or on behalf of someone else. For example, if the logged in user dealer1@novobank.co.za wishes to make a trade on behalf of user client@customer.co.za, then the value of this field will be dealer1@novobank.co.za. If the user client@customer.co.za makes a trade on behalf of themselves it will be client@customer.co.za.
TOBOUser
string
Example: client@customer.co.za
The user the trade is on behalf of. For example, if the logged in user dealer1@novobank.co.za wishes to make a trade on behalf of user client@customer.co.za, then the value of this field will be client@customer.co.za.
OrderCount
integer
OrderID
string
The id of the order.
ActivationDate
string
What date the strategy should be activated.
ActivationTime
string
What time the strategy should be activated if the ActivationDate was in the format of yyyymmdd.
ActivationLocation
string
Example: Europe/London
When location should be used to evaluate the time to activate if the ActivationDate was in the format of yyyymmdd.
ActivationUTCOffset
string
ExpirationDate
string
What date the strategy should expire.
ExpirationTime
string
What time the strategy should be activated if the ExpirationDate was in the format of yyyymmdd.
ExpirationLocation
string
When location should be used to evaluate the time to expire if the ExpirationDate was in the format of yyyymmdd.
ExpirationUTCOffset
string
ProximityPercentage
decimal
A percentage indicator of an Order's proximity to the market.
AlertFields
AlertPhoneNumber1
string
Phone number that should be called when an order event occurs
AlertPhoneNumber2
string
Phone number that should be called when an order event occurs
AlertPhoneNumber3
string
Phone number that should be called when an order event occurs
AlertPhoneNumber4
string
Phone number that should be called when an order event occurs
AlertPhoneNumber5
string
Phone number that should be called when an order event occurs
AlertPhoneNumber6
string
Phone number that should be called when an order event occurs
AlertPhoneNumber7
string
Phone number that should be called when an order event occurs
AlertPhoneNumber8
string
Phone number that should be called when an order event occurs
AlertPhoneNumber9
string
Phone number that should be called when an order event occurs
AlertPhoneNumber10
string
Phone number that should be called when an order event occurs
AlertEmailAddress1
string
Email address that should be mailed when an order event occurs
AlertEmailAddress2
string
Email address that should be mailed when an order event occurs
AlertEmailAddress3
string
Email address that should be mailed when an order event occurs
AlertEmailAddress4
string
Email address that should be mailed when an order event occurs
AlertEmailAddress5
string
Email address that should be mailed when an order event occurs
AlertEmailAddress6
string
Email address that should be mailed when an order event occurs
AlertEmailAddress7
string
Email address that should be mailed when an order event occurs
AlertEmailAddress8
string
Email address that should be mailed when an order event occurs
AlertEmailAddress9
string
Email address that should be mailed when an order event occurs
AlertEmailAddress10
string
Email address that should be mailed when an order event occurs
LegFields Ln
Ln_Editable
boolean
Whether a trade or order is editable.
Ln_OrderID
string
The id of the order.
Ln_Status
string
Use OrderStatus instead.
Ln_OrderStatus
string
Caplin supported statuses are [PENDING-ACCEPT, PENDING-ACTIVATION, ACTIVE, PARENT-ACTIVE, PENDING-DEACTIVATION, DEACTIVATED, EXPIRED, COMPLETED, REJECTED, PENDING-CANCEL, CANCELLED, CANCELLED-BY-PARTNER]
Ln_SubmittedDateTime
datetime
The time and date a trade was submitted
Ln_LastActionBy
string
The last person or system to perform an action on an order.
Ln_LastActionDateTime
datetime
The time and date of the last action on an order.
Ln_Amount
decimal
The amount of a trade or order in the DealtCurrency.
Ln_Filled
decimal
The amount of an order that has been filled.
Ln_Remaining
decimal
The amount of an order that has not been filled.
Ln_MonitorSide
string
The side that should be monitored for an order to be triggered.
Ln_DealtCurrency
string
The currency of the Amount of a trade or order.
Ln_BuySell
string
The direction of the trade. This always refers to the BaseCurrency, NOT the DealtCurrency.
Ln_ExecutionType
string
The order type. Caplin supported types are [BENCHMARK, CALL_ORDER, MARKET, PEGGED, STOP_LOSS, TAKE_PROFIT]
Ln_BenchmarkType
string
The benchmark order name. For example, ECB.
Ln_LimitPrice
decimal
The price at which a leg should fill.
Ln_Remarks
string
The clients or trader's comments on an order leg - visible to both the Client and the Trader
Ln_ChildLegId
integer
Ln_ChildRelationship
string
Ln_PartnerLegId
integer
Ln_PartnerRelationship
string
Ln_LoopLegId
integer
Ln_FillRate
string
Ln_OrderTenor
string
The tenor the order will settle on for Forward and NDF orders. Either OrderTenor or OrderSettlementDate should be provided but not both.
Ln_OrderSettlementDate
date
The settlement date the order will settle on for Forward and NDF orders. Either OrderTenor or OrderSettlementDate should be provided but not both.
Ln_OrderFixingDate
date
The date an NDF order will fix on if filled.
SalesLegFields Ln
Ln_Margin
decimal
The amount of margin
Ln_Discretion
decimal
Number of points the trader has discretion to fill the order
Ln_TraderRemarks
string
The trader's comments on an order leg - visible to only the Trader
EditOpenAck
MsgType
String
Example: EditOpenAck
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
Refresh
MsgType
String
Example: Refresh
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model