otp.RemoteTS#

class RemoteTS(host, port=None, cep=False)[source]#

Bases: object

Class representing remote tick-server. Can be used in Session as well as the local databases.

Parameters
  • host (str, LoadBalancing, FaultTolerance) – In case of string: string with the domain name or ip-address of the remote server and, optionally, the port number after the : character. Otherwise, configuration of LoadBalancimg and/or FaultTolerance (please, check corresponding classes)

  • port (int, str, optional) – The port number of the remote tick-server. If not specified here, can be specified in the host parameter.

  • cep (bool) – Specifies if the remote server is the CEP-mode tick-server.

Examples

>>> session.use(otp.RemoteTS('server.onetick.com:50015'))  

Combination of LoadBalancing and FaultTolerance can be used for host parameter:

>>> RemoteTS(FaultTolerance(LoadBalancing('host1:4001', 'host2:4002'),
...                         LoadBalancing('host3:4003', 'host3:4004'))