Home › Resources › TradingView to TopstepX Automation
How to Automate TradingView Alerts to TopstepX (ProjectX API Setup Guide)
TopstepX is Topstep's own execution platform, built on the ProjectX technology Topstep acquired exclusively in early 2026. TopstepX opened a dedicated API in late April 2026, giving traders direct programmatic access to their account for market data and order placement — separate from the older TradingView-to-Tradovate route covered in our Tradovate automation guide. This guide walks through connecting a Pine Script strategy to TopstepX using that API, via PickMyTrade.
What you need before starting
- TradingView account — Essential plan ($14.95/mo or higher). The free plan does not support webhook alerts.
- A TopstepX Combine or funded account. Log in at least once to confirm it's active before starting the API setup.
- ProjectX API subscription — a separate subscription from your Combine/funded account, managed through the ProjectX dashboard (dashboard.projectx.com), not inside TopstepX's own settings.
- PickMyTrade account — the bridge that consumes the TopstepX API under the hood and turns a TradingView webhook into an order on your account.
- A Pine Script strategy with alert conditions. Strategies from our store ship pre-wired with the correct alert payload format.
Step 1 — Get your TopstepX API key
The API key lives behind a linked ProjectX dashboard account, not directly inside TopstepX:
- In TopstepX, go to Settings (gear icon) → API tab.
- Click Link under "ProjectX Linking."
- You'll be sent to dashboard.projectx.com to verify your email and register (or log in if you already have a ProjectX dashboard account).
- Go to Subscriptions → ProjectX API Access and enter payment info. Full price is around $39/mo.
- Return to TopstepX Settings → API and click Add API Key. Copy the generated key and store it securely — treat it like a password.
Step 2 — Connect TopstepX to PickMyTrade
- Create an account at pickmytrade.trade.
- Go to Brokers → Add Broker and select TopstepX / ProjectX.
- Enter a connection name, select Topstep as the prop firm, and enter your TopstepX username and the API key from Step 1.
- PickMyTrade will show the TopstepX accounts linked to that key — select your Combine or funded account.
Step 3 — Set up your bot and get the webhook URL
- In PickMyTrade, go to Bots → Create Bot and give it a name (e.g. "MES EMA Crossover — TopstepX").
- Set Symbol to the contract you're trading (e.g.
MES,MNQ). - Set Quantity and Order Type (Market is simplest while testing).
- Under Linked Accounts, select the TopstepX account from Step 2.
- Save the bot. PickMyTrade generates a webhook URL in the format
https://pickmytrade.trade/api/webhook/<your-token>— copy it.
Step 4 — Configure your Pine Script alert
Your Pine Script needs to fire an alert PickMyTrade can parse. If you use strategy.entry()/strategy.exit(), set the alert to "Order fills only" with a JSON payload like:
{
"passphrase": "your-bot-passphrase",
"ticker": "{{ticker}}",
"action": "{{strategy.order.action}}",
"quantity": {{strategy.position_size}}
}
The passphrase is set inside your PickMyTrade bot settings and acts as a security key so unauthorized signals can't reach your bot. For alertcondition()-based scripts, create one alert per direction ("buy"/"sell"), both pointed at the same webhook URL.
Step 5 — Create the TradingView alert
- Right-click the chart and select Add Alert, or press
Alt+A. - Set the Condition to your strategy or alertcondition name.
- Under Notifications, enable Webhook URL and paste the PickMyTrade URL from Step 3.
- Paste the JSON payload from Step 4 into the Message box.
- Set expiration at least 6 months out and click Create.
Test before going live
PickMyTrade supports a TopstepX demo/practice environment for exactly this reason. Point your bot at a demo account first, fire a manual test alert from TradingView's Alerts panel, and confirm the order appears correctly before switching to a real Combine or funded account. Run at least 5–10 full entry/exit pairs in test mode before going live.
Compliance checklist before going live
- Local execution. Run the automation from your own machine, actively monitored — not an unattended VPS or cloud instance.
- Session filter. Restrict entries to Regular Trading Hours; most prop firms prohibit overnight holds on eval accounts.
- EOD flatten. Force-close all positions ahead of the market close as a backstop.
- Daily loss kill switch. A hard stop that disables entries once your self-imposed daily loss threshold is hit — set below TopstepX's actual limit for a buffer.
- Bar-close entries. Use
calc_on_every_tick=falseso orders fire on confirmed bar closes, not noisy intrabar ticks.
Free Pine Script snippets for all of the above are at propfirmpinescripts.com/snippets/.
Common issues
- Alert fires but no order appears. Check the PickMyTrade bot log first — every received webhook shows up there with success/error status. A malformed JSON payload is the most common cause.
- API key rejected. Confirm your ProjectX API subscription is active — the key is tied to that subscription, not directly to your TopstepX login.
- Symbol not recognized. Use the generic contract code (
MES, not a dated contract code) — PickMyTrade resolves the front month automatically. - Order rejected as final/unauthorized. TopstepX API orders can't be edited after the fact — cancel and resend rather than trying to modify a placed order.
Skip the wiring — get a strategy that's already set up.
Every Pine Script from our store ships with the compliance controls above pre-built — session filter, EOD flatten, daily loss kill switch — plus the standard alert payload format.
View PlansInvite-only on TradingView · Monthly subscription · Cancel anytime