Direct Link: Environments, Hosts, and Tokens

A Direct Link integration talks to four different surfaces, two of them from the end user's browser and two from your backend, and each has its own host and its own credential. This page puts all of that in one place. The step-by-step flow lives in the Direct Linking Integration guide.


Hosts by environment

SurfaceWhat it's forWho calls itSandboxProduction
Participant APIUser login, 2FA, session extension, key generation (Steps 1–2)End user's clienthttps://sandbox.prophetx.devhttps://www.prophetx.co
Geolocation checkPOST /ip-geolocation/api/v1/check-ip (Step 5)Your backend (with the user's real IP)https://sandbox.prophetx.devhttps://www.prophetx.co
Trading APIKey→token exchange, submit_order, get_order, get_balance, cancel_order, fixtures (Steps 2–6)End user's client (orders) / your backend (fixtures)https://api.sandbox.prophetx.dev/partnerhttps://cash.api.prophetx.co/partner
WebSocketOrder book + the user's own order updates (Steps 4, 6)Bothwss://ws.sandbox.prophetx.dev (from GET /websocket/connection-config → ws_host)wss://ws.prophetx.co (same field)
  • Keep the /partner path segment on Trading API calls — it isn't optional.
  • Use www.prophetx.co, not bare prophetx.co (the bare host returns a 403).
  • The Trading API is also reachable through https://www.prophetx.co/partner/... in production; either host works and both carry the same CORS policy.
  • Pick the WebSocket host up from connection-config at runtime rather than hardcoding it, and re-fetch it at least every 30 minutes. If you connect from a browser, allow both wss:// hosts above in your content security policy. ws_host is always present — there is no fallback host.
  • Outbound allowlists: the two hosts above are the only values ws_host returns today, so they are what to pre-approve (port 443, wss). They are fixed domains, not an IP range or CIDR we publish — allowlist by name, and confirm with your integration contact before go-live if your policy needs more than that.

Which calls run where

From the end user's client (browser / app)From your backend
auth/login, send-verification-codeGeolocation check-ip (needs the real end-user IP from your inbound connection)
POST /partner/auth/keys (generate the user's key pair)Fixture ingest: get_tournaments, get_sport_events, get_multiple_markets, get_price_ladder
POST /partner/auth/login (exchange key pair for a trading token)Order book WebSocket under your own account
submit_order, cancel_order, get_order, get_balance—
The user's private orders WebSocket channel—

The user's access_key / secret_key and trading access_token must never reach your backend. That's the whole security model of Direct Link — see the security requirement.


Your own aggregator account (Steps 3–4)

Fixture ingest and the shared order-book WebSocket run under your ProphetX account, not any user's. Getting one is the same self-serve path your users take:

  1. Register at https://sandbox.prophetx.dev (real phone and email; sandbox PII can be test data) and, for production, at https://www.prophetx.co with full KYC.
  2. In the web app, open API Integration from the menu and generate a key pair — any KYC-approved, non-suspended account can; no market-maker flag is needed. The default tier allows 2 active key pairs per account, so revoke old ones there rather than accumulating them.
  3. Exchange the pair at POST /partner/auth/login exactly as in Step 2 of the guide. Rate limits and tiering apply to this account like any other; ask your integration contact about a higher tier before pointing a production feed at it.

Sandbox has test funds on request and no house liquidity, so don't expect every market to show selections — see Sandbox Notes.


CORS

Browser calls to any of these hosts only work if ProphetX has added your web origin(s) to the CORS allowlist. This is per-origin, not open — there's no wildcard, by design. Send your exact origins (scheme + host, e.g. https://app.example.com) to your integration contact before you start client-side testing; until then, calls from the browser will fail with a CORS error even though the same request works from curl or a backend. The allowlist is shared across sandbox and production, so you only need to ask once.


Credentials and lifetimes

There are three distinct credentials in play. Don't mix them up:

CredentialIssued byUsed forLifetimeRenew with
Participant accessTokenPOST /api/v1/auth/login (email/password)Authorizing POST /partner/auth/keys only60 min in production, 15 min in sandboxNot needed in this flow — it's used once, right after login. Log in again if you ever need it later (e.g. to revoke a key).
access_key / secret_keyPOST /partner/auth/keysLogging in to the Trading API — nothing elseUntil revoked (DELETE /partner/auth/keys/{id})n/a — secret_key is only shown at creation
Trading access_token (+ refresh_token)POST /partner/auth/login (key pair)Every Trading API call: Authorization: Bearer <access_token>10 minutesPOST /partner/auth/refresh with { "refresh_token": "..." }

An expired or invalid trading token returns 401. A 404 data_not_found is never an auth problem — see Order lifecycle.

Refresh proactively (e.g. at the 8-minute mark) rather than waiting for a 401 mid-order.


Rate limits

Trading API limits are enforced per user key, per endpoint, in requests per second, and returned as 429 when exceeded. Every linked user has their own budget, so one busy user doesn't throttle another — but each individual user's calls are serialized.

The default tier that every self-serve key starts on is 1 request/second on almost every endpoint, including submit_order, get_order, get_order_history, get_order_matched_detail, get_trades, and get_transactions; the batch endpoints (submit_multiple_orders, cancel_multiple_orders) are disabled (0) on that tier. The next tier raises the order and history endpoints to 10 RPS. You may see a "50 RPS" figure elsewhere — that's a global fallback for endpoints with no limit of their own and never applies to the endpoints above, so don't size a backfill or polling loop around it. Ask your integration contact for the full per-endpoint table.

Tiers are assigned per account by ProphetX, not per partner; if you expect bursts (many users firing orders at kickoff) or heavy per-user backfills, talk to your integration contact about tiering before launch. Build against the v4 endpoints (/v4/mm/...) only — pre-v4 legacy endpoints may be rate-limited to zero for newly created keys. Don't poll read endpoints faster than once per second per user — use the WebSocket for anything real-time.

There is no published limit on the participant login endpoints, but call auth/login once per session and keep the token; send-verification-code sends the user a real SMS each time.


Response compression

Both hosts return gzip-compressed responses to clients that send Accept-Encoding: gzip; a response of 1 KB or more then carries Content-Encoding: gzip and is roughly 15–20% of its plain size. Requests without the header, and small responses, come back as plain JSON. Send the header from your backend on every call, especially the market-data calls you poll (get_multiple_markets, get_markets) and get_order_history. Browsers and most server-side HTTP libraries already do this by default; Python urllib, Java's built-in HttpClient, .NET HttpClient, and curl need it enabled. The per-library list is in Response compression. The Talaria WebSocket is a separate transport and is not compressed.


Did this page help you?