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

# Quotes

> Discover coverage, request quotes, and confirm one.

## Discover coverage

* `GET /v1/ramp/countries` lists markets and the rails each supports.
* `GET /v1/ramp/assets` lists fiat currencies and stablecoins, with networks per stablecoin.
* `GET /v1/ramp/routes` lists enabled corridors. Filter by `direction`, `rail`, `source_asset`, `destination_asset`, `country_code`, and `amount` to know exactly what you can offer before you show a form.
* `GET /v1/ramp/rates?from=USDC&to=NGN` returns indicative buy and sell rates with the Onstacks spread applied. Use it for display; use a quote for a price you can commit to.

## Request a quote

`POST /v1/ramp/quote?environment=sandbox`

```json theme={"system"}
{
  "direction": "off_ramp",
  "source_asset": "USDC",
  "source_amount": "1000000",
  "destination_asset": "NGN",
  "country_code": "NG",
  "rail": "bank"
}
```

You do not have to name a network. Onstacks orchestrates the network internally; pass `source_network` only when you need a specific one.

The response contains one quote per eligible provider, ranked by what the recipient receives after fees, plus `recommended_quote_reference`. Each quote carries `source`, `destination`, `fee`, `rate`, `provider`, and `expires_at`.

## Confirm a quote

`POST /v1/ramp/quote/{reference}?environment=sandbox`

```json theme={"system"}
{
  "destination": {
    "bank_account": {
      "account_name": "Mason Emma",
      "account_number": "0234247896",
      "bank_code": "058"
    }
  },
  "idempotency_key": "order-4471"
}
```

The destination is a typed object matching the rail: `bank_account` (local bank codes, IBAN, SWIFT, sort code, or routing number depending on the market), `mobile_money`, or `wallet` for on-ramps. Confirming returns the payment.

<Warning>
  Quotes expire about two minutes after they are issued. Confirming an expired quote returns `422`; request a fresh one.
</Warning>

## Skip the quote

`POST /v1/ramp/payments` takes the same fields plus `destination` and lets Onstacks select the provider. Use it for backend payouts where the user never sees options.


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