sb-trading-components-admin
Trading Components Administration Utility — Runs the StreamBase Trading Components administration client
SYNOPSIS
sb-trading-components-admin
The command accepts no options or arguments at the shell prompt. Run this command to start an interactive administrative client session that provides its own command line that does not show a prompt. On the administrative client's command line, enter subcommands that use the following syntax:
[commandOPTIONS] [ARGS]
DESCRIPTION
The sb-trading-components-admin command starts an interactive session of the StreamBase Administration Client for Trading Components. The admin client lets you identify all instances of StreamBase Trading Comonents handlers running on a network, and allows you to send commands to one or all running handlers using JSON over UDP. The tool lets you interactively subscribe to, unsubscribe from, and ping venues, to list current connections and subscriptions, and other tasks.
Prerequisites
Each handler must be set up with its own TCP and UDP ports that communicate back with the tool. It finds the handlers using a standard UDP ping port that all handlers and the tool share. The default UDP port is 9000 and the default multicast address is 239.0.0.0.
Connections, also called destinations, are identified by a host IP address and a port ID number. For convenience, instead of always providing these two parameters to commands that require them, connections have sequentially assigned reference numbers. Use the listconnections command to print a list of current connections, with each entry prefaced by its reference number.
OPTIONS
When used, the following options must be provided in the order listed below.
-
-hip -
The IP address of a connected venue being referenced. Not needed if
-ris specified. When used, also requires port ID to be specified with-p. -
-pid -
The port number for a connected venue being referenced. Not needed if
-ris specified. When used, also requires host IP address to be specified with-h. -
-rdestination -
destinationis a 0-based integer destination ID for a venue being referenced. Not needed if-hand-pare both specified. Use listconnections to obtain destination IDs. -
-astring -
One or more arguments providing data appropriate to the command. The number and meaning of arguments varies among the commands. Do not repeat
-aif providing more than one argument. The arguments themselves do not require quotes around them. -
-fstring -
stringdesignates a text file name to which the command output is written. Not all commands can write to a file. Some commands generate file names that include host and port identifiers followed by the string entered. Any existing file with the same name is overwritten. See the config command for more information about how the program constructs such filenames.
COMMANDS
-
bounce [[-h
ip-pid| -rrefnum] -aFIX_IDSENDER_IDTARGET_ID], b [[-hip-pid| -rrefnum]-aFIX_IDSENDER_IDTARGET_ID] -
Disconnect from and then reconnect to the specified venue. Takes either 0 or 3
-aarguments. With no arguments, only one venue must be connected; if the FX adapter has multiple FX sessions, this command fails. The three-aarguments to identify a session are(FIX tag 8),BeginString(FIX tag 49), andSenderCompID(FIX tag 56). Bouncing an FX session does not reset destination numbers.TargetCompIDExample:
bounce -r 0 -a FIX.4.4 SENDER_ID TARGET_IDAttempts to bounce the FX session specified by these parameters on the handler at connection 0. No output is returned if the operation succeeds, but you are notified if a valid connection is not specified.
-
config [-h
ip-pid| -rrefnum] [-ffilename] , cfg [-hip-pid| -rrefnum] [-ffilename] -
Prints configuration key-value pairs in configuration file format for the connection described by a
refnumor host and port. Use-fto pipe command output to a file, which can then be used as a configuration file. For example:config -h 10.97.12.333 -p 11111 -f test.logwould create a file named
10.97.12.233_11111_test.log, in which the host and port identifiers are separated with an underscore, followed by an underscore and the provided file name. -
handlers,hs -
Takes no arguments and returns the handler status, version info, and the venue name.
Example response:
Printing all current connections: --------------------------------- [0] : FXSpotStream Market Data [10.181.1.189:11109] [1] : Deutsche Bank AutobahnFX Rapid FIX Market Data [10.181.1.189:11107] ---------------------------------
-
help,help,commandhelp dest,help args -
Provides usage text about commands and their options, and arguments; and about addressing destinations.
- listconnections, lc
-
Prints a list of all active connections to StreamBase FX Servers, including each server's Local Reference Number, IP Address, and Port. The numbers returned in the first column are destination references; provide a reference number returned from this command to the config, logs, snapshot, bounce, and unsubscribe commands with the
-roption. Without a-roption (or-hand-p) options, those commands act on all current subscriptions.Example response:
Printing all current connections: --------------------------------- [0] : Deutsche Bank AutobahnFX Rapid FIX Market Data [10.97.233.40:11107] [1] : FXSpotStream Market Data [10.97.233.40:11109] ---------------------------------
-
logs [-h
ip-pid| -rrefnum], l [-hip-pid| -rrefnum] -
Returns a list of paths to log files for the FX Adapter for the connection at destination
refnumor portidat hostip. For example:logs -h 10.97.12.333 -p 11111or
logs -r 0 - ping, p
-
Causes the client to ping the multicast group to update the connection list with any new FX servers and to remove dead connections. This command is automatically called by the client every 5 seconds, and can also be issued manually (without affecting the periodic pinging).
The ping command produces no output. Use listconnections to identify current group members.
- quit, q
-
Exits the sb-trading-components-admin utility, asking for confirmation first. You can also type Ctrl+C (or Ctrl+D on Linux or OS X) to exit immediately.
-
snapshot [-h
ip-pid| -rrefnum] -asubscription, snap [-hip-pid| -rrefnum] -asubscription -
Takes a reference number or a host-port pair and one
-aargument, the Subscription ID, for which to take a snapshot. Requires the option and that argument. Obtain subscription IDs with the listconnections command. Thus, snapshot -r 0 Is an invalid command, since it fails to provide the requisite subscriptionID.Example:
snapshot -r 0 -a R-1-1403640896972Retrieves a snapshot of the subscription with subscriptionID R-1-1403640896972. The first few lines of a typical response follow:
#Response from: FXSpotStream [10.181.1.189:11109] # Operation SUCCEEDED # Message: # Snapshot query returned 2 quotes [0]: Subscription ID: R-1-1403640896972 MsgSeqNum: 10 Instrument: Instrument Type: SPOT Currency 1: EUR Currency 2: USD Settlement Date: Settlement Date Far: Tenor: Tenor Far: Venue Name: FXSpotStream Quote ID: Q-5-1403640896991MSB ...
-
subscribe [-h
ip-pid| -rrefnum] -aargs, sub [-hip-pid| -rrefnum] -aargs -
Interactively subscribes to a venue, specifying the same thirteen fields as the initial subscription file. It returns a status and message, which reports only on the success or failure of the submission of the command. If the handler rejects the request, it will not be reported by this response.
All thirteen arguments must be provided in the following order:
-
InstrumentType
-
Currency1
-
Currency2
-
SettlementDate
-
SettlementDateFar
-
Tenor
-
TenorFar
-
Side
-
MarketDepth
-
Quantity
-
QuantityFar
-
Duration
-
Currency
Expects all thirteen values. Use
nullin place of any values which you do not want to specify.Example:
subscribe -r 0 -a SPOT EUR USD null null null null null 0 null null null nullPossible response:
#Response from: FXSpotStream [10.181.1.189:11109] # Operation SUCCEEDED # Message: # Sent SUBSCRIBE R-1-1403702057539 request to handler
-
-
subscriptions [-h,ip-pid| -rrefnum] [-acur1[cur2]]subs [-hip-pid| -rrefnum] [-acur1[cur2]] -
Lists subscriptions to FX venues. Takes 0, 1, or 2
-aarguments:-
With no arguments, it returns all active subscriptions.
-
With 1, it filters subscriptions by their currency value.
-
With 2, filters subscriptions by their Instrument's currency pair.
If used, the
cur1andcur2arguments are specified as standard three-character currency codes.Examples:
subsSends a request to list all active subscriptions
subs -a USASends a request to list all subscriptions whose Currency1 or Currency2 value is USA.
subs -a USA EURSends a request to list all subscriptions whose Instrument's Currency1 and Currency2 values are USA and EUR (order is irrelevant). A typical response:
#Response from: FXSpotStream [10.181.1.189:11109] # Operation SUCCEEDED # Message: # Subscription query returned 1 subscriptions [0]: Subscription ID: R-1-1403640896972 MD Req ID: R-1-1403640896972 Instrument: Instrument Type: SPOT Currency 1: EUR Currency 2: USD Settlement Date: Settlement Date Far: Tenor: Tenor Far: Side: BOTH Market Depth: 0 Quantity: Quantity Far: Currency: Duration: Expiration: Pending Unsubscribe Timeout:
-
-
unsubscribe [-h
ip-pid| -rrefnum] -asubscriptionID, unsub [-hip-pid| -rrefnum] -asubscriptionID -
Unsubscribes from a venue. Takes one required argument, the subscription ID to unsubscribe from. Returns a status and a message reporting whether the submission was successful. The response does not indicate whether or not the handler rejected the request. Use the subscriptions command to verify the outcome.
Example:
unsubscribe -r 0 -a R-1-1372341719901Sends an unsubscribe command for the subscription whose
subscriptionIDis R-1-1372341719901. Possible response:#Response from: FXSpotStream [10.181.1.189:11109] # Operation SUCCEEDED # Message: # Sent UNSUBSCRIBE R-1-1372341719901 request to handler
FILES
There is no configuration file for sb-trading-components-admin.
You can use the -f option to send to a file the output
of any command that returns information about a connection. New files having the same
name as existing files overwrite them.
COMMUNICATION PARAMETERS
The sb-trading-components-admin tool uses the following parameters to communicate with running handlers:
- TCPPort
-
(String) — The TCP port used to communicate back to the FX admin client tool.
- UDPListenPort
-
(int) — The UDP port used to listen for ping requests to enable the FX admin client tool to find all the handlers.
- UDPWritePort
-
(int) — The UDP port used to write back the ping response to enable the FX admin client tool to find all the handlers.
- MulticastIP
-
(String) — The multicast address used to communicate with the FX admin client tool.
- AdminModule
-
(String, "Enabled" or "Disabled") — Determines whether the venue handler opens the socket connections required by the FX admin client tool.
These values are appropriately defaulted by all the handlers. Each venue handler must have a unique TCPPort and UDPWritePort. StreamBase Studio automatically assigns a unique port number to each handler instance it creates. However, should more than one instance of a handler exist on a network, users must make sure that their port numbers are unique. To override any of the above parameters, open the Parameters tab of the handler in StreamBase Studio and add the name of the parameter and the value you want to set.
DATA FORMAT
The FX admin client tool uses JSON expressions to communicate directly with the venue handlers. For example, if you use it to subscribe to a venue, it outputs a request like the following (line break added for readability):
{"args":["SPOT","EUR","USD","null","null","null","null","null","0","null","null","null","null"],
"method":"subscribe","requestID":"2e7550b9-a2a6-42b1-a1cb-3d107881ea85"}
The JSON response to such a request might be:
{"requestID":"2e7550b9-a2a6-42b1-a1cb-3d107881ea85",
"methodSuccess":{"success":true,"message":"Sent SUBSCRIBE R-1-1403881738107 request to handler"}}
Commands that print such responses to the screen format them, and do not issue JSON strings to the terminal window.
The JSON protocols could be implemented in a Web page or a LiveView application having capabilities similar to those of the sb-trading-components-admin tool to monitor and control venue handlers through a more convenient user interface.
