コード例 #1
0
 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));
     };
 }
コード例 #2
0
 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);
     };
 }