Skip to Content
EngineeringOct 31, 20265 min read

The MyFundedPerps API: Quickstart, Keys, and Your First Programmatic Order

About This Blog

The MyFundedPerps API is the only sanctioned way to automate your trading on the platform. The rules are explicit: automated trading must use the documented public API, and calling the internal endpoints the website itself uses is prohibited. The good news is that the public API covers the full trading lifecycle, from listing accounts and quoting markets to placing, modifying, and cancelling orders. This article walks the official quickstart path: create a key, authenticate, get a quote, and submit your first market order.

One caveat up front: the developer API is in beta, and breaking changes can be introduced at any time. Treat the docs at docs.myfundedperpetuals.com as the source of truth and version your client code accordingly.

Keys and access levels

Create a key in API Key Settings on your dashboard, name it, and copy the secret when it appears. MyFundedPerps stores only the cryptographic hash, so the secret is shown once and cannot be recovered. Every key has two properties you must choose deliberately:

The account boundary has a copy-trading subtlety worth knowing. A lead order requires access to the lead and every configured follower in the same environment. A key scoped to the lead alone cannot place the lead trade while the copy group is enabled; the request fails with a 404 and account_not_found before any order is created, and followers are never silently skipped. Use a key covering the whole group, or manage that trade on the website.

Keys created before scoped access existed keep read and trade access to every owned account until revoked.

Live and test environments

Every key belongs to one environment, named by its prefix and served on its own hostname:

A key presented on the wrong host returns 401 with a message naming the correct one. Build and debug against the sandbox with an fp_test_ key before you let anything touch a live evaluation.

Authentication

Authentication is a Bearer token in the HTTP Authorization header:

The API information and tradable-market catalog endpoints are public; account state, quotes, positions, and orders require a key. Treat keys as long-lived credentials: store them in a secret manager or encrypted environment registry, never commit them, never log them, never put them in a URL or frontend code. To rotate, create a replacement key, update your client, confirm an authenticated read works, then revoke the old key in API Key Settings. Revocation applies to new requests immediately.

The MyFundedPerps API quickstart, step by step

1. Export your key

2. List your accounts

GET /v1/accounts/{account_id} returns a fresh risk snapshot: equity, unrealized P/L, reserved margin, available balance, gross exposure, loss floors, room above each floor, and remaining profit target. If any open position lacks a fresh mark, mark-dependent values come back null and marks_complete is false. Copy the id of the challenge account you want to trade.

3. Quote a market

Market IDs contain a pipe character, so URL-encode it in paths:

With side and size supplied, the quote returns estimated_fill_price (top of book bounded by the mark-based slippage cap), slippage_bps (the maximum adverse slippage tier), estimated_notional, and estimated_fee. fillable is false when your size is invalid at the market's size precision.

4. Place the order

Use the quote's mid as expected_price. That value records what your client observed; the server still prices and validates against a fresh, authoritative book:

An accepted order starts as pending. Poll the order endpoint until it reaches filled or rejected, with sensible backoff and respect for the documented rate limits. If the placement response is lost, recover the server order with GET /v1/orders?client_order_id=quickstart-entry-1 rather than blindly resubmitting; the Idempotency-Key header and your client_order_id are your defenses against duplicate exposure.

Beyond market orders

The same /v1/orders endpoint accepts limit, chase, stop, take, and external conditional orders. TWAP, VWAP, and scaled ladders use their own parent resources. For continuous prices, connect to market data streaming instead of polling; account and order updates stay on REST. If you prefer a batteries-included client, the official fperp CLI wraps every operation, and the hosted MCP server exposes the same operations as tools for AI agents; both have their own articles on this blog.

One rule reminder: automation does not exempt you from any trading rule. HFT, latency arbitrage, quote stuffing, and cross-account coordination are prohibited whether they come from a mouse or a script, and every order still consumes your account's fee schedule and risk limits. See myfundedperps-rules-explained for the evaluation rules your bot must respect.

Frequently asked questions

Is the MyFundedPerps API free to use?

The API is documented as part of the platform and requires an account with API key access created in API Key Settings. It is currently in beta, so interfaces may change. There is no separate signup flow beyond creating a key on your existing account.

What is the difference between a Read Only and a Read And Trade key?

A Read Only key can query accounts, markets, quotes, positions, orders, and fills. A Read And Trade key adds order and position changes. A read-only key attempting a trading request receives a 403 response.

Why does my key work on one host but return 401 on another?

Keys are bound to their environment. An fp_live_ key only works on https://developers.myfundedperpetuals.com, and an fp_test_ key only works on the sandbox host. Presenting a key on the wrong host returns 401 with a message naming the correct host.

How do I avoid placing duplicate orders when a response times out?

Send a unique Idempotency-Key with every order and set your own client_order_id. If the response is lost, query GET /v1/orders?client_order_id=... to recover the server-side order before deciding whether anything needs to be resubmitted.

Can I use the website's internal API instead?

No. Automated trading must use the documented public API. Accessing internal endpoints exposed through browser developer tools or network requests is explicitly prohibited and treated as a platform violation.

Keep Exploring