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

# Queue a withdrawal to an external address.



## OpenAPI

````yaml /openapi.yaml post /custody/withdraw
openapi: 3.1.0
info:
  title: Symbiosis API
  description: >-
    The Symbiosis REST API.


    ## Authentication


    Endpoints accept one of two credentials:


    - **Session token** — `Authorization: Bearer <token>`, from `POST
    /auth/login`.

    - **API key (HMAC)** — three headers on every request:
      - `APIKEY`: the API key id, from `POST /auth/api-keys`.
      - `X-Hmac-Timestamp`: current Unix time in milliseconds.
      - `X-Hmac-Signature`: Base64-encoded HMAC-SHA256 of
        `timestamp_ms "\n" METHOD "\n" PATH_AND_QUERY "\n" BODY`, keyed with the API key
        secret. `PATH_AND_QUERY` is the full request target including the query string.

    ## Wire formats


    Token amounts (`U256`) serialize in responses as 0x-prefixed hex strings;
    requests accept decimal strings, 0x-prefixed hex strings, or JSON numbers.
    Asset ids and addresses are 0x-prefixed hex strings. Prices are integers
    scaled by 1e6.
  version: 0.1.0
servers:
  - url: https://api.symbiosis.markets
security: []
tags:
  - name: auth
    description: Accounts, sessions, API keys, and websocket tickets.
  - name: custody
    description: Deposit addresses, balances, and withdrawals.
  - name: rfq
    description: Quote requests, quotes, and matching.
paths:
  /custody/withdraw:
    post:
      tags:
        - custody
      summary: Queue a withdrawal to an external address.
      operationId: withdraw
      parameters:
        - in: header
          name: X-Hmac-Timestamp
          description: >-
            Unix milliseconds used in the signed message. Required with
            `APIKEY`.
          schema:
            type: string
          style: simple
        - in: header
          name: X-Hmac-Signature
          description: >-
            Base64 HMAC-SHA256 over `timestamp_ms \n METHOD \n PATH_AND_QUERY \n
            BODY`. Required with `APIKEY`.
          schema:
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WithdrawRequest'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WithdrawResponse'
        '400':
          description: Insufficient balance, or an invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid, missing, or mis-signed credentials.
        '403':
          description: Authenticated, but the credential lacks the required scope.
      security:
        - SessionBearer: []
        - ApiKeyHmac: []
components:
  schemas:
    WithdrawRequest:
      type: object
      properties:
        amount:
          type: string
        asset:
          $ref: '#/components/schemas/WithdrawAsset'
        recipient:
          type: string
      required:
        - recipient
        - asset
        - amount
    WithdrawResponse:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/WithdrawStatus'
      required:
        - status
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
      required:
        - error
    WithdrawAsset:
      oneOf:
        - type: object
          properties:
            asset_id:
              type: string
            venue:
              $ref: '#/components/schemas/Venue'
            withdraw_asset_type:
              type: string
              const: asset
          required:
            - withdraw_asset_type
            - venue
            - asset_id
        - type: object
          properties:
            chain:
              $ref: '#/components/schemas/Chain'
            withdraw_asset_type:
              type: string
              const: u_s_d_c
          required:
            - withdraw_asset_type
            - chain
    WithdrawStatus:
      type: string
      enum:
        - Queued
    Venue:
      description: The supported markets of the system.
      type: string
      enum:
        - polymarket
        - kalshi
        - limitless
    Chain:
      type: string
      enum:
        - Polygon
        - Solana
        - Base
  securitySchemes:
    SessionBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Session token from `POST /auth/login`.
    ApiKeyHmac:
      type: apiKey
      in: header
      name: APIKEY
      description: >-
        API key id; must be accompanied by `X-Hmac-Timestamp` and
        `X-Hmac-Signature`. See the API description for the signing scheme.

````