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

# Initiate Trade

> Initiates a trade operation for a specified wallet.



## OpenAPI

````yaml /api/swagger.json post /trade/
openapi: 3.0.1
info:
  title: BLOOD-V3 API
  contact: {}
  version: 0.0.1
servers:
  - url: //localhost:50000/api/v1
security: []
paths:
  /trade/:
    post:
      tags:
        - Trade
      summary: Initiate Trade
      description: Initiates a trade operation for a specified wallet.
      requestBody:
        description: Trade Request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/handlers.tradeRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handlers.tradeResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handlers.ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handlers.ErrorResponse'
components:
  schemas:
    handlers.tradeRequest:
      type: object
      properties:
        amount:
          type: string
        direction:
          type: string
        fee:
          type: number
        input:
          type: string
        preset:
          type: string
        slippage:
          type: number
        stable:
          type: string
        strategy:
          type: string
        tip:
          type: number
        wallet_id:
          type: string
    handlers.tradeResponse:
      type: object
      properties:
        result:
          $ref: '#/components/schemas/handlers.tradeResult'
        task_id:
          type: string
    handlers.ErrorResponse:
      type: object
      properties:
        error:
          type: string
    handlers.tradeResult:
      type: object
      properties:
        market_cap_usd:
          type: number
        pool_id:
          type: string
        pool_platform:
          $ref: '#/components/schemas/models.Platform'
        slot:
          type: integer
        token_in_amount:
          type: string
        token_in_info:
          $ref: '#/components/schemas/models.TokenInfo'
        token_out_amount:
          type: string
        token_out_info:
          $ref: '#/components/schemas/models.TokenInfo'
        transaction_id:
          type: string
    models.Platform:
      type: integer
      enum:
        - 0
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 9
        - 10
        - 11
        - 12
      x-enum-varnames:
        - PlatformUnknown
        - PlatformRaydium
        - PlatformRaydiumCp
        - PlatformRaydiumClmm
        - PlatformPumpfun
        - PlatformMoonshot
        - PlatformMeteoraDyn
        - PlatformMeteoraDlmm
        - PlatformPamm
        - PlatformRaydiumLaunchpad
        - PlatformMeteoraDbc
        - PlatformMeteoraDammV2
        - PlatformHeaven
    models.TokenInfo:
      type: object
      properties:
        address:
          type: string
        decimals:
          type: integer
        is_stable:
          type: boolean
        metadata:
          $ref: '#/components/schemas/models.TokenMetadata'
        owner:
          type: string
        supply:
          type: integer
    models.TokenMetadata:
      type: object
      properties:
        name:
          type: string
        symbol:
          type: string
        uri:
          type: string

````