예제 #1
0
 public async Task CloseCandlestickStreamAsync(string symbol, BinanceChartInterval interval) =>
 await CloseStreamAsync(new BinanceCandlestickStreamNameInfo(symbol, interval));
예제 #2
0
 public async Task <BinanceResponse <List <BinanceCandlestickData> > > GetCandlestickData(string symbol, BinanceChartInterval interval, long?startTime = null, long?endTime = null, int?limit = null) =>
 await MakeRequestAsync <List <BinanceCandlestickData> >(HttpMethod.Get, "api/v1/klines",
                                                         $"symbol={symbol.ToUpper()}&" +
                                                         $"interval={interval.Format()}" +
                                                         $"{BinanceRequest.TryGetRequestParameter(startTime, "startTime")}" +
                                                         $"{BinanceRequest.TryGetRequestParameter(endTime, "endTime")}" +
                                                         $"{BinanceRequest.TryGetRequestParameter(limit, "limit")}");
예제 #3
0
 //
 public async Task OpenCandlestickStreamAsync(string symbol, BinanceChartInterval interval) =>
 await OpenStreamAsync <BinanceEventKline>(new BinanceCandlestickStreamNameInfo(symbol, interval));
 public BinanceCandlestickStreamNameInfo(string symbol, BinanceChartInterval interval)
     : base(symbol) => this.Interval = interval;