Trading API for C  7.0.0.309536
ctl_trade_listener Struct Reference

Listener interface that should be registered if you wish to receive events for a trade. More...

Data Fields

void(* on_event )(void *context, ctl_provider *provider, ctl_channel *channel, ctl_trade *trade, ctl_tradeevent *ev)
 Invoked when a valid event is received for a trade. More...
 
void(* on_invalid_event )(void *context, ctl_provider *provider, ctl_channel *channel, ctl_trade *trade, ctl_tradeevent *ev, ctl_error reason)
 Invoked when a remote event would trigger an invalid state transition. More...
 

Detailed Description

Listener interface that should be registered if you wish to receive events for a trade.

Field Documentation

void(* ctl_trade_listener::on_event) (void *context, ctl_provider *provider, ctl_channel *channel, ctl_trade *trade, ctl_tradeevent *ev)

Invoked when a valid event is received for a trade.

Parameters
provider- The trading provider.
channel- The trade channel.
trade- The trade that has just been created.
ev- The trade event that has just been received

Typically you would transform the contents of ev into appropriate calls into your trading system.

void(* ctl_trade_listener::on_invalid_event) (void *context, ctl_provider *provider, ctl_channel *channel, ctl_trade *trade, ctl_tradeevent *ev, ctl_error reason)

Invoked when a remote event would trigger an invalid state transition.

Parameters
provider- The trading provider.
channel- The trade channel.
trade- The trade that has just been created.
ev- The trade event that has just been received.
reason- The reason for this method being invoked.

The documentation for this struct was generated from the following file:

Generated on Thu Jun 15 2017 10:22:29 for Trading API for C