Contents
The TIBCO StreamBase® Adapter for GAIN GTX allows a StreamBase application to receive Foreign Exchange (FX) market data from, place orders with, and receive trading-related events from a GAIN GTX ECN server. The GAIN GTX adapter is a single, bidirectional adapter that can both send and receive GTX messages. To facilitate its use in EventFlow diagrams, the adapter is represented as an input adapter and an output adapter, with separate icons in the StreamBase Studio Palette view. These icons must be used as a pair that shares a single GTX connection (described below in Linking Input and Output Adapters).
The adapter has the following capabilities:
-
Establishes a connection to the GAIN GTX server.
-
Subscribes to market data for specific FX currency pairs, as well as publishes prices and places trades for those subscribed symbols.
-
Converts the incoming events from the GTX server and sends them as tuples to the StreamBase application.
-
Converts incoming tuples from the StreamBase application into GTX messages that are then sent to the GTX server.
-
Optionally receives commands from the StreamBase application to log on to, or log out from, the GAIN GTX server.
The input side of the adapter exposes a set of output ports, and the output side exposes a set of input ports, the fields for which are defined later in this document. In addition, each side of the adapter exposes a set of adapter properties as described in Adapter Properties.
Having separate input and output adapter icons for EventFlow applications minimizes the need for loops in EventFlow logic. The input and output adapters share a connection to the GAIN GTX server.
To link GAIN GTX input and output adapters so that they share a single GTX connection, follow these steps:
-
Create a GAIN GTX input adapter and configure it to connect to the GTX server, as described in Adapter Properties Tab. In this input adapter's General tab, note the value of the Name parameter. For clarity, specify a non-default name here. For this example we will use the name
MyGTXTradingInputAdapter
. -
Create an instance of the GAIN GTX output adapter.
-
In this new adapter's Adapter Properties tab, fill in the Share A Connection With The GAIN GTX Input Adapter Named field, enter the name of your input adapter (
MyGTXTradingInputAdapter
in our example).Note
Make sure the spelling matches the input adapter's name exactly or a runtime error will occur, indicating that the specified input adapter is not found.
Settings are used to control most of the behavior of the adapter. The settings are grouped under several tabs in the Properties view in StreamBase Studio.
In the table in this section, the Property column shows each property name as found in the one or more adapter properties tabs of the Properties view for this adapter.
Name: Use this required field to specify or change the name of this instance of this component, which must be unique in the current EventFlow module. The name must contain only alphabetic characters, numbers, and underscores, and no hyphens or other special characters. The first character must be alphabetic or an underscore.
Adapter: A read-only field that shows the formal name of the adapter.
Class name: Shows the fully qualified class name that implements the functionality of this adapter. If you need to reference this class name elsewhere in your application, you can right-click this field and select Copy from the context menu to place the full class name in the system clipboard.
Start with application: If this field is set to Yes (default) or to a module parameter that evaluates to true
, this instance of this adapter starts as part of the JVM engine that runs this EventFlow module. If this field is set to
No or to a module parameter that evaluates to false
, the adapter instance is loaded with the engine, but does not start until you send an sbadmin resume command, or until you start the component with StreamBase Manager.
Enable Error Output Port: Select this check box to add an Error Port to this component. In the EventFlow canvas, the Error Port shows as a red output port, always the last port for the component. See Using Error Ports to learn about Error Ports.
Description: Optionally enter text to briefly describe the component's purpose and function. In the EventFlow canvas, you can see the description by pressing Ctrl while the component's tooltip is displayed.
Property | Data Type | Default | Description |
---|---|---|---|
Server URL | string | none | A valid URL pointing to the GAIN GTX server to which to connect.
NoteUnless the Configuration File property is specified, this setting is required. |
User Name | string | none | The username to use when signing on to the GTX server.
NoteUnless the Configuration File property is specified, this setting is required. |
Password | string | none | The password to use when signing on to the GTX server.
NoteUnless the Configuration File property is specified, this setting is required. |
Application Name | string | none | A string such as "Acme Corp. Trading App" to be used as the application name to be recorded as the "User-Agent" identifier in server connection logs. |
Configuration File | drop-down list | none | The name a file containing the necessary parameters to use when connecting to the GAIN GTX server. The format of this file
is expected to conform to the Java Properties file format. As of this writing the following properties may be included in
this file:
This control is a drop-down list that shows the available files in the current Studio project. Import the GAIN GTX configuration into your Studio project so that it can be selected in the list. |
Connect On Startup | check box | true (selected) | When selected, the adapter attempts to connect to the GAIN GTX server immediately after starting. If cleared, the adapter remains idle after starting and waits for a Connect command as described in Input Port Overview. |
Reconnect Retries | int | 0 | The number of times the adapter is to attempt reconnection if the first connection attempt is unsuccessful. |
Reconnect Interval (in seconds) | int | 10 | Specifies the number of seconds to wait between reconnection attempts. This value is ignored unless Reconnect Retries has a non-zero positive value. |
Property | Data Type | Default | Description |
---|---|---|---|
Use Proxy | check box | false (cleared) | If selected, this option causes the adapter to go through the specified proxy (see settings below) to access the GAIN GTX server. |
Proxy Host Name | string | none | Name of the proxy server to use. |
Proxy Host Port | int | none | Port number of the proxy server to use. |
Proxy Type | drop-down list | NONE | The type of proxy connection to use. Available values are:
|
Proxy User Name | string | none | User name to use when connecting to the proxy server. |
Proxy Passphrase | string | none | Passphrase to use when connecting to the proxy server. |
Property | Data Type | Default | Description |
---|---|---|---|
Log Level | drop-down list | INFO | Controls the level of verbosity the adapter uses to send notifications to the console. This setting can be higher than the containing application's log level. If set lower, the system log level will be used. Available values, in increasing order of verbosity, are: OFF, ERROR, WARN, INFO, DEBUG, TRACE. |
Report Profiling Data | check box | false (cleared) | When selected, the adapter collects data on how long it takes to process incoming messages, and regularly reports the results to the console. Reported data includes the average, standard deviation, minimum and maximum times (in microseconds) taken to receive each market data message, convert it into a tuple and send it to the application. This is useful when troubleshooting performance issues in your application. |
Reporting Interval (in # of messages) | int | 10000 | When Report Profiling Data is checked, this property specifies the number of incoming messages after which performance data is reported to the console. A positive integer is expected. This property is ignored if Report Profiling Data is cleared. |
Use the Concurrency tab to specify parallel regions for this instance of this component, or multiplicity options, or both. The Concurrency tab settings are described in Concurrency Options, and dispatch styles are described in Dispatch Styles.
Caution
Concurrency settings are not suitable for every application, and using these settings requires a thorough analysis of your application. For details, see Execution Order and Concurrency, which includes important guidelines for using the concurrency options.
This tab is identical to the one exposed by the GAIN GTX input adapter. See General Tab.
Property | Data Type | Default | Description |
---|---|---|---|
Share A Connection With The GAIN GTX Input Adapter Named | string | none | The name of the GAIN GTX input adapter with which to share a connection. |
This tab is identical to the one exposed by the GAIN GTX input adapter. See Logging Tab.
This tab is identical to the one exposed by the GAIN GTX input adapter. See Concurrency Tab.
The GAIN GTX input adapter has five output ports:
-
The first port routes the
Market Data
messages received from the GAIN GTX server. -
The second port routes incoming
Trade Execution Report
messages received from the server. -
The third port routes incoming
Firm Feed Execution Report
messages received from the server. -
The fourth port routes status messages, such as connection and disconnection from the server, error conditions, and so on.
-
The fifth port routes asynchronous order status messages. These are generated to inform the user of an order's current state in the system (Accepted, Matched, and so on).
The schema for each output port is described in the following sections:
The first output port routes incoming Market Data
messages to the StreamBase application. In order to receive such messages for a given currency pair, you must first subscribe
to it (see Subscription Input Port).
The schema for this port is pre-set by the adapter, and is described in the following table:
Field Name | Field Type | Description | ||
---|---|---|---|---|
requestedSymbol | string | |||
requesterBookProperties | string | |||
marketParameters | tuple | Contains values common to all the data entries in this message. | ||
^ | symbol | string | Symbol in CCY1/CCY2 format.
|
|
displayPrecision | int | Positive number of decimal places which should be used for displaying prices in this book. | ||
maxBuyAmount | long | PRE-CLEARED TRADING LIMIT: Returns the maximum order size that can result in a complete fill for a BUY order from viewingFirmName assuming sufficient market depth is available. | ||
maxSellAmount | long | PRE-CLEARED TRADING LIMIT: Returns the maximum order size that can result in a complete fill for a SELL order from viewingFirmName assuming sufficient market depth is available. | ||
onePip | double | Customary value of one pip in this market. | ||
priceIncrement | double | All prices displayed in this book will be a multiple of this value. | ||
tradeDate | timestamp | Current trade date. | ||
valueData | timestamp | Current value date. | ||
viewingFirmName | string | Name of the firm for which this custom limit-order book view has been constructed. | ||
viewingUserName | string | Name of the firm for which this custom limit-order book view has been constructed. | ||
marketDataEntries | list<tuple> | Contains the list of MarketDataEntries contained in this message.
|
||
^ | orderID | string | String Order ID associated with this entry if it is available, null otherwise. | |
price | double | Limit order price for the underlying order. | ||
size | double | Available size (adjusted by credit constraints and previous fills) of the underlying order. | ||
enteringFirmName | string | Identifying code for the entering firm name if it is available, null otherwise. | ||
enteringUserName | string | Login name of the entering user if it is available, null otherwise. | ||
matchIncrement | double | Non-null value if this entry is restricted to matching in multiples of the specified positive value. | ||
minQty | double | Non-null value if this entry is restricted to matching in amounts equal to or larger than the specified positive value. | ||
positionNum | int | Display position of this bid or offer, numbered from most competitive to least competitive, per market side, beginning with 1. | ||
isAON | boolean | |||
isRestrictedBySelfDealRule | boolean | True if the price maker is in your own firm and your account is configured to disallow self-dealing. | ||
scope | string | FIX Scope(546) of the entry, or zero if the subscriber is not configured to receive that information. Possible values are:
|
||
side | string | BID_SIDE if this entry is an order to BUY CCY1, or OFFER_SIDE if this is an order to SELL CCY1.
|
The second output port routes incoming Trade Execution Report
messages to the StreamBase application (once you've subscribed for trading — see Subscription Input Port).
The schema for this port is pre-set by the adapter, and is described in the following table:
Field Name | Field Type | Description | |||
---|---|---|---|---|---|
possDup | boolean | ||||
bulkLoad | boolean | True for any and all trades that are reported in a "bulk load" operation immediately after a new trading subscription is made. | |||
sequenceNumber | long | The GTX sequence number that can be used to query subsequent trades. | |||
symbol | string | ||||
tradeID | string | A short deal identifier, same for all parties to the trade. | |||
tradeDate | timestamp | ||||
amount | double | Quantity of the first currency which was bought or sold. | |||
counterAmount | double | Quantity of the second currency that was bought or sold in exchange for amount. | |||
farAmount | double | ||||
farCounterAmount | double | ||||
counterpartyID | string | String identifier for the counterparty firm. | |||
forwardPoints | double | swapRate value after scaling by the standard scaling factor for this currency pair, which usually (but not always) results in a number of pips. | |||
otherCustomOrderInfo | string | String identifier that was attached to the order by specifying a FIX PartyRole(452) of CONTRA_TRADER(37), or null if that party is not available in this Execution Report. | |||
otherOrderID | string | String identifier of the order entered by the FIX PartyRole(452) of CONTRA_TRADER(37), or null if that party is not available in this Execution Report. | |||
otherOrderProperties | tuple | "Advanced properties" of the order entered by the FIX PartyRole(452) of CONTRA_TRADER(37), or null if that party is not available in this Execution Report. | |||
^ | properties | list<tuple> | Contains a list of the properties, represented by a simple tag|value tuple. | ||
^ | tag | string | |||
value | string | ||||
possibleProblems | list<string> | A collection of strings describing unrecognized tags and other issues that might cause problems but which GTX will attempt to pass along anyway. | |||
definiteProblems | list<string> | A collection of strings describing parse errors that will prevent the affected fields from being processed correctly. | |||
ourCustomOrderInfo | string | ||||
ourOrderID | string | String identifier of the trader's order, useful for tracking multiple executions which represent partial fills of a single order. | |||
ourOrderProperties | tuple | "Advanced properties" of the order. | |||
^ | properties | list<tuple> | Contains a list of the properties, represented by a simple tag|value tuple. | ||
^ | tag | string | |||
value | string | ||||
possibleProblems | list<string> | A collection of strings describing unrecognized tags and other issues that might cause problems but which GTX will attempt to pass along anyway. | |||
definiteProblems | list<string> | A collection of strings describing parse errors that will prevent the affected fields from being processed correctly. | |||
ourPartyID | string | String identifying the firm or account from whose perspective this trade is being reported. | |||
parties | list<tuple> | Names and roles of the parties involved the trade. | |||
^ | partyRole | string | FIX PartyRole(452) value for this party. | ||
name | string | Name of this party. | |||
rate | double | Price at which this trade was executed. | |||
spotRate | double | For a forward trade, returns the spot rate, equivalent to the Rate minus the SwapRate. | |||
spotDate | timestamp | ||||
swapRate | double | For a forward trade, returns the unscaled forward points, that is, as a value that can be directly added or subtracted to other prices. | |||
swapNearRate | double | ||||
swapFarRate | double | ||||
swapNearDate | timestamp | ||||
swapFarDate | timestamp | ||||
forwardDate | timestamp | ||||
isBuying | boolean | True of this party was the buyer of amount, false if seller. | |||
isForward | boolean | ||||
isSpot | boolean | ||||
isSwap | boolean |
The third output port routes incoming Firm Feed Execution Report
messages to the StreamBase application (once you've subscribed for Firm Feed functionality — see Subscription Input Port). The schema for this port is identical to that of the Trade Execution Report
Output port above.
The schema for this port is pre-set by the adapter, and is described in this section: Trade Execution Report Output Port Schema.
Note
Every Execution Report received via this port MUST subsequently be acknowledged via an ACKNOWLEDGE_REPORT command to the Output Adapter's Command input port (see Command Input Port).
The fourth output port routes incoming Status
messages to the StreamBase application.
The schema for this port is pre-set by the adapter, and is described in the following table:
Field Name | Field Type | Description | ||
---|---|---|---|---|
statusType | string | The type of event this tuple is describing. One of:
|
||
moreInfo | string | Contains extra information when the statusType is one of: | ||
masterSwitchEnabled | boolean | True if the "master switch" controlling all Firm Feed subscriptions is currently allowing prices to be displayed. | ||
previousConnectionStatus | tuple | Describes the previous state of the connection to the GTX server. This may be null if this status tuple was generated as a
result of a GET_CONNECTION_STATUS command (see Command Input Port).
|
||
^ | isConnected | boolean | True if the connection is up. | |
clockSkewMillis | long | Smoothed estimate of the clock skew, positive if the GTX server clock is ahead of the client clock. | ||
roundTripMillis | int | Most recent round-trip latency observation. | ||
nextAttempt | timestamp | If connection was unexpectedly disconnected, returns the approximate time (according to the local client clock) at which a reconnection attempt is scheduled, otherwise returns zero. | ||
disconnectCause | string | Describes the cause of the most recent disconnect or the reason for a login failure. | ||
newConnectionStatus | tuple | Describes the current state of the connection to the GTX server. | ||
^ | isConnected | boolean | True if the connection is up. | |
clockSkewMillis | long | Smoothed estimate of the clock skew, positive if the GTX server clock is ahead of the client clock. | ||
roundTripMillis | int | Most recent round-trip latency observation. | ||
nextAttempt | timestamp | If connection was unexpectedly disconnected, returns the approximate time (according to the local client clock) at which a reconnection attempt is scheduled, otherwise returns zero. | ||
disconnectCause | string | Describes the cause of the most recent disconnect or the reason for a login failure. | ||
tempOrderID | string | If this status tuple is of type ORDER_SENT , this field will contain the orderID supplied in the original SEND_ORDER tuple sent to the Trading input port (see Trading Input Port).
|
||
orderID | string | Contains the "official" order ID as assigned by GTX. This is the order ID that must be used to refer to this order after an
order is sent (for example, when requesting the status of the order via a GET_ORDER_STATUS command on the Command input port, or when canceling the order via a CANCEL command sent on the Trading input port).
|
||
isActive | boolean | For tuples of statusType ORDER_STATUS , contains true if this trade is currently active or false if the order is canceled, filled, expired, or replaced.
|
||
execReports | list<ExecutionReport> | When a command of type GET_ORDER_STATUS is sent with includeExecReports=true, this list will contain the Exection Reports (see Trade Execution Report Output Port Schema) for all partial fills that have occurred on this order.
|
The fifth output port routes to the StreamBase application all incoming messages resulting from notifications of state changes
and fills for an order submitted via the Trading
port's Send_Order_Async
functionality (see Trading Input Port).
The schema for this port is pre-set by the adapter, and is described in the following table:
Field Name | Field Type | Description | |||
---|---|---|---|---|---|
type | string | The type of status represented by this tuple. Possible values are:
|
|||
symbol | string | ||||
side | string | Literal strings buy or sell .
|
|||
orderQty | long | ||||
cashOrderQty | long | ||||
limitPrice | long | ||||
tempOrderID | string | If this status tuple is of type ACCEPTED , this field contains the orderID supplied in the original SEND_ORDER tuple sent to the Trading input port (see Trading Input Port).
|
|||
orderID | string | Contains the official order ID as assigned by GTX. This is the order ID that must be used to refer to this order after an
order is sent (for example, when requesting the status of the order via a GET_ORDER_STATUS command on the Command input port, when canceling the order via a CANCEL command sent on the Trading input port, or when receiving an Execution Report or other order status report via this port).
|
|||
cumulativeAmount | double | ||||
cumulativeCounterAmount | double | ||||
averagePrice | double | ||||
text | string | For status tuples of type FROZEN , contains the final disposition of the order (such as FILLED ).
|
|||
advancedProperties | tuple | The advanced properties of the order. | |||
^ | properties | list<tuple> | Contains a list of the properties, represented by a simple tag-value tuple. | ||
^ | tag | string | |||
value | string | ||||
possibleProblems | list<string> | A collection of strings describing unrecognized tags and other issues that might cause problems but which GTX attempts to pass along anyway. | |||
definiteProblems | list<string> | A collection of strings describing parse errors that prevent the affected fields from being processed correctly. | |||
tradeIDs | list<string> | For status tuples of type MATCHED , contains the cumulative list of all trades that have occurred so far to fill this order.
|
The adapter has four input ports:
-
The first port, Command Input Port, allows applications to send commands to the adapter.
-
The second port, Subscription Input Port, allows applications to subscribe to receive market data, trading and firm feed updates from the GAIN GTX server.
-
The third port, Trading Input Port, allows applications to place trades.
-
The fourth port, Firm Feed Prices Input Port, allows applications to publish multiple bid and offer prices to GTX as a stream.
The Command input port is used to instruct the adapter to perform certain actions, such as connect or disconnect from the GTX server, get the status of an order, and so on.
The schema for the Command Input port is expected to contain the following fields:
Field Name | Field Type | Field Description |
---|---|---|
command |
string | Contains the name of the command to execute. This field is required to be non-null for all supported commands. See below for a list of the available commands. |
state |
boolean | For commands of type SET_MASTER_SWITCH_STATE , must contain the desired state (true=enabled) of the Firm Feed master switch.
This field may be left null for all other commands. |
orderID |
string | For commands of type GET_ORDER_STATUS , must contain the ID of the order (as given by the Status output port's orderID field) for which status is desired.
This field may be left null for all other commands. |
includeExecReports |
boolean | For commands of type GET_ORDER_STATUS , set to true to request the execReports field to be filled out when generating the ORDER_STATUS tuple on the Status output port. If left null or set to false, the execReports field will be left null.
This field may be left null for all other commands. |
seqNum |
long | For commands of type DOWNLOAD_TRADES , will cause a tuple of type DOWNLOADED_TRADES to be issued on the Status port containing all trades done since the trade which had the specified sequence number.
For commands of type This field may be left null for all other commands. |
tradeDate |
timestamp | For commands of type DOWNLOAD_TRADES , if seqNum is left null this will cause a tuple of type DOWNLOADED_TRADES to be issued on the Status port containing all trades done on the given date. Note that the trade date rolls at 17:00 New
York time.
This field may be left null for all other commands. |
Available commands include:
-
Connect: Log on to the configured GAIN GTX server. Required fields:
-
command
: Should contain the valueConnect
. Case is unimportant.
-
-
Disconnect: Log out of the GAIN GTX server. Required fields:
-
command
: Should contain the valueDisconnect
. Case is unimportant.
-
-
Get_Connection_Status: Request a Status tuple that describes the current state of the connection to the GTX server. The resulting tuple on the Status output port will be of statusType=CONNECTION_STATUS. Required fields:
-
command
: Should contain the value Get_Connection_Status. Case is unimportant.
-
-
Get_Order_Status: Query the GTX server to obtain the status of the given order, via a tuple sent to the Status port. The resulting tuple will be of type statusType=
ORDER_STATUS
. Required fields:-
command
: Should contain the valueGet_Order_Status
. Case is unimportant. -
orderID
: The ID of the order for which status is desired, as given by the orderID field of the statusType=ORDER_SENT Status tuple previously issued for this order. -
includeExecReports
: If this field is non-null and its value is true, the execReports field of the resulting statusType=ORDER_STATUS
Status tuple will contain the Exection Reports (see Trade Execution Report Output Port Schema) for all partial fills that have occurred on this order.
-
-
Download_Trades: Request from the GTX server a list of either: all trades of the current trading day starting with the given sequence number (if seqNum is non-null), or all trades that occurred on the given trading date (if tradeDate is non-null instead). Required fields:
-
command
: Should contain the valueDownload_Trades
. Case is unimportant.
Also, one (and only one) of these fields must be specified:
-
seqNum
: Return all trades done since the trade which had the specified sequence number. If value is zero, return all trades since the beginning of the current trading date (which rolls at 17:00 New York time Monday through Thursday and on Saturday). -
tradeDate
: Return all trades done on the specified trading date.
-
-
Acknowledge_Report: Each Execution Report received via the Input Adapter's Firm Feed Execution Report Output port (see Firm Feed Execution Report Output Port Schema) MUST be acknowledged via this command. Required fields:
-
command
: Should contain the valueAcknowledge_Report
. Case is unimportant. -
seqNum
: Should contain the value found in the execution report tuple'ssequenceNumber
field..
-
-
Get_Master_Switch: Request from the GTX server the state of the Firm Feed master switch, controlling whether all Firm Feed subscriptions are allowed to display prices. Required fields:
-
command
: Should contain the valueGet_Master_Switch
. Case is unimportant.
-
-
Set_Master_Switch: Explicitly set the state of the GTX server's master switch state which controls whether Firm Feed subscriptions are allowed to display prices. Required fields:
-
command
: Should contain the valueSet_Master_Switch
. Case is unimportant. -
state
: True if the switch os to be enabled, false otherwise. If field is left null, a value of false is assumed.
-
The Subscription Input port allows applications to subscribe to receive market data, trading and firm feed updates from the GAIN GTX server.
The schema for the Subscription Input port is expected to contain the following fields:
Field Name | Field Type | Description | |||
---|---|---|---|---|---|
subscriptionType | string | Contains the type of the subscription desired. This field is required to be non-null for all supported subscriptions. Subscription
types include (case is unimportant):
|
|||
symbol | string | For a subscriptionType of type MarketData or FirmFeed , designates the currency pair for which a subscription is desired. Otherwise, may be left null.
|
|||
advancedBookPropertiesString | string | (MarketData subscriptions only) A semicolon-delimited string of tag=value properties such as "MarketDepth=3;AggregatedBook=Y" or "264=3;266=Y".
May be left null.
|
|||
advancedBookProperties | list<tuple> | (MarketData subscriptions only) Convenience construct allowing to specify tag=value properties as with the advancedBookPropertiesString field without having to construct the string directly.
|
|||
^ | tag | string | |||
^ | value | string | |||
removeSubscription | boolean | Must be non-null and true if the desire is to unsubscribe instead of subscribing. | |||
lastSequenceNumber | long | For a subscriptionType of type Trading , subscribes for all trades done by any user of your firm since the trade which had the specified sequence number. If left
null or if the value is 0, returns all trades since the beginning of the current trade date.
These trade execution reports are sent via the input adapter's Trade Execution Report output stream. |
|||
key | int | For a subscriptionType of type FirmFeed , this is used in conjunction with the symbol field to uniquely identify the subscription. This key will need to be specified for all subsequent command involving this
Firm Feed subscription.
|
The Trading Input port allows you to place and cancel orders with the GTX system (once you have subscribed for trading — see Subscription Input Port).
The schema is expected to contain the following fields:
Field Name | Field Type | Description | |||
---|---|---|---|---|---|
type | string | The type of operation to perform. One of:
Required field. Case is unimportant. Orders can be sent synchronously or asynchronously. If an order is sent asynchronously using SEND_ORDER_ASYNC, server messages regarding that order are emitted by the input adapter on the port for asynchronous order status messages. See Order Status Output Port Schema. |
|||
orderID | string | For type=SEND_ORDER or SEND_ORDER_ASYNC , this should contain a user-provided identifier which will be used by the adapter as the value of tempOrderID in the resulting ORDER_SENT status tuple (if SEND_ORDER was used) or in the resulting ACCEPTED order status tuple (if SEND_ORDER_ASYNC was used). In that same status tuple, the GTX-supplied, "real" order ID will be placed in the orderID field. This way applications can obtain the "real" ID for their order, which must be used in all subsequent operations for
this order (such as Cancel, Order Status).
For type= For type= |
|||
symbol | string | The currency pair in AAABBB format (such as EURUSD).
For |
|||
side | string | The word "Buy" or "Sell" referring to whether the first (LHS) currency is being bought or sold. Case is ignored.
For |
|||
qty | double | The amount of the first (LHS) currency to buy or sell, or null if a cashOrderQty is specified.
For |
|||
cashQty | double | The amount of the second (RHS) currency that is desired, or null if an ordinary LHS orderQty is specified.
For |
|||
limitPrice | double | The limit price, or null for a market order. If the desired quantity cannot be filled at or better than the limit price, then
nothing is done (the entire quantity is cancelled).
For |
|||
advancedOrderProperties | double | A list of tag | value tuples representing additional FIX order fields to use when sending this order.
For |
|||
^ | tag | string | FIX tag, either in numerical form (such as "11") or by name (such as "ClOrdID"). | ||
^ | value | string | FIX value. |
The Firm Feed Prices Input port allows applications to publish multiple bid and offer prices to GTX as a stream (once you have subscribed for Firm Feed functionality — see Subscription Input Port).
The schema for the Firm Feed Prices Input port is expected to contain the following fields:
Field Name | Field Type | Description | |||
---|---|---|---|---|---|
type | string | The type of operation to perform. One of:
Required field. Case is unimportant. |
|||
symbol | string | The symbol identifying (along with key, below) this Firm Feed. This value must match the one passed in the symbol field when subscribing to this Firm Feed (see Subscription Input Port).
Required field. |
|||
key | int | The key identifying (along with symbol, above) this Firm Feed. This value must match the one passed in the key field when subscribing to this Firm Feed (see Subscription Input Port).
Required field. |
|||
sizes | list<double> | List of the new bids (if positive values) or offers (if negative) to transmit to GTX for immediate display.
Required for |
|||
prices | list<double> | List of prices to display.
Required for |
|||
feedItemNum | int | For type=SET_SPOT_TIERS , this value will later be used by GTX in any ExecutionReport (in the ourCustomOrderInfo field) resulting from a match with these prices. Note there can be multiple matches against the same "item".
Required for |
|||
feedValueDate | timestamp | The prices will not be displayed if the date in this field does not match the GTX spot date. Pass null to bypass this validity
check.
Operations other than |
|||
feedProperties | double | For type=PUT_FEED_PROPERTIES , contains the list of price feed properties to set. Valid properties are:
This field will be ignored by other operations. |
|||
^ | tag | string | |||
^ | value | string |
The adapter uses typecheck messages to help you configure the adapter in your StreamBase application. In particular, the adapter generates typecheck messages for the following reasons:
-
A required property is missing.
-
One or more required fields in the Command input port is missing or is of the wrong type or size.
When suspended, the adapter remains connected to the GTX server if it was already connected, but all incoming messages and events from the server are dropped.
When resumed, the adapter starts routing incoming messages and events from the server to the StreamBase application again.