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

# Preview exchange rate

> Non-reserved rate preview. Pass `from`/`to` legs as query parameters.

Does not reserve a quote — use `POST /v1/orders/quote` to lock a rate before creating an order.

**Related:** [Create quote](/api-reference/create-quote)




## OpenAPI

````yaml /openapi/partner-api.yaml get /v1/exchange-rate
openapi: 3.1.0
info:
  title: Liquidramp Partner API
  version: 2.0.0
  license:
    name: Proprietary
  description: >
    Public integration API for consumer partners: reference data, exchange
    rates, quotes, orders, and webhooks.


    ## Authentication


    - **Public key (`pk_*`)**: read requests (reference data, rate preview) — no
    HMAC

    - **Secret key (`sk_*`)**: backend only — reads and writes (quotes, orders,
    fulfilment). Every `sk_*` request requires HMAC signing with your `enc_*`
    encryption key


    Create keys in the [partner portal](https://dashboard.liquidramp.com). Never
    send `enc_*` as a Bearer token. Never use `sk_*` or `enc_*` in client-side
    code.


    ## HMAC canonical string


    `clientId|timestamp|METHOD|path|rawBody`


    Path includes the `/v1` prefix and any query string. Signature: `sha256=` +
    HMAC-SHA256(canonical, `enc_*`).
servers:
  - url: https://vibe-api.liquidramp.com
    description: Test
  - url: https://api.liquidramp.com
    description: Live
security: []
tags:
  - name: Health
    description: Service health checks
  - name: Reference
    description: Institutions, networks, currencies, and account lookup
  - name: Exchange Rates
    description: Market rates and quote preview
  - name: Orders
    description: Quotes, order creation, fulfilment, and management
  - name: Webhooks
    description: Outbound order lifecycle events delivered to your server
paths:
  /v1/exchange-rate:
    get:
      tags:
        - Exchange Rates
      summary: Preview exchange rate
      description: >
        Non-reserved rate preview. Pass `from`/`to` legs as query parameters.


        Does not reserve a quote — use `POST /v1/orders/quote` to lock a rate
        before creating an order.


        **Related:** [Create quote](/api-reference/create-quote)
      operationId: previewExchangeRate
      parameters:
        - name: from
          in: query
          style: deepObject
          explode: true
          schema:
            $ref: '#/components/schemas/QuoteRequestLeg'
        - name: to
          in: query
          style: deepObject
          explode: true
          schema:
            $ref: '#/components/schemas/QuoteRequestLeg'
        - name: partner_fee
          in: query
          schema:
            type: number
            minimum: 0
      responses:
        '200':
          description: Rate preview
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/QuoteResponse'
      security:
        - PublicKeyAuth: []
        - SecretKeyHmac: []
components:
  schemas:
    QuoteRequestLeg:
      type: object
      properties:
        currency:
          type: string
          description: Asset code (fiat or crypto), e.g. NGN or USDT
        network:
          type: string
          description: Required for crypto currencies; omit for fiat
        amount:
          type: number
          exclusiveMinimum: 0
    SuccessEnvelope:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: boolean
          const: true
        message:
          type: string
        data: {}
        meta:
          $ref: '#/components/schemas/PaginationMeta'
    QuoteResponse:
      type: object
      properties:
        quote_id:
          type: string
        type:
          $ref: '#/components/schemas/OrderType'
        from:
          $ref: '#/components/schemas/OrderLeg'
        to:
          $ref: '#/components/schemas/OrderLeg'
        pricing:
          $ref: '#/components/schemas/OrderPricing'
        fee:
          $ref: '#/components/schemas/OrderFee'
        timestamp:
          type: string
          format: date-time
        ttl_in_seconds:
          type: integer
        provider_id:
          type: integer
    PaginationMeta:
      type: object
      properties:
        total:
          type: integer
        per_page:
          type: integer
        current_page:
          type: integer
        last_page:
          type: integer
    OrderType:
      type: string
      enum:
        - onramp
        - offramp
        - swap
    OrderLeg:
      type: object
      properties:
        currency:
          type: string
        network:
          type: string
        amount:
          type: number
    OrderPricing:
      type: object
      properties:
        base_currency:
          type: string
        quote_currency:
          type: string
        exchange_rate:
          type: number
    OrderFee:
      type: object
      properties:
        currency:
          type: string
        network_fee:
          type: number
        protocol_fee:
          type: number
        partner_fee:
          type: number
        vat:
          type: number
        total:
          type: number
        fee_in_rate:
          type: boolean
      description: >-
        Omitted from responses when the fee is already embedded in
        `pricing.exchange_rate`.
  securitySchemes:
    PublicKeyAuth:
      type: http
      scheme: bearer
      description: Bearer pk_* public key. Also send `liquidramp-client-id`.
    SecretKeyHmac:
      type: http
      scheme: bearer
      description: |
        Bearer sk_* plus required headers:
        - liquidramp-client-id
        - liquidramp-timestamp (unix ms)
        - liquidramp-signature (sha256=...)

````