Rates
Rates provide the conversion value needed to determine the crypto equivalent for a given fiat amount.
Prerequisites
This step is only required when performing a fiat payout (operationType: fiatpayout).
For detailed instructions, see the Fiat Payout Transfer.
Get a Rate Quote
Use this endpoint to retrieve a rate quote and the crypto equivalent for the fiat amount you want to pay out.
Request
curl --request POST \
--url https://api.sandbox.celar.io/api/v1/payments/rate \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <api_key>' \
--header 'Content-Type: application/json' \
--data '{
"fiat_amount": 100,
"token": "USDC",
"fiat_currency": "UGX",
"network": "base"
}'
Response
{
"status": "success",
"id": "rate_4c9991ac41a6683c",
"signature": "sig_964235caae236ddf",
"rate": 3608.06,
"cryptoEquivalent": "0.028"
}
Notes
- The returned
cryptoEquivalentis the stablecoin amount required to fulfill the fiat payout amount. - Both cryptoEquivallent and signature must be used when submitting a fiat payout transfer.