You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The kraken API (https://docs.kraken.com/websockets/#message-ohlc) actually only sends one candle at a time, not an array of candles, so I changed the interface accordingly
The API also requires the candle interval parameter which is part of the channel name, so this was also added to the interface
Provided an implementation for Kraken exchange. There is one quirk* mentioned below
Added ws-candles to ExchangeSharpConsole. Also added a IOptionWithPeriod so the candle interval can be specified on commandline - and applied this to the REST-based CandlesOption with the same default value of 1800
I'm not sure if we have formal tests but I tested from the console app and all looked good except for:
*Note that Kraken sends updates to the current candle when there are new trades, and when it does the open-time is the current time, i.e. the open time changes over the life-time of the candle but the close-time does not. Current implementation passes open-time to ParseCandle extension method as MarketCandle.TimeStamp is specified as the open time of the OHLC candle. So you'll see candle updates with new candle timestamp come through.
I do not know if this would be consider correct/desired functionality by the community, or if the open-time should be set as close-time - period so it is constant? It would be a trivial change to var candle = this.ParseCandle(token[1], marketSymbol, interval * 60, 2, 3, 4, 5, 0, TimestampType.UnixSeconds, 7, null, 6); you are welcome to make.
* Update .gitignore
Navigating to a folder using the "Finder" on Mac generates a .DS_Store file holding metadata about the folder (e.g. thumbnails etc.). These files can pollute your git commits and are annoying.
* Update MovingAverageCalculator.cs
Pull methods and expose accessors on base class for consistency.
* Implemented ws-candles for Kraken
* Update ExchangeKrakenAPI.cs
fix candle open time as close time -interval
0 commit comments