-
-
Notifications
You must be signed in to change notification settings - Fork 375
Add ExchangeKrakenAPI.OnGetCandlesWebSocketAsync implementation #600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ExchangeKrakenAPI.OnGetCandlesWebSocketAsync implementation #600
Conversation
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 .gitignore
Pull methods and expose accessors on base class for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the open-time should be set as
close-time - period
so it is constant
Yes, I think it would make more sense to do this, if you can make the change
fix candle open time as close time -interval
I've made this change. It's a little hacky but I don't see a nicer way without changing the design... seems a quirk of Kraken. I tested in console again and you now get something like this, note the volume resets each time the candle timestamp changes:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will merge for now, but if you think of a better way to handle the volume in the future, feel free to send a PR!
IOptionWithPeriod
so the candle interval can be specified on commandline - and applied this to the REST-based CandlesOption with the same default value of 1800I'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 asMarketCandle.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 tovar candle = this.ParseCandle(token[1], marketSymbol, interval * 60, 2, 3, 4, 5, 0, TimestampType.UnixSeconds, 7, null, 6);
you are welcome to make.