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
Currently, I am using type-annotated global variables which I access and update within the callback function, but that doesn't seem very performant. Is there a better way?
The text was updated successfully, but these errors were encountered:
Hey @Phionx, nice to see that someone is actually using this tool!
To be honest, I haven't tried out much variants for accessing the contents of msg.
Could you provide an example which should be improved - or if you find some more efficient and straightforward way of implementing this (or any other) part - this project is open for contributions and I would be happy involve more developer into this project.
The examples only serve as templates that can be used to implement custom strategies. The msg will always be some message that was sent by the Kraken API. The on_message function can't use return values, since it's a callback used internally - the only way to use/extract information that are stored (… or derived from) within msg is to use global variables like structures or some database that will be updated when some condition for msg is matching.
The on_message function is a kind of trigger that one can use to execute other functions like create_order, ... .
To not only rely on data from msg you can query more information at any time using the other functions provided by this tool - or you fill a database with incoming messages to perform analysis on that, create arrays, use the file system, trigger other functions for some condition.
Hi,
Thanks for creating this awesome package!
What is the recommended way to use data from outside of the
msg
argument in the trading strategy withinon_message
?https://docs.juliahub.com/KrakenEx/C18NY/0.1.0/spot/spot_examples/#Spot-WebSocket-Example
Currently, I am using type-annotated global variables which I access and update within the callback function, but that doesn't seem very performant. Is there a better way?
The text was updated successfully, but these errors were encountered: