> For the complete documentation index, see [llms.txt](https://docs.localramp.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.localramp.co/crypto-swaps/instant-swap.md).

# 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.
