Comment on page

Instant Swap

You can instantly swap between crypto currencies in your wallet. To do this, Make a POST request to the following endpoint.
https://api.localramp.co/v1/transaction/swap/initiate
The request takes this as the body
{
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:
{
"status": "success",
"data": {
"reference": "SWAP_hDUkDSE36MHkds79"
}
}
Store the reference returned which would be used to verify the transaction.