kalshi-cpp 0.6.2
C++23 client for Kalshi's Predictions API
Loading...
Searching...
No Matches
kalshi::FixedPoint Class Reference

Lossless fixed-point decimal received from or sent to Kalshi. More...

#include <kalshi/fixed_point.hpp>

Public Member Functions

const std::string & wire () const noexcept
 
Result< std::int64_t > scaled_integer (std::uint8_t scale) const
 Convert exactly to an integer with scale decimal places.
 

Static Public Member Functions

static Result< FixedPoint > parse (std::string_view value)
 

Detailed Description

Lossless fixed-point decimal received from or sent to Kalshi.

Member Function Documentation

◆ parse()

static Result< FixedPoint > kalshi::FixedPoint::parse ( std::string_view  value)
inlinestatic

◆ wire()

const std::string & kalshi::FixedPoint::wire ( ) const
inlinenoexcept

◆ scaled_integer()

Result< std::int64_t > kalshi::FixedPoint::scaled_integer ( std::uint8_t  scale) const
inline

Convert exactly to an integer with scale decimal places.

Returns InvalidRequest instead of rounding or saturating.


The documentation for this class was generated from the following file: