Skip to main content
POST
Swap Currency
Swap funds from one currency to another at the current exchange rate. Use a rateToken from the /wallet/rates endpoint to lock in a specific rate.

Example Request

Example Response

The fromCurrency and toCurrency must be different. If you don’t provide a rateToken, the swap will execute at the current market rate which may differ from the last quoted rate.

Authorizations

X-API-Key
string
header
required

Your Rolla API key

Body

application/json
fromCurrency
string
required

Source currency code

Required string length: 3
Example:

"USD"

toCurrency
string
required

Destination currency code (must differ from fromCurrency)

Required string length: 3
Example:

"NGN"

fromAmount
number
required

Amount to swap from source currency

Example:

1000

description
string

Optional description

Maximum string length: 500
rateToken
string

Rate token from /wallet/rates to lock in a specific rate

Response

Swap completed successfully

success
boolean
Example:

true

message
string
Example:

"Swap completed successfully"

data
object