kalshi-cpp 0.6.2
C++23 client for Kalshi's Predictions API
Loading...
Searching...
No Matches
ws_models.hpp
Go to the documentation of this file.
1// Generated by tools/codegen/generate.py from spec/asyncapi.yaml. Do not edit.
2#pragma once
3
4// WebSocket message types. They live in `kalshi::ws` because several share
5// names with REST models, such as `Trade` and `Fill`.
6
7#include "kalshi/models.hpp"
8
9#include <array>
10#include <cstdint>
11#include <optional>
12#include <string>
13#include <string_view>
14#include <variant>
15#include <vector>
16
17namespace kalshi::ws {
18
36
37[[nodiscard]] constexpr std::string_view to_string(Channel value) noexcept {
38 switch (value) {
40 return "orderbook_delta";
41 case Channel::Ticker:
42 return "ticker";
43 case Channel::Trade:
44 return "trade";
45 case Channel::Fill:
46 return "fill";
48 return "market_positions";
50 return "market_lifecycle_v2";
52 return "multivariate_market_lifecycle";
54 return "communications";
56 return "order_group_updates";
58 return "user_orders";
60 return "cfbenchmarks_value";
62 return "cfbenchmarks_value_5hz";
64 return "pyth_value";
66 break;
67 }
68 return "";
69}
70
72enum class CollateralReturnType : std::uint8_t {
73 Unknown,
74 MECNET,
75 DIRECNET,
76 Unset,
77};
78
79[[nodiscard]] constexpr std::string_view to_string(CollateralReturnType value) noexcept {
80 switch (value) {
82 return "MECNET";
84 return "DIRECNET";
86 return "";
88 break;
89 }
90 return "";
91}
92
102
103[[nodiscard]] constexpr std::string_view to_string(FeeTypeOverride value) noexcept {
104 switch (value) {
106 return "quadratic";
108 return "quadratic_with_maker_fees";
110 return "quadratic_with_combo_maker_fees";
112 return "flat";
114 return "margin_market_maker_program_fees";
116 break;
117 }
118 return "";
119}
120
140
141[[nodiscard]] constexpr std::string_view to_string(LifecyclePriceLevelStructure value) noexcept {
142 switch (value) {
144 return "banded_centi_cent";
146 return "";
148 return "linear_cent";
150 return "deci_cent";
152 return "tapered_deci_cent";
154 return "center_whole_edge_half_cent";
156 return "center_whole_edge_quint_cent";
158 return "center_half_edge_half_cent";
160 return "center_half_edge_quint_cent";
162 return "center_half_edge_deci_cent";
164 return "center_quint_edge_quint_cent";
166 return "center_quint_edge_deci_cent";
168 return "center_centi_edge_centi_cent";
170 return "center_deci_edge_centi_cent";
172 break;
173 }
174 return "";
175}
176
178enum class MarketLifecycleV2EventType : std::uint8_t {
179 Unknown,
180 Created,
182 Activated,
184 Determined,
185 Settled,
187};
188
189[[nodiscard]] constexpr std::string_view to_string(MarketLifecycleV2EventType value) noexcept {
190 switch (value) {
192 return "created";
194 return "deactivated";
196 return "activated";
198 return "close_date_updated";
200 return "determined";
202 return "settled";
204 return "price_level_structure_updated";
206 break;
207 }
208 return "";
209}
210
212enum class MultivariateMarketLifecycleEventType : std::uint8_t {
213 Unknown,
214 Created,
216 Activated,
218 Determined,
219 Settled,
220};
221
222[[nodiscard]] constexpr std::string_view
224 switch (value) {
226 return "created";
228 return "deactivated";
230 return "activated";
232 return "close_date_updated";
234 return "determined";
236 return "settled";
238 break;
239 }
240 return "";
241}
242
244enum class OrderAction : std::uint8_t {
245 Unknown,
246 Buy,
247 Sell,
250 Unset,
251};
252
253[[nodiscard]] constexpr std::string_view to_string(OrderAction value) noexcept {
254 switch (value) {
255 case OrderAction::Buy:
256 return "buy";
258 return "sell";
260 return "sell_partial";
262 return "sell_to_close";
264 return "";
266 break;
267 }
268 return "";
269}
270
272enum class OrderGroupUpdatesEventType : std::uint8_t {
273 Unknown,
274 Created,
275 Triggered,
276 Reset,
277 Deleted,
279};
280
281[[nodiscard]] constexpr std::string_view to_string(OrderGroupUpdatesEventType value) noexcept {
282 switch (value) {
284 return "created";
286 return "triggered";
288 return "reset";
290 return "deleted";
292 return "limit_updated";
294 break;
295 }
296 return "";
297}
298
311
312[[nodiscard]] constexpr std::string_view to_string(UpdateAction value) noexcept {
313 switch (value) {
315 return "add_markets";
317 return "delete_markets";
319 return "get_snapshot";
321 return "subscribe_indices";
323 return "unsubscribe_indices";
325 return "indexlist";
327 return "subscribe_underlyings";
329 return "unsubscribe_underlyings";
331 return "underlying_list";
333 break;
334 }
335 return "";
336}
337
339enum class UserFilter : std::uint8_t {
340 Unknown,
341 Unset,
342 Self,
343};
344
345[[nodiscard]] constexpr std::string_view to_string(UserFilter value) noexcept {
346 switch (value) {
348 return "";
349 case UserFilter::Self:
350 return "self";
352 break;
353 }
354 return "";
355}
356
360 std::int64_t id{0};
362
363 friend bool operator==(const Subscription&, const Subscription&) = default;
364};
365
367template <typename T>
368struct Update {
370 std::int64_t sid{0};
372 std::optional<std::int64_t> seq;
374 std::optional<std::int64_t> id;
376 std::int64_t subscription{0};
378};
379
383 std::vector<std::string> index_ids;
384};
385
389 std::string value;
391 std::int64_t window_size{};
393 std::int64_t window_start_ts_ms{};
396};
397
401 std::vector<std::string> index_ids;
402};
403
407 std::string index_id;
409 std::int64_t received_at{};
411 std::string data;
416 std::optional<CfbenchmarksAvgData> last_60s_windowed_average_15min;
417};
418
422 std::string index_id;
424 std::string value_usd;
426 std::int64_t source_ts_ms{};
428 std::int64_t received_at{};
430 std::string data;
431};
432
436 std::string event_ticker;
438 std::optional<FeeTypeOverride> fee_type_override;
440 std::optional<double> fee_multiplier_override;
441};
442
446 std::string event_ticker;
448 std::int64_t exchange_index{};
450 std::string title;
452 std::string subtitle;
456 std::string series_ticker;
458 std::optional<std::int64_t> strike_date;
460 std::optional<std::string> strike_period;
461};
462
464struct Fill {
466 std::string trade_id;
468 std::string order_id;
470 std::optional<std::string> client_order_id;
472 std::string market_ticker;
474 std::int64_t exchange_index{};
476 bool is_taker{};
480 std::int64_t ts{};
482 std::int64_t ts_ms{};
484 std::string yes_price_dollars;
486 std::string count_fp;
488 std::string fee_cost;
492 std::string post_position_fp;
500 std::optional<std::int64_t> subaccount;
501};
502
505 std::string name;
506 std::string title;
507 std::string yes_sub_title;
508 std::string no_sub_title;
509 std::string rules_primary;
510 std::string rules_secondary;
512 std::string event_ticker;
514 std::optional<std::string> strike_type;
515 std::optional<double> floor_strike;
516 std::optional<double> cap_strike;
517 std::optional<RawJson> custom_strike;
518};
519
522 std::string start;
524 std::string end;
526 std::string step;
527};
528
533 std::string market_ticker;
535 std::optional<std::int64_t> exchange_index;
537 std::optional<std::int64_t> open_ts;
540 std::optional<std::int64_t> close_ts;
542 std::optional<std::int64_t> determination_ts;
544 std::optional<std::int64_t> settled_ts;
546 std::optional<std::string> result;
548 std::optional<std::string> settlement_value;
550 std::optional<bool> is_deactivated;
552 std::optional<LifecycleAdditionalMetadata> additional_metadata;
557 std::optional<LifecyclePriceLevelStructure> price_level_structure;
560 std::optional<std::vector<MarketLifecycleV2PriceRangesItem>> price_ranges;
561};
562
566 std::string market_ticker;
568 std::optional<std::string> strike_type;
570 std::optional<double> floor_strike;
572 std::optional<double> cap_strike;
575 std::optional<RawJson> custom_strike;
577 std::optional<std::string> yes_sub_title;
578};
579
583 std::string user_id;
585 std::string market_ticker;
587 std::string position_fp;
593 std::string fees_paid_dollars;
597 std::string volume_fp;
599 std::optional<std::int64_t> subaccount;
600};
601
606 std::string market_ticker;
608 std::optional<std::int64_t> exchange_index;
610 std::optional<std::int64_t> open_ts;
613 std::optional<std::int64_t> close_ts;
615 std::optional<std::int64_t> determination_ts;
617 std::optional<std::int64_t> settled_ts;
619 std::optional<std::string> result;
621 std::optional<std::string> settlement_value;
623 std::optional<bool> is_deactivated;
625 std::optional<LifecycleAdditionalMetadata> additional_metadata;
629 std::optional<LifecyclePriceLevelStructure> price_level_structure;
630};
631
637 std::string order_group_id;
639 std::optional<std::string> contracts_limit_fp;
641 std::int64_t ts_ms{};
642};
643
647 std::string market_ticker;
649 std::string market_id;
651 std::string price_dollars;
653 std::string delta_fp;
657 std::optional<std::string> client_order_id;
659 std::optional<std::string> ts;
661 std::optional<std::int64_t> ts_ms;
663 std::optional<std::int64_t> subaccount;
664};
665
669 std::string market_ticker;
671 std::string market_id;
673 std::optional<std::vector<std::array<std::string, 2>>> yes_dollars_fp;
675 std::optional<std::vector<std::array<std::string, 2>>> no_dollars_fp;
676};
677
681 std::vector<std::string> underlying_tickers;
682};
683
685struct PythValue {
687 std::string underlying_ticker;
689 std::string value_usd;
691 std::int64_t source_ts_ms{};
693 std::int64_t received_at{};
694};
695
699 std::string quote_id;
701 std::string rfq_id;
703 std::string quote_creator_id;
705 std::string rfq_creator_id;
707 std::string market_ticker;
709 std::optional<std::string> event_ticker;
711 std::string yes_bid_dollars;
713 std::string no_bid_dollars;
715 std::optional<kalshi::Side> accepted_side;
717 std::optional<std::string> contracts_accepted_fp;
719 std::optional<std::string> yes_contracts_offered_fp;
721 std::optional<std::string> no_contracts_offered_fp;
723 std::optional<std::string> rfq_target_cost_dollars;
725 std::optional<std::int64_t> subaccount;
726};
727
731 std::string quote_id;
733 std::string rfq_id;
735 std::string quote_creator_id;
737 std::string rfq_creator_id;
739 std::string market_ticker;
741 std::optional<std::string> event_ticker;
743 std::string yes_bid_dollars;
745 std::string no_bid_dollars;
747 std::optional<std::string> yes_contracts_offered_fp;
749 std::optional<std::string> no_contracts_offered_fp;
751 std::optional<std::string> rfq_target_cost_dollars;
753 std::string created_ts;
755 std::optional<std::int64_t> subaccount;
756};
757
761 std::string quote_id;
763 std::string rfq_id;
765 std::string quote_creator_id;
767 std::string rfq_creator_id;
769 std::string order_id;
771 std::string client_order_id;
773 std::string market_ticker;
775 std::string executed_ts;
777 std::optional<std::int64_t> subaccount;
778};
779
790
794 std::string id;
796 std::string creator_id;
798 std::string market_ticker;
800 std::optional<std::string> event_ticker;
802 std::optional<std::string> contracts_fp;
804 std::optional<std::string> target_cost_dollars;
806 std::string created_ts;
808 std::optional<std::string> mve_collection_ticker;
810 std::optional<std::vector<RfqCreatedMveSelectedLegsItem>> mve_selected_legs;
811};
812
816 std::string id;
818 std::string creator_id;
820 std::string market_ticker;
822 std::optional<std::string> event_ticker;
824 std::optional<std::string> contracts_fp;
826 std::optional<std::string> target_cost_dollars;
828 std::string deleted_ts;
829};
830
834 std::optional<std::string> market_ticker;
836 std::vector<std::string> market_tickers;
839 std::optional<std::string> market_id;
842 std::vector<std::string> market_ids;
844 std::optional<bool> send_initial_snapshot;
846 std::optional<bool> skip_ticker_ack;
848 std::optional<bool> use_yes_price;
850 std::optional<UserFilter> user_filter;
852 std::optional<std::int64_t> shard_factor;
854 std::optional<std::int64_t> shard_key;
856 std::vector<std::string> index_ids;
858 std::vector<std::string> underlying_tickers;
859};
860
862struct Ticker {
864 std::string market_id;
866 std::string market_ticker;
868 std::string price_dollars;
870 std::string yes_bid_dollars;
872 std::string yes_ask_dollars;
874 std::string volume_fp;
876 std::string open_interest_fp;
878 std::int64_t dollar_volume{};
880 std::int64_t dollar_open_interest{};
882 std::string yes_bid_size_fp;
884 std::string yes_ask_size_fp;
888 std::int64_t ts{};
890 std::int64_t ts_ms{};
892 std::string time;
893};
894
920
924 std::optional<std::string> market_ticker;
926 std::vector<std::string> market_tickers;
928 std::optional<std::string> market_id;
930 std::vector<std::string> market_ids;
932 std::optional<bool> send_initial_snapshot;
935 std::vector<std::string> index_ids;
937 std::vector<std::string> underlying_tickers;
938};
939
941struct UserOrder {
943 std::string order_id;
945 std::string user_id;
947 std::string ticker;
949 std::int64_t exchange_index{};
955 bool is_yes{};
961 std::string yes_price_dollars;
963 std::string fill_count_fp;
967 std::string initial_count_fp;
977 std::string client_order_id;
979 std::optional<std::string> order_group_id;
981 std::optional<kalshi::SelfTradePreventionType> self_trade_prevention_type;
983 std::optional<std::string> created_time;
985 std::optional<std::string> last_update_time;
987 std::optional<std::string> expiration_time;
989 std::optional<std::int64_t> expiration_ts_ms;
991 std::optional<std::int64_t> created_ts_ms;
993 std::optional<std::int64_t> last_updated_ts_ms;
995 std::optional<std::int64_t> subaccount_number;
996};
997
1001 std::int64_t sid{0};
1002};
1003
1008
1011struct Updated {
1013 std::vector<std::string> market_tickers;
1014 std::vector<std::string> market_ids;
1015 std::vector<std::string> index_ids;
1016 std::vector<std::string> underlying_tickers;
1017};
1018
1021 std::string channel;
1022 std::int64_t sid{0};
1023};
1024
1027 std::int64_t id{0};
1028 std::vector<ListedSubscription> subscriptions;
1029};
1030
1032using Message =
1033 std::variant<Update<OrderbookSnapshot>, Update<OrderbookDelta>, Update<Ticker>, Update<Trade>,
1044[[nodiscard]] constexpr std::string_view error_code_name(std::int64_t code) noexcept {
1045 switch (code) {
1046 case 1:
1047 return "Unable to process message";
1048 case 2:
1049 return "Params required";
1050 case 3:
1051 return "Channels required";
1052 case 4:
1053 return "Subscription IDs required";
1054 case 5:
1055 return "Unknown command";
1056 case 7:
1057 return "Unknown subscription ID";
1058 case 8:
1059 return "Unknown channel name";
1060 case 9:
1061 return "Authentication required";
1062 case 10:
1063 return "Channel error";
1064 case 11:
1065 return "Invalid parameter";
1066 case 12:
1067 return "Exactly one subscription ID is required";
1068 case 13:
1069 return "Unsupported action";
1070 case 14:
1071 return "Market Ticker required";
1072 case 15:
1073 return "Action required";
1074 case 18:
1075 return "Command timeout";
1076 case 19:
1077 return "shard_factor must be > 0";
1078 case 20:
1079 return "shard_factor is required when shard_key is set";
1080 case 21:
1081 return "shard_key must be >= 0 and < shard_factor";
1082 case 22:
1083 return "shard_factor must be <= 100";
1084 case 23:
1085 return "Match IDs required";
1086 case 24:
1087 return "Index IDs required";
1088 case 25:
1089 return "Subscription buffer overflow";
1090 case 26:
1091 return "Subscription market limit exceeded";
1092 case 27:
1093 return "Too many requests";
1094 case 28:
1095 return "Underlying tickers required";
1096 default:
1097 return "";
1098 }
1099}
1100} // namespace kalshi::ws
Definition ws_models.hpp:17
MarketLifecycleV2EventType
Field to annotate which of the event type this event is for.
Definition ws_models.hpp:178
@ PriceLevelStructureUpdated
price_level_structure_updated
@ Unknown
A value this SDK version does not know.
MultivariateMarketLifecycleEventType
Field to annotate which of the event type this event is for.
Definition ws_models.hpp:212
@ Unknown
A value this SDK version does not know.
OrderGroupUpdatesEventType
Order group event type.
Definition ws_models.hpp:272
@ Unknown
A value this SDK version does not know.
FeeTypeOverride
Event fee type override.
Definition ws_models.hpp:94
@ QuadraticWithComboMakerFees
quadratic_with_combo_maker_fees
@ QuadraticWithMakerFees
quadratic_with_maker_fees
@ Unknown
A value this SDK version does not know.
@ MarginMarketMakerProgramFees
margin_market_maker_program_fees
constexpr std::string_view error_code_name(std::int64_t code) noexcept
Kalshi's name for a WebSocket error code, or an empty string for codes this SDK version does not know...
Definition ws_models.hpp:1044
CollateralReturnType
Collateral return type, MECNET or DIRECNET of the event.
Definition ws_models.hpp:72
@ Unknown
A value this SDK version does not know.
Channel
A WebSocket channel.
Definition ws_models.hpp:20
@ MarketPositions
market_positions
@ PythValue
pyth_value
@ CfbenchmarksValue
cfbenchmarks_value
@ CfbenchmarksValue5hz
cfbenchmarks_value_5hz
@ Unknown
A value this SDK version does not know.
@ UserOrders
user_orders
@ MultivariateMarketLifecycle
multivariate_market_lifecycle
@ MarketLifecycleV2
market_lifecycle_v2
@ OrderbookDelta
orderbook_delta
@ Communications
communications
@ OrderGroupUpdates
order_group_updates
UpdateAction
Definition ws_models.hpp:299
@ SubscribeUnderlyings
subscribe_underlyings
@ DeleteMarkets
delete_markets
@ UnderlyingList
underlying_list
@ GetSnapshot
get_snapshot
@ Unknown
A value this SDK version does not know.
@ UnsubscribeIndices
unsubscribe_indices
@ SubscribeIndices
subscribe_indices
@ UnsubscribeUnderlyings
unsubscribe_underlyings
std::variant< Update< OrderbookSnapshot >, Update< OrderbookDelta >, Update< Ticker >, Update< Trade >, Update< Fill >, Update< MarketPosition >, Update< EventLifecycle >, Update< EventFeeUpdate >, Update< MultivariateMarketLifecycle >, Update< RfqCreated >, Update< RfqDeleted >, Update< QuoteCreated >, Update< QuoteAccepted >, Update< QuoteExecuted >, Update< OrderGroupUpdates >, Update< UserOrder >, Update< CfbenchmarksValue >, Update< CfbenchmarksIndexList >, Update< CfbenchmarksValue5Hz >, Update< Cfbenchmarks5HzIndexList >, Update< PythValue >, Update< PythUnderlyingList >, Update< MarketMetadataUpdated >, Update< MarketLifecycleV2 >, Subscribed, Unsubscribed, Updated, SubscriptionList > Message
Everything WebSocketClient delivers to on_message.
Definition ws_models.hpp:1041
OrderAction
Deprecated.
Definition ws_models.hpp:244
@ SellToClose
sell_to_close
@ Unknown
A value this SDK version does not know.
@ SellPartial
sell_partial
UserFilter
Communications channel only.
Definition ws_models.hpp:339
@ Unknown
A value this SDK version does not know.
LifecyclePriceLevelStructure
Optional - The market price level structure on creation or price_level_structure_updated events.
Definition ws_models.hpp:123
@ CenterQuintEdgeDeciCent
center_quint_edge_deci_cent
@ CenterHalfEdgeHalfCent
center_half_edge_half_cent
@ CenterDeciEdgeCentiCent
center_deci_edge_centi_cent
@ CenterQuintEdgeQuintCent
center_quint_edge_quint_cent
@ CenterWholeEdgeHalfCent
center_whole_edge_half_cent
@ CenterCentiEdgeCentiCent
center_centi_edge_centi_cent
@ CenterHalfEdgeDeciCent
center_half_edge_deci_cent
@ Unknown
A value this SDK version does not know.
@ CenterWholeEdgeQuintCent
center_whole_edge_quint_cent
@ CenterHalfEdgeQuintCent
center_half_edge_quint_cent
constexpr std::string_view to_string(Channel value) noexcept
Definition ws_models.hpp:37
Side
Deprecated.
Definition models.hpp:709
BookSide
Side of the book for an order or trade.
Definition models.hpp:110
OrderStatus
The status of an order.
Definition models.hpp:518
OutcomeSide
Outcome side.
Definition models.hpp:558
The index IDs recently observed on the 5Hz stream, sent in response to an indexlist action.
Definition ws_models.hpp:381
std::vector< std::string > index_ids
Index IDs recently observed on the 5Hz stream.
Definition ws_models.hpp:383
Trailing 60-second average metadata.
Definition ws_models.hpp:387
std::string value
Average value over the window, formatted to 8 decimal places.
Definition ws_models.hpp:389
std::int64_t window_end_ts_exclusive
Window end boundary, exclusive (unix ms)
Definition ws_models.hpp:395
std::int64_t window_size
Number of ticks counted in the window.
Definition ws_models.hpp:391
std::int64_t window_start_ts_ms
Window start boundary (unix ms)
Definition ws_models.hpp:393
The set of available CF Benchmarks index IDs, sent in response to an indexlist action.
Definition ws_models.hpp:399
std::vector< std::string > index_ids
Available CF Benchmarks index IDs.
Definition ws_models.hpp:401
Real-time CF Benchmarks index value at up to 5 updates per second.
Definition ws_models.hpp:420
std::int64_t received_at
When Kalshi received the upstream frame (unix ms)
Definition ws_models.hpp:428
std::string value_usd
Index value in USD, formatted with exactly 8 decimal places.
Definition ws_models.hpp:424
std::string data
The raw CF Benchmarks JSON frame, as a string.
Definition ws_models.hpp:430
std::string index_id
CF Benchmarks index ID (for example "BRTI")
Definition ws_models.hpp:422
std::int64_t source_ts_ms
Upstream publication timestamp of the tick (unix ms)
Definition ws_models.hpp:426
Real-time CF Benchmarks index value with trailing 60-second and quarter-hour averages.
Definition ws_models.hpp:405
std::string data
The raw CF Benchmarks JSON frame, as a string.
Definition ws_models.hpp:411
std::int64_t received_at
When Kalshi received the upstream frame (unix ms)
Definition ws_models.hpp:409
std::string index_id
CF Benchmarks index ID (for example "BRTI")
Definition ws_models.hpp:407
CfbenchmarksAvgData avg_60s_data
Trailing 60-second average metadata.
Definition ws_models.hpp:413
std::optional< CfbenchmarksAvgData > last_60s_windowed_average_15min
Optional - present only during the final minute before quarter-hour close (:00, :15,...
Definition ws_models.hpp:416
Emitted when an event-level fee override is set or cleared.
Definition ws_models.hpp:434
std::string event_ticker
Unique identifier for the event.
Definition ws_models.hpp:436
std::optional< double > fee_multiplier_override
Event fee multiplier override.
Definition ws_models.hpp:440
std::optional< FeeTypeOverride > fee_type_override
Event fee type override.
Definition ws_models.hpp:438
Event creation notification.
Definition ws_models.hpp:444
std::string subtitle
Subtitle of event.
Definition ws_models.hpp:452
std::optional< std::string > strike_period
Optional - String to indicate the strike period of the event if there is one.
Definition ws_models.hpp:460
std::string series_ticker
Series ticker for the event.
Definition ws_models.hpp:456
std::int64_t exchange_index
Identifier for the exchange shard the event's markets live on.
Definition ws_models.hpp:448
std::optional< std::int64_t > strike_date
Optional - Unix timestamp to indicate the strike date of the event if there is one.
Definition ws_models.hpp:458
std::string title
Title of event.
Definition ws_models.hpp:450
CollateralReturnType collateral_return_type
Collateral return type, MECNET or DIRECNET of the event.
Definition ws_models.hpp:454
std::string event_ticker
Unique identifier for the event being created.
Definition ws_models.hpp:446
Private fill information for authenticated user.
Definition ws_models.hpp:464
std::int64_t ts_ms
Unix timestamp for when the update happened (in milliseconds)
Definition ws_models.hpp:482
kalshi::Side purchased_side
Deprecated.
Definition ws_models.hpp:494
std::string yes_price_dollars
Price for the yes side of the fill in dollars.
Definition ws_models.hpp:484
std::string order_id
Unique identifier for orders.
Definition ws_models.hpp:468
std::string fee_cost
Exchange fee paid for this fill in fixed-point dollars.
Definition ws_models.hpp:488
std::int64_t exchange_index
Identifier for the exchange shard where the fill occurred.
Definition ws_models.hpp:474
std::string post_position_fp
Fixed-point position after the fill (2 decimals)
Definition ws_models.hpp:492
kalshi::OutcomeSide outcome_side
The outcome side this fill positioned the user for.
Definition ws_models.hpp:496
kalshi::BookSide book_side
Same directional bit as outcome_side in book vocabulary.
Definition ws_models.hpp:498
std::optional< std::int64_t > subaccount
Optional subaccount number for the fill.
Definition ws_models.hpp:500
OrderAction action
Deprecated.
Definition ws_models.hpp:490
bool is_taker
If you were a taker on this fill.
Definition ws_models.hpp:476
std::string market_ticker
Unique identifier for markets.
Definition ws_models.hpp:472
kalshi::Side side
Deprecated.
Definition ws_models.hpp:478
std::optional< std::string > client_order_id
Optional client-provided order ID.
Definition ws_models.hpp:470
std::string trade_id
Unique identifier for fills.
Definition ws_models.hpp:466
std::int64_t ts
Deprecated - Unix timestamp for when the update happened (in seconds).
Definition ws_models.hpp:480
std::string count_fp
Fixed-point contracts filled (2 decimals)
Definition ws_models.hpp:486
Optional - This key will be emitted when the market is created.
Definition ws_models.hpp:504
std::optional< RawJson > custom_strike
Definition ws_models.hpp:517
std::string title
Definition ws_models.hpp:506
std::string rules_secondary
Definition ws_models.hpp:510
std::string yes_sub_title
Definition ws_models.hpp:507
std::string event_ticker
Definition ws_models.hpp:512
std::string name
Definition ws_models.hpp:505
std::optional< std::string > strike_type
Definition ws_models.hpp:514
std::optional< double > floor_strike
Definition ws_models.hpp:515
std::optional< double > cap_strike
Definition ws_models.hpp:516
std::string rules_primary
Definition ws_models.hpp:509
bool can_close_early
Definition ws_models.hpp:511
std::int64_t expected_expiration_ts
Definition ws_models.hpp:513
std::string no_sub_title
Definition ws_models.hpp:508
One entry of a list_subscriptions reply.
Definition ws_models.hpp:1020
std::int64_t sid
Definition ws_models.hpp:1022
std::string channel
Definition ws_models.hpp:1021
std::string step
Tick size (minimum price increment) within this band, in dollars.
Definition ws_models.hpp:526
std::string start
Starting price for this band, in dollars.
Definition ws_models.hpp:522
std::string end
Ending price for this band, in dollars.
Definition ws_models.hpp:524
Market lifecycle events (created, activated, deactivated, close_date_updated, determined,...
Definition ws_models.hpp:531
std::optional< std::string > settlement_value
Optional - This key will ONLY exist when the market is determined.
Definition ws_models.hpp:548
std::optional< std::int64_t > settled_ts
Optional - This key will ONLY exist when the market is settled.
Definition ws_models.hpp:544
std::optional< std::int64_t > open_ts
Optional - This key will ONLY exist when the market is created.
Definition ws_models.hpp:537
std::optional< std::vector< MarketLifecycleV2PriceRangesItem > > price_ranges
Optional - Emitted alongside price_level_structure (on market creation and price_level_structure_upda...
Definition ws_models.hpp:560
std::optional< std::string > result
Optional - This key will ONLY exist when the market is determined.
Definition ws_models.hpp:546
MarketLifecycleV2EventType event_type
Field to annotate which of the event type this event is for.
Definition ws_models.hpp:554
std::optional< LifecycleAdditionalMetadata > additional_metadata
Optional - This key will be emitted when the market is created.
Definition ws_models.hpp:552
std::optional< LifecyclePriceLevelStructure > price_level_structure
Optional - The market price level structure on creation or price_level_structure_updated events.
Definition ws_models.hpp:557
std::optional< std::int64_t > close_ts
Optional - This key will ONLY exist when the market is created OR when the close date is updated.
Definition ws_models.hpp:540
std::optional< std::int64_t > determination_ts
Optional - This key will ONLY exist when the market is determined.
Definition ws_models.hpp:542
std::string market_ticker
Unique identifier for markets.
Definition ws_models.hpp:533
std::optional< bool > is_deactivated
Optional - This key will ONLY exist when the market is paused/unpaused.
Definition ws_models.hpp:550
std::optional< std::int64_t > exchange_index
Optional - This key will ONLY exist when the market is created.
Definition ws_models.hpp:535
Updated strike information or yes subtitle.
Definition ws_models.hpp:564
std::optional< double > floor_strike
Optional - This key will ONLY exist for metadata_updated events.
Definition ws_models.hpp:570
std::optional< std::string > yes_sub_title
Optional - This key will ONLY exist for metadata_updated events.
Definition ws_models.hpp:577
std::optional< RawJson > custom_strike
Optional - This key will ONLY exist for metadata_updated events with a custom or structured strike ty...
Definition ws_models.hpp:575
std::optional< double > cap_strike
Optional - This key will ONLY exist for metadata_updated events.
Definition ws_models.hpp:572
std::string market_ticker
Unique identifier for markets.
Definition ws_models.hpp:566
std::optional< std::string > strike_type
Optional - This key will ONLY exist for metadata_updated events.
Definition ws_models.hpp:568
Real-time position updates for authenticated user.
Definition ws_models.hpp:581
std::string position_fee_cost_dollars
Total position fee cost as a fixed-point dollar string.
Definition ws_models.hpp:595
std::string fees_paid_dollars
Total fees paid as a fixed-point dollar string.
Definition ws_models.hpp:593
std::string volume_fp
Fixed-point total volume traded (2 decimals)
Definition ws_models.hpp:597
std::optional< std::int64_t > subaccount
Optional subaccount number for the position.
Definition ws_models.hpp:599
std::string position_fp
Fixed-point net position (2 decimals)
Definition ws_models.hpp:587
std::string user_id
User ID for the position.
Definition ws_models.hpp:583
std::string market_ticker
Market ticker for the position.
Definition ws_models.hpp:585
std::string realized_pnl_dollars
Realized profit/loss as a fixed-point dollar string.
Definition ws_models.hpp:591
std::string position_cost_dollars
Current cost basis of the position as a fixed-point dollar string.
Definition ws_models.hpp:589
Multivariate market lifecycle events (created, activated, deactivated, close_date_updated,...
Definition ws_models.hpp:604
std::optional< bool > is_deactivated
Optional - This key will ONLY exist when the market is paused/unpaused.
Definition ws_models.hpp:623
std::optional< std::int64_t > close_ts
Optional - This key will ONLY exist when the market is created OR when the close date is updated.
Definition ws_models.hpp:613
std::optional< std::int64_t > determination_ts
Optional - This key will ONLY exist when the market is determined.
Definition ws_models.hpp:615
std::string market_ticker
Unique identifier for markets.
Definition ws_models.hpp:606
std::optional< std::string > settlement_value
Optional - This key will ONLY exist when the market is determined.
Definition ws_models.hpp:621
std::optional< std::int64_t > open_ts
Optional - This key will ONLY exist when the market is created.
Definition ws_models.hpp:610
std::optional< LifecycleAdditionalMetadata > additional_metadata
Optional - This key will be emitted when the market is created.
Definition ws_models.hpp:625
MultivariateMarketLifecycleEventType event_type
Field to annotate which of the event type this event is for.
Definition ws_models.hpp:627
std::optional< std::int64_t > exchange_index
Optional - This key will ONLY exist when the market is created.
Definition ws_models.hpp:608
std::optional< std::string > result
Optional - This key will ONLY exist when the market is determined.
Definition ws_models.hpp:619
std::optional< LifecyclePriceLevelStructure > price_level_structure
Optional - The market price level structure on creation.
Definition ws_models.hpp:629
std::optional< std::int64_t > settled_ts
Optional - This key will ONLY exist when the market is settled.
Definition ws_models.hpp:617
Order group lifecycle and limit updates for authenticated user.
Definition ws_models.hpp:633
std::int64_t ts_ms
Matching engine timestamp at which the event was processed, as Unix epoch milliseconds.
Definition ws_models.hpp:641
std::string order_group_id
Order group identifier.
Definition ws_models.hpp:637
std::optional< std::string > contracts_limit_fp
Updated contracts limit in fixed-point (2 decimals).
Definition ws_models.hpp:639
OrderGroupUpdatesEventType event_type
Order group event type.
Definition ws_models.hpp:635
Update to be applied to the current order book view.
Definition ws_models.hpp:645
std::optional< std::string > ts
Deprecated - Optional timestamp for when the orderbook change was recorded (RFC3339).
Definition ws_models.hpp:659
std::string delta_fp
Fixed-point contract delta (2 decimals)
Definition ws_models.hpp:653
std::string market_ticker
Unique market identifier.
Definition ws_models.hpp:647
std::optional< std::string > client_order_id
Optional - Present only when you caused this orderbook change.
Definition ws_models.hpp:657
std::optional< std::int64_t > subaccount
Optional - Present only when you caused this orderbook change and are using subaccounts.
Definition ws_models.hpp:663
std::optional< std::int64_t > ts_ms
Optional - Unix timestamp for when the orderbook change was recorded (in milliseconds)
Definition ws_models.hpp:661
std::string market_id
Unique market UUID.
Definition ws_models.hpp:649
kalshi::Side side
Market side.
Definition ws_models.hpp:655
std::string price_dollars
Price level in dollars.
Definition ws_models.hpp:651
Complete view of the order book's aggregated price levels.
Definition ws_models.hpp:667
std::string market_ticker
Unique market identifier.
Definition ws_models.hpp:669
std::optional< std::vector< std::array< std::string, 2 > > > no_dollars_fp
Optional - Same format as "yes_dollars_fp" but for the NO side of the orderbook.
Definition ws_models.hpp:675
std::optional< std::vector< std::array< std::string, 2 > > > yes_dollars_fp
Optional - This key will not exist if there are no Yes offers in the orderbook.
Definition ws_models.hpp:673
std::string market_id
Unique market UUID.
Definition ws_models.hpp:671
Recently streamed Pyth underlying tickers.
Definition ws_models.hpp:679
std::vector< std::string > underlying_tickers
Underlying tickers observed on the Pyth stream in the last two hours.
Definition ws_models.hpp:681
Deduplicated real-time Pyth price for an underlying ticker.
Definition ws_models.hpp:685
std::string value_usd
USD value formatted to 8 decimal places.
Definition ws_models.hpp:689
std::int64_t received_at
When Kalshi received the Pyth update (unix ms)
Definition ws_models.hpp:693
std::int64_t source_ts_ms
Pyth source timestamp (unix ms)
Definition ws_models.hpp:691
std::string underlying_ticker
Qualified Pyth underlying ticker.
Definition ws_models.hpp:687
Notification when a quote is accepted.
Definition ws_models.hpp:697
std::string rfq_creator_id
Public communications ID of the RFQ creator (anonymized)
Definition ws_models.hpp:705
std::string quote_creator_id
Public communications ID of the quote creator (anonymized)
Definition ws_models.hpp:703
std::string yes_bid_dollars
Yes side bid price in dollars.
Definition ws_models.hpp:711
std::string no_bid_dollars
No side bid price in dollars.
Definition ws_models.hpp:713
std::string rfq_id
Identifier of the RFQ this quote is for.
Definition ws_models.hpp:701
std::optional< std::string > no_contracts_offered_fp
Fixed-point no contracts offered (2 decimals) (optional)
Definition ws_models.hpp:721
std::string market_ticker
Market ticker for the quote.
Definition ws_models.hpp:707
std::optional< std::int64_t > subaccount
Optional - Present only when your side of this quote used a subaccount.
Definition ws_models.hpp:725
std::optional< std::string > rfq_target_cost_dollars
Target cost from the RFQ in dollars (optional)
Definition ws_models.hpp:723
std::optional< kalshi::Side > accepted_side
Which side was accepted (yes/no) (optional)
Definition ws_models.hpp:715
std::string quote_id
Unique identifier for the quote.
Definition ws_models.hpp:699
std::optional< std::string > yes_contracts_offered_fp
Fixed-point yes contracts offered (2 decimals) (optional)
Definition ws_models.hpp:719
std::optional< std::string > contracts_accepted_fp
Fixed-point contracts accepted (2 decimals) (optional)
Definition ws_models.hpp:717
std::optional< std::string > event_ticker
Event ticker (optional)
Definition ws_models.hpp:709
Notification when a quote is created on an RFQ.
Definition ws_models.hpp:729
std::string quote_id
Unique identifier for the quote.
Definition ws_models.hpp:731
std::optional< std::string > event_ticker
Event ticker (optional)
Definition ws_models.hpp:741
std::optional< std::int64_t > subaccount
Optional - Present only when your side of this quote used a subaccount.
Definition ws_models.hpp:755
std::string market_ticker
Market ticker for the quote.
Definition ws_models.hpp:739
std::string rfq_creator_id
Public communications ID of the RFQ creator (anonymized)
Definition ws_models.hpp:737
std::optional< std::string > no_contracts_offered_fp
Fixed-point no contracts offered (2 decimals) (optional)
Definition ws_models.hpp:749
std::string rfq_id
Identifier of the RFQ this quote is for.
Definition ws_models.hpp:733
std::string yes_bid_dollars
Yes side bid price in dollars.
Definition ws_models.hpp:743
std::string created_ts
Timestamp when the quote was created.
Definition ws_models.hpp:753
std::optional< std::string > rfq_target_cost_dollars
Target cost from the RFQ in dollars (optional)
Definition ws_models.hpp:751
std::optional< std::string > yes_contracts_offered_fp
Fixed-point yes contracts offered (2 decimals) (optional)
Definition ws_models.hpp:747
std::string quote_creator_id
Public communications ID of the quote creator (anonymized)
Definition ws_models.hpp:735
std::string no_bid_dollars
No side bid price in dollars.
Definition ws_models.hpp:745
Notification when a quote is executed and orders are placed.
Definition ws_models.hpp:759
std::string order_id
Your order ID resulting from the quote execution.
Definition ws_models.hpp:769
std::string quote_creator_id
Anonymized identifier for the quote creator.
Definition ws_models.hpp:765
std::string executed_ts
Timestamp when the quote was executed and orders were placed.
Definition ws_models.hpp:775
std::string quote_id
Unique identifier for the quote that was executed.
Definition ws_models.hpp:761
std::string rfq_creator_id
Anonymized identifier for the RFQ creator.
Definition ws_models.hpp:767
std::string client_order_id
Your client order ID for the executed order.
Definition ws_models.hpp:771
std::optional< std::int64_t > subaccount
Optional - Present only when your side of this quote used a subaccount.
Definition ws_models.hpp:777
std::string market_ticker
Market ticker for the executed quote.
Definition ws_models.hpp:773
std::string rfq_id
Identifier of the RFQ this quote was for.
Definition ws_models.hpp:763
Definition ws_models.hpp:780
std::optional< std::string > yes_settlement_value_dollars
Yes settlement value in dollars for the selected leg.
Definition ws_models.hpp:788
kalshi::Side side
Side selected for the leg.
Definition ws_models.hpp:786
std::string event_ticker
Event ticker for the selected leg.
Definition ws_models.hpp:782
std::string market_ticker
Market ticker for the selected leg.
Definition ws_models.hpp:784
Notification when an RFQ is created.
Definition ws_models.hpp:792
std::string market_ticker
Market ticker for the RFQ.
Definition ws_models.hpp:798
std::optional< std::string > contracts_fp
Fixed-point contracts requested (2 decimals) (optional)
Definition ws_models.hpp:802
std::optional< std::string > target_cost_dollars
Target cost in dollars (optional)
Definition ws_models.hpp:804
std::string id
Unique identifier for the RFQ.
Definition ws_models.hpp:794
std::string created_ts
Timestamp when the RFQ was created.
Definition ws_models.hpp:806
std::optional< std::vector< RfqCreatedMveSelectedLegsItem > > mve_selected_legs
Selected legs for an MVE RFQ.
Definition ws_models.hpp:810
std::string creator_id
Public communications ID of the RFQ creator (anonymized).
Definition ws_models.hpp:796
std::optional< std::string > event_ticker
Event ticker (optional)
Definition ws_models.hpp:800
std::optional< std::string > mve_collection_ticker
Multivariate event collection ticker.
Definition ws_models.hpp:808
Notification when an RFQ is deleted.
Definition ws_models.hpp:814
std::string creator_id
Public communications ID of the RFQ creator (anonymized)
Definition ws_models.hpp:818
std::optional< std::string > target_cost_dollars
Target cost in dollars (optional)
Definition ws_models.hpp:826
std::string deleted_ts
Timestamp when the RFQ was deleted.
Definition ws_models.hpp:828
std::string id
Unique identifier for the RFQ.
Definition ws_models.hpp:816
std::optional< std::string > contracts_fp
Fixed-point contracts requested (2 decimals) (optional)
Definition ws_models.hpp:824
std::optional< std::string > event_ticker
Event ticker (optional)
Definition ws_models.hpp:822
std::string market_ticker
Market ticker for the RFQ.
Definition ws_models.hpp:820
Options for subscribe; the client sets the channel.
Definition ws_models.hpp:832
std::optional< std::string > market_id
Subscribe to a single market by UUID (ticker only; mutually exclusive with market_ids and market_tick...
Definition ws_models.hpp:839
std::optional< bool > skip_ticker_ack
If true, OK responses omit the market_tickers/market_ids lists for this subscription.
Definition ws_models.hpp:846
std::vector< std::string > market_ids
Subscribe to multiple markets by UUID (ticker only; mutually exclusive with market_id and market_tick...
Definition ws_models.hpp:842
std::optional< bool > use_yes_price
Orderbook channel only.
Definition ws_models.hpp:848
std::optional< std::int64_t > shard_factor
Number of shards for communications channel fanout (optional)
Definition ws_models.hpp:852
std::optional< bool > send_initial_snapshot
If true, receive an initial snapshot for requested market tickers on the ticker channel.
Definition ws_models.hpp:844
std::vector< std::string > market_tickers
Subscribe to multiple markets.
Definition ws_models.hpp:836
std::optional< std::int64_t > shard_key
Shard key for communications channel fanout (requires shard_factor)
Definition ws_models.hpp:854
std::optional< std::string > market_ticker
Subscribe to a single market.
Definition ws_models.hpp:834
std::vector< std::string > index_ids
cfbenchmarks_value and cfbenchmarks_value_5hz channels only.
Definition ws_models.hpp:856
std::optional< UserFilter > user_filter
Communications channel only.
Definition ws_models.hpp:850
std::vector< std::string > underlying_tickers
pyth_value channel only.
Definition ws_models.hpp:858
The server confirmed a subscription.
Definition ws_models.hpp:999
std::int64_t sid
Definition ws_models.hpp:1001
Subscription subscription
Definition ws_models.hpp:1000
The reply to list_subscriptions; id is the command's ID.
Definition ws_models.hpp:1026
std::vector< ListedSubscription > subscriptions
Definition ws_models.hpp:1028
A handle for one channel subscription.
Definition ws_models.hpp:359
friend bool operator==(const Subscription &, const Subscription &)=default
Channel channel
Definition ws_models.hpp:361
Market price ticker information.
Definition ws_models.hpp:862
std::string yes_bid_dollars
Best bid price for yes side in dollars.
Definition ws_models.hpp:870
std::string yes_ask_size_fp
Fixed-point contracts at best ask (2 decimals)
Definition ws_models.hpp:884
std::string volume_fp
Fixed-point total contracts traded (2 decimals)
Definition ws_models.hpp:874
std::int64_t dollar_volume
Signed whole-dollar cumulative traded notional.
Definition ws_models.hpp:878
std::string market_id
Unique market UUID.
Definition ws_models.hpp:864
std::string yes_bid_size_fp
Fixed-point contracts at best bid (2 decimals)
Definition ws_models.hpp:882
std::string last_trade_size_fp
Fixed-point contracts in last trade (2 decimals)
Definition ws_models.hpp:886
std::string yes_ask_dollars
Best ask price for yes side in dollars.
Definition ws_models.hpp:872
std::int64_t ts_ms
Unix timestamp for when the update happened (in milliseconds)
Definition ws_models.hpp:890
std::int64_t dollar_open_interest
Signed whole-dollar open-interest notional.
Definition ws_models.hpp:880
std::string price_dollars
Last traded price in dollars.
Definition ws_models.hpp:868
std::string market_ticker
Unique market identifier.
Definition ws_models.hpp:866
std::string open_interest_fp
Fixed-point open interest (2 decimals)
Definition ws_models.hpp:876
std::int64_t ts
Deprecated - Unix timestamp for when the update happened (in seconds).
Definition ws_models.hpp:888
std::string time
Deprecated - Timestamp for when the update happened (RFC3339).
Definition ws_models.hpp:892
Public trade information.
Definition ws_models.hpp:896
std::string trade_id
Unique identifier for the trade.
Definition ws_models.hpp:898
std::string count_fp
Fixed-point contracts traded (2 decimals)
Definition ws_models.hpp:906
std::string market_ticker
Unique market identifier.
Definition ws_models.hpp:900
bool is_block_trade
True if the trade was matched off book as a block trade.
Definition ws_models.hpp:914
std::string yes_price_dollars
Yes side price in dollars.
Definition ws_models.hpp:902
std::string no_price_dollars
No side price in dollars.
Definition ws_models.hpp:904
std::int64_t ts
Deprecated - Unix timestamp in seconds.
Definition ws_models.hpp:916
kalshi::BookSide taker_book_side
Same directional bit as taker_outcome_side in book vocabulary.
Definition ws_models.hpp:912
kalshi::Side taker_side
Deprecated.
Definition ws_models.hpp:908
std::int64_t ts_ms
Unix timestamp in milliseconds.
Definition ws_models.hpp:918
kalshi::OutcomeSide taker_outcome_side
The outcome side the taker is positioned for.
Definition ws_models.hpp:910
The server ended a subscription after unsubscribe.
Definition ws_models.hpp:1005
Subscription subscription
Definition ws_models.hpp:1006
Options for update_subscription; the client sets the subscription.
Definition ws_models.hpp:922
std::vector< std::string > market_tickers
Add/remove multiple markets.
Definition ws_models.hpp:926
std::optional< std::string > market_ticker
Add/remove a single market.
Definition ws_models.hpp:924
std::vector< std::string > market_ids
Add/remove multiple markets by UUID (ticker only)
Definition ws_models.hpp:930
std::optional< std::string > market_id
Add/remove a single market by UUID (ticker only)
Definition ws_models.hpp:928
std::vector< std::string > index_ids
CF Benchmarks index IDs to add or remove.
Definition ws_models.hpp:935
std::optional< bool > send_initial_snapshot
If true, receive an initial snapshot for newly added market tickers on the ticker channel.
Definition ws_models.hpp:932
std::vector< std::string > underlying_tickers
Pyth underlyings to add or remove.
Definition ws_models.hpp:937
UpdateAction action
Definition ws_models.hpp:933
One data frame. msg holds the channel's payload.
Definition ws_models.hpp:368
std::int64_t subscription
Subscription::id of the subscription that produced the frame.
Definition ws_models.hpp:376
std::optional< std::int64_t > id
The command that asked for this frame, such as a get_snapshot.
Definition ws_models.hpp:374
T msg
Definition ws_models.hpp:377
std::int64_t sid
The server's subscription ID, which changes after a reconnect.
Definition ws_models.hpp:370
std::optional< std::int64_t > seq
Present on sequenced channels. The client checks it for gaps.
Definition ws_models.hpp:372
An update_subscription succeeded.
Definition ws_models.hpp:1011
std::vector< std::string > underlying_tickers
Definition ws_models.hpp:1016
Subscription subscription
Definition ws_models.hpp:1012
std::vector< std::string > market_tickers
Definition ws_models.hpp:1013
std::vector< std::string > index_ids
Definition ws_models.hpp:1015
std::vector< std::string > market_ids
Definition ws_models.hpp:1014
Real-time order updates for authenticated user.
Definition ws_models.hpp:941
std::string client_order_id
Client-provided order identifier.
Definition ws_models.hpp:977
kalshi::BookSide book_side
Same directional bit as outcome_side in book vocabulary.
Definition ws_models.hpp:959
std::optional< std::int64_t > last_updated_ts_ms
Last update time as a Unix timestamp in milliseconds.
Definition ws_models.hpp:993
std::string taker_fees_dollars
Taker fees in fixed-point dollars (6 decimals).
Definition ws_models.hpp:973
std::string remaining_count_fp
Number of contracts remaining in fixed-point (2 decimals)
Definition ws_models.hpp:965
std::optional< kalshi::SelfTradePreventionType > self_trade_prevention_type
Self-trade prevention type.
Definition ws_models.hpp:981
std::string initial_count_fp
Initial number of contracts in fixed-point (2 decimals)
Definition ws_models.hpp:967
std::optional< std::string > expiration_time
Deprecated - Order expiration time in RFC3339 format.
Definition ws_models.hpp:987
std::string yes_price_dollars
Yes price in fixed-point dollars (4 decimals)
Definition ws_models.hpp:961
kalshi::OrderStatus status
Current order status.
Definition ws_models.hpp:951
std::string fill_count_fp
Number of contracts filled in fixed-point (2 decimals)
Definition ws_models.hpp:963
std::string maker_fees_dollars
Maker fees in fixed-point dollars (6 decimals).
Definition ws_models.hpp:975
kalshi::OutcomeSide outcome_side
The outcome side this order is positioned for.
Definition ws_models.hpp:957
std::string ticker
Market ticker for the order.
Definition ws_models.hpp:947
std::string user_id
User identifier.
Definition ws_models.hpp:945
std::optional< std::string > order_group_id
Order group identifier, if applicable.
Definition ws_models.hpp:979
std::string order_id
Unique order identifier.
Definition ws_models.hpp:943
std::int64_t exchange_index
Identifier for the exchange shard where the order resides.
Definition ws_models.hpp:949
std::optional< std::int64_t > expiration_ts_ms
Order expiration time as a Unix timestamp in milliseconds.
Definition ws_models.hpp:989
bool is_yes
Deprecated.
Definition ws_models.hpp:955
std::optional< std::int64_t > subaccount_number
Subaccount number (0 for primary, 1-63 for subaccounts)
Definition ws_models.hpp:995
std::string taker_fill_cost_dollars
Taker fill cost in fixed-point dollars (6 decimals)
Definition ws_models.hpp:969
kalshi::Side side
Deprecated.
Definition ws_models.hpp:953
std::optional< std::string > last_update_time
Deprecated - Last update time in RFC3339 format.
Definition ws_models.hpp:985
std::optional< std::string > created_time
Deprecated - Order creation time in RFC3339 format.
Definition ws_models.hpp:983
std::string maker_fill_cost_dollars
Maker fill cost in fixed-point dollars (6 decimals)
Definition ws_models.hpp:971
std::optional< std::int64_t > created_ts_ms
Order creation time as a Unix timestamp in milliseconds.
Definition ws_models.hpp:991