PhoenixPerpetualsDocs API v1
Get an API key

API reference ยท Exits and strategies

GET/v1/accounts/{account_id}/strategies

List strategies⁠.

Read

The account's strategies, newest first, with every order each one placed.

Path parameters#

Query parameters#

  • statusstring

    active: waiting or working. ended: completed, canceled or ended. all: both.

    One ofallactiveended

  • marketstring

    Only this market.

  • The strategy you created with this id.

  • limitinteger

    Page size.

  • cursorstring

    next_cursor from the previous page, with the same filters.

Responses#

200OK
  • idstringrequired

    The strategy.

  • client_strategy_idstring or nullrequired

    Your own id for it.

  • account_idstringrequired

    The account number.

  • typestringrequired

    exits: a position's take-profit and stop-loss legs. bracket: an order with exits once it fills. oco: two orders, the first fill cancels the other. twap, vwap: an order in slices over time. scaled: a ladder of limits. chase: a limit that follows the price. conditional: an order sent once a price is reached.

    One ofexitsbracketocotwapvwapscaledchaseconditional

  • marketstringrequired

    A market id: the asset and USD; an option adds its venue or hours after a dot.

  • sidestring or nullrequired

    The side of its orders (exits: the closing side).

    One ofbuysell

  • statusstringrequired

    waiting: armed, nothing placed yet. working: running. completed: done as asked. canceled: you ended it. ended: it stopped for end_reason.

    One ofwaitingworkingcompletedcanceledended

  • end_reasonstring or nullrequired

    Why it stopped.

    One oftake_profitstop_lossfilledposition_closedposition_reversedcanceled_by_userexternalkey_revokedaccount_closedengine_restartchild_rejectedprice_boundexpired

  • paramsobjectrequired

    What it was created with.

  • progressobjectrequired

    How far it is (by type).

  • ordersarray of Orderrequired

    Every order it placed, oldest first.

    Show 26 fields
    • idstringrequired

      The order.

    • client_order_idstring or nullrequired

      Your own id for it, when it was placed through the API.

    • account_idstringrequired

      The account number.

    • marketstringrequired

      A market id: the asset and USD; an option adds its venue or hours after a dot.

    • sidestring or nullrequired

      The order's side; null for an order placed elsewhere before the API saw it.

      One ofbuysell

    • typestring or nullrequired

      The order's type.

      One ofmarketlimitstop_marketstop_limittake_markettake_limit

    • statusstringrequired

      unconfirmed: the engine has not confirmed its last state yet.

      One ofpendingworkingfilledcanceledrejectedexpiredunconfirmed

    • sizedecimal string or nullrequired

      The size, in the base asset.

    • filled_sizedecimal string or nullrequired

      How much filled.

    • limit_pricedecimal string or nullrequired

      Its limit price.

    • stop_pricedecimal string or nullrequired

      Its trigger price.

    • average_fill_pricedecimal string or nullrequired

      The average fill price.

    • feedecimal string or nullrequired

      The fee its fill paid.

    • reduce_onlyboolean or nullrequired

      It may only reduce a position; null when not known (placed elsewhere).

    • time_in_forcestringrequired

      How long it rests.

      One ofgtcgtdiocfok

    • expires_atinteger, Unix ms or nullrequired

      A gtd order: when it expires (it ends expired then); null otherwise.

    • post_onlyboolean or nullrequired

      It may only rest, never fill at once; null when not known (placed elsewhere).

    • sourcestringrequired

      Where it was placed: this API, an AI assistant (the MCP server), a trading platform, a strategy, a TradingView alert, or the system (a liquidation).

      One ofapimcpplatformstrategytradingviewsystem

    • strategy_idstring or nullrequired

      The strategy that placed it (source strategy).

    • exitsobject or nullrequired

      Exits attached to it (orders placed through the API).

    • cancel_reasonstring or nullrequired

      Why it was canceled.

      One ofusercancel_allflattenclose_allposition_closedposition_reversedclose_assistocoreplacedstrategykey_loss_stoprisk_rulesystem_restartexternal

    • rejectobject or nullrequired
      Show 2 fields
      • codestringrequired

        The error code.

      • messagestring or nullrequired

        What happened.

    • created_atinteger, Unix ms or nullrequired

      When it was placed.

    • filled_atinteger, Unix ms or nullrequired

      When it filled.

    • canceled_atinteger, Unix ms or nullrequired

      When it was canceled.

    • updated_atinteger, Unix ms or null

      Its latest change.

  • created_atinteger, Unix msrequired

    When it was created.

  • updated_atinteger, Unix msrequired

    Its latest change.

  • ended_atinteger, Unix ms or nullrequired

    When it stopped.

400A query or path parameter is out of range or the wrong kind.
{
  "error": {
    "type": "invalid_request",
    "code": "invalid_parameter",
    "message": "A parameter has a value this route does not take.",
    "request_id": "req_0f9c2a7d8e1b4c6a9f3e5d7b1a2c4e6f",
    "retryable": false,
    "doc_url": "https://docs.phoenixperpsfunding.com/reference/errors#invalid_parameter"
  }
}
401The request has no Authorization header.
{
  "error": {
    "type": "authentication",
    "code": "missing_api_key",
    "message": "No API key: send it as Authorization: Bearer <key>.",
    "request_id": "req_0f9c2a7d8e1b4c6a9f3e5d7b1a2c4e6f",
    "retryable": false,
    "doc_url": "https://docs.phoenixperpsfunding.com/reference/errors#missing_api_key"
  }
}
403The key only works from the addresses you listed.
{
  "error": {
    "type": "permission",
    "code": "ip_not_allowed",
    "message": "This address is not on the key's allowlist.",
    "request_id": "req_0f9c2a7d8e1b4c6a9f3e5d7b1a2c4e6f",
    "retryable": false,
    "doc_url": "https://docs.phoenixperpsfunding.com/reference/errors#ip_not_allowed"
  }
}
404The account does not exist in this environment, or the key does not reach it.
{
  "error": {
    "type": "not_found",
    "code": "account_not_found",
    "message": "No account with that id is reachable with this key.",
    "request_id": "req_0f9c2a7d8e1b4c6a9f3e5d7b1a2c4e6f",
    "retryable": false,
    "doc_url": "https://docs.phoenixperpsfunding.com/reference/errors#account_not_found"
  }
}
429A request budget is used up (details.scope says which).
{
  "error": {
    "type": "rate_limit",
    "code": "rate_limited",
    "message": "Too many requests: slow down.",
    "request_id": "req_0f9c2a7d8e1b4c6a9f3e5d7b1a2c4e6f",
    "retryable": true,
    "doc_url": "https://docs.phoenixperpsfunding.com/reference/errors#rate_limited"
  }
}
500An error we did not expect.
{
  "error": {
    "type": "server",
    "code": "internal_error",
    "message": "Something went wrong on our side.",
    "request_id": "req_0f9c2a7d8e1b4c6a9f3e5d7b1a2c4e6f",
    "retryable": true,
    "doc_url": "https://docs.phoenixperpsfunding.com/reference/errors#internal_error"
  }
}
503The API is starting and has not loaded your keys yet.
{
  "error": {
    "type": "engine",
    "code": "not_ready",
    "message": "The API is starting. Try again in a moment.",
    "request_id": "req_0f9c2a7d8e1b4c6a9f3e5d7b1a2c4e6f",
    "retryable": true,
    "doc_url": "https://docs.phoenixperpsfunding.com/reference/errors#not_ready"
  }
}

Errors#

Codes this endpoint can return. Match on the code, never on the message.

Guides, endpoints, fields and error codes.