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

# Read Phoenix cross-account collateral

> Read the wallet's Phoenix cross-margin account balance, in USDC micros.

`usdc_e6: null` ⇒ the wallet was **never onboarded**; `0` ⇒ onboarded but
unfunded. Phoenix needs this account funded *before* an order — an
unfunded account silently 0-fills — so check it as a pre-flight and top up
with `/perp/sol/phoenix-deposit`.




## OpenAPI

````yaml openapi-spec/trading.yaml post /perp/sol/phoenix-collateral
openapi: 3.0.3
info:
  title: Raze Trading API
  description: >
    Trading endpoints for Solana token swaps — quote, buy, sell, atomic

    round-trips and raw instructions. Perpetuals (Jupiter Perps + Phoenix) live

    here too.


    Quotes can also be **streamed**: `/swap/sol/quote/stream` is a WebSocket
    that

    pushes a fresh quote whenever the pools under your route move. It is not

    describable in OpenAPI — see

    [Streaming quotes](/api-reference/router/quote-stream).


    Write utilities (`/utils/sol/*` — launch, transfer, burn, consolidate, fees)

    moved to the History API on `https://api.raze.bot` (see `history.yaml`).


    Runs on port 8082.


    **Auth methods**: `Authorization: Bearer sk_...` header, `X-API-Key: sk_...`
    header, or `?apiKey=sk_...` query param.
  version: 2.1.0
servers:
  - url: https://router.raze.bot
    description: >-
      Raze global trading router — GeoDNS routes to the nearest region
      automatically
security: []
paths:
  /perp/sol/phoenix-collateral:
    post:
      summary: Read Phoenix cross-account collateral
      description: >
        Read the wallet's Phoenix cross-margin account balance, in USDC micros.


        `usdc_e6: null` ⇒ the wallet was **never onboarded**; `0` ⇒ onboarded
        but

        unfunded. Phoenix needs this account funded *before* an order — an

        unfunded account silently 0-fills — so check it as a pre-flight and top
        up

        with `/perp/sol/phoenix-deposit`.
      operationId: phoenixCollateral
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PhoenixWalletRequest'
            example:
              wallet: 62ThHC1rs2GUfa8J4Qjcj5GD2MSL2d65pcJtenNieDnm
      responses:
        '200':
          description: Balance read
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoenixCollateralResponse'
              example:
                success: true
                data:
                  usdc_e6: 250000000
        '400':
          description: Invalid wallet
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: Upstream read failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    PhoenixWalletRequest:
      type: object
      required:
        - wallet
      properties:
        wallet:
          type: string
    PhoenixCollateralResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          type: object
          properties:
            usdc_e6:
              type: integer
              format: int64
              nullable: true
              description: >-
                Cross-account collateral in USDC micros. `null` ⇒ never
                onboarded; `0` ⇒ onboarded but unfunded.
        error:
          type: string
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
        details:
          type: string
      required:
        - success
        - error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer

````