# On Ramp Quote

Convert fiat currency to cryptocurrency (e.g., BRL to BRZ via PIX).

**Note:** we currently only support BRL → BRZ on ramps at the moment.

## Request a Quote

You can request a quote using an existing recipient ID or by passing the settlement details directly in the payload.

{% tabs %}
{% tab title="Using Recipient ID" %}
{% code title="TypeScript" %}

```typescript
const quote = await orda.onRamp.requestQuote({
  fromCurrency: 'BRL',
  intent: {
    method: 'fromAmount',
    value: '100.00'
  },
  recipientId: 'recipient-id'
});

console.log('PIX Key:', quote.depositInstructions.pixKey);
console.log('Transaction ID:', quote.transactionId);
```

{% endcode %}
{% endtab %}

{% tab title="Using Inline Settlement" %}
{% code title="TypeScript" %}

```typescript
const quote = await orda.onRamp.requestQuote({
  fromCurrency: 'BRL',
  intent: {
    method: 'usd',
    value: '100'
  },
  settlementDetails: {
    toChain: '8453',
    toToken: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913',
    toAddress: '0xRecipientAddress'
  }
});
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Deposit Instructions

The quote response includes PIX deposit details and a QR code formatted in Base64.

{% code title="Response (JSON)" %}

```json
{
  "transactionId": "tx-id",
  "depositInstructions": {
    "pixKey": "pix@orda.network",
    "pixKeyType": "EMAIL",
    "amount": "100.00",
    "currency": "BRL"
  }
}
```

{% endcode %}

## Get Status

{% code title="TypeScript" %}

```typescript
const status = await orda.onRamp.getStatus(quote.transactionId);
console.log(status.status);  // 'AwaitingDeposit', 'Processing', 'Completed', etc.
```

{% endcode %}

## Wait for Completion

{% code title="TypeScript" %}

```typescript
await orda.onRamp.waitForCompletion(quote.transactionId, {
  intervalMs: 15000,
  timeoutMs: 3600000,
  onStatusUpdate: (status) => console.log('Status:', status)
});
```

{% endcode %}

## Terminal Statuses

<details>

<summary>Possible terminal statuses</summary>

* Completed - Crypto received
* Failed - Transfer failed
* Cancelled - Transfer cancelled
* Refunded - Fiat returned

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.orda.network/developers/sdks/on-ramp-quote.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
