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

# Quote withdrawals

> Validates a list-shaped NGN bank or one-item USD stablecoin withdrawal and returns aggregate debit, fee, expected receive amount, item previews, and transfer count. Quoting never reserves funds.



## OpenAPI

````yaml /openapi/openapi.json post /partner/wallets/withdrawal/quotes
openapi: 3.1.0
info:
  title: Stabyl API
  description: >-
    REST API for approved Stabyl accounts to automate exchange, wallet, and
    non-production simulation workflows.
  contact:
    name: Stabyl Support
    email: support@stabyl.com
  license:
    name: Proprietary
  version: 1.0.0
servers:
  - url: https://api.stabyl.com/v1
    description: Production
  - url: https://api-staging.stabyl.com/v1
    description: Staging
security: []
tags:
  - name: Exchange
    description: Trading market data and order management for account automation.
  - name: Wallets
    description: >-
      Supported routes, deposit destinations, balances, transactions, and saved
      recipients.
  - name: Webhooks
    description: >-
      Outbound event delivery configuration and eventually consistent delivery
      history. Verify Standard Webhooks webhook-id, webhook-timestamp, and
      webhook-signature headers against the unchanged raw request body before
      parsing JSON.
  - name: Simulation
    description: Non-production endpoints for testing integration behavior.
paths:
  /partner/wallets/withdrawal/quotes:
    post:
      tags:
        - Wallets
      summary: Quote withdrawals
      description: >-
        Validates a list-shaped NGN bank or one-item USD stablecoin withdrawal
        and returns aggregate debit, fee, expected receive amount, item
        previews, and transfer count. Quoting never reserves funds.
      operationId: post_partner_wallets_withdrawal_quotes
      parameters:
        - name: X-Stabyl-Timestamp
          in: header
          description: >-
            Current Unix time in milliseconds. The server accepts at most 30
            seconds of clock skew.
          required: true
          schema:
            type: string
          example: '1783756800000'
        - name: X-Stabyl-Nonce
          in: header
          description: >-
            A new UUIDv4 or UUIDv7 for this HTTP attempt. A verified nonce is
            single-use for five minutes.
          required: true
          schema:
            type: string
            format: uuid
          example: 018f32f0-3333-7333-8333-333333333333
        - name: X-Stabyl-Signature
          in: header
          description: >-
            Unpadded base64url Ed25519 signature of the version 1 canonical
            payload. The exact path includes the server prefix, for example
            `/v1/partner/wallets/withdrawals`.
          required: true
          schema:
            type: string
          example: >-
            -_flQmASKXMSSh5cMTAON3zdPWWDWus4ONfim0kYqaG3nGPyWw-TC4bbr4YfmoebWgYgj6V2DNmM6WIl1oaHAA
      requestBody:
        description: >-
          List-shaped NGN or one-item USD withdrawal to quote. Do not include an
          authorization token; the signed HTTP request authenticates the caller
          and quoting does not reserve funds.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PartnerWithdrawalQuoteRequest'
        required: true
      responses:
        '200':
          description: Withdrawal quote
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/WalletWithdrawalQuoteResponse'
                  status:
                    type: string
                    enum:
                      - success
              example:
                data:
                  amount: '200000000.00'
                  currency: NGN
                  quotes:
                    - debit_amount: '200000500.00'
                      estimated_receive: '200000000.00'
                      fee: '500.00'
                      items:
                        - amount: '200000000.00'
                          client_item_id: beneficiary-1
                          destination:
                            account_name: Example Recipient
                            account_number: '0123456789'
                            bank_code: '044'
                            bank_name: Access Bank
                            type: bank_account
                          transfers:
                            - amount: '100000000.00'
                              sequence: 1
                              status: pending
                            - amount: '100000000.00'
                              sequence: 2
                              status: pending
                      max_transfer_amount: '100000000.00'
                      rail: bank_transfer
                      receive_currency: NGN
                      status: available
                      transfer_count: 2
                status: success
        '400':
          description: Invalid parameters or unsupported route
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                    properties:
                      code:
                        type: string
                        example: VALIDATION_FAILED
                      message:
                        type: string
                        example: invalid request parameters
                  status:
                    type: string
                    enum:
                      - error
              example:
                error:
                  code: VALIDATION_FAILED
                  message: invalid request parameters
                status: error
        '401':
          description: Signed request required
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                    properties:
                      code:
                        type: string
                        example: UNAUTHORIZED
                      message:
                        type: string
                        example: missing X-Api-Key header
                  status:
                    type: string
                    enum:
                      - error
              example:
                error:
                  code: UNAUTHORIZED
                  message: missing X-Api-Key header
                status: error
        '403':
          description: Missing wallets:withdraw scope
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                    properties:
                      code:
                        type: string
                        example: FORBIDDEN
                      message:
                        type: string
                        example: request is not allowed
                  status:
                    type: string
                    enum:
                      - error
              example:
                error:
                  code: FORBIDDEN
                  message: request is not allowed
                status: error
      security:
        - api_key: []
components:
  schemas:
    PartnerWithdrawalQuoteRequest:
      type: object
      required:
        - currency
        - items
      properties:
        currency:
          type: string
          example: NGN
        items:
          type: array
          items:
            $ref: '#/components/schemas/WalletWithdrawalItemRequest'
        settlement_rail:
          type:
            - string
            - 'null'
          example: USDC
      additionalProperties: false
      example:
        currency: NGN
        items:
          - amount: '200000000.00'
            client_item_id: beneficiary-a
            description: Supplier settlement
            destination:
              account_name: Jane Doe
              account_number: '0123456789'
              bank_code: '044'
              bank_name: Access Bank
              type: bank_account
    WalletWithdrawalQuoteResponse:
      type: object
      required:
        - currency
        - amount
        - quotes
      properties:
        amount:
          type: string
        currency:
          type: string
        quotes:
          type: array
          items:
            $ref: '#/components/schemas/WalletWithdrawalQuote'
    WalletWithdrawalItemRequest:
      type: object
      description: Rail-neutral withdrawal item used by list-only public adapters.
      required:
        - amount
        - destination
      properties:
        amount:
          type: string
          example: '100.00'
        client_item_id:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
        destination:
          $ref: '#/components/schemas/WalletWithdrawalDestination'
      additionalProperties: false
    WalletWithdrawalQuote:
      type: object
      required:
        - rail
        - status
        - fee
        - debit_amount
        - estimated_receive
        - receive_currency
        - transfer_count
        - items
      properties:
        debit_amount:
          type: string
        estimated_receive:
          type: string
        expires_at:
          type:
            - string
            - 'null'
        fee:
          type: string
        items:
          type: array
          items:
            $ref: '#/components/schemas/WalletWithdrawalItemPreview'
        max_transfer_amount:
          type:
            - string
            - 'null'
        rail:
          type: string
        reason:
          type:
            - string
            - 'null'
        receive_currency:
          type: string
        settlement_estimate:
          type:
            - string
            - 'null'
        status:
          type: string
        transfer_count:
          type: integer
          minimum: 0
    WalletWithdrawalDestination:
      oneOf:
        - type: object
          required:
            - bank_code
            - bank_name
            - account_number
            - account_name
            - type
          properties:
            account_name:
              type: string
            account_number:
              type: string
            bank_code:
              type: string
            bank_name:
              type: string
            type:
              type: string
              enum:
                - bank_account
        - type: object
          required:
            - chain
            - address
            - type
          properties:
            address:
              type: string
            chain:
              $ref: '#/components/schemas/WalletChain'
            slug:
              type:
                - string
                - 'null'
            type:
              type: string
              enum:
                - crypto_address
    WalletWithdrawalItemPreview:
      type: object
      description: >-
        Rail-neutral item preview. Its field names intentionally match the
        existing

        fiat preview so NGN response JSON remains unchanged.
      required:
        - amount
        - destination
        - transfers
      properties:
        amount:
          type: string
        client_item_id:
          type:
            - string
            - 'null'
        destination:
          $ref: '#/components/schemas/WalletWithdrawalDestination'
        transfers:
          type: array
          items:
            $ref: '#/components/schemas/WalletWithdrawalTransferPreview'
    WalletChain:
      type: string
      description: Supported blockchain route family for stablecoin deposits.
      enum:
        - evm
        - tron
        - solana
    WalletWithdrawalTransferPreview:
      type: object
      required:
        - sequence
        - amount
        - status
      properties:
        amount:
          type: string
        sequence:
          type: integer
          format: int32
        status:
          type: string
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        API credential. Withdrawal quote and submit operations additionally
        require the documented Ed25519 timestamp, nonce, and signature headers.
      x-default: sb_test_your_key

````