Skip to main content
POST
/
api
/
v3
/
rate
/
onramp
Get Onramp Exchange rate
curl --request POST \
  --url https://sandbox-api.kotanipay.com/api/v3/rate/onramp \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "from": "KES",
  "to": "USDT",
  "fiatAmount": "0.85"
}
'
{
  "success": true,
  "message": "Available exchange rate.",
  "data": {
    "from": "USD",
    "to": "EUR",
    "value": "0.85",
    "id": "1234567890",
    "fiatAmount": "100",
    "cryptoAmount": "100",
    "transactionAmount": "100",
    "fee": "100"
  }
}
An integrator can use this endpoint to get the exchange rate between two currencies for onramp transactions.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
from
enum<string>
required

From currency

Available options:
KES,
GHS,
NGN,
ZAR,
ZAR,
USD,
XOF,
ZMW,
XAF,
SLE,
CDF,
TZS,
UGX,
EGP,
MWK,
RWF,
ETB,
MZN,
LSL,
GNF,
USDT,
BTC,
ETH,
USDC
Example:

"KES"

to
enum<string>
required

To currency

Available options:
CUSD,
USDC,
USDT,
USDGLO,
CKES,
CGHS,
MSAT
Example:

"USDT"

fiatAmount
number
required

Rate value

Example:

"0.85"

Response

success
boolean
Example:

true

message
string
Example:

"Available exchange rate."

data
object