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

# Exchange Rate

> Retrieves the current FX spot rate for supported currency pairs. Use this endpoint for real-time reference rates or live rate display.



## OpenAPI

````yaml GET /rates/currency-pairs-exchange-rate
openapi: 3.1.0
info:
  title: Grain API
  version: 1.0.0
  description: >-
    Grain's API provides a comprehensive set of endpoints for managing hedging,
    spot transactions, pricing, and fund movements - enabling seamless
    integration of FX workflows into your platform. Each API call follows REST
    conventions, uses secure authentication, and returns standardized responses
    for consistency across environments.
  license:
    name: Creative Commons Attribution 3.0
  contact:
    name: Grain Finance
    url: https://docs.grainfinance.co
    email: support@grainfinance.co
  termsOfService: https://grainfinance.co/terms-of-service/
  x-apiClientRegistration:
    url: https://grainfinance.co/partners
servers:
  - url: https://api.grainfinance.co/v1
    description: Grain API
security: []
tags:
  - name: Hedges
    description: >-
      Hedge objects represent transactions that lock exchange rates for future
      dates. A single hedge locks an exchange rate for a future transaction
      between two currencies.
  - name: Dual Hedges
    description: >-
      A dual hedge mitigates FX risk by automatically generating two linked
      hedge legs - a customer leg and a supplier leg - both routed through the
      customer's functional currency. This structure reduces exposure to
      currency fluctuations for both cash flow and accounting purposes, while
      allowing independent tracking and reporting of each hedge leg.
  - name: Customers
    description: >-
      Customer objects represent your end customers on the Grain platform. A
      customer must be created before a hedge or spot transaction can be
      initiated.
  - name: Pricing
    description: >-
      Pricing endpoints provide access to FX rates for currency pairs that are
      not being hedged. These endpoints can be used for live rate display or
      bulk retrieval to support high-volume quoting workflows.
  - name: Spots
    description: >-
      Spot objects represent currency conversions executed for immediate or
      near-term settlement.
  - name: Conversions
    description: >-
      Conversion objects represent currency conversions executed for immediate
      or near-term settlement.
  - name: Wallets
    description: Endpoints to view balances, manage funding, and perform transfers.
paths:
  /rates/currency-pairs-exchange-rate:
    get:
      tags:
        - Pricing
      description: >-
        Retrieves the current FX spot rate for supported currency pairs. Use
        this endpoint for real-time reference rates or live rate display.
      operationId: Rate
      parameters:
        - description: >-
            (Optional) A query parameter specifying a comma-separated list of
            3-letter ISO currency codes.
          in: query
          name: currencies
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Currency Pairs Exchange Rate
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpotRatesResponseBody'
        '400':
          description: >-
            The request failed because it is not well-formed or is syntactically
            incorrect or violates schema.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcceptOfflineHedgeBadParamsErrorResponse'
        '422':
          description: >-
            The request failed because it is either semantically incorrect or
            has failed business validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: The request failed because an internal server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - api-key: []
components:
  schemas:
    SpotRatesResponseBody:
      properties:
        rates:
          $ref: '#/components/schemas/SpotRates'
      type: object
      additionalProperties: false
    AcceptOfflineHedgeBadParamsErrorResponse:
      description: An API Error
      properties:
        message:
          type: string
          description: A short code of the error.
          example: REVISION_INVALID
        reason:
          type: string
          description: A detailed description of the reason for the failure.
          example: >-
            The revision number is not valid or does not exist. Please fetch a
            new rate table using the /offline-rates endpoint and pass a valid
            revision.
      required:
        - message
      type: object
      additionalProperties: false
    ErrorResponse:
      description: An API Error
      properties:
        message:
          type: string
          description: A short explanation of the error.
          example: Can't perform this action
        reason:
          type: string
          description: A detailed description of the reason for the failure.
          example: >-
            Supplied object is in *Cancelled* state, which prevents performing
            this action
      required:
        - message
      type: object
      additionalProperties: false
    SpotRates:
      properties: {}
      type: object
      additionalProperties:
        properties: {}
        additionalProperties:
          type: number
          format: double
        type: object
  securitySchemes:
    api-key:
      type: http
      scheme: basic
      description: >-
        Basic authentication using the partner API keys from
        https://console.grainfinance.co/keys

````