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

# FX Quote

> Lock a firm rate. Use `purpose: swap` for internal transfers between
your books, then pass the returned `id` as `quote_id` to `POST /swaps`.
Omit purpose (or leave empty) for a payout quote.




## OpenAPI

````yaml /openapi.yaml post /fx/quotes
openapi: 3.1.0
info:
  title: Keette API
  version: 1.0.0
  description: |
    Public HTTP API for Keette workspaces. One base URL — live vs sandbox is
    selected by your API key (`sk_live_…` / `sk_test_…`).

    Endpoints are added as each implementation phase ships.
  contact:
    name: Keette Support
    email: talk@keette.com
servers:
  - url: https://20b9-41-90-209-232.ngrok-free.app/v1
    description: Local (ngrok)
  - url: https://api.keette.com/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Account
    description: Identity for the authenticating API key
  - name: Balances
    description: Wallet books
  - name: Beneficiaries
    description: Payout recipients
  - name: Transactions
    description: Unified transaction index
  - name: FX
    description: Indicative rates and firm quotes
  - name: Catalog
    description: Payout corridors and relationships
  - name: Payouts
    description: Send money to a beneficiary
  - name: Payins
    description: Collect money into your books
  - name: Swaps
    description: FX between your own books
  - name: Events
    description: Durable event log for webhook polling
paths:
  /fx/quotes:
    post:
      tags:
        - FX
      summary: FX Quote
      description: |
        Lock a firm rate. Use `purpose: swap` for internal transfers between
        your books, then pass the returned `id` as `quote_id` to `POST /swaps`.
        Omit purpose (or leave empty) for a payout quote.
      operationId: createFxQuote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - from
                - to
              properties:
                from:
                  type: string
                  description: Source book currency (ISO 4217 or stablecoin code).
                  example: USD
                to:
                  type: string
                  description: Destination book currency.
                  example: NGN
                amount_from:
                  type: integer
                  description: >
                    Source amount in Ledger minor units (cents/kobo). Set
                    exactly

                    one of `amount_from` or `amount_to`.
                  example: 10000
                amount_to:
                  type: integer
                  description: >-
                    Destination amount in Ledger minor units. Set exactly one of
                    `amount_from` or `amount_to`.
                purpose:
                  type: string
                  enum:
                    - swap
                  description: >
                    Omit for a payout quote. Set to `swap` when the quote will
                    be

                    passed to `POST /swaps`.
            examples:
              swap:
                summary: Quote for an internal transfer
                value:
                  from: USD
                  to: NGN
                  amount_from: 10000
                  purpose: swap
              payout:
                summary: Quote for a cross-currency payout
                value:
                  from: USD
                  to: NGN
                  amount_from: 10000
      responses:
        '200':
          description: Firm quote
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    enum:
                      - fx_quote
                    description: Object type discriminator.
                  id:
                    type: string
                    format: uuid
                    description: Firm quote id — pass as `quote_id` to payouts or swaps.
                  from:
                    type: string
                    description: Source currency.
                  to:
                    type: string
                    description: Destination currency.
                  amount_from:
                    type: integer
                    description: Debit amount in Ledger minor units.
                  amount_to:
                    type: integer
                    description: Credit amount in Ledger minor units at the locked rate.
                  scale_from:
                    type: integer
                    description: Decimal places for `from` (usually 2).
                  scale_to:
                    type: integer
                    description: Decimal places for `to`.
                  rate:
                    type: string
                    description: >-
                      Locked mid-market-style rate as a decimal string (`to` per
                      1 `from`).
                  expires_at:
                    type: string
                    format: date-time
                    description: When this quote can no longer be used.
                  valid_for_seconds:
                    type: integer
                    description: Seconds remaining at creation time.
              examples:
                quote:
                  value:
                    object: fx_quote
                    id: e6bd10ee-6e53-4aaa-9cd0-a2bb980cf73e
                    from: USD
                    to: NGN
                    amount_from: 10000
                    amount_to: 1550000
                    scale_from: 2
                    scale_to: 2
                    rate: '155.00'
                    expires_at: '2026-10-27T13:02:00Z'
                    valid_for_seconds: 90
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              type: authentication_error
              code: invalid_api_key
              message: Invalid API key provided.
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - type
            - code
            - message
          properties:
            type:
              type: string
              description: Broad error class for client handling.
              enum:
                - invalid_request
                - authentication_error
                - permission_error
                - rate_limit
                - api_error
            code:
              type: string
              description: Stable machine-readable code (e.g. `parameter_invalid`).
            message:
              type: string
              description: Human-readable explanation safe to show developers.
            param:
              type: string
              description: Request field that failed validation, when applicable.
            doc_url:
              type: string
              format: uri
              description: Optional link to docs for this error.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: |
        Secret API key from **Settings → Developers → API keys**.
        Example: `Authorization: Bearer sk_test_…`

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.