> ## 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.

# Create quote

> Reserves a quote. Order type is inferred from the `from`/`to` legs:

| Type | from | to |
|------|------|-----|
| onramp | `{ currency, amount? }` | `{ currency, network, amount? }` |
| offramp | `{ currency, network, amount? }` | `{ currency, amount? }` |
| swap | `{ currency, network, amount? }` | `{ currency, network, amount? }` (same network) |

Both legs use `currency`. Crypto legs require `network`; fiat legs must omit it. Set `amount` on exactly one leg.

Quotes expire — create the order before `ttl_in_seconds` elapses.

**Auth:** Secret key + HMAC. Account must be KYB-approved in the partner portal.

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




## OpenAPI

````yaml /openapi/partner-api.yaml post /v1/orders/quote
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/orders/quote:
    post:
      tags:
        - Orders
      summary: Create quote
      description: >
        Reserves a quote. Order type is inferred from the `from`/`to` legs:


        | Type | from | to |

        |------|------|-----|

        | onramp | `{ currency, amount? }` | `{ currency, network, amount? }` |

        | offramp | `{ currency, network, amount? }` | `{ currency, amount? }` |

        | swap | `{ currency, network, amount? }` | `{ currency, network,
        amount? }` (same network) |


        Both legs use `currency`. Crypto legs require `network`; fiat legs must
        omit it. Set `amount` on exactly one leg.


        Quotes expire — create the order before `ttl_in_seconds` elapses.


        **Auth:** Secret key + HMAC. Account must be KYB-approved in the partner
        portal.


        **Related:** [Create order](/api-reference/create-order)
      operationId: createQuote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuoteRequest'
            examples:
              onramp:
                summary: Onramp quote
                value:
                  from:
                    currency: NGN
                    amount: 50000
                  to:
                    currency: USDT
                    network: BSC
                  partner_fee: 0
              offramp:
                summary: Offramp quote
                value:
                  from:
                    currency: USDT
                    network: BSC
                    amount: 50
                  to:
                    currency: NGN
                  partner_fee: 0
              swap:
                summary: Swap quote
                value:
                  from:
                    currency: USDT
                    network: BSC
                    amount: 50
                  to:
                    currency: USDC
                    network: BSC
                  partner_fee: 0
      responses:
        '200':
          description: Quote reserved
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/QuoteResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/ValidationError'
      security:
        - SecretKeyHmac: []
components:
  schemas:
    QuoteRequest:
      type: object
      required:
        - from
        - to
      properties:
        from:
          $ref: '#/components/schemas/QuoteRequestLeg'
        to:
          $ref: '#/components/schemas/QuoteRequestLeg'
        partner_fee:
          type: number
          minimum: 0
        provider_id:
          type: integer
    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
    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
    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`.
    ErrorEnvelope:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: boolean
          const: false
        code:
          type: string
          enum:
            - E_BADREQUEST
            - E_UNAUTHORIZED
            - E_FORBIDDEN
            - E_NOTFOUND
            - E_CONFLICT
            - E_VALIDATION_ERROR
            - E_RATE_LIMITED
            - E_IP_BLOCKED
        message:
          type: string
  responses:
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            status: false
            code: E_UNAUTHORIZED
            message: Invalid credentials
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    ValidationError:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            status: false
            code: E_VALIDATION_ERROR
            message: 'recipient: recipient is required'
  securitySchemes:
    SecretKeyHmac:
      type: http
      scheme: bearer
      description: |
        Bearer sk_* plus required headers:
        - liquidramp-client-id
        - liquidramp-timestamp (unix ms)
        - liquidramp-signature (sha256=...)

````