Skip to content

sub-penny increment does not fulfill minimum pricing criteria #21

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

Open
SeverinJB opened this issue Sep 23, 2022 · 1 comment
Open

sub-penny increment does not fulfill minimum pricing criteria #21

SeverinJB opened this issue Sep 23, 2022 · 1 comment
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@SeverinJB
Copy link
Owner

SeverinJB commented Sep 23, 2022

It appears Alpaca only accepts two decimals for prices if the price is above $1.00 (see doc).

The fix should be to round the order price up if the total order is above $1.00. For instance, instead of $1.005, the order would be $1.01.

Image

@SeverinJB SeverinJB added the bug Something isn't working label Sep 23, 2022
@SeverinJB SeverinJB self-assigned this Sep 23, 2022
SeverinJB added a commit that referenced this issue Sep 23, 2022
@SeverinJB
Copy link
Owner Author

For simplicity, the alpaca_trade_executor now uses round() to round the decimal to two places if the price is bigger than 1.

However, from a logical standpoint, it needs to be investigated if the price should rather be rounded up for 'side=buy' and rounded down for 'side=sell'.

Keep this open as the above needs to be looked into.

@SeverinJB SeverinJB added the enhancement New feature or request label Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant