Exchange positions synchronization after algo restart


#1

Hello,

I would like to import into catalyst positions already available in my exchange account when I start my algorithm in live trading. What I see is by default only the cash is imported (I’m using Poloniex if that change something).

It seems there is a nice function to actually do that in https://github.com/enigmampc/catalyst/blob/master/catalyst/exchange/exchange.py with the sync_positions method, but this method seems to expect the positions to be known in advance by the algorithm… and mine is basically using the complete Poloniex pair universe.

So, should I loop over all the universe pair to try to synchronize them or is there something smarter to do ? :slight_smile:

Thanks in advance !!


#2

Hi @Xawotihs, you are right, the sync_positions method is used for updating only the positions affected by the algorithm. This is the behaviour by design, as each algorithm starts from a clean point and its logic should take effect only on the quote currency cash defined for it. Meaning that existing positions/orders on the exchange should not be accessible by your strategy.

Embar