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

# Buy Cryptocurrency (Withdrawal)

> Creates a cryptocurrency withdrawal request. Conversion via USDT. Requests are processed in queue order.



## OpenAPI

````yaml /APIs/crypto-cash-openapi-en.json post /merchant/api/v1/balance/actions/buy/crypto/
openapi: 3.1.0
info:
  title: CryptoCash Merchant API
  description: >-
    API for working with cryptocurrency payments. All requests require signature
    authentication. Request body contains: data (JSON object in base64) and
    signature (SHA256(SECRET_KEY + data) in base64).
  version: 1.0.0
servers:
  - url: https://api.crypto-cash.world
    description: Production server
security: []
tags:
  - name: Balance
    description: Balance operations
  - name: Actions
    description: 'Actions: buy, sell, refund'
  - name: Transactions
    description: Transaction management
  - name: Reference
    description: Reference information
externalDocs:
  description: External currency rates
  url: https://rates.crypto-cash.world/api/v1/market/rates/export/json
paths:
  /merchant/api/v1/balance/actions/buy/crypto/:
    post:
      tags:
        - Actions
      summary: Buy Cryptocurrency (Withdrawal)
      description: >-
        Creates a cryptocurrency withdrawal request. Conversion via USDT.
        Requests are processed in queue order.
      operationId: buyCrypto
      requestBody:
        required: true
        description: |-
          Data parameters:
          - **publicKey** (required)
          - **address** (required)
          - **memo** (optional)
          - **amount** (required)
          - **currency** (optional if ticker)
          - **network** (optional if ticker)
          - **ticker** (optional if currency+network)
          - **externalId** (required)
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SignedRequest'
        x-data-schema:
          $ref: '#/components/schemas/BuyCryptoRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 200
                  data:
                    type: object
                    properties:
                      item:
                        $ref: '#/components/schemas/BuyCryptoResponse'
                      queued:
                        type: boolean
                        description: Queue placement flag
                      scheduledAt:
                        type: string
                        format: date-time
                        description: Scheduled execution time
        '400':
          description: Request error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    SignedRequest:
      type: object
      required:
        - data
        - signature
      properties:
        data:
          type: string
          description: JSON object with request parameters encoded in base64
        signature:
          type: string
          description: Signature SHA256(SECRET_KEY + data) encoded in base64
    BuyCryptoResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Internal transaction ID
        externalId:
          type: string
          description: External ID
    Error:
      type: object
      properties:
        errors:
          type: array
          items:
            type: integer
          description: List of error codes
      example:
        errors:
          - 1000

````