Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

exchanges should have a price and volume precision component for each trading pair #74

Closed
nikhilsaraf opened this issue Dec 3, 2018 · 1 comment
Assignees
Labels
feature request New feature or request
Milestone

Comments

@nikhilsaraf
Copy link
Contributor

Desired Behavior

I want to be able to use the exchange.go interface for trading without running into precision issues. This requires each exchange to be aware of it's precision requirements on a per-trading-pair basis.

Impact

The desired behavior will allow me to trade with kraken, binance, etc. without running into precision issues, enabling usage of the mirror strategy's offset_trades feature.

Feature Suggestion

We can achieve the desired behavior by possibly expanding the exchange interface to return the precision for a given trading pair for price and volume (since they can be different like for Kraken).

References

I think this feature exists in other projects but I have not looked for a reference link.

Additional context

Some alternatives that would achieve the same result are:

  • the exchange automatically "fixes up" orders before placing based on the precision requirements, i.e. do not update the exchange.go interface

The feature suggested above was the better than the alternative because by exposing the method in the exchange interface we are letting the framework be aware of precision requirements rather than having this be an implicit operation which can lead to immense confusion.

@nikhilsaraf nikhilsaraf added the feature request New feature or request label Dec 3, 2018
@nikhilsaraf nikhilsaraf added this to the v1.3.0 milestone Dec 3, 2018
@nikhilsaraf nikhilsaraf self-assigned this Dec 3, 2018
@nikhilsaraf
Copy link
Contributor Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant