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

# Buy crypto with fiat

> Buy a stablecoin with fiat from a liquidity provider.

Buy crypto with fiat from a liquidity provider (LP), for example 5,000 USDC with USD. Put the amount you want to receive on `output`. The quote fills in what it costs.

## Example intent

```json theme={null}
{
  "intent": {
    "input": { "asset": "USD" },
    "output": { "asset": "USDC", "amount": "5000.00" }
  }
}
```

Get a quote with the intent, execute it before the quote expires, and track the transaction to completion. See [Trade](/transactions/trade) for the API.


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