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

How to set custom ratio? #52

Open
reachtarunhere opened this issue Feb 22, 2021 · 3 comments
Open

How to set custom ratio? #52

reachtarunhere opened this issue Feb 22, 2021 · 3 comments

Comments

@reachtarunhere
Copy link

Hi! I understand the default ratio is according to the balance of accounts. I would like to override this and set ratio myself. If this feature is not available can you please point me to the parts of code where the ratio is decided so I can try modifying it.

Thanks a lot!

@mokolotron
Copy link
Contributor

Hi. This feature is not available.

  • Exchenge.get_part() - used by the master to determine what percentage of the balance was used to create an order.
  • Exchenge.calc_quantity_from_part() - used by the slave to calculate the specific value of the order amount for sending by each slave. (I recommend doing your case here)

@reachtarunhere
Copy link
Author

Thanks for the prompt reply. Can you clarify what order.quantityPart means here:

    quantity = self.calc_quantity_from_part(order.symbol, order.quantityPart, order.price, order.side)

is it the amount of coin bought by the master or fraction of the coin bought compared to available balance in master?

@mokolotron
Copy link
Contributor

Yes it's a fraction of the coin bought compared to available balance in master.

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

2 participants