# Bridge/Swap

Request quotes for crypto transfers with flexible intent methods.

## Requesting 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="example.ts" %}

```typescript
const quote = await orda.quote.request({
  fromChain: '1',  // Ethereum
  fromToken: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',  // USDC
  fromAddress: '0xYourAddress',
  intent: {
    method: 'usd',
    value: '100'
  },
  recipientId: 'recipient-id'
});
```

{% endcode %}

{% endtab %}

{% tab title="Using Inline Settlement" %}
{% code title="example.ts" %}

```typescript
const quote = await orda.quote.request({
  fromChain: '1',
  fromToken: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
  fromAddress: '0xYourAddress',
  intent: {
    method: 'fromAmount',
    value: '1000000'  // 1 USDC (6 decimals)
  },
  settlementDetails: {
    toChain: '8453',
    toToken: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913',
    toAddress: '0xRecipientAddress'
  }
});
```

{% endcode %}

{% endtab %}
{% endtabs %}

## Intent Methods

Use one of these intent methods to specify the quote intent.

{% tabs %}
{% tab title="USD Value" %}

```typescript
{ method: 'usd', value: '100' }  // $100 worth
```

{% endtab %}

{% tab title="From Amount" %}

```typescript
{ method: 'fromAmount', value: '1000000' }  // Exact input amount
```

The intent value when using `fromAmount` must be in smallest units (e.g. for USDC with 6 decimals: 100000 = 1 USDC)
{% endtab %}

{% tab title="To Amount" %}

```typescript
{ method: 'toAmount', value: '1000000' }  // Exact output amount
```

The intent value when using `toAmount` must be in smallest units (e.g. for USDC with 6 decimals: 100000 = 1 USDC)
{% endtab %}
{% endtabs %}


---

# 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/bridge-swap.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.
