---
title: "Example quote handler"
method: POST
path: "/quote"
tags: ["crate::server"]
---

# Example quote handler

`POST /quote`

This is an example quote handler that returns a hardcoded quote response

## Headers

- `X-API-KEY` string, nullable

## Request body

- QuoteRequest — Request to get a quote from the Market Maker
  - `amount` string, required
  - `feeBps` integer, required — Fee in basis points to be charged by the Market Maker
  - `protocol` 'v1', required
  - `quoteId` string, required
  - `quoteType` 'exactIn' | 'exactOut', required
  - `requestId` string, required
  - `suggestedPrioritizationFees` integer, nullable — If no taker is provided, the there will be no suggested fee This is the suggested compute unit price in micro lamports to be set when building the transaction MMs will have the option to ignore our suggested fee and provide their own when responding to this quote
  - `taker` string, nullable — Taker is optional here as there are times we want to just get a quote without user signing in When user signs in, we should try to requote again so the new quote request will have a taker
  - `tokenIn` string, required
  - `tokenOut` string, required

## Response `200`

- QuoteResponse — Response to a quote request from the Market Maker
  - `amountIn` string, required
  - `amountOut` string, required
  - `maker` string, required
  - `prioritizationFeeToUse` integer, nullable — Prioritization fee compute unit price in micro lamports to be set in the fill transaction It is estimated using https://docs.triton.one/chains/solana/improved-priority-fees-api 50th percentile, mean priority fee over the last 20 slots MMs to return us the fees they want to use either the suggested_prioritization_fees in the quote request or a custom amount
  - `protocol` 'v1', required
  - `quoteId` string, required
  - `quoteType` 'exactIn' | 'exactOut', required
  - `requestId` string, required
  - `taker` string, nullable — Taker is optional here as there are times we want to just get a quote without user signing in
  - `tokenIn` string, required
  - `tokenOut` string, required

## Other responses

- `400`
- `401`
- `500`
- `503`

## Changes

- **2026-07-17** `a3335bf73304` — 1 breaking
  - added the new required request property `feeBps`
- **2025-01-07** `fd37929e791a` — 1 warning, 1 info
  - removed the request property `amountIn`
  - request property `amount` reactivated
- **2025-01-06** `4bc3ef0077ec` — 1 info
  - request property `amount` deprecated
- **2024-12-12** `c1749645abd4` — 1 info
  - the `header` request parameter `X-API-KEY` became optional
- **2024-12-12** `43126258a27c` — 2 breaking, 1 warning
  - added the new required request property `amountIn`
  - the `header` request parameter `X-API-KEY` became required
  - removed the request property `feeBps`

[Change history](https://skmtc.dev/jup-ag/apis/server-example/changes/quote/post.md)

---

[API](https://skmtc.dev/jup-ag/apis/server-example.md) · [All operations](https://skmtc.dev/jup-ag/apis/server-example/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/jup-ag/server-example/revisions/a3335bf73304/schema)
