FX
KES against USDT, quoted off a live rate, and USD to KES conversions on the collections product. When we cannot price, we decline rather than guess.
Two pairs, on two different products, priced in two different ways:
- KES against USDT, on the USDT rails product. The rate is
rateon a quote, expressed as KES per USDT, and it is locked until the quote expires. Most of this page is about this pair. - USD to KES, on the collections product, in one direction only. A conversion's rate is fixed when the conversion executes, not when you ask; see USD to KES conversions below.
Quotes come off a live rate
A quote is only ever issued against a live rate source. There is no fallback to a cached or default rate, because a stale rate is a rate neither side agreed to.
If we cannot price at that moment, the quote request fails rather than returning a figure we do not stand behind. Treat that as a transient condition: surface it to your user as "we could not price this right now", and let them retry.
Never derive the other leg yourself
Supply one leg and read the other off the response. The derived leg rounds in OnLink's favour, so a number you computed will occasionally disagree with the one the order executes at — and the response is the one that is true.
Precision
rate— KES per USDT. A quote'sratecarries 2 decimal places; the order that quote is spent on persistsrateat 4 decimal places instead. Both describe the same trade — read whichever resource you have, and do not assume the two are byte-identical strings.kesAmount— 2 decimal places.usdtAmount— 6 decimal places.
All strings. See Money for why, and for how to hold them without losing value.
The rate is locked, then spent
The rate on a quote holds until expiresAt and is consumed by the order that
uses it. Nothing re-prices silently: an expired quote is a 409, never a fresh
rate you did not see.
USD to KES conversions
A conversion turns US dollars in your USD account into shillings in your KES account. It is priced differently from an order:
- The quote is indicative.
GET /v1/conversions/quotetells you the rate you would get now, and holds nothing. The rate is fixed when the conversion executes. rateis KES per 1 USD, to 2 decimal places, andtargetis exactlysource × rate, rounded down to the cent. Both arenullon the conversion until the rate is fixed, and never change afterwards.- A rate that moves too far is not traded. If the rate at execution has
moved too far from the one read when you created the conversion, in either
direction, the conversion fails with
rate_moved_beyond_toleranceand your USD is returned. - No rate, no conversion. When no usable rate is available, quoting and
creating are refused
503 CONVERSION_RATE_UNAVAILABLE, and nothing moves.
A conversion carries no fee line: its rate is the whole of its price, and is
not itemised further. See Fees.
USDT on Tron
One chain, one token, six decimals. Addresses are registered and confirmed before they can receive.
Webhooks
We POST a signed event to your endpoint when money lands in your KES or USD account (USD credits include a collection payout and the USD a failed conversion returns), or when an order, a transfer, a USDT send, a collection or a conversion confirms funds or reaches a terminal state. Fifteen events, seven attempts, one idempotency key.