Connect Tradier to Nyria
End-to-end Tradier setup — OAuth for live and sandbox (paper), account selection, the 4-leg options ceiling, and the weekend phantom-fill behavior to watch out for on paper.
By the end you will have a Tradier brokerage account (paper or live) connected to Nyria via OAuth, with an account selected and a paper test order routed through a Nyria strategy.
Paper trade first, but read Step 7. Tradier's sandbox is the right place to validate a strategy end-to-end, but it has one well-known quirk Nyria cannot work around: weekend "phantom fills" on resting orders. See Step 7 before you draw conclusions from a Saturday backtest.
Prerequisites
- A Nyria account. If you do not have one yet, follow the Quick Start.
- A Tradier account. Sign up at tradier.com for live or developer.tradier.com for sandbox/paper.
- A Nyria strategy you want to point at this broker. The connection itself does not require a strategy, but you will need one for the Step 8 smoke test.
What Tradier supports through Nyria
Confirm the broker matches what your strategy needs before you connect.
- Stocks (long and short).
- Options — single leg, and multi-leg spreads up to 4 legs.
- Market and limit orders.
- Extended-hours sessions via limit orders.
Not supported on Tradier (by Tradier, not by Nyria):
- Futures.
- Cryptocurrency.
- Fractional shares.
If your strategy needs futures or crypto, see the Tradier integration page for the full capability table and pick a different broker.
Step 1: Open the Integrations tab in Nyria
Sign in to the Nyria app at app.nyria.io.
In the left sidebar, click Integrations.
Click Add Integration in the top right.
Step 2: Pick Tradier from the broker list
In the Add Integration modal, find the Tradier tile.
Click Connect on the Tradier tile.
The modal that opens next asks you to choose between Live and Paper (Sandbox).
Step 3: Choose Live or Paper
These are two completely separate Tradier environments. They use different OAuth endpoints, different account numbers, and different login credentials.
- Paper (Sandbox) —
sandbox.tradier.com. Simulated funds, no real money at risk. Use this to validate strategies. Read the phantom-fill warning in Step 7 before trusting weekend behavior. - Live —
api.tradier.com. Real money. Only choose this after you have validated the strategy on paper for at least one full trading session.
You can connect both at once — connect paper first, then come back to this page and connect live as a second authorization. Each gets its own entry in the Integrations list.
Click Paper (Sandbox) for your first connection.
Click Continue with Tradier. Nyria opens Tradier's OAuth consent page in a new tab.
Step 4: Complete OAuth on Tradier
On the Tradier consent page, sign in with your Tradier username and password. For sandbox, this is the developer-portal login from developer.tradier.com. For live, it is your normal tradier.com login.
Tradier shows the permissions Nyria is requesting: read account profile, read balances and positions, place and cancel orders, stream market data. Review them.
Click Authorize.
Tradier redirects back to Nyria. The Integrations page updates to show a success modal with the broker name and the number of accounts discovered.
If the OAuth tab closes without redirecting, or you land on
/integrations?error=..., jump to Troubleshooting at the bottom.
The most common cause is a pop-up blocker eating the callback.
Step 5: Select which account to use
Tradier accounts come in several flavors — individual cash, individual margin, joint, IRA, and so on. A single Tradier login can have more than one. Nyria asks you to pick which one(s) bots should trade through.
In the post-OAuth account selector, you will see one row per Tradier account number with the account type and current cash balance.
Tick the box next to each account you want Nyria to be able to trade. You can change this later from the integration's detail page.
Click Save.
The selected accounts now appear as routing targets when you build a bot.
Step 6: Know the 4-leg ceiling
Tradier's API caps a single options order at 4 legs. This is a Tradier-side limit, not a Nyria choice, and it affects which spread shapes you can deploy.
| Shape | Legs | Tradier? |
|---|---|---|
| Long call / long put | 1 | Yes |
| Vertical spread | 2 | Yes |
| Calendar / diagonal | 2 | Yes |
| Iron condor | 4 | Yes |
| Iron butterfly | 4 | Yes |
| Iron condor + protective wing | 5 | No |
| Custom 5+ leg structure | 5+ | No |
If a strategy you wire up tries to fire a 5-leg structure at Tradier, the order will be rejected at submission time and the bot will log a broker_rejected event with Tradier's error string. Plan around it by:
- Splitting a 5+ leg structure into two separate Nyria bots, each within the 4-leg ceiling, that fire off the same alert. Each becomes its own Tradier order.
- Or routing that strategy to a broker whose options API does not have the cap. See the Tradier integration page and pick a different broker for that strategy.
Step 7: Understand weekend paper "phantom fills"
This is the single biggest gotcha for Tradier sandbox users.
On weekends and outside the regular session, Tradier's paper environment can mark resting orders as filled at prices that do not reflect any real market. A limit order you placed Friday at 3:59pm can show as "filled" on Saturday morning at a price the real market never printed. Nyria will record that as a real fill — because as far as the broker's API is concerned, it is one — and the bot will continue to the exit leg of its state machine.
What this means in practice:
- Do not draw conclusions about strategy P/L from a Saturday or Sunday review of a Tradier paper account.
- Do not assume an "exited" paper position means the live strategy would have exited at the same price.
- For honest paper validation, restrict your evaluation window to regular trading hours, Monday through Friday.
This behavior is specific to Tradier's sandbox and is not a Nyria bug. It cannot be filtered out at the Nyria layer without breaking the legitimate after-hours fill case (which does exist for limit orders on extended-hours-eligible underlyings). The right mitigation is to ignore weekend paper activity, or move validation to a broker whose paper environment matches market hours exactly.
The live environment does not have this behavior. It only affects sandbox.
Step 8: Send a smoke-test order
Validate the full chain — Nyria webhook to parsed alert to Tradier order to fill confirmation — with a single test alert.
Open the strategy you want to test, click the Integration tab, and copy its webhook URL. It looks like https://trades.nyria.io/webhooks/s_8f2a91c4b6e0....
Make sure the strategy's Broker Account is set to one of the Tradier accounts you selected in Step 5.
From a terminal, send a one-share buy order against a liquid name:
curl -X POST 'https://trades.nyria.io/webhooks/s_8f2a91c4b6e0...' \
-H 'Content-Type: application/json' \
-d '{
"ticker": "SPY",
"action": "buy",
"quantity": 1,
"orderType": "market"
}'Replace s_8f2a91c4b6e0... with your actual token. SPY is chosen because it is dense enough that even a market order during regular hours will fill within the spread.
In the Nyria app, open the strategy's Logs tab. You should see one row appear within a few seconds: the parsed alert, the Tradier order id, and a fill status.
Cross-check the same trade in your Tradier dashboard — the order id from the Nyria log should match what Tradier shows.
Close the position manually from Tradier's UI, or send a second sell alert. Either is fine for a smoke test.
If the order id does not appear in Nyria's logs within ~15 seconds, see Troubleshooting below.
Troubleshooting
OAuth callback fails or shows an error
You land on /integrations?error=...&error_description=... after authorizing. Common causes:
- Pop-up blocker. Disable for
app.nyria.ioand retry. - Logged into the wrong Tradier environment. Sandbox and live use different domains; if your browser had a live session open and you clicked "Paper", Tradier may redirect mid-flow. Log out of
tradier.comand try again in a fresh tab. access_denied. You clicked Deny instead of Authorize. Start over.
"Buying power" error on the smoke test
Tradier sandbox accounts ship with a fixed simulated balance. If you have been trading the same sandbox account heavily, the cash side can be exhausted. Reset the sandbox balance from the Tradier developer portal, or open a fresh sandbox account.
For live, this is exactly what it sounds like — not enough cash or margin for the order. Reduce size or fund the account.
"Market closed" on the smoke test
Tradier rejects market orders outside the 9:30am–4:00pm ET regular session. For after-hours testing, change "orderType": "market" to "orderType": "limit" and add a "limitPrice" field. See the Webhook Reference for the full set of accepted fields.
Order placed but never appears in Nyria logs
The bot ran, Tradier shows the fill, but the Nyria strategy log is empty.
- Confirm the webhook URL token matches the strategy you are looking at. Each strategy has its own token; it is easy to copy from one and tail logs on another.
- Confirm the Tradier account in the strategy config is one of the accounts you selected in Step 5. An account that was discovered but not ticked will not be eligible for routing.
- For raw payload questions ("did the parser see my field?"), see Webhook Reference.
Weekend behavior looks wrong
Re-read Step 7. If the unexpected behavior is on a live account, not sandbox, capture the Tradier order id and contact Nyria support — that warrants a real investigation.
Disconnecting
If you ever want to revoke Nyria's access to the Tradier account:
In Nyria, go to Integrations, click the Tradier row, and click Disconnect. This deletes Nyria's stored OAuth tokens.
Separately, in Tradier's account settings, revoke Nyria's API authorization. Disconnecting from Nyria does not revoke the grant on Tradier's side; the token simply stops being used.
Any bots that were routing to a Tradier account will move to a paused state on the next alert and will surface an "account disconnected" error in their logs until you either reconnect or repoint them to a different account.
Next steps
- Tradier integration overview — capability matrix, margin rules, full feature list.
- Webhook Payload Reference — every field Nyria's parser recognizes, with examples.
- Trading Behavior — how Nyria sequences entries, exits, and reversals across brokers.
- Equity Types — supported instruments and per-broker availability.