PhoenixPerpetualsDocs API v1
Get an API key

Developers ยท API v1

Build on Phoenix Perpetuals⁠.

Trade your accounts from your own code. Place orders with server-side stops, stream your risk live, get webhooks and TradingView alerts, and test everything for free in the sandbox first.

Start in 5 minutesBrowse the reference

order.created: An order rests on the engine (or a market order was taken).order.edited: An order changed in place (size or price).order.filled: An order filled.order.canceled: An order was canceled; cancel_reason says why.order.rejected: The engine refused an order; reject.code says why.order.expired: An order ended by its time in force (gtd, ioc, fok).fill.created: An execution, with its price and fee.position.opened: A position opened (or turned to the other side).position.changed: A position's size or entry price changed.position.closed: A position closed.strategy.created: A strategy started.strategy.leg_placed: A strategy placed an order.strategy.leg_modified: A strategy moved one of its orders (a trailing stop, break-even, a chase).strategy.leg_filled: An order of a strategy filled.strategy.leg_canceled: An order of a strategy was canceled.strategy.leg_rejected: The engine refused an order of a strategy.strategy.orphan_repaired: An exit filled past flat and the position it opened was closed at once.strategy.slice: A TWAP or VWAP slice was sent, carried or refused.strategy.triggered: A conditional order's price was reached: its order was sent.strategy.ended: A strategy ended; end_reason says why.tradingview.alert_executed: A TradingView alert placed its orders.tradingview.alert_refused: A TradingView alert was refused; reason says why.account.updated: An account's balance or status changed.account.passed: An evaluation account passed.account.failed: An account breached a rule.account.payout_eligible: A funded account can request a payout.account.disabled: An account was disabled.account.removed: An account was removed.key.loss_stop: A key reached its daily loss stop: its trading on the account is paused until the next day.key.expiring: A key expires soon (api.keys.expiry_notice_days before its end), told on each account it reaches.system.restarted: The trading engine restarted: its orders and positions were reset (one event per account the API was following).risk.warning: An account came near a limit.risk.cleared: An account moved back from a limit.alert.triggered: A price alert fired: the market's price reached its level.webhook.ping: A test sent from your dashboard or the API.Ticker: The latest prices, at most once per interval_ms.Order book: The top of the book to the depth asked, whole every time (replace what you hold), at most every 250 ms.Trades: Trades as they print, batched every 100 ms; first the history asked.Candles: Candles: first the history asked, then the forming candle as it changes and each closed one.Stats: 24-hour figures and open interest, every 5 seconds (GET /v1/markets/stats answers the same for every market).Market status: The price feed's state, when it changes. v1
65 REST operations35 events6 market data channels

Your first call

List your accounts⁠.

Create a sandbox key in your dashboard, put it in PHOENIXPERPS_API_KEY, and run this.

The whole quickstart
curl "https://sandbox-api.phoenixperpsfunding.com/v1https://api.phoenixperpsfunding.com/v1/accounts" \
  -H "Authorization: Bearer $PHOENIXPERPS_API_KEY"
Example response
{
  "data": [
    {
      "id": "SANDBOX-00042-001",
      "environment": "sandbox",
      "stage": "sandbox",
      "status": "active",
      "product": "Classic",
      "tier": "$100K",
      "start_balance": "100000",
      "balance": "100000",
      "rule": {
        "start_balance": "100000",
        "daily_loss": {
          "amount": "5000",
          "pct": null,
          "basis": "start_balance",
          "on_breach": "fail_account"
        },
        "max_drawdown": {
          "amount": "10000",
          "pct": null,
          "mode": "end_of_day"
        },
        "weekly_loss": {
          "amount": null,
          "pct": null
        },
        "profit_target": {
          "amount": "8000",
          "pct": null,
          "requires_flat": false
        },
        "min_trading_days": 3,
        "min_calendar_days": null,
        "consistency": {
          "amount": null,
          "pct": null
        },
        "overnight_holding": true,
        "weekend_holding": true,
        "inactivity_days": null
      },
      "payout_eligible": false,
      "parked": false,
      "created_at": 1791460800000
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "as_of": 1791460800000,
  "stale": false
}

Where to go next⁠.

Seven official SDKs⁠.

Typed, with retries, pagination and streams built in. Open source on GitHub, installed with no account to create.

Sandbox

A free sandbox for every trader⁠.

Ten paper accounts of $100,000, on the same engine with real prices and real rules. Break things there, not on your evaluation.

How the sandbox works

Guides, endpoints, fields and error codes.