Open wakamex opened 12 months ago
This is a known issue. Unfortunately, solution number 2 isn't feasible because anvil loses state after some time, and getting shorts/longs needs deltas from the beginning of time. I'll look into solution 1, but on the server side to ensure the analysis pipeline is up to date before returning
Marking this as backlog until after the 17th
need to explore with new refactors, might be able to run data pipeline async
currently, running arbitrary bot actions back-to-back can't be done right away. that's because the second execution instantiates its wallet from the chainsync process running in the background, which may be a few milliseconds behind. I found a
time.sleep(1)
call to be sufficient to let it catch up. however, this is a bit messy and sub-optimal. Avoiding that would be ideal. A few ways to do so are:wait_for_data()
function which waits for chainsync to update to the latest block