midBound
midBound(
ref,tokens,o): (req) =>bigint|null
A webhookPricer bound: what the reference mid pays for the request plus
toleranceBps, and never more than available(token) of what we pay out. Null (no
quote) without a fresh mid or outside the USDM/NIGHT pair.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
ref |
RefPrice |
tokens |
{ usdm: string; night: string; } |
tokens.usdm |
string |
tokens.night |
string |
o |
{ toleranceBps: number; available: (token) => bigint; } |
o.toleranceBps |
number |
o.available |
(token) => bigint |
Returns
Section titled “Returns”(req) => bigint | null