PhoenixPerpetualsDocs API v1
Get an API key

API reference ยท Markets

GET/v1/markets/stats

List market stats⁠.

No key

Every market's last price, its 24 h change, range and volume, and its open interest, in one call (the market data stream's stats channel sends the same every 5 s). The list is complete: it never pages. as_of: when these figures were read.

Responses#

200OK
  • marketstringrequired

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

  • lastdecimal string or nullrequired

    The last trade.

  • change_24hdecimal string or nullrequired

    The change over 24 hours.

  • change_24h_pctdecimal string or nullrequired

    That change in percent.

  • high_24hdecimal string or nullrequired

    The highest in 24 hours.

  • low_24hdecimal string or nullrequired

    The lowest in 24 hours.

  • volume_24hdecimal string or nullrequired

    The size traded in 24 hours, in the base asset.

  • notional_volume_24hdecimal string or nullrequired

    The value traded in 24 hours, in USD.

  • open_interestdecimal string or nullrequired

    The market's open interest: the size held open in positions, in the base asset.

  • notional_open_interestdecimal string or nullrequired

    That open interest in USD, at the last price.

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 trading engine did not give a complete answer in time; nothing partial is returned.
{
  "error": {
    "type": "engine",
    "code": "state_unavailable",
    "message": "The account's figures cannot be read right now.",
    "request_id": "req_0f9c2a7d8e1b4c6a9f3e5d7b1a2c4e6f",
    "retryable": true,
    "doc_url": "https://docs.phoenixperpsfunding.com/reference/errors#state_unavailable"
  }
}

Errors#

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

Guides, endpoints, fields and error codes.