decodeOrderRange function
Decode an order ID's range and quantity — the Dart mirror of
order::lower_tick / higher_tick / quantity.
Implementation
OrderRange decodeOrderRange(BigInt orderId, {BigInt? lotSize}) {
return OrderRange(
lowerTick: (orderId >> _lowerTickOffset.toInt()) & _tickMask,
higherTick: (orderId >> _higherTickOffset.toInt()) & _tickMask,
quantity: ((orderId >> _quantityLotsOffset.toInt()) & _u32Mask) *
(lotSize ?? POSITION_LOT_SIZE),
);
}