> ## Documentation Index
> Fetch the complete documentation index at: https://docs.phoenix.trade/llms.txt
> Use this file to discover all available pages before exploring further.

# Get exchange

> Handles `GET /v1/view/exchange` via `get.v1.view.exchange`.



## OpenAPI

````yaml /openapi/phoenix-public-api.json get /v1/view/exchange
openapi: 3.1.0
info:
  title: Phoenix Eternal API
  description: >-
    RESTful API for accessing Phoenix Eternal perpetual trading data. Provides
    real-time orderbook levels, asset information, and market metadata.
  termsOfService: https://www.phoenix.trade/terms-of-service
  contact:
    name: Phoenix Development Team
    url: https://github.com/Ellipsis-Labs/phoenix
  license:
    name: Proprietary
  version: 1.0.0
servers:
  - url: https://perp-api.phoenix.trade
    description: Phoenix Eternal Perp API
security: []
tags:
  - name: Auth
    description: Wallet and session authentication.
  - name: Exchange
    description: Exchange, market, candle, and no-referral register-instruction workflows.
  - name: Invite
    description: Invite validation, referral activation, and wallet allowlist checks.
  - name: Notifications
    description: Trader notification reads and acknowledgement helpers.
  - name: Trader
    description: Trader state, account history, and transaction builders.
externalDocs:
  url: https://docs.phoenix.trade
  description: Phoenix developer documentation
paths:
  /v1/view/exchange:
    get:
      tags:
        - Exchange
      summary: Get exchange
      description: Handles `GET /v1/view/exchange` via `get.v1.view.exchange`.
      operationId: get.v1.view.exchange
      responses:
        '200':
          description: Phoenix Eternal exchange configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExchangeView'
        '500':
          $ref: '#/components/responses/ErrorResponse'
      security:
        - PhoenixBearerAuth: []
components:
  schemas:
    ExchangeView:
      type: object
      description: |-
        Full exchange configuration response containing keys and market configs.
        Does NOT include live data like mark prices or current open interest.
      required:
        - keys
        - markets
      properties:
        keys:
          $ref: '#/components/schemas/ExchangeKeysView'
          description: Exchange-level account keys and authorities.
        markets:
          type: array
          items:
            $ref: '#/components/schemas/ExchangeMarketConfig'
          description: Static per-market configuration entries.
    ExchangeKeysView:
      type: object
      required:
        - globalConfig
        - currentAuthorities
        - pendingAuthorities
        - canonicalMint
        - globalVault
        - perpAssetMap
        - globalTraderIndex
        - activeTraderBuffer
        - withdrawQueue
      properties:
        activeTraderBuffer:
          type: array
          items:
            type: string
          description: Active trader buffer account public keys.
        canonicalMint:
          type: string
          description: Canonical quote mint public key.
        currentAuthorities:
          $ref: '#/components/schemas/AuthoritySetView'
          description: Currently active authority set.
        globalConfig:
          type: string
          description: Global configuration account public key.
        globalTraderIndex:
          type: array
          items:
            type: string
          description: Global trader index account public keys.
        globalVault:
          type: string
          description: Global vault public key.
        pendingAuthorities:
          $ref: '#/components/schemas/AuthoritySetView'
          description: Pending authority set awaiting activation.
        perpAssetMap:
          type: string
          description: Perp asset map public key.
        withdrawQueue:
          type: string
          description: Withdraw queue account public key.
    ExchangeMarketConfig:
      type: object
      description: >-
        Static market configuration without live data like prices or open
        interest.

        Used by the `/exchange` endpoint to return market parameters.
      required:
        - symbol
        - assetId
        - marketStatus
        - marketPubkey
        - splinePubkey
        - tickSize
        - baseLotsDecimals
        - takerFee
        - makerFee
        - leverageTiers
        - riskFactors
        - fundingIntervalSeconds
        - fundingPeriodSeconds
        - maxFundingRatePerInterval
        - openInterestCapBaseLots
        - maxLiquidationSizeBaseLots
        - isolatedOnly
      properties:
        assetId:
          type: integer
          format: int32
          description: Numeric asset identifier.
          minimum: 0
        baseLotsDecimals:
          type: integer
          format: int32
          description: Base-lot decimal exponent.
        commodityMetadata:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CommodityMetadata'
              description: Commodity-specific metadata, present only for commodity markets.
        fundingIntervalSeconds:
          type: integer
          format: int32
          description: Funding interval length in seconds.
          minimum: 0
        fundingPeriodSeconds:
          type: integer
          format: int32
          description: Funding period length in seconds.
          minimum: 0
        isolatedOnly:
          type: boolean
          description: Whether this market only supports isolated margin positions
        leverageTiers:
          type: array
          items:
            $ref: '#/components/schemas/ExchangeLeverageTier'
          description: Configured leverage tiers.
        makerFee:
          type: number
          format: double
          description: Maker fee (percent).
        marketPubkey:
          type: string
          description: The orderbook account pubkey (base58 encoded)
        marketStatus:
          $ref: '#/components/schemas/MarketStatus'
          description: Current market status.
        maxFundingRatePerInterval:
          type: integer
          format: int64
          description: Maximum absolute funding rate per interval.
        maxFundingRatePerIntervalPercentage:
          type: number
          format: double
          description: >-
            Maximum absolute funding rate per interval as a percentage of
            notional

            at the current mark price.
        maxLiquidationSizeBaseLots:
          $ref: '#/components/schemas/JsSafeU64'
          description: Maximum size for a single liquidation (in base lots)
        metadata:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/MarketPublicMetadata'
              description: Public market metadata configured off-chain.
        openInterestCapBaseLots:
          $ref: '#/components/schemas/JsSafeU64'
          description: Maximum open interest allowed for this market (in base lots)
        riskFactors:
          $ref: '#/components/schemas/ExchangeRiskFactors'
          description: Risk factors as percentages.
        splinePubkey:
          type: string
          description: The spline collection PDA (derived from market_pubkey)
        statsSnapshot:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/MarketStatsSnapshot'
              description: >-
                Optional live stats snapshot for seeding clients before
                websocket

                updates.
        symbol:
          type: string
          description: Market symbol (for example, "SOL-PERP").
        takerFee:
          type: number
          format: double
          description: Taker fee (percent).
        tickSize:
          type: integer
          format: int64
          description: Tick size in quote lots per base lot per tick.
          minimum: 0
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
    AuthoritySetView:
      type: object
      description: View for authority set containing all authority pubkeys
      required:
        - rootAuthority
        - riskAuthority
        - marketAuthority
        - oracleAuthority
        - adlAuthority
        - cancelAuthority
        - backstopAuthority
      properties:
        adlAuthority:
          type: string
          description: ADL authority public key.
        backstopAuthority:
          type: string
          description: Backstop authority public key.
        cancelAuthority:
          type: string
          description: Cancel authority public key.
        marketAuthority:
          type: string
          description: Market authority public key.
        oracleAuthority:
          type: string
          description: Oracle authority public key.
        riskAuthority:
          type: string
          description: Risk authority public key.
        rootAuthority:
          type: string
          description: Root authority public key.
    CommodityMetadata:
      type: object
      description: Commodity-specific market metadata.
      required:
        - isCommodity
        - isReopen
        - isAfterHours
        - status
        - afterHoursRadius
      properties:
        afterHoursRadius:
          type: string
          description: Commodity after-hours radius in price units.
        executionPriceBand:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/MarketPriceBand'
              description: >-
                Price band currently applied to execution-visible orderbook
                levels.
        isAfterHours:
          type: boolean
          description: Parsed after-hours flag.
        isCommodity:
          type: boolean
          description: Parsed commodity flag. Always true when this object is present.
        isReopen:
          type: boolean
          description: Parsed reopen flag.
        lastIndexExpiryTimestamp:
          type:
            - integer
            - 'null'
          format: int64
          description: Unix timestamp when the last known index price expires.
          minimum: 0
        lastKnownIndexPrice:
          type:
            - string
            - 'null'
          description: Last index price used for commodity after-hours/reopen behavior.
        markPriceBand:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/MarketPriceBand'
              description: Mark-price clamp band around the last known index price.
        status:
          $ref: '#/components/schemas/CommodityMarketState'
          description: Derived commodity state.
    ExchangeLeverageTier:
      type: object
      description: |-
        Leverage tier with risk factors as f64 percentages.
        Used by the `/exchange` endpoint.
      required:
        - maxLeverage
        - maxSizeBaseLots
        - limitOrderRiskFactor
      properties:
        limitOrderRiskFactor:
          type: number
          format: double
          description: The limit order risk factor as a percentage (e.g., 60.0 = 60%).
        limitOrderRiskFactorBps:
          type:
            - integer
            - 'null'
          format: int32
          description: The limit order risk factor in basis points (e.g., 6000 = 60%).
          minimum: 0
        maxLeverage:
          type: number
          format: double
          description: Maximum leverage for this tier.
        maxSizeBaseLots:
          type: integer
          format: int64
          description: Maximum size in base lots for this tier.
          minimum: 0
    MarketStatus:
      type: string
      enum:
        - uninitialized
        - active
        - postOnly
        - paused
        - closed
        - tombstoned
    JsSafeU64:
      type: integer
      format: int64
      description: |-
        Wrapper for unsigned 64-bit values that must be JSON-safe for consumers
        written in JavaScript/TypeScript. Mirrors [`JsSafeI64`] but for unsigned
        Phoenix quantities such as base lots, quote lots, and slots.
      minimum: 0
    MarketPublicMetadata:
      type: object
      description: Public off-chain metadata for a market.
      properties:
        calendar:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/MarketCalendar'
              description: >-
                Market calendar metadata derived from the configured calendar
                id.
        coinGeckoId:
          type:
            - string
            - 'null'
          description: CoinGecko asset identifier.
        coinMarketCapId:
          type:
            - integer
            - 'null'
          format: int64
          description: CoinMarketCap numeric asset identifier.
        description:
          type:
            - string
            - 'null'
          description: Human-readable market description.
        displayColor:
          type:
            - string
            - 'null'
          description: Preferred display color for this market.
        logoUri:
          type:
            - string
            - 'null'
          description: Logo URI for this market.
        name:
          type:
            - string
            - 'null'
          description: Human-readable market name.
        tokensXyzAssetId:
          type:
            - string
            - 'null'
          description: tokens.xyz asset identifier.
    ExchangeRiskFactors:
      type: object
      description: |-
        Risk factors as percentages.
        Used by the `/exchange` endpoint.
      required:
        - maintenance
        - backstop
        - highRisk
        - upnl
        - upnlForWithdrawals
        - cancelOrder
      properties:
        backstop:
          type: number
          format: double
          description: Backstop liquidation risk factor as a percentage.
        backstopBps:
          type:
            - integer
            - 'null'
          format: int32
          description: Backstop liquidation risk factor in basis points.
          minimum: 0
        cancelOrder:
          type: number
          format: double
          description: Cancel order risk factor as a percentage.
        cancelOrderBps:
          type:
            - integer
            - 'null'
          format: int32
          description: Cancel order risk factor in basis points.
          minimum: 0
        highRisk:
          type: number
          format: double
          description: High risk threshold as a percentage.
        highRiskBps:
          type:
            - integer
            - 'null'
          format: int32
          description: High risk threshold in basis points.
          minimum: 0
        maintenance:
          type: number
          format: double
          description: Maintenance margin risk factor as a percentage (e.g., 50.0 = 50%).
        maintenanceBps:
          type:
            - integer
            - 'null'
          format: int32
          description: Maintenance margin risk factor in basis points (e.g., 5000 = 50%).
          minimum: 0
        upnl:
          type: number
          format: double
          description: Risk factor for positive unrealized PnL penalty as a percentage.
        upnlBps:
          type:
            - integer
            - 'null'
          format: int32
          description: Risk factor for positive unrealized PnL penalty in basis points.
          minimum: 0
        upnlForWithdrawals:
          type: number
          format: double
          description: >-
            Risk factor for positive unrealized PnL penalty during withdrawals
            as a

            percentage.
        upnlForWithdrawalsBps:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            Risk factor for positive unrealized PnL penalty during withdrawals
            in

            basis points.
          minimum: 0
    MarketStatsSnapshot:
      type: object
      description: Live market stats captured alongside an exchange market config response.
      required:
        - slot
        - slotIndex
        - openInterestBaseLots
        - fundingStartIntervalTimestamp
        - cumulativeFundingRate
      properties:
        cumulativeFundingRate:
          $ref: '#/components/schemas/JsSafeI64'
          description: Current cumulative funding rate.
        fundingStartIntervalTimestamp:
          $ref: '#/components/schemas/JsSafeU64'
          description: Unix timestamp in seconds for the current funding interval start.
        openInterestBaseLots:
          $ref: '#/components/schemas/JsSafeU64'
          description: Current open interest in base lots.
        slot:
          type: integer
          format: int64
          description: Solana slot of the state snapshot used to build these stats.
          minimum: 0
        slotIndex:
          type: integer
          format: int32
          description: |-
            Intra-slot sequence index of the state snapshot used to build these
            stats.
          minimum: 0
    MarketPriceBand:
      type: object
      description: Inclusive lower/upper price bounds for market-specific execution rules.
      required:
        - min
        - max
      properties:
        max:
          type: string
        min:
          type: string
    CommodityMarketState:
      type: string
      description: >-
        Represents the state of a RWA market. This type is shared between
        on-chain

        and off-chain components
      enum:
        - active
        - afterHours
        - reopen
    MarketCalendar:
      type: object
      description: Public metadata for a market calendar associated with a market.
      required:
        - id
        - description
        - calendarUri
        - contentSha256
      properties:
        calendarUri:
          type: string
          description: URI where the full market calendar can be fetched.
        contentSha256:
          type: string
          description: SHA-256 hash of the calendar content.
        description:
          type: string
          description: Human-readable calendar description.
        id:
          type: string
          description: Market calendar identifier configured off-chain.
        nextMarketTransitionUtc:
          type:
            - string
            - 'null'
          format: date-time
          description: Next UTC timestamp at which this calendar changes market state.
    JsSafeI64:
      type: integer
      format: int64
      description: >-
        Wrapper for signed 64-bit values that need to survive JSON transport
        without

        tripping JavaScript's safe-integer limits. When `serde` is enabled, this
        can

        deserialize from a string or number to accommodate clients that
        stringify

        large values.
  responses:
    ErrorResponse:
      description: Standard JSON error payload.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    PhoenixBearerAuth:
      type: http
      scheme: bearer
      description: Bearer access token issued by `/v1/auth/*` login endpoints.

````