Skip to content

DocOTCmd2_subscribe

Open Trading edited this page Feb 22, 2016 · 11 revisions

OTCmd2 subscribe

WARN: sMt4Dir not found: /c/Program Files/MetaTrader 4 Terminal

Subscribe to messages from RabbitMQ on a given topic:

  sub get               - get the current target for subscribe; defaults to:
                        the first value of default['lOnlineTargets'] in OTCmd2.ini
  sub set TARGET        - set the target for subscribe, must be one of:
                        the values of default['lOnlineTargets'] in OTCmd2.ini
  sub config            - configure the current target for subscribe: [KEY [VAL]]
  sub run TOPIC1 ...    - start a thread to listen for messages,
                          TOPIC is one or more Rabbit topic patterns.
  sub topics            - shows topics subscribed to.
  sub hide TOPIC        - stop seeing TOPIC messages (e.g. tick - not a pattern)
  sub show              - list the message topics that are being hidden
  sub show TOPIC        - start seeing TOPIC messages (e.g. tick - not a pattern)
  sub pprint ?0|1       - seeing TOPIC messages with pretty-printing,
                          with 0 - off, 1 - on, no argument - current value
  sub thread info       - info on the thread listening for messages.
  sub thread stop       - stop a thread listening for messages.
  sub thread enumerate  - enumerate all threads

Common RabbitMQ topic patterns are:

  • # for all messages,
  • tick.# for ticks,
  • timer.# for timer events,
  • retval.# for return values.

You can choose as specific chart with syntax like:

    tick.oChart.EURGBP.240.93ACD6A2.#

The RabbitMQ host and login information is set in the [RabbitMQ] section of the OTCmd2.ini file; see the -c/--config command-line options.

Usage: subscribe [options] get|config|topics|set|thread|hide|show|pprint|run|foo

Options:
  -h, --help  show this help message and exit

DEBUG: atexit

This file is automatically generated from the source code: do not edit.

This file is automatically generated from the source code: do not edit.


Next: DocOTCmd2_publish Parent: DocOTCmd2

Clone this wiki locally