price method
Anonymous board pricing: the chain's probability for both sides of a
strike, from one fresh pricer (no account needed). This is the ↑/↓
button price before a user has onboarded. m must be a binary
descriptor (strike-bearing) — anonymous board pricing has no range
semantics.
Implementation
Future<({double up, double down})> price(MarketDescriptor m) async {
final feeds = _c._feeds(m.underlying);
final resolved = await _c._resolveMarket(
underlying: m.underlying, expiryMs: m.expiryMs, marketId: m.marketId);
final strikeRaw = await _c._strikeRawFor(m, resolved.id, resolved.state);
final prices = await markets_reads.rangePrices(
_c._client,
_c._config,
resolved.id,
feeds,
strikeRaw,
resolved.state.tickSizeRaw,
);
return (
up: rawToProbability(prices.upRaw),
down: rawToProbability(prices.downRaw),
);
}