Integration surface ยท Developer guide

MCP vs REST vs WebSocket for NinjaTrader Automation

CrossTrade exposes three integration surfaces. REST for deterministic application calls. WebSocket for streaming data and event-driven listeners. MCP for AI-agent tool use. They are not in competition; they answer different questions.

Direct answer

Pick by who is making the call

  • REST: your application code knows exactly what it wants. Request/response, idempotent, deterministic, cacheable.
  • WebSocket: your application code wants to react to events. Streaming, low-latency, push.
  • MCP: an AI model is choosing which call to make next based on conversation. Typed tools, OAuth-scoped, agent-friendly.
REST

When REST is the right answer

  • You are writing a Python or JS script that places an order on a schedule.
  • You are integrating with a third-party CRM or accounting system that does request/response.
  • You want a typed OpenAPI surface to generate clients in your language.
  • You need predictable rate limits and retries.

See CrossTrade API Overview for endpoints, auth, and rate-limit details. Pro tier and above.

WebSocket

When WebSocket is the right answer

  • You need quote updates without polling.
  • You are building a custom dashboard that reacts to fills and account state.
  • You want event-driven copier or alert handling.

See WebSocket API docs. Pro tier and above.

MCP

When MCP is the right answer

  • An AI assistant (Claude, ChatGPT, Cursor) is the user-facing surface.
  • You want the model to choose tools based on the conversation.
  • You want OAuth-scoped permissions (mcp:read vs mcp:trade) instead of hand-rolled auth.
  • You need access to MCP-only Elite tools: NinjaScript compile, Strategy Analyzer backtest parity, deployment registry, webhook signal history, journal, copier activity.

See MCP Trading API. Elite tier.

Comparison

Side by side

Property
REST
WebSocket / MCP
Direction
Request/response
WebSocket: push events. MCP: agent-driven tool calls.
Best caller
App code
WebSocket: app code. MCP: AI model.
Auth
PAT
WebSocket: PAT. MCP: OAuth 2.1 scopes.
Tier
Pro
WebSocket: Pro. MCP: Elite.
Tool surface
Public REST endpoints
WebSocket: streaming endpoints. MCP: REST surface + Elite tools (NinjaScript, backtest, deploy registry, journal, webhooks, copier).
Discovery
OpenAPI
WebSocket: docs. MCP: tools/list in protocol.
Same workflow, three surfaces

Place a limit order on MES 06-26

REST

POST /v1/api/accounts/Sim101/orders/place
Authorization: Bearer <PAT>
Content-Type: application/json

{ "instrument": "MES 06-26", "side": "Buy", "type": "Limit",
  "quantity": 1, "limit_price": 5230.00, "tif": "Day" }

WebSocket (subscribe to fills)

// Place via REST, then listen to fills.
ws.subscribe("/v1/ws/accounts/Sim101/executions")

MCP

Agent: "On Sim101, place a buy limit for 1 MES 06-26 at 5230.00, day order.
Restate and wait for me to confirm before calling."

User: confirm.

Agent: [calls PlaceOrder]

Same outcome, three audiences. REST for code. WebSocket for streaming. MCP for an AI conversation.

Tiering

What each surface needs

Surface
Required tier
REST
Pro and above
WebSocket
Pro and above
MCP
Elite

The Elite tier specifically gates the MCP transport. REST and WebSocket remain on Pro.

Safety and approvals

Different approval models

  • REST/WebSocket: your code is the human-in-the-loop. You ship the safety logic.
  • MCP: the conversation is the interface; the agent's prompt encodes approval gates. The OAuth scope is a hard floor.
FAQ

Frequently asked questions

Should I use MCP, REST, or WebSocket?

REST for application code, WebSocket for streaming, MCP for AI-agent tool use. Most users will use a combination.

Do all surfaces talk to the same NT8?

Yes. The CrossTrade Add-On is the bridge for all of them.

Can MCP do everything REST does?

The public REST trading surface is exposed as MCP tools. MCP also includes Elite-only tools (NinjaScript compile, backtest parity, deployment registry, webhook history, journal, copier).

Why is MCP Elite-only?

The transport itself, plus the additional tool surface and OAuth-scoped permissions, are part of the Elite product. REST and WebSocket remain on Pro.

Pick the right tool for the caller

App code? REST or WebSocket. AI agent? MCP. Combine them when you need both.