Skip to main content
POST
/
api
/
v3
/
rate
/
crypto-bridge
Get Crypto Bridge rate quote
curl --request POST \
  --url https://sandbox-api.kotanipay.com/api/v3/rate/crypto-bridge \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "source_currency": "KES",
  "source_amount": 1000,
  "crypto_chain": "LIGHTNING",
  "crypto_token": "MSAT",
  "requested_crypto_amount": 150000000
}
'
{
  "success": true,
  "message": "Crypto bridge rate quote generated successfully.",
  "data": {
    "rate_id": "RATE-CB-1732454321-XYZ123",
    "source_amount": 1000,
    "source_currency": "KES",
    "crypto_amount": 150000000,
    "crypto_unit": "msat",
    "chain": "LIGHTNING",
    "token": "MSAT",
    "exchange_rate": {
      "fiat_to_btc": "0.00000015",
      "btc_to_msat": 100000000,
      "exchange_rate_source": "COINBASE"
    },
    "fees": {
      "fiat_fee": 15,
      "fiat_fee_currency": "KES",
      "crypto_fee": 1000,
      "crypto_fee_unit": "sats",
      "fee_percentage": 1.5
    },
    "total_cost": 1015,
    "net_crypto_amount": 149000000,
    "expires_at": "2024-11-24T12:01:00Z",
    "created_at": "2024-11-24T12:00:00Z"
  }
}
Get an exchange rate quote for a crypto bridge transaction before initiating the deposit. Use this to display the estimated source fiat amount, crypto amount, and destination fiat amount to the customer.

Authorizations

Authorization
string
header
required

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

Body

application/json
source_currency
enum<string>
required

Source fiat 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"

source_amount
number
required

Source fiat amount customer will pay

Example:

1000

crypto_chain
enum<string>
required

Blockchain/network to use

Available options:
CELO,
ETHEREUM,
ARBITRUM,
AVALANCHE,
BINANCE,
POLYGON,
OPTIMISM,
FUSE,
TRON,
PROVENANCE,
SOLANA,
HEDERA,
STELLAR,
BASE,
LISK,
VICTION,
SCROLL,
LIGHTNING
Example:

"LIGHTNING"

crypto_token
enum<string>
required

Crypto token to use

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

"MSAT"

requested_crypto_amount
number

Requested crypto amount (optional - for validation)

Example:

150000000

Response

success
boolean
Example:

true

message
string
Example:

"Crypto bridge rate quote generated successfully."

data
object