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

# Exchange Rate Query

> This API provides real-time exchange rates between fiat currencies and cryptocurrencies. It supports multiple trading pairs and is available exclusively to Gate Pay merchants.

## Overview

This page documents the `POST /payment/open/institution/v1/pay/currency/exchange/rate/query` endpoint. The full schema, parameters, and examples are rendered from the linked OpenAPI definition above.

## Notes

* Authentication uses the standard GatePay signed headers.
* This page documents the standard merchant endpoint.
* For shared signing rules, see [/api-reference/version/100/en/common/securityAndSignature](/api-reference/version/100/en/common/securityAndSignature).


## OpenAPI

````yaml /api-reference/version/100/en/openapi/institution/rate-exchange-openapi.json POST /payment/open/institution/v1/pay/currency/exchange/rate/query
openapi: 3.1.0
info:
  title: Gate Pay API
  version: 1.0.0
servers:
  - url: https://openplatform.gateapi.io
security: []
paths:
  /payment/open/institution/v1/pay/currency/exchange/rate/query:
    post:
      summary: Query exchange rate
      description: >-
        This API provides real-time exchange rates between fiat currencies and
        cryptocurrencies. It supports multiple trading pairs and is available
        exclusively to Gate Pay merchants.
      operationId: postCurrencyExchangeRateQuery
      parameters:
        - $ref: '#/components/parameters/X-GatePay-Certificate-ClientId'
        - $ref: '#/components/parameters/X-GatePay-Signature'
        - $ref: '#/components/parameters/X-GatePay-Timestamp'
        - $ref: '#/components/parameters/X-GatePay-Nonce'
        - $ref: '#/components/parameters/X-GatePay-On-Behalf-Of'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExchangeRateQueryRequest'
      responses:
        '200':
          description: SUCCESS
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_ExchangeRateQuery'
              examples:
                success:
                  summary: SUCCESS
                  value:
                    status: SUCCESS
                    code: '000000'
                    errorMessage: ''
                    data:
                      sourceCurrency: EUR
                      targetCurrency: USDT
                      rate: '0.021'
                      updateTime: 12324324324323
components:
  parameters:
    X-GatePay-Certificate-ClientId:
      name: X-GatePay-Certificate-ClientId
      in: header
      required: true
      description: >-
        The clientId assigned when the merchant registers an application in the
        Gate merchant console.
      schema:
        type: string
        example: 4186d0c6-6a35-55a9-8dc6-5312769dbff8
    X-GatePay-Signature:
      name: X-GatePay-Signature
      in: header
      required: true
      description: >-
        Request signature. GatePay uses this signature to verify whether the
        request is valid.
      schema:
        type: string
    X-GatePay-Timestamp:
      name: X-GatePay-Timestamp
      in: header
      required: true
      description: >-
        UTC timestamp in milliseconds when the request is generated. GatePay
        will not process requests where the difference from the receive time
        exceeds 10 seconds.
      schema:
        type: string
        example: '1672905655498'
    X-GatePay-Nonce:
      name: X-GatePay-Nonce
      in: header
      required: true
      description: >-
        Random string. Must comply with HTTP header rules; recommended length is
        within 32 characters, composed of digits and letters.
      schema:
        type: string
        example: '9578'
    X-GatePay-On-Behalf-Of:
      name: X-GatePay-On-Behalf-Of
      in: header
      required: true
      schema:
        type: string
      description: >-
        Required delegated-subject header. Provide the initiating account ID for
        this request. For institution merchant APIs, this is typically the
        target sub-account ID; for institution charge and transfer APIs, it can
        be either an institution account ID or a sub-account ID.
  schemas:
    ExchangeRateQueryRequest:
      type: object
      properties:
        sourceCurrency:
          type: string
          description: Base currency,Supported:EUR/GBP/USD/CNY/JPY/AUD/CAD/CHF
          example: EUR
        targetCurrency:
          type: string
          description: Quote currency,Supported:USDT
          example: USDT
      required:
        - sourceCurrency
        - targetCurrency
    ApiResponse_ExchangeRateQuery:
      type: object
      properties:
        status:
          type: string
          description: API response result
          example: SUCCESS
        code:
          type: string
          description: Response error code
          example: '000000'
        errorMessage:
          type: string
          description: Error description
          example: ''
        data:
          $ref: '#/components/schemas/ExchangeRateQueryData'
      required:
        - status
        - code
    ExchangeRateQueryData:
      type: object
      properties:
        sourceCurrency:
          type: string
          description: Base currency
        targetCurrency:
          type: string
          description: Quote currency
        rate:
          type: string
          description: Exchange rate between base/quote currency and fiat currency
        updateTime:
          type: integer
          format: int64
          description: Quote time

````