Open djdjoko opened 7 months ago
That is quite challenging if not entirely impossible because we generate the Python bindings through something called SWIG (https://www.swig.org/). setTimer requires a callback as parameter, and that feature isn't supported in SWIG. Could you elaborate a little bit more about your use case so that we can find a workaround? For example, you need a periodic timer to be triggered (every 1 second or on each exact second moment or ...)? Thank you.
Thanks for your reply! I would like ideally to have a periodic timer as you suggested but subscribing to multiple setTimer events would also work to mimic this behavior. Exact second is not that important but would also be a nice to have. Ideally I want some scheduling for low frequency operations.
We've found a workaround: not ideal at all, but can be used as a workaround. :) See: https://github.com/crypto-chassis/ccapi?tab=readme-ov-file#receive-subscription-events-at-periodic-intervals-including-when-the-market-depth-snapshot-hasnt-changed. That basically serves as a periodic "timer". Let me know if that works for your purpose or not. Meanwhile we continue to seek for a better solution. Thank you!
Thank you,
I will try that :)
On Sat, 2 Mar 2024 at 05:39, cryptochassis @.***> wrote:
We've found a workaround: not ideal at all, but can be used as a workaround. :) See: https://github.com/crypto-chassis/ccapi?tab=readme-ov-file#receive-subscription-events-at-periodic-intervals-including-when-the-market-depth-snapshot-hasnt-changed. That basically serves as a periodic "timer". Let me know if that works for your purpose or not. Meanwhile we continue to seek for a better solution. Thank you!
— Reply to this email directly, view it on GitHub https://github.com/crypto-chassis/ccapi/issues/463#issuecomment-1974292310, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG4JUSFWPNAXWJUAERFOE3YWFJZHAVCNFSM6AAAAABDW4ZDVSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZUGI4TEMZRGA . You are receiving this because you authored the thread.Message ID: @.***>
Is it possible to expose the setTimer function to python? This would be a game changer for me and hopefully other python users :)
Thanks!