Skip to main content
PeerPesa provides indicative conversion rates so you can estimate the value of a ramp before committing. Rates are not locked until you create a quote, and quotes remain valid for 30 minutes. Use this endpoint to preview pricing for your users before generating a locked quote.
Rates returned by this endpoint are indicative only and may change without notice. To lock a rate for 30 minutes, create a quote via POST /quotes.

Get conversion rate

Retrieve the current conversion rate for an onramp (fiat to crypto) or offramp (crypto to fiat) pair.

Query parameters

string
required
Direction of the ramp. Must be one of: onramp, offramp.
string
required
Blockchain network. Must be one of: stellar, celo.
string
required
Crypto asset code. Supported values per network:
  • stellar: XLM, USDC
  • celo: CELO, USDT, USDC, CUSD
string
required
Fiat currency code. Supported values: KES, TZS, NGN, ZAR, ZMW.

Request examples

Response example

Response fields

string
required
The ramp direction requested. One of: onramp, offramp.
string
required
The blockchain network identifier. One of: stellar, celo.
string
required
The crypto asset code (e.g. USDC, USDT, CUSD).
string
required
The fiat currency code (e.g. KES, NGN).
string
required
The conversion rate as a decimal string. For an onramp, this is the amount of fiat per one unit of crypto. For an offramp, it is the amount of fiat received per one unit of crypto. The exact semantics depend on the type and asset pair.
string
required
The inverse of the quoted rate as a decimal string.
string
required
ISO 8601 UTC timestamp indicating when this rate was last refreshed.

Error responses

Possible error codes for this endpoint include: