FX
KES against USDT, quoted off a live rate. When we cannot price, we decline rather than guess.
One pair: KES against USDT. The rate is rate on a
quote, expressed as KES per USDT.
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, 2 decimal places.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.