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

Class Orders stopPrice is set to int #131

Open
bradcarp opened this issue Jan 31, 2021 · 2 comments
Open

Class Orders stopPrice is set to int #131

bradcarp opened this issue Jan 31, 2021 · 2 comments
Labels
question Questions about use, potential features, or improvements

Comments

@bradcarp
Copy link

Overall this code has been great to use and super helpful.

I am trying to create a STOP order. I took the tda_build_limit_stock_order() sample, which works great for buy_limit and stop_limit orders and slightly modified it to do STOPs. Looking at the Class Orders, the "price" for LIMIT orders is a str but the "stopPrice" value is an int. I can get a STOP order submitted to TDA, however in the order i have to set "stopPrice = (int)price" to get it to work. This means I can only send in a STOP value of say 13 vs 13.47. I have tried a few other things, but they fail.

Is this a bug or am I missing something thing in terms of being able to send in 13.47 as the STOP price?

Thanks.

Brad

@timkpaine
Copy link
Owner

related to #112

@timkpaine timkpaine added the question Questions about use, potential features, or improvements label Jan 31, 2021
@bradcarp
Copy link
Author

bradcarp commented Feb 1, 2021

Thanks Tim. I had searched but somehow I missed that other issue. Apologies. I did change the stopPrice to a str in the Class Orders and tried again and that solved the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions about use, potential features, or improvements
Projects
None yet
Development

No branches or pull requests

2 participants