PhoenixPerpetualsDocs API v1
Get an API key

API reference ยท Platform

GET/v1/me

Get your key⁠.

Read

The key you called with: its access, the accounts it reaches, the limits you set on it and its budgets.

Responses#

200OK
  • credentialobjectrequired
    Show 7 fields
    • kindstringrequired

      What you called with: an API key, or an app you signed in to.

      One ofkeyapp

    • idstringrequired

      The key's id (the part after ppk_test_ or ppk_live_), or the app access's id.

    • namestringrequired

      Its name (an app: the app's name).

    • environmentstringrequired

      Its environment.

      One oflivesandbox

    • accessstringrequired

      read: look only. trade: also place and cancel.

      One ofreadtrade

    • expires_atinteger, Unix ms or nullrequired

      When it expires; null: never.

    • created_atinteger, Unix ms or nullrequired

      When it was made.

  • accountsarray of stringrequired

    The accounts it reaches.

  • account_scopestringrequired

    all: every account of the environment, new ones too. selected: only those listed.

    One ofallselected

  • controlsobjectrequired

    The limits you set on the key.

    Show 5 fields
    • marketsarray of stringrequired

      The markets the key may trade; empty: every market.

    • reduce_onlybooleanrequired

      The key may only reduce positions.

    • max_order_usddecimal string or nullrequired

      The largest order the key may place, in USD.

    • max_position_usddecimal string or nullrequired

      The largest position the key may hold, in USD.

    • daily_loss_usddecimal string or nullrequired

      The loss in a trading day at which the key stops trading the account.

  • budgetsobjectrequired
    Show 2 fields
  • assistantobject or nullrequired

    Through the MCP server (an AI assistant): how its trades are confirmed and its budget. Null for any other call.

    Show 3 fields
    • confirm_tradesbooleanrequired

      Each trade is shown first and placed only when repeated with its confirmation (preview, then confirm).

    • confirm_secondsintegerrequired

      How long a preview's confirmation holds, in seconds.

    • budgetobjectrequired

      The AI assistant's own budget, on top of the others.

      Show 3 fields
304Not Modified: your If-None-Match still matches (no body; nothing changed).
400The request carries something this route does not know, or a parameter twice.
{
  "error": {
    "type": "invalid_request",
    "code": "unknown_field",
    "message": "A parameter or field is not part of this route.",
    "request_id": "req_0f9c2a7d8e1b4c6a9f3e5d7b1a2c4e6f",
    "retryable": false,
    "doc_url": "https://docs.phoenixperpsfunding.com/reference/errors#unknown_field"
  }
}
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"
  }
}
405The path exists, with other methods (see the Allow header).
{
  "error": {
    "type": "method",
    "code": "method_not_allowed",
    "message": "This route does not take that method.",
    "request_id": "req_0f9c2a7d8e1b4c6a9f3e5d7b1a2c4e6f",
    "retryable": false,
    "doc_url": "https://docs.phoenixperpsfunding.com/reference/errors#method_not_allowed"
  }
}
414The URL is over the length limit.
{
  "error": {
    "type": "payload",
    "code": "uri_too_long",
    "message": "The address is too long.",
    "request_id": "req_0f9c2a7d8e1b4c6a9f3e5d7b1a2c4e6f",
    "retryable": false,
    "doc_url": "https://docs.phoenixperpsfunding.com/reference/errors#uri_too_long"
  }
}
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"
  }
}
503A service this call needs did not answer.
{
  "error": {
    "type": "server",
    "code": "temporarily_unavailable",
    "message": "This cannot be done right now. Try again in a moment.",
    "request_id": "req_0f9c2a7d8e1b4c6a9f3e5d7b1a2c4e6f",
    "retryable": true,
    "doc_url": "https://docs.phoenixperpsfunding.com/reference/errors#temporarily_unavailable"
  }
}

Errors#

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

Guides, endpoints, fields and error codes.