Example #1
0
 public static SubscribeMessage ToFundingTicker(FundingSymbols symbol)
 {
     return(new SubscribeMessage
     {
         ChannelName = @"fticker",
         Symbol = EnumStringValueAttribute.GetValue(symbol)
     });
 }
Example #2
0
 public static SubscribeMessage ToTrades(TradingSymbols symbol)
 {
     return(new SubscribeMessage
     {
         ChannelName = @"trades",
         Symbol = EnumStringValueAttribute.GetValue(symbol)
     });
 }
Example #3
0
 public static SubscribeMessage ToTradingCandles(TradingSymbols symbol, CandlesTimeFrame timeFrame)
 {
     return(new SubscribeMessage
     {
         ChannelName = @"candles",
         Key =
             $"trade:{EnumStringValueAttribute.GetValue(timeFrame)}:{EnumStringValueAttribute.GetValue(symbol)}"
     });
 }
Example #4
0
 public static SubscribeMessage ToRawOrderBook(FundingSymbols symbol, BooksLimit limit)
 {
     return(new SubscribeMessage
     {
         ChannelName = @"book",
         Symbol = EnumStringValueAttribute.GetValue(symbol),
         Precision = EnumStringValueAttribute.GetValue(BooksPrecision.NoAggregation),
         Length = ((int)limit).ToString()
     });
 }
Example #5
0
 public static SubscribeMessage ToOrderBook(FundingSymbols symbol, BooksPrecision precision, BooksFrequency frequency,
                                            BooksLimit limit)
 {
     return(new SubscribeMessage
     {
         ChannelName = @"book",
         Symbol = EnumStringValueAttribute.GetValue(symbol),
         Precision = EnumStringValueAttribute.GetValue(precision),
         Frequency = EnumStringValueAttribute.GetValue(frequency),
         Length = ((int)limit).ToString()
     });
 }