public static SubscribeMessage ToFundingTicker(FundingSymbols symbol) { return(new SubscribeMessage { ChannelName = @"fticker", Symbol = EnumStringValueAttribute.GetValue(symbol) }); }
public static SubscribeMessage ToTrades(TradingSymbols symbol) { return(new SubscribeMessage { ChannelName = @"trades", Symbol = EnumStringValueAttribute.GetValue(symbol) }); }
public static SubscribeMessage ToTradingCandles(TradingSymbols symbol, CandlesTimeFrame timeFrame) { return(new SubscribeMessage { ChannelName = @"candles", Key = $"trade:{EnumStringValueAttribute.GetValue(timeFrame)}:{EnumStringValueAttribute.GetValue(symbol)}" }); }
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() }); }
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() }); }