NexusFi: Find Your Edge


Home Menu

 





Futures Trading API for Python


Discussion in Platforms and Indicators

Updated
      Top Posters
    1. looks_one sgjohnson with 4 posts (0 thanks)
    2. looks_two hedgeplay with 2 posts (0 thanks)
    3. looks_3 Mabi with 2 posts (1 thanks)
    4. looks_4 ZB23 with 1 posts (0 thanks)
    1. trending_up 13,886 views
    2. thumb_up 1 thanks given
    3. group 7 followers
    1. forum 9 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 sgjohnson 
Kingsport, Tennessee
 
Experience: None
Posts: 38 since Apr 2020
Thanks Given: 13
Thanks Received: 13

I got so incredibly frustrated with TradeStation/EasyLanguage, I've decided to try and code my automated strategy in Python. I'd need a minimum $10,000 (which I don't have yet) to even use their WebAPI, but not sure I'd want to go back anyway. Many are complaining in their forums about the godawful documentation, which seems to be their infamy in general. But before I get too deep, I wanted to ask around for recommendations regarding what broker API folks are using for this purpose. It's somewhat confusing trying to figure out which APIs are actually for trading, and which are not. So far, I've gotten the impression Interactive Brokers is the "only game in town" for automated futures trading, though I've seen Alpaca mentioned for stocks. Ironbeam mentions an API, but as far as I can tell it's an API for the platform.

TIA


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Peace Deal Forward Curve: May 22%, June 51%, December 81 …
Prediction Markets & Event Contracts
Prediction Markets Lock Fed Pause at 99pct for April 29 …
Prediction Markets & Event Contracts
Iran Airspace Contract Surges to 33.5% as Project Freedo …
Prediction Markets & Event Contracts
CFTC Workforce Shrinks 24% to 15-Year Low While Predicti …
Traders Hideout
Kraken Becomes First US Digital Asset Bank With Direct F …
Cryptocurrency
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #2 (permalink)
 
Mabi's Avatar
 Mabi 
sweden
 
Experience: Advanced
Platform: NinjaTrader,MetaTrader
Trading: futures, FX
Posts: 141 since Oct 2010
Thanks Given: 121
Thanks Received: 136

Maybe You can Check out MT5 . https://www.mql5.com/en/docs/integration/python_metatrader5


Reply With Quote
Thanked by:
  #3 (permalink)
 sgjohnson 
Kingsport, Tennessee
 
Experience: None
Posts: 38 since Apr 2020
Thanks Given: 13
Thanks Received: 13




Thanks, but I asked specifically about brokers, not platforms. Not interested in going through a platform again.


Started this thread Reply With Quote
  #4 (permalink)
Critical Error
Denver
 
Posts: 1 since Jan 2021
Thanks Given: 1
Thanks Received: 0

Ninja trader has automated trading you can create. Not sure if it's what you are looking for though. It uses C# not Python.


Reply With Quote
  #5 (permalink)
 JayC 
San Diego, CA
 
Experience: Beginner
Platform: TOS, Sierra
Trading: Emini ES, Crude CL
Posts: 55 since Mar 2019
Thanks Given: 9
Thanks Received: 43

You might look for brokers which allow direct fix connections. A quick search turned up RJO.

https://www.rjobrien.com/fix-solutions/

Then you could use a python fix library to manage orders such as simplefix or quickfix.

QuickFIX

I've never set this up myself, so needs more investigation.

Jay


Reply With Quote
  #6 (permalink)
 
Mabi's Avatar
 Mabi 
sweden
 
Experience: Advanced
Platform: NinjaTrader,MetaTrader
Trading: futures, FX
Posts: 141 since Oct 2010
Thanks Given: 121
Thanks Received: 136


sgjohnson View Post
Thanks, but I asked specifically about brokers, not platforms. Not interested in going through a platform again.


okey. You only use the platform to connect to broker no need to learn the platform . But i guess it only works with AMP as broker for futures. It was not that hard to do my brother who never programmed in Phyton nor used MT5 got it up and working in 1 week so now we can send orders, read orders, history from phyton to AMP via Mt5. Just tried it and learning Phyton so thats why i posted the answer.


Reply With Quote
  #7 (permalink)
 sgjohnson 
Kingsport, Tennessee
 
Experience: None
Posts: 38 since Apr 2020
Thanks Given: 13
Thanks Received: 13

Looks like I might go with MT5 after all. There was no ready-made solution in Python for something as seemingly simple as tick charts, which is what my trading is based on. Still don't understand how the non-packaged solutions work since I've only ever used TradeStation. If MT5 can use CQG data does that mean any broker compatible with CQG can use MT5? Or is that CQG datafeed only and not execution? I've also seen a post that says MT5 has bad slippage because orders go through an extra step of servers.


Started this thread Reply With Quote
  #8 (permalink)
 hedgeplay 
Austin Texas / US
 
Experience: Intermediate
Frequency: Several times daily
Duration: Seconds
Posts: 216 since Dec 2019
Thanks Given: 159
Thanks Received: 241

Similar to JayC's answer

There might be good leverage opportuntiies on Github
https://github.com/search?q=python+futures&type=Repositories
https://github.com/search?o=desc&q=python+api+futures&s=updated&type=Repositories

I don't know anything about Alpaca but possibly an option.
https://alpaca.markets/

https://alpaca.markets/data
Alpaca Data API is your new go-to stock data API for building trading apps & algorithmic trading strategies. ... securities derivative or futures products of any kind, or any type of trading or investment advice, recommendation or strategy, given or in any manner endorsed by AlpacaDB, Inc. or any AlpacaDB, Inc. affiliate and the information ...

HedgePlay


Reply With Quote
  #9 (permalink)
 sgjohnson 
Kingsport, Tennessee
 
Experience: None
Posts: 38 since Apr 2020
Thanks Given: 13
Thanks Received: 13


hedgeplay View Post
Similar to JayC's answer

There might be good leverage opportuntiies on Github
https://github.com/search?q=python+futures&type=Repositories
https://github.com/search?o=desc&q=python+api+futures&s=updated&type=Repositories

I don't know anything about Alpaca but possibly an option.
https://alpaca.markets/

https://alpaca.markets/data
Alpaca Data API is your new go-to stock data API for building trading apps & algorithmic trading strategies. ... securities derivative or futures products of any kind, or any type of trading or investment advice, recommendation or strategy, given or in any manner endorsed by AlpacaDB, Inc. or any AlpacaDB, Inc. affiliate and the information ...

HedgePlay

I don't know where you got that quote, but there's nothing at those links that says futures.


Started this thread Reply With Quote
  #10 (permalink)
 hedgeplay 
Austin Texas / US
 
Experience: Intermediate
Frequency: Several times daily
Duration: Seconds
Posts: 216 since Dec 2019
Thanks Given: 159
Thanks Received: 241



sgjohnson View Post
I don't know where you got that quote, but there's nothing at those links that says futures.

I copied that paragraph yesterday from the results of a search query I executed at https://duckduckgo.com/. So it is text in their search engine gathered from crawling.

I search again this morning and found this Dec 2020 comment.

Hey @mark_Friedman

Futures are not yet supported through Alpaca however we are aware of the interest and it is noted. Will follow up when there is progress on our end

Jason from Alpaca

https://forum.alpaca.markets/t/futures-planned/251/6


Reply With Quote




Last Updated on March 1, 2021


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts