public void SubscribeTicker(BitmexExchange ex, Action <object, TickerEventArgs> callback) { foreach (var contract in _contracts) { ex.SubscribeTopics(true, contract, BtxSubscriptionItem.instrument); } ex.InstrumentChanged += (s, e) => { callback(ex, new TickerEventArgs(e.BtxInstrument)); }; }
public void SubscribeLiquidation(BitmexExchange ex, Action <object, LiquidationEventArgs> liqCallback) { foreach (var contract in _contracts) { ex.SubscribeTopics(true, contract, BtxSubscriptionItem.liquidation); } ex.LiquidationReceived += (s, e) => { liqCallback(ex, e); }; }