Show more above works. Create a dedicated read-only key for market data: it cannot place
orders if it leaks. Sandbox keys (fp_test_), affiliate keys, and CLI or
MCP sessions are refused. Browsers cannot set this header on a WebSocket,
so connect from a server or script.
2. Negotiate compression. Enable the permessage-deflate extension. Books,
trades, and candles are several times smaller compressed. Python
websockets and the Node ws package negotiate it by default; if your
client has a compression option, leave it on.
3. Stay within 5 connections per API key. One connection carries every
market you need, so multiplex subscriptions on it. Another key of yours
has its own 5.
[!NOTE]
− These requirements take effect on the date given in our developer notice
− email. Until then, connections without a key or compression still work. Check
− the X-Developer-Feed-Auth header on the upgrade response to see whether your
− client is ready: authenticated means it meets every requirement, and any
− other value is the error code your connection will receive once they apply
− (unverified means the key had not been checked yet; reconnect after a few
− seconds to see its result). X-Developer-Feed-Enforce-At shows the effective
− time once it is scheduled.
+ These requirements take effect on December 1, 2026 at 17:00 UTC (as announced
+ in our developer notice email). Until then, connections without a key or
+ compression still work. Check the X-Developer-Feed-Auth header on the
+ upgrade response to see whether your client is ready: authenticated means it
+ meets every requirement, and any other value is the error code your connection
+ will receive once they apply (unverified means the key had not been checked
+ yet; reconnect after a few seconds to see its result).
+ X-Developer-Feed-Enforce-At shows the effective time.
Keep one long-lived connection and multiplex your subscriptions on it; do not
reconnect to poll for a fresh snapshot. Send one JSON object per WebSocket
Show more below text frame.
[tab] TypeScript (Node)
ts theme={null}
import WebSocket from "ws"; // negotiates permessage-deflate by default
const socket = new WebSocket(
"wss://api-stream.myfundedperpetuals.com/v1/market-data",
{ headers: { Authorization: Bearer ${process.env.FP_API_KEY} } },
);
const subscriptions = new Map();
socket.on("open", () =>
Show more above clear connection-local IDs and mappings, reconnect with exponential backoff
and jitter, and re-establish subscriptions. Restore books and prices from the
new snapshot, backfill missing candles with candles.history, and reconcile
account trading state through the trading API. A market trade tape cannot be
used as your account fill ledger. A slow client can lose superseded state or
be disconnected; always monitor freshness.
On draining, connect a replacement, subscribe, wait for its initial snapshot
boundaries, and then close the old socket. Deduplicate overlapping events.
If the replacement fails, keep reading the old socket until it ends and retry
with backoff. Avoid unlimited reconnect loops on permanent filter errors.
Bound Behavior when exceeded 256 active subscriptions per connection New subscription rejected.
− Bound Behavior when exceeded 32 symbols and 10 providers per subscription Invalid filter rejected.
+ Bound Behavior when exceeded 32 symbols and 11 providers per subscription Invalid filter rejected.
64 distinct provider/symbol leases across candle, book, and trade subscriptions per connection New subscription rejected. 16 concurrent requests, including at most 4 history requests per connection Excess request returns an error; heartbeat pings are excluded.
Show more below 5 active connections per API key Upgrade rejected with HTTP 429 too_many_connections. 512 active connections per source address Upgrade rejected with HTTP 429. 30 connection admissions per minute per source, with a burst of 10 Excess upgrades return HTTP 429 with Retry-After: 60. Shared process connection, memory, and upstream budgets Upgrade may return HTTP 503 or subscription/request may be rejected. Retry transient capacity failures with backoff.
These budgets belong to the developer stream and are separate from the website feed.
The service also limits simultaneous history work and one-shot status requests;
prefer a status subscription and back off when capacity is exhausted. Keep one multiplexed socket per
client, unsubscribe unused views, cache closed candles, and avoid polling REST
quotes for every price update. Market streaming adds no REST quota usage.
For order, fill, position, and balance changes on your own accounts, use