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:

command [OPTIONS] [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.

-h ip

The IP address of a connected venue being referenced. Not needed if -r is specified. When used, also requires port ID to be specified with -p.

-p id

The port number for a connected venue being referenced. Not needed if -r is specified. When used, also requires host IP address to be specified with -h.

-r destination

destination is a 0-based integer destination ID for a venue being referenced. Not needed if -h and -p are both specified. Use listconnections to obtain destination IDs.

-a string

One or more arguments providing data appropriate to the command. The number and meaning of arguments varies among the commands. Do not repeat -a if providing more than one argument. The arguments themselves do not require quotes around them.

-f string

string designates 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 -p id | -r refnum] -a FIX_ID SENDER_ID TARGET_ID], b [[-h ip -p id | -r refnum] -a FIX_ID SENDER_ID TARGET_ID]

Disconnect from and then reconnect to the specified venue. Takes either 0 or 3 -a arguments. With no arguments, only one venue must be connected; if the FX adapter has multiple FX sessions, this command fails. The three -a arguments to identify a session are BeginString (FIX tag 8), SenderCompID (FIX tag 49), and TargetCompID (FIX tag 56). Bouncing an FX session does not reset destination numbers.

Example:

bounce -r 0 -a FIX.4.4 SENDER_ID TARGET_ID

Attempts 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 -p id | -r refnum] [-f filename] , cfg [-h ip -p id | -r refnum] [-f filename]

Prints configuration key-value pairs in configuration file format for the connection described by a refnum or host and port. Use -f to 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.log

would 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 command, help 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 -r option. Without a -r option (or -h and -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 -p id | -r refnum], l [-h ip -p id | -r refnum]

Returns a list of paths to log files for the FX Adapter for the connection at destination refnum or port id at host ip. For example:

logs -h 10.97.12.333 -p 11111

or

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 -p id | -r refnum] -a subscription, snap [-h ip -p id | -r refnum] -a subscription

Takes a reference number or a host-port pair and one -a argument, 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-1403640896972

Retrieves 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 -p id | -r refnum] -a args, sub [-h ip -p id | -r refnum] -a args

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:

  1. InstrumentType

  2. Currency1

  3. Currency2

  4. SettlementDate

  5. SettlementDateFar

  6. Tenor

  7. TenorFar

  8. Side

  9. MarketDepth

  10. Quantity

  11. QuantityFar

  12. Duration

  13. Currency

Expects all thirteen values. Use null in 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 null

Possible response:

#Response from: FXSpotStream [10.181.1.189:11109]
# Operation SUCCEEDED
# Message:
# Sent SUBSCRIBE R-1-1403702057539 request to handler
subscriptions [-h ip -p id | -r refnum] [-a cur1 [cur2]], subs [-h ip -p id | -r refnum] [-a cur1 [cur2]]

Lists subscriptions to FX venues. Takes 0, 1, or 2 -a arguments:

  • 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 cur1 and cur2 arguments are specified as standard three-character currency codes.

Examples:

subs

Sends a request to list all active subscriptions

subs -a USA

Sends a request to list all subscriptions whose Currency1 or Currency2 value is USA.

subs -a USA EUR

Sends 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 -p id | -r refnum] -a subscriptionID, unsub [-h ip -p id | -r refnum] -a subscriptionID

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-1372341719901

Sends an unsubscribe command for the subscription whose subscriptionID is 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.

SEE ALSO

sbadmin
sbc
sbd(1)