Skip to main content

deserialize_optional_polymarket_game_id

Function deserialize_optional_polymarket_game_id 

Source
pub fn deserialize_optional_polymarket_game_id<'de, D>(
    deserializer: D,
) -> Result<Option<String>, D::Error>
where D: Deserializer<'de>,
Expand description

Deserializes a Polymarket game ID as an opaque identifier.

The Gamma API returns the field in several shapes: an integer on GammaEvent, a numeric string on most GammaMarket records, and a composite <uuid>:<away>:<home> string on some sports markets. The value identifies a venue-side fixture and is never used for arithmetic, so it is kept verbatim rather than parsed into a number. Both null and -1 (or "-1") are the “no game” sentinel and map to None.