Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: martingale : self.last_price rounding issue #697

Open
2 tasks done
malaka-kahingalage opened this issue Apr 12, 2023 · 0 comments
Open
2 tasks done

[Bug]: martingale : self.last_price rounding issue #697

malaka-kahingalage opened this issue Apr 12, 2023 · 0 comments

Comments

@malaka-kahingalage
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

i have seen rounding issues in the self.last_price, which generates the below error.

invalid limit_price 106.215. sub-penny increment does not fulfil minimum pricing criteria

managed to fix this by adding the below before the buy and sell
self.last_price = round(self.last_price, 2)

Expected Behavior

No response

SDK Version I encountered this issue in

martingale.py example

Steps To Reproduce

running the example and randomly generating the below error

`invalid limit_price 106.215. sub-penny increment does not fulfil minimum pricing criteria`

Filled out the Steps to Reproduce section?

  • I have entered valid steps to reproduce my issue or have attached a minimally reproducible case in code that shows my issue happening; and understand that without this my issue will be flagged as invalid and closed after 30 days.

Anything else?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant