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

# relayer_getFeeData

> Fetches the exchange rate for a payment token along with current gas prices. Returns a quote with an expiry timestamp.



## OpenAPI

````yaml /gasless-with-relay/relayer-api-endpoints/relay/relayer_getFeeData.json post /rpc
openapi: 3.1.0
info:
  title: relayer_getFeeData
  version: 1.0.0
servers:
  - url: https://api.gelato.cloud
    description: Mainnet
security: []
paths:
  /rpc:
    post:
      summary: relayer_getFeeData
      description: >-
        Fetches the exchange rate for a payment token along with current gas
        prices. Returns a quote with an expiry timestamp.
      parameters:
        - name: X-API-Key
          in: header
          required: true
          schema:
            type: string
          description: Gelato API key for authentication.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Request'
        required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    Request:
      type: object
      required:
        - jsonrpc
        - method
        - params
        - id
      properties:
        id:
          type: number
          default: 1
        jsonrpc:
          type: string
          default: '2.0'
        method:
          type: string
          default: relayer_getFeeData
        params:
          $ref: '#/components/schemas/FeeDataParams'
    Response:
      type: object
      properties:
        id:
          type: number
          default: 1
        jsonrpc:
          type: string
          default: '2.0'
        result:
          $ref: '#/components/schemas/FeeDataResult'
    ErrorResponse:
      type: object
      properties:
        jsonrpc:
          type: string
          default: '2.0'
        id:
          type: number
        error:
          type: object
          properties:
            code:
              type: number
              description: >-
                Error code (-32602: Invalid params, 4100: Unauthorized, 4202:
                Unsupported Payment Token, 4203: Rate Limit Exceeded, 4206:
                Unsupported Chain)
            message:
              type: string
              description: Error message
    FeeDataParams:
      type: object
      required:
        - chainId
        - token
      properties:
        chainId:
          type: string
          description: Chain ID
          default: '1'
        token:
          type: string
          description: Payment token address (zero address for native token)
          default: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
    FeeDataResult:
      type: object
      properties:
        chainId:
          type: string
          description: Chain ID for this quote
          example: '1'
        token:
          type: object
          properties:
            address:
              type: string
              description: Token contract address
              example: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
            decimals:
              type: number
              description: Token decimals
              example: 6
        rate:
          type: number
          description: Exchange rate (token per 1 native, e.g., USDC/ETH)
          example: 2000.5
        minFee:
          type: string
          description: Minimum fee in token units (optional)
          example: '4.5'
        expiry:
          type: number
          description: Unix timestamp when quote expires
          example: 1755917874
        gasPrice:
          type: string
          description: Current gas price in wei (hex)
          example: '0x4a817c800'
        context:
          type: string
          description: Opaque context to include in relayer_sendTransaction (optional)
          example: 0x...

````