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 Mabi with 2 posts (1 thanks)
    3. looks_3 hedgeplay with 2 posts (0 thanks)
    4. looks_4 JayC with 1 posts (0 thanks)
    1. trending_up 11,350 views
    2. thumb_up 1 thanks given
    3. group 7 followers
    1. forum 9 posts
    2. attach_file 0 attachments




 
Search this Thread

Futures Trading API for Python

  #1 (permalink)
 sgjohnson 
Kingsport, Tennessee
 
Experience: None
Posts: 37 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?
Futures True Range Report
The Elite Circle
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
Deepmoney LLM
Elite Quantitative GenAI/LLM
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
NexusFi Journal Challenge - April 2024
Feedback and Announcements
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
GFIs1 1 DAX trade per day journal
18 thanks
The Program
18 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: 37 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: 37 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: 175 since Dec 2019
Thanks Given: 145
Thanks Received: 211

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: 37 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: 175 since Dec 2019
Thanks Given: 145
Thanks Received: 211



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


© 2024 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 - Privacy Policy - Downloads - Top
no new posts