Marfusios / bitfinex-client-websocket

🛠️ C# client for Bitfinex & Ethfinex websocket API version 2.0
Apache License 2.0
55 stars 38 forks source link

Candles #2

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hello, when you complete work with Candles?

Marfusios commented 6 years ago

Hello,

already implemented (version >= 0.0.9), gratitude to @axiomaticcrab.

Usage:

client.Streams.CandlesStream.Subscribe(candles =>
{
    candles.CandleList.OrderBy(x => x.Mts).ToList().ForEach(x =>
        Log.Information($"Candle(Pair : {candles.Pair} TimeFrame : {candles.TimeFrame.GetStringValue()}) --> {x.Mts} High : {x.High} Low : {x.Low} Open : {x.Open} Close : {x.Close}"));
});

client.Send(new CandlesSubscribeRequest("BTC/USD", BitfinexTimeFrame.OneMinute));