> ## Documentation Index
> Fetch the complete documentation index at: https://api.unusualwhales.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> API requests use the base URL https://api.unusualwhales.com and require a bearer token in the `Authorization` header (`Authorization: Bearer <API_KEY>`). Create and manage API tokens at https://unusualwhales.com/dashboard/api.
> For live market data inside an AI tool, use the Unusual Whales MCP server at https://unusualwhales.com/public-api/mcp.
> Instructions for agents using Unusual Whales tools: https://unusualwhales.com/skill.md

# Decimal

> Exact decimal number, mirroring Rust's `rust_decimal::Decimal`: a 96-bit unsigned integer mantissa, a base-10 scale and a sign. value = (hi << 64 | lo) / 10^scale, negated when `negative` is true Example: lo=12345, hi=0, scale=2, negative=false represents 123.45. Decoding in Rust (with the `rust_decimal` crate): let lo = (d.lo & 0xFFFF_FFFF) as u32; let mid = (d.lo >> 32) as u32; let value = Decimal::from_parts(lo, mid, d.hi, d.negative, d.scale); Decoding in Python (E-notation string: exact regardless of the decimal context's precision, and faster than dividing by 10^scale): from decimal import Decimal mantissa = (d.hi << 64) | d.lo value = Decimal(f"{'-' if d.negative else ''}{mantissa}E-{d.scale}")

Message
fields**4**
used by[FlexConsolidation](/docs/kafka/types/FlexConsolidation.md)
used by[FlexOptionState](/docs/kafka/types/FlexOptionState.md)
used by[PredictionsInsider](/docs/kafka/types/PredictionsInsider.md)
used by[PredictionsPosition](/docs/kafka/types/PredictionsPosition.md)
used by[PredictionsTrade](/docs/kafka/types/PredictionsTrade.md)
used by[ScreenerDividendState](/docs/kafka/types/ScreenerDividendState.md)
used by[ScreenerEarningsState](/docs/kafka/types/ScreenerEarningsState.md)
used by[ScreenerFlexState](/docs/kafka/types/ScreenerFlexState.md)
used by[ScreenerGexState](/docs/kafka/types/ScreenerGexState.md)
used by[ScreenerInterpolatedIvState](/docs/kafka/types/ScreenerInterpolatedIvState.md)
used by[ScreenerIvRankState](/docs/kafka/types/ScreenerIvRankState.md)
used by[ScreenerOptionFlowState](/docs/kafka/types/ScreenerOptionFlowState.md)
used by[ScreenerPerformanceState](/docs/kafka/types/ScreenerPerformanceState.md)
used by[ScreenerSharesState](/docs/kafka/types/ScreenerSharesState.md)
used by[ScreenerStockState](/docs/kafka/types/ScreenerStockState.md)
used by[ScreenerTickerInfoState](/docs/kafka/types/ScreenerTickerInfoState.md)
used by[ScreenerVolatilityState](/docs/kafka/types/ScreenerVolatilityState.md)
used by[ThirteenFOptionHolding](/docs/kafka/types/ThirteenFOptionHolding.md)
used by[TickerDividend](/docs/kafka/types/TickerDividend.md)
used by[TickerEarnings](/docs/kafka/types/TickerEarnings.md)
used by[TickerInfo](/docs/kafka/types/TickerInfo.md)
used by[TickerOiStatsDay](/docs/kafka/types/TickerOiStatsDay.md)
used by[TickerPerformance](/docs/kafka/types/TickerPerformance.md)
used by[TickerShares](/docs/kafka/types/TickerShares.md)
used by[TickerVolatility](/docs/kafka/types/TickerVolatility.md)

**Proto definition**

```protobuf schema.proto theme={null}
message Decimal {
  uint64 lo = 1;
  uint32 hi = 2;
  uint32 scale = 3;
  bool negative = 4;
}
```

## Fields

The number on the right of each row is the protobuf field number.

lo
uint64
1

Low 64 bits of the 96-bit mantissa.

hi
uint32
2

High 32 bits of the 96-bit mantissa.

scale
uint32
3

Number of decimal digits after the point, i.e. the power of ten the mantissa is divided by. At most 28.

negative
bool
4

True when the value is negative.

> [!NOTE]
>
> Decode via an exact decimal type, never a float. In Python the E-notation form is exact regardless of the decimal context's precision, and faster than dividing by `10^scale`:
>
> ```python theme={null}
> from decimal import Decimal
>
> mantissa = (d.hi << 64) | d.lo
> value = Decimal(f"{'-' if d.negative else ''}{mantissa}E-{d.scale}")
> ```
>
> In Rust, with the `rust_decimal` crate:
>
> ```rust theme={null}
> let lo = (d.lo & 0xFFFF_FFFF) as u32;
> let mid = (d.lo >> 32) as u32;
> let value = Decimal::from_parts(lo, mid, d.hi, d.negative, d.scale);
> ```
