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

# Step 2: Get a Quote

> Price a buy or sell order before creating it

<Note>
  Quotes are **non-binding**. They show the user what they will get. The final price is set when the user confirms on the hosted page.
</Note>

## Request

Call [Get Quote](/api-reference/onramp-&-offramp-intent/get-a-quote). The request is the same for both directions; `orderType` and the source/destination pair change.

<Tabs>
  <Tab title="Onramp (buy)">
    ```bash cURL theme={null}
    curl --request POST \
      --url https://api.rampnow.io/api/partner/v1/ext/ramp_order/quote \
      --header 'Content-Type: application/json' \
      --header 'X-RAMPNOW-API-KEY: YOUR_API_KEY' \
      --header 'X-RAMPNOW-TIMESTAMP: UNIX_SECONDS' \
      --header 'X-RAMPNOW-SIGN: HMAC_SHA256_SIGNATURE' \
      --data '{
        "orderType": "buy",
        "srcCurrency": "EUR",
        "srcChain": "fiat",
        "srcAmount": "250",
        "dstCurrency": "ETH",
        "dstChain": "ethereum"
      }'
    ```

    | Field | Required | Description |
    | - | - | - |
    | `orderType` | Required | `buy` for onramp |
    | `srcCurrency` / `srcChain` | Required | Fiat currency the user pays with (e.g. `EUR`) on chain `fiat` |
    | `dstCurrency` / `dstChain` | Required | Crypto asset + network to deliver (e.g. `ETH` on `ethereum`) |
    | `srcAmount` / `dstAmount` | One of | Set **either** the amount the user pays (`srcAmount`) **or** the amount they receive (`dstAmount`). The other side is computed |
    | `paymentMode` | Optional | Price against a specific payment method. Quotes can differ by method |
    | `partnerPctFee` / `partnerFixedFee` | Optional | Per-request partner fee override (see below) |
  </Tab>

  <Tab title="Offramp (sell)">
    ```bash cURL theme={null}
    curl --request POST \
      --url https://api.rampnow.io/api/partner/v1/ext/ramp_order/quote \
      --header 'Content-Type: application/json' \
      --header 'X-RAMPNOW-API-KEY: YOUR_API_KEY' \
      --header 'X-RAMPNOW-TIMESTAMP: UNIX_SECONDS' \
      --header 'X-RAMPNOW-SIGN: HMAC_SHA256_SIGNATURE' \
      --data '{
        "orderType": "sell",
        "srcCurrency": "USDT",
        "srcChain": "ethereum",
        "srcAmount": "500",
        "dstCurrency": "EUR",
        "dstChain": "fiat"
      }'
    ```

    | Field | Required | Description |
    | - | - | - |
    | `orderType` | Required | `sell` for offramp |
    | `srcCurrency` / `srcChain` | Required | Crypto asset + network the user sells (e.g. `USDT` on `ethereum`) |
    | `dstCurrency` / `dstChain` | Required | Fiat payout currency (e.g. `EUR`) on chain `fiat` |
    | `srcAmount` / `dstAmount` | One of | Set **either** the amount the user sells (`srcAmount`) **or** the amount they receive (`dstAmount`). The other side is computed |
    | `paymentMode` | Optional | Price against a specific payment method. Quotes can differ by method |
    | `partnerPctFee` / `partnerFixedFee` | Optional | Per-request partner fee override (see below) |
  </Tab>
</Tabs>

## Response

The response echoes the route and returns `srcAmount`, `dstAmount`, `exchangeRate` and `feeDetails`. If no quote can be produced, `message` explains why.

## Partner fee (markup)

To take a margin on an order, pass your fee on the quote and order-creation requests. Both fields are optional and **override** the fee configured on your account for that request:

| Field | Type | Description |
| - | - | - |
| `partnerPctFee` | number | Partner fee as a percentage of the order amount (e.g. `1.5` = 1.5%) |
| `partnerFixedFee` | number | Fixed partner fee in the order's base currency |

They apply to the quote (`/ext/ramp_order/quote`) and the checkout order (`/ext/ramp_order/checkout`). When omitted, the account-configured partner fee applies. Send the **same** values on both calls so the order matches the quote you showed the user.

## Fee breakdown (`feeDetails`)

Quote and order responses return a `feeDetails` array. Each entry has a `type`, `fee`, `currency`, and `isInclusive`. The returned `type` values are:

| `type` | Description | Where |
| - | - | - |
| `platform` | Aggregated platform fee (Rampnow service + processing, and — in the quote — your partner fee) | quote + order |
| `network` | Blockchain network (gas) fee | quote + order |
| `partner` | Your partner fee / markup, broken out as its own line | order only (`GET /ext/ramp_order/{uid}` + webhook) |

**Reconciliation.** In the quote, the partner fee is folded into `platform`, so `total = platform + network`. On the order responses it is broken out: `platform` **excludes** the partner amount and a `partner` line is added, so `total = platform + network + partner`. The total is identical either way.

<Card title="Next: Create the order" icon="arrow-right" href="/quickstart/ramp-intent/create-order">
  Create the checkout order with the user's details
</Card>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.