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

# Get trade status

> Returns settlement status, observed transaction signatures, known amounts, and ledger summary for a trade.



## OpenAPI

````yaml /openapi.yaml get /v1/trades/{trade_id}
openapi: 3.1.0
info:
  title: Firmament Backend API
  version: 0.1.3
  summary: Public backend routes for Firmament swaps and runtime proof.
  description: >
    Firmament is a Solana RFQ maker backend for managed liquidity demos.

    This specification documents the public routes used by the swap app and
    runtime view.
servers:
  - url: https://api.firmament.shaikazeem.com
    description: Deployed Firmament API.
  - url: http://127.0.0.1:5050
    description: Local backend started with `cargo run`.
security: []
tags:
  - name: Health
    description: Runtime liveness.
  - name: Assets
    description: Supported Solana assets.
  - name: Pairs
    description: Configured directional pairs and constraints.
  - name: RFQ
    description: Firm quote requests.
  - name: Settlement
    description: Browser-wallet HTLC settlement.
  - name: Trades
    description: Trade status lookup.
  - name: Runtime
    description: Read-only runtime state, events, ledger, and trades.
paths:
  /v1/trades/{trade_id}:
    get:
      tags:
        - Trades
      summary: Get trade status
      description: >-
        Returns settlement status, observed transaction signatures, known
        amounts, and ledger summary for a trade.
      operationId: getTrade
      parameters:
        - $ref: '#/components/parameters/TradeId'
      responses:
        '200':
          description: Trade status.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TradeResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    TradeId:
      name: trade_id
      in: path
      required: true
      description: Trade identifier.
      schema:
        type: string
        format: uuid
  schemas:
    TradeResponse:
      type: object
      required:
        - trade_id
        - quote_id
        - run_id
        - current_run
        - created_at
        - settlement_status
        - tx_signatures
        - tx_signature_kinds
        - amounts
        - ledger_summary
        - integration_status
      properties:
        trade_id:
          type: string
          format: uuid
        quote_id:
          type: string
          format: uuid
        run_id:
          type: string
          format: uuid
          description: Runtime invocation that created the trade.
        current_run:
          type: boolean
          description: Whether the trade belongs to the currently running backend process.
        taker_wallet:
          description: Taker wallet that requested the trade when attribution is known.
          anyOf:
            - $ref: '#/components/schemas/WalletAddress'
            - type: 'null'
        expires_at:
          description: HTLC expiry timestamp when known.
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        created_at:
          type: string
          format: date-time
        settlement_status:
          $ref: '#/components/schemas/SettlementStatus'
        tx_signatures:
          type: array
          items:
            $ref: '#/components/schemas/TxSignature'
        tx_signature_kinds:
          type: array
          items:
            $ref: '#/components/schemas/TradeSignature'
        amounts:
          $ref: '#/components/schemas/TradeAmounts'
        input:
          description: Display-friendly input amount, present when known.
          anyOf:
            - $ref: '#/components/schemas/AmountView'
            - type: 'null'
        output:
          description: Display-friendly output amount, present when known.
          anyOf:
            - $ref: '#/components/schemas/AmountView'
            - type: 'null'
        ledger_summary:
          $ref: '#/components/schemas/LedgerSummary'
        integration_status:
          $ref: '#/components/schemas/IntegrationStatus'
    WalletAddress:
      type: string
      description: Solana wallet address.
      example: '11111111111111111111111111111111'
    SettlementStatus:
      type: string
      enum:
        - pending
        - initiated
        - redeemed
        - refunded
        - failed
    TxSignature:
      type: string
      description: Solana transaction signature.
    TradeSignature:
      type: object
      required:
        - kind
        - signature
      properties:
        kind:
          $ref: '#/components/schemas/TradeSignatureKind'
        signature:
          $ref: '#/components/schemas/TxSignature'
    TradeAmounts:
      type: object
      required:
        - input
        - output
      properties:
        input:
          anyOf:
            - $ref: '#/components/schemas/TokenAmount'
            - type: 'null'
        output:
          anyOf:
            - $ref: '#/components/schemas/TokenAmount'
            - type: 'null'
    AmountView:
      type: object
      required:
        - asset
        - amount
        - amount_raw
        - decimals
      properties:
        asset:
          type: string
          example: USDC
        amount:
          type: string
          example: '1.000000'
        amount_raw:
          type: string
          example: '1000000'
        decimals:
          type: integer
          minimum: 0
          maximum: 18
        mint:
          $ref: '#/components/schemas/MintAddress'
    LedgerSummary:
      type: object
      required:
        - balanced
        - entry_count
        - net_usdc_estimate
      properties:
        balanced:
          type: boolean
        entry_count:
          type: integer
          minimum: 0
        net_usdc_estimate:
          $ref: '#/components/schemas/DecimalString'
    IntegrationStatus:
      type: string
      enum:
        - runtime_orchestrated
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - details
          properties:
            code:
              type: string
              example: invalid_json
            message:
              type: string
            details:
              type: array
              items:
                type: string
    TradeSignatureKind:
      type: string
      enum:
        - taker_lock
        - taker_redeem
        - taker_refund
        - maker_lock
        - maker_redeem
        - maker_refund
        - gateway_burn
        - gateway_mint
        - jupiter_swap
    TokenAmount:
      type: object
      required:
        - asset
        - amount_raw
      properties:
        asset:
          type: string
          example: USDC
        amount_raw:
          $ref: '#/components/schemas/AmountRaw'
    MintAddress:
      type: string
      description: Solana mint address.
      example: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
    DecimalString:
      type: string
      description: Decimal value serialized by the runtime.
      examples:
        - '0'
    AmountRaw:
      type: integer
      minimum: 0
      format: int64
      examples:
        - 1000
  responses:
    BadRequest:
      description: Request shape, path, or validation error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Requested quote or trade was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'

````