Read time … min

Build trading strategies in Cursor

A practical guide to writing automated trading strategies with AI in Cursor, storing them in GitHub, and running them on TradingHost. One workflow, any broker, any language that runs in a container.

Cursor is an AI-first code editor that you run on your laptop. It knows the major trading frameworks (CCXT, Freqtrade, Hummingbot), so you can describe a strategy in plain English and get working code. GitHub stores that code; TradingHost reads it and runs your strategy in the cloud. MCP closes the loop so Cursor can read logs, restart strategies and redeploy from inside the editor.

Section 01 · How it fits together

Three pieces, one loop

The whole workflow runs on three tools that each do one job. Cursor writes the code, GitHub stores it, TradingHost runs it. Once you understand which tool does what, every other section on this page is a detail you can skim.

  • Your code editor

    Cursor

    An AI-first code editor that runs on your laptop. You describe what you want a strategy to do in plain English; Cursor writes the code using Claude, GPT or Gemini.

  • Your strategy repo

    GitHub

    A cloud-hosted folder for your code, with version history. Cursor pushes changes here when you are happy with them. GitHub is the single source of truth for what TradingHost will run.

  • Your cloud runtime

    TradingHost

    An always-on cloud environment that pulls your code from GitHub, builds a container, and runs your strategy against your broker or exchange. Streams logs back to you.

From zero to a live strategy

  1. Fork a framework starter (CCXT, Freqtrade or Hummingbot) into your GitHub account.
  2. Open the repo in Cursor and describe your strategy idea in plain English.
  3. Review the code Cursor writes, then push it to GitHub when each piece looks right.
  4. TradingHost picks up the push, builds your container, and runs the strategy in your chosen region.
  5. Cursor connects back to your runtime via MCP to tail logs, restart strategies, and redeploy without leaving the editor.

Section 02 · At a glance

At a glance

Workflow
Author trading strategies in Cursor, deploy to TradingHost from GitHub
AI tool
Cursor (with any model: Claude, GPT, etc.)
Frameworks
CCXT, Freqtrade, Hummingbot, native broker APIs, custom
Brokers supported
Any TradingHost-supported broker or exchange
Deployment
GitHub-native; push to redeploy
Runtime control
MCP from Cursor: read logs, restart strategies, redeploy
Best for
Traders building or porting strategies who want AI assistance and a reliable runtime

Section 03 · Set up Cursor

Get Cursor ready for trading work

Install Cursor and sign in. Connect it to GitHub so it can read and push to your strategy repos directly. Pick the AI model that matches your tolerance for code suggestions: Claude is conservative and explanatory, GPT is faster, Gemini sits in between.

For trading work, lean toward the strongest model your subscription tier allows. Strategy code is unforgiving of subtle bugs and the marginal cost of a better model is negligible compared to the cost of a bad fill in production.

Section 04 · Pick a framework

Start from a framework Cursor knows

The fastest path is to fork a TradingHost framework starter and let Cursor extend it. The framework defines the scaffold; Cursor fills in your strategy logic.

  • CCXT

    Pick CCXT when you want one strategy that talks to multiple exchanges. Cursor handles CCXT idioms well.

  • Freqtrade

    Pick Freqtrade when you want a structured strategy framework with built-in indicators and a configuration model.

  • Hummingbot

    Pick Hummingbot when you’re building market-making or liquidity strategies on crypto venues.

  • Native or custom

    Pick native broker APIs or your own connector when you need direct control over venue-specific behaviour.

Section 05 · Author your strategy

Describe the strategy, review the code

Open the framework starter in Cursor and describe what you want the strategy to do in plain English: what to monitor, what to enter, what to exit, what to hedge, what to reconcile. Cursor writes the code against the framework’s idioms.

Trading code is unforgiving. Read every line Cursor produces, especially around order types, position sizing, error handling and reconnection logic. Ask Cursor to explain non-obvious behaviour before you accept it. Use the chat to interrogate edge cases ("what happens if the order is partially filled?", "what if the websocket disconnects mid-trade?") and have Cursor add the handling.

Push code to GitHub when each beat is reviewed. Don’t push speculative code into a live runtime; the runtime will start running it.

Section 06 · Connect MCP

Close the loop with MCP

TradingHost MCP support gives Cursor a controlled interface into your live runtime. Once connected, Cursor can read deployment state, tail logs, restart a strategy process, and redeploy, all without leaving the editor.

The practical loop: write code in Cursor, push to GitHub, runtime redeploys, ask Cursor "are there any errors in the last hour" or "restart strategy A", read the answer, iterate. MCP is a control and observability surface, not the trade execution path.

Section 07 · Deploy and iterate

Push, deploy, observe, iterate

When Cursor pushes to your GitHub main branch, TradingHost picks the change up, builds the container, and redeploys. You don’t have to leave Cursor to ship a strategy update.

The first deploy of any strategy needs a region pick (EU or US-East) and your broker API credentials in your GitHub-controlled secrets workflow. After that, redeployment is just a git push.

Section 09 · FAQ

Frequently asked questions

Some coding literacy helps, but you do not need to write code from scratch. Cursor writes most of it; your job is to describe what you want, read the result, and ask for adjustments. Reading code well matters more than writing it from a blank page, especially around order types, position sizing and reconnection logic.

GitHub is a cloud service for storing code. You will need a free GitHub account so your strategy code has a home. TradingHost reads from GitHub to know what to run, so the two are linked: when you push code to your repo, TradingHost picks up the change and redeploys.

Your GitHub repo can be private. TradingHost only reads the repos you connect, and broker API keys are stored as encrypted secrets, never in the code itself. See platform secrets for the credential handling model.

A first deploy of a starter strategy is usually under an hour: install Cursor, fork a framework starter, connect GitHub, point TradingHost at the repo, pick a region, add your broker credentials. The slow part is reviewing the strategy code itself, which is on purpose.

A paid Cursor subscription gets you access to stronger models and higher request limits. The free tier works for prototyping; production strategy work benefits from the paid tier.

Lean toward the strongest model your tier allows. Strategy bugs are expensive in production, and the marginal cost of a better model is negligible compared to a bad fill.

Yes. All three frameworks have public docs and code examples that AI models have ingested. Cursor produces idiomatic code for each. See the CCXT, Freqtrade or Hummingbot framework pages for the deploy story for each.

Any broker TradingHost supports. Cursor writes the strategy and connector code; TradingHost runs the container against whatever broker API you point at. See brokers for the supported list.

MCP lets Cursor read and act on your live TradingHost runtime: tail logs, restart a strategy, redeploy. It’s a control surface, not the trade execution path. See the MCP control surface for the full picture.

Trust the workflow, not the output. Read every line, especially around order types, position sizing, error handling and reconnects. AI accelerates authoring; it doesn’t replace review.

The same workflow shape works for any AI IDE. Future workflow pages will cover Claude Code and Copilot specifically; the framework, MCP and runtime parts are the same.

Cursor and TradingHost are billed separately. Cursor has its own subscription tiers; TradingHost runtime plans are listed on pricing. Linking a GitHub repo and creating a strategy on TradingHost is free.