Crypto-Copy-Trader
Crypto-Copy-Trader copied to clipboard
How to set custom ratio?
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!
Hi. This feature is not available.
-
Exchenge.get_part()
- used by themaster
to determine what percentage of the balance was used to create an order. -
Exchenge.calc_quantity_from_part()
- used by theslave
to calculate the specific value of the order amount for sending by each slave. (I recommend doing your case here)
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?
Yes it's a fraction of the coin bought compared to available balance in master.