Trade model: EditStrategy (order modification)

This page describes the FX Integration API’s EditStrategy 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 8.3.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.

For high-level information on message fields, see Message and record fields. For information about fields in specific messages, see the message specifications below.

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
Example: SALES_RFS
This field is used to indicate to the back end that the user is requesting a trade with Sales functionality.
OrderID
string
The id of the order.
AppID
A unique identifier for the client application
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
Example: GBP
The currency of the Amount of a trade or order.
Ln_BuySell
string
The direction of the trade or trade leg, from the client's perspective. 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 text content of a comment left on a leg of a trade or order.
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_AllowPartialFill
Denotes if this leg may be partially filled
Ln_FillMode
The permitted fill types for this leg, e.g. ANY, MANUAL or AUTO
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.
Ln_OrderFixingDate
date
The date an NDF order will fix on if filled.
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].
EntityId
string
Example: CUSTONE
The entity the trade is on behalf of. For example, if the logged in user user1@customer.co.za wishes to make a trade on behalf of entity CUSTONE, then the value of this field will be CUSTONE. If this field is absent on a leg then the default entity should be presumed.
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.
AppID
A unique identifier for the client application
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
FixingSource
string
Example: WMR 8am London Time
SettlementCurrency
string
Example: GBP
A currency for of settlement instruction
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
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.

For high-level information on message fields, see Message and record fields. For information about fields in specific messages, see the message specifications below.

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.
FullName
string
The full name of the user the trade is on behalf of
EntityId
string
Example: CUSTONE
The entity the trade is on behalf of. For example, if the logged in user user1@customer.co.za wishes to make a trade on behalf of entity CUSTONE, then the value of this field will be CUSTONE. If this field is absent on a leg then the default entity should be presumed.
EntityDescription
string
Example: Customer 1
The description of a trade on behalf of entity.
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
Temperature
string
Example: 2
Shows how close an Order is to its trigger point at the leg level. Shows the maximum of the leg temperatures at the common level [1=cold,2=warm,3=hot,4=very hot,5=target rate reached].
SubmittedDateTime
datetime
Example: 2023-04-19T11:09:45.00Z
The time and date a trade or order was submitted
FixingSource
string
Example: WMR 8am London Time
SettlementCurrency
string
Example: GBP
A currency for of settlement instruction
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
Example: 2023-04-19T11:09:45.00Z
The time and date a trade or order 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
Example: GBP
The currency of the Amount of a trade or order.
Ln_BuySell
string
The direction of the trade or trade leg, from the client's perspective. 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 text content of a comment left on a leg of a trade or order.
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.
Ln_Temperature
string
Example: 2
Shows how close an Order is to its trigger point at the leg level. Shows the maximum of the leg temperatures at the common level [1=cold,2=warm,3=hot,4=very hot,5=target rate reached].
Ln_FilledRate
decimal
Example: 123.012345
The rate at which an order has been 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.
FullName
string
The full name of the user the trade is on behalf of
EntityId
string
Example: CUSTONE
The entity the trade is on behalf of. For example, if the logged in user user1@customer.co.za wishes to make a trade on behalf of entity CUSTONE, then the value of this field will be CUSTONE. If this field is absent on a leg then the default entity should be presumed.
EntityDescription
string
Example: Customer 1
The description of a trade on behalf of entity.
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
Temperature
string
Example: 2
Shows how close an Order is to its trigger point at the leg level. Shows the maximum of the leg temperatures at the common level [1=cold,2=warm,3=hot,4=very hot,5=target rate reached].
SubmittedDateTime
datetime
Example: 2023-04-19T11:09:45.00Z
The time and date a trade or order was submitted
FixingSource
string
Example: WMR 8am London Time
SettlementCurrency
string
Example: GBP
A currency for of settlement instruction
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
Example: 2023-04-19T11:09:45.00Z
The time and date a trade or order 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
Example: GBP
The currency of the Amount of a trade or order.
Ln_BuySell
string
The direction of the trade or trade leg, from the client's perspective. 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 text content of a comment left on a leg of a trade or order.
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.
Ln_Temperature
string
Example: 2
Shows how close an Order is to its trigger point at the leg level. Shows the maximum of the leg temperatures at the common level [1=cold,2=warm,3=hot,4=very hot,5=target rate reached].
Ln_FilledRate
decimal
Example: 123.012345
The rate at which an order has been 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