-
Notifications
You must be signed in to change notification settings - Fork 506
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
Opening an order with TP/SL #644
Comments
There is no easy way to do this. You must send 3 different requests. I am inserting an example of my own code here for you.Ask what you don't understand. I hope I can help you.
|
@farukborann thank you for this! Just one more question - assuming the take profit gets hit, does the stop loss order cancel? I wouldn't want the order to just linger around. |
@farukborann thanks for sharing the code its awesome. Can you also share a methods ExchangeInfo, RoundStep code ? Thanks |
They will stop because the orders are related to each other. |
Yes, for sure!
You must to be run GetExchangeInfo function for one time in my structre but you can change this code for yourself. |
I have been trying (unsuccessfully) to create a function that would follow this rough format
Ideally this opens up an order on a futures market with a take profit and stop loss? There are other options of setting up a take profit and stop loss manually, but I believe there should be an easy way to do this (referring to how in the GUI there is an area for TP/SL)?
Thank you for the help!
The text was updated successfully, but these errors were encountered: