Sending order to Forex or Stocks from Python strategy
Sending order to Forex or Stocks from Python strategy
Loading saved threads...
Don Coder · External communityPost link
External question — Quantitative Finance Stack Exchange
Author: Don Coder
Original post: https://quant.stackexchange.com/questions/42681
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
I have my own strategy developed in Python. But I couldn't find a reliable method to send, close, and modify orders using Python. Are there any tools that help order management using Python?
I also would like to ask which brokers provide Python API? I cannot use Oanda as they don't support my country.
I mainly focused Forex, CFD and equities.
Quote
Report
Nobody · External communityPost link
External answer — Quantitative Finance Stack Exchange
Author: Nobody
Original post: https://quant.stackexchange.com/a/42682
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
Quantopian uses Python. Or you need to convert to proprietary scripts like Think script
Quote
Report
Theodore · External communityPost link
External answer — Quantitative Finance Stack Exchange
Author: Theodore
Original post: https://quant.stackexchange.com/a/42687
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
The
Interactive Brokers API
provides functionality for sending, modifying and closing orders for all of the asset classes you have mentioned.
It supports Python, as well as Java, C++ and C#. I cannot truly speak for the Python version as I have only used the C++ API which is barely usable with the way the current threading model "works"... however I can recommend
github.com/erdewit/ib_insync
as it seems to simplify many aspects of the TWS and socket connectivity.
Seeing as you're in Turkey, according to IB's
Available Countries
page, Turkey is supported!
Quote
Report
Jared M · External communityPost link
External answer — Quantitative Finance Stack Exchange
Author: Jared M
Original post: https://quant.stackexchange.com/a/42693
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
I second the use of the Interactive Brokers API. It is what I currently use to manage my orders. Here is a good blog to get started -->
https://qoppac.blogspot.com/2017/03/interactive-brokers-native-python-api.html
Quote
Report
ltrd · External communityPost link
External answer — Quantitative Finance Stack Exchange
Author: ltrd
Original post: https://quant.stackexchange.com/a/42700
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
Great Python API is provided by FXCM. It is really intuitive and easy to use.
https://www.fxcm.com/uk/algorithmic-trading/forex-python/
Quote
Report
roman · External communityPost link
External answer — Quantitative Finance Stack Exchange
Author: roman
Original post: https://quant.stackexchange.com/a/63332
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
We solve this task using this Python package:
https://pypi.org/project/metaapi-cloud-sdk/
which is provided by MetaApi SaaS service
https://metaapi.cloud
.
The advantage of using this approach is that you can choose any MetaTrader-enabled broker for trading (there are plenty of these).
Quote
Report
Post Reply
Quoted from Forex.com.bd-Editorial External answer — Quantitative Finance Stack Exchange Author: ltrd Source score (net votes, not local likes): 0 Original post: https://quant.stackexchange.com/a/42700 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. Great Python API is provided by FXCM. It is really intuitive and easy to use. https://www.fxcm.com/uk/algorithmic-trading/forex-python/
Checking account access…