# Instant Swap

You can instantly swap between crypto currencies in your wallet. To do this, Make a **POST** request to the following endpoint.

{% code overflow="wrap" %}

```url
https://api.localramp.co/v1/transaction/swap/initiate
```

{% endcode %}

The request takes this as the body

```javascript
{
        from_currency: "BTC",
        to_currency: "LTC",
        from_amount: "0.34928456"
}
```

With the following header

```
x-auth-token: <SECRET_KEY>
```

If the API call is successful, LocalRamp returns the following response:

```javascript
{
    "status": "success",
    "data": {
        "reference": "SWAP_hDUkDSE36MHkds79"
    }
}
```

Store the `reference` returned which would be used to verify the transaction.


---

# 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.localramp.co/crypto-swaps/instant-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.
