TopstepX

Automating TopstepX, without writing the layer underneath.

People searching for the TopstepX API almost always want the same outcome — a strategy placing orders on a funded account without sitting there clicking. Writing against an API is one way to get there. It is not the short way, and this page is about the difference.

What you are actually trying to build

Strip the API question back and the requirement is small: something has to hold a live session with the platform, receive your strategy's signal, decide the size, check it against your limits, and place the order. Then do it again tomorrow, at 3am, without you.

The first version of that is an afternoon. Authenticate, POST an order, watch it appear. The version that survives a month of real sessions is where the time goes, and none of it is visible from the first page of any API's documentation.

Build it yourselfhonest estimate
Authenticate, place an orderGet a token, send an order, see it fill. This is the afternoon.Easy
Keep the session aliveTokens expire and get revoked. A loop that retries a dead token forever is a silent outage that looks like a network problem.Hard
Track what actually filledOne order produces several execution reports. Key on the order id instead of the execution and your position tracking drifts.Hard
Address each funded accountOne login can hold several accounts. Treat the login as the unit and per-account sizing becomes impossible later.Hard
Enforce limits before the orderA limit checked after the fill is a report, not a control.Hard
Run it when you are asleepWhatever holds the session has to be awake. This is where the VPS bill starts.Ongoing

The part that catches everyone

Executions, not orders. A single order rarely fills in one piece. Each fill is its own event with its own id, and anything keyed on the order id will either miss the partials or count them twice. It is the most common bug in home-built execution layers and it does not show up until you trade size.

Revocation is not an error to retry. An expired token and a revoked one look similar and need opposite responses. Retrying a revoked token forever produces a system that appears healthy, logs nothing alarming, and places no orders at all.

Contracts roll. A hard-coded contract id is a bug with a date on it. Resolving a symbol to the right contract, and caching that without caching it past expiry, is a small subsystem rather than a lookup.

The route that skips it

TopstepX is a direct rail in Quanify, alongside Tradovate and NinjaTrader. The session is held server-side and every funded account under a login is addressed individually — which is what makes per-account sizing possible at all.

Your strategy talks to a URL. Each strategy in Quanify gets its own webhook, and anything that can send an HTTP POST can drive it: a TradingView alert, a Python script, your own service. No SDK, no client library, no OAuth flow to implement, and nothing installed.

The failure cases above are handled as named states rather than as retries. Executions are de-duplicated inside a 60-second window per account, keyed on the execution — never the order — so a broker retransmission lands once and a partial is never mistaken for a duplicate.

{
  "action": "{{strategy.order.action}}",
  "ticker": "{{ticker}}",
  "contracts": "{{strategy.order.contracts}}",
  "market_position": "{{strategy.market_position}}"
}

Limits, because it is a funded account

This is the part an API gives you nothing for. Every check has to be written, and every check has to run before the order rather than after the fill.

Fixed contract size

A size set on the strategy overrides whatever quantity the signal carried, so a signal source that knows nothing about your account cannot size it.

Per strategy

Allow 2+ entries, off by default

A signal that would grow a position you already hold in the same direction is refused. Scaling out is always allowed, and so is a flip — you can always get smaller.

Per strategy

Allow 2+ entries, off

By default a signal that would grow a position you already hold in the same direction is refused. Scaling out is always allowed, and so is a flip.

The guard against a noisy signal

When writing it yourself is right

Sometimes it genuinely is. Build your own layer if you need order types or lifecycle control beyond entry, exit and size; if your logic reacts to the book rather than to your own fills; or if the thing you are making is a product rather than a workflow.

Do not build it because the first example looked easy. The example is easy. The session that survives a Tuesday is not, and that is the part still unfinished six weeks later.

And whichever route you take: check what your firm's rules say about automation on the specific account before you arm it. That is a contract question, and no API answers it.

Common questions

Does TopstepX have an API?

Topstep publishes its own developer documentation for TopstepX, and what it exposes is set by them rather than by any third party. If you intend to build against it directly, their current docs are the authority on endpoints and access.

Do I need the API to automate a TopstepX account?

No. Quanify connects to TopstepX as a direct rail and places orders from a webhook, so a TradingView alert or any HTTP request can drive it. There is no client library to write and nothing installed.

What is the hardest part of building your own execution layer?

Not placing orders. It is keeping the session alive across token expiry and revocation, handling several execution reports per order without double-counting, resolving contracts across front-month rolls, and running the whole thing somewhere that is awake at 3am.

Can one strategy trade several TopstepX accounts?

Yes. Every funded account under a login is addressed individually, and each carries its own whole-number multiplier, applied before the order is sent.

Do I need a VPS?

Not with Quanify — the session is held server-side, so nothing of yours is in the path. A self-built layer does need somewhere that stays awake, which is what a VPS is usually for.

Is automated trading allowed on a Topstep account?

That is set by Topstep's rules for the specific account type, and firms distinguish between automation and copying. Read the current rulebook before arming anything, and ask support in writing if a clause is ambiguous.

Start on a simulated account.

Connect a sim or evaluation account and run the whole product against it before you point anything at live money. Nothing about the setup changes when you do.