Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Place order in zipline with amount in decimal places

I'm running a backtest on crypto market and need to enter positions in decimal places rather than whole numbers. When I call the order_target_percent API, zipline rounds down the amount/qty to a whole number. I also tried calling order API with my amount in decimal places but got the same results after rounding.

Can anyone please advise the best workaround for this issue as this is common use case in Crypto as I could buy 0.15 BTC instead 1 BTC.

2 responses

@Jeetu,

Been meaning to look at this, yet haven't yet.
Bet you can find modified "order" code for crypto assets in Enigma's code base:
https://github.com/enigmampc/catalyst

alan

Thanks @Alan. will look at it and let you know