publicdotcom-cli 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. publicdotcom_cli/__init__.py +3 -0
  2. publicdotcom_cli/__main__.py +5 -0
  3. publicdotcom_cli/_generated/__init__.py +8 -0
  4. publicdotcom_cli/_generated/api/__init__.py +1 -0
  5. publicdotcom_cli/_generated/api/account_details/__init__.py +1 -0
  6. publicdotcom_cli/_generated/api/account_details/get_account_portfolio_v2.py +182 -0
  7. publicdotcom_cli/_generated/api/account_details/get_history.py +250 -0
  8. publicdotcom_cli/_generated/api/authorization/__init__.py +1 -0
  9. publicdotcom_cli/_generated/api/authorization/create_personal_access_token.py +230 -0
  10. publicdotcom_cli/_generated/api/instrument_details/__init__.py +1 -0
  11. publicdotcom_cli/_generated/api/instrument_details/get_all_instruments.py +303 -0
  12. publicdotcom_cli/_generated/api/instrument_details/get_instrument.py +170 -0
  13. publicdotcom_cli/_generated/api/list_accounts/__init__.py +1 -0
  14. publicdotcom_cli/_generated/api/list_accounts/get_accounts.py +172 -0
  15. publicdotcom_cli/_generated/api/market_data/__init__.py +1 -0
  16. publicdotcom_cli/_generated/api/market_data/get_option_chain.py +200 -0
  17. publicdotcom_cli/_generated/api/market_data/get_option_expirations.py +210 -0
  18. publicdotcom_cli/_generated/api/market_data/get_quotes.py +200 -0
  19. publicdotcom_cli/_generated/api/option_details/__init__.py +1 -0
  20. publicdotcom_cli/_generated/api/option_details/get_option_greeks.py +194 -0
  21. publicdotcom_cli/_generated/api/order_placement/__init__.py +1 -0
  22. publicdotcom_cli/_generated/api/order_placement/cancel_order.py +123 -0
  23. publicdotcom_cli/_generated/api/order_placement/get_order.py +206 -0
  24. publicdotcom_cli/_generated/api/order_placement/place_multileg_order.py +214 -0
  25. publicdotcom_cli/_generated/api/order_placement/place_order.py +222 -0
  26. publicdotcom_cli/_generated/api/order_placement/preflight_multi_leg.py +276 -0
  27. publicdotcom_cli/_generated/api/order_placement/preflight_single_leg.py +220 -0
  28. publicdotcom_cli/_generated/api/order_placement/replace_order.py +222 -0
  29. publicdotcom_cli/_generated/client.py +272 -0
  30. publicdotcom_cli/_generated/errors.py +16 -0
  31. publicdotcom_cli/_generated/models/__init__.py +417 -0
  32. publicdotcom_cli/_generated/models/com_hellopublic_holdingsystem_core_types_option_price_increment.py +71 -0
  33. publicdotcom_cli/_generated/models/com_hellopublic_userapiauthservice_api_personal_create_access_token_request.py +84 -0
  34. publicdotcom_cli/_generated/models/com_hellopublic_userapiauthservice_api_personal_create_access_token_response.py +61 -0
  35. publicdotcom_cli/_generated/models/com_hellopublic_userapiauthservice_domain_error_error_body.py +70 -0
  36. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_account_account_settings.py +161 -0
  37. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_account_account_settings_account_type.py +14 -0
  38. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_account_account_settings_brokerage_account_type.py +9 -0
  39. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_account_account_settings_options_level.py +12 -0
  40. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_account_account_settings_response.py +85 -0
  41. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_account_account_settings_trade_permissions.py +11 -0
  42. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_history_gateway_history_response_page.py +195 -0
  43. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_history_gateway_history_transaction.py +263 -0
  44. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_history_gateway_history_transaction_direction.py +9 -0
  45. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_history_gateway_history_transaction_security_type.py +13 -0
  46. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_history_gateway_history_transaction_side.py +9 -0
  47. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_history_gateway_history_transaction_sub_type.py +19 -0
  48. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_history_gateway_history_transaction_type.py +10 -0
  49. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_option_chain_request.py +85 -0
  50. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_option_chain_response.py +115 -0
  51. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_option_expirations_request.py +75 -0
  52. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_option_expirations_response.py +81 -0
  53. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_quote.py +272 -0
  54. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_quote_outcome.py +9 -0
  55. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_quote_request.py +84 -0
  56. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_quote_response.py +87 -0
  57. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_marketdata_quote_one_day_change.py +74 -0
  58. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_marketdata_quote_option_details.py +135 -0
  59. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_options_greek_response.py +113 -0
  60. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_options_greeks_response.py +86 -0
  61. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_options_option_greeks_type_0.py +117 -0
  62. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_cancel_replace_order_request.py +139 -0
  63. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_cancel_replace_order_request_order_type.py +11 -0
  64. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_instrument_dto.py +265 -0
  65. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_instrument_dto_fractional_trading.py +10 -0
  66. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_instrument_dto_option_spread_trading.py +10 -0
  67. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_instrument_dto_option_trading.py +10 -0
  68. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_instrument_dto_shorting_availability.py +10 -0
  69. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_instrument_dto_trading.py +10 -0
  70. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_instrument_response.py +87 -0
  71. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_multileg_order_request.py +141 -0
  72. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_multileg_order_request_type.py +11 -0
  73. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_order_request.py +231 -0
  74. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_order_request_equity_market_session.py +9 -0
  75. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_order_request_open_close_indicator.py +9 -0
  76. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_order_request_order_side.py +9 -0
  77. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_order_request_order_type.py +11 -0
  78. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_order_result.py +69 -0
  79. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_leg_instrument.py +73 -0
  80. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_leg_instrument_type.py +9 -0
  81. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_order.py +334 -0
  82. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_order_instrument.py +73 -0
  83. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_order_instrument_type.py +15 -0
  84. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_order_leg.py +125 -0
  85. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_order_leg_open_close_indicator.py +9 -0
  86. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_order_leg_side.py +9 -0
  87. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_order_open_close_indicator.py +9 -0
  88. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_order_side.py +9 -0
  89. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_order_status.py +17 -0
  90. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_order_type.py +11 -0
  91. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_short_selling.py +127 -0
  92. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_short_selling_availability.py +10 -0
  93. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_short_selling_uptick_rule.py +9 -0
  94. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_instrumentdetails_api_instrument_details.py +67 -0
  95. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_instrumentdetails_api_instrument_details_bond.py +74 -0
  96. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_instrumentdetails_api_instrument_details_crypto.py +92 -0
  97. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_order_expiration.py +87 -0
  98. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_order_expiration_time_in_force.py +9 -0
  99. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_portfolio_gain_type_0.py +88 -0
  100. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_portfolio_gateway_buying_power.py +77 -0
  101. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_portfolio_gateway_cost_basis_type_0.py +167 -0
  102. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_portfolio_gateway_portfolio_account_v2.py +233 -0
  103. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_portfolio_gateway_portfolio_account_v2_account_type.py +14 -0
  104. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_portfolio_gateway_portfolio_equity_v2.py +100 -0
  105. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_portfolio_gateway_portfolio_equity_v2_type.py +14 -0
  106. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_portfolio_gateway_portfolio_instrument.py +93 -0
  107. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_portfolio_gateway_portfolio_instrument_type.py +14 -0
  108. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_portfolio_gateway_portfolio_position.py +352 -0
  109. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_portfolio_gateway_strategy.py +276 -0
  110. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_portfolio_gateway_strategy_leg.py +78 -0
  111. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_portfolio_price_type_0.py +79 -0
  112. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_gateway_margin_impact.py +70 -0
  113. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_gateway_margin_requirement.py +70 -0
  114. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_gateway_option_details.py +91 -0
  115. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_gateway_option_details_type.py +9 -0
  116. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_gateway_option_rebate.py +79 -0
  117. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_gateway_price_increment.py +80 -0
  118. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_gateway_regulatory_fees.py +118 -0
  119. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_preflight_leg_response.py +167 -0
  120. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_preflight_leg_response_open_close_indicator.py +9 -0
  121. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_preflight_leg_response_side.py +9 -0
  122. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_preflight_multi_leg_request.py +148 -0
  123. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_preflight_multi_leg_request_order_type.py +11 -0
  124. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_preflight_multi_leg_response.py +313 -0
  125. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_preflight_single_leg_request.py +225 -0
  126. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_preflight_single_leg_request_equity_market_session.py +11 -0
  127. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_preflight_single_leg_request_open_close_indicator.py +11 -0
  128. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_preflight_single_leg_request_order_side.py +9 -0
  129. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_preflight_single_leg_request_order_type.py +11 -0
  130. publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_preflight_single_leg_response.py +410 -0
  131. publicdotcom_cli/_generated/models/get_all_instruments_fractional_trading_filter_item.py +10 -0
  132. publicdotcom_cli/_generated/models/get_all_instruments_option_spread_trading_filter_item.py +10 -0
  133. publicdotcom_cli/_generated/models/get_all_instruments_option_trading_filter_item.py +10 -0
  134. publicdotcom_cli/_generated/models/get_all_instruments_trading_filter_item.py +10 -0
  135. publicdotcom_cli/_generated/models/get_all_instruments_type_filter_item.py +15 -0
  136. publicdotcom_cli/_generated/models/get_instrument_type.py +15 -0
  137. publicdotcom_cli/_generated/types.py +54 -0
  138. publicdotcom_cli/cli.py +761 -0
  139. publicdotcom_cli/client.py +83 -0
  140. publicdotcom_cli/config.py +222 -0
  141. publicdotcom_cli/output.py +77 -0
  142. publicdotcom_cli/payloads.py +36 -0
  143. publicdotcom_cli-1.0.0.dist-info/METADATA +256 -0
  144. publicdotcom_cli-1.0.0.dist-info/RECORD +146 -0
  145. publicdotcom_cli-1.0.0.dist-info/WHEEL +4 -0
  146. publicdotcom_cli-1.0.0.dist-info/entry_points.txt +2 -0
@@ -0,0 +1,272 @@
1
+ from __future__ import annotations
2
+
3
+ import datetime
4
+ from collections.abc import Mapping
5
+ from typing import TYPE_CHECKING, Any, TypeVar
6
+
7
+ from attrs import define as _attrs_define
8
+ from attrs import field as _attrs_field
9
+ from dateutil.parser import isoparse
10
+
11
+ from ..models.com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_quote_outcome import (
12
+ ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayQuoteOutcome,
13
+ )
14
+ from ..types import UNSET, Unset
15
+
16
+ if TYPE_CHECKING:
17
+ from ..models.com_hellopublic_userapigateway_api_rest_marketdata_quote_one_day_change import (
18
+ ComHellopublicUserapigatewayApiRestMarketdataQuoteOneDayChange,
19
+ )
20
+ from ..models.com_hellopublic_userapigateway_api_rest_marketdata_quote_option_details import (
21
+ ComHellopublicUserapigatewayApiRestMarketdataQuoteOptionDetails,
22
+ )
23
+ from ..models.com_hellopublic_userapigateway_api_rest_order_gateway_order_instrument import (
24
+ ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument,
25
+ )
26
+
27
+
28
+ T = TypeVar("T", bound="ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayQuote")
29
+
30
+
31
+ @_attrs_define
32
+ class ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayQuote:
33
+ """
34
+ Attributes:
35
+ instrument (ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument):
36
+ outcome (ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayQuoteOutcome): The outcome status of the quote
37
+ request.
38
+ last (str | Unset): The last traded price of the instrument. Can be null if no trades have occurred.
39
+ last_timestamp (datetime.datetime | Unset): Timestamp of when the last trade occurred. Can be null if no trades
40
+ have occurred.
41
+ bid (str | Unset): The current bid price (sell-side price) in the market. Can be null if no bid exists.
42
+ bid_size (int | Unset): Number of shares, contracts, or units available at the given bid price.
43
+ bid_timestamp (datetime.datetime | Unset): Timestamp of when the bid price was last updated. Can be null if no
44
+ bid exists.
45
+ ask (str | Unset): The current ask price (buy-side price) in the market. Can be null if no ask exists.
46
+ ask_size (int | Unset): Number of shares, contracts, or units available at the given ask price.
47
+ ask_timestamp (datetime.datetime | Unset): Timestamp of when the ask price was last updated. Can be null if no
48
+ ask exists.
49
+ volume (int | Unset): The total volume traded on the date of the last trade.
50
+ open_interest (int | Unset): The total number of options contracts that are not closed or delivered on a
51
+ particular day.
52
+ previous_close (str | Unset): The previous day's close price from the last trading session.
53
+ one_day_change (ComHellopublicUserapigatewayApiRestMarketdataQuoteOneDayChange | Unset): Represents the one-day
54
+ price change data for a quote.
55
+
56
+ The change values are provided by the data source (e.g., Xignite) and may differ from simple subtraction
57
+ of current price minus previous close due to corporate actions, stock splits, or other adjustments.
58
+ option_details (ComHellopublicUserapigatewayApiRestMarketdataQuoteOptionDetails | Unset): Option-specific
59
+ details including Greeks, strike price, and mid price.
60
+ """
61
+
62
+ instrument: ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument
63
+ outcome: ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayQuoteOutcome
64
+ last: str | Unset = UNSET
65
+ last_timestamp: datetime.datetime | Unset = UNSET
66
+ bid: str | Unset = UNSET
67
+ bid_size: int | Unset = UNSET
68
+ bid_timestamp: datetime.datetime | Unset = UNSET
69
+ ask: str | Unset = UNSET
70
+ ask_size: int | Unset = UNSET
71
+ ask_timestamp: datetime.datetime | Unset = UNSET
72
+ volume: int | Unset = UNSET
73
+ open_interest: int | Unset = UNSET
74
+ previous_close: str | Unset = UNSET
75
+ one_day_change: ComHellopublicUserapigatewayApiRestMarketdataQuoteOneDayChange | Unset = UNSET
76
+ option_details: ComHellopublicUserapigatewayApiRestMarketdataQuoteOptionDetails | Unset = UNSET
77
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
78
+
79
+ def to_dict(self) -> dict[str, Any]:
80
+ instrument = self.instrument.to_dict()
81
+
82
+ outcome = self.outcome.value
83
+
84
+ last = self.last
85
+
86
+ last_timestamp: str | Unset = UNSET
87
+ if not isinstance(self.last_timestamp, Unset):
88
+ last_timestamp = self.last_timestamp.isoformat()
89
+
90
+ bid = self.bid
91
+
92
+ bid_size = self.bid_size
93
+
94
+ bid_timestamp: str | Unset = UNSET
95
+ if not isinstance(self.bid_timestamp, Unset):
96
+ bid_timestamp = self.bid_timestamp.isoformat()
97
+
98
+ ask = self.ask
99
+
100
+ ask_size = self.ask_size
101
+
102
+ ask_timestamp: str | Unset = UNSET
103
+ if not isinstance(self.ask_timestamp, Unset):
104
+ ask_timestamp = self.ask_timestamp.isoformat()
105
+
106
+ volume = self.volume
107
+
108
+ open_interest = self.open_interest
109
+
110
+ previous_close = self.previous_close
111
+
112
+ one_day_change: dict[str, Any] | Unset = UNSET
113
+ if not isinstance(self.one_day_change, Unset):
114
+ one_day_change = self.one_day_change.to_dict()
115
+
116
+ option_details: dict[str, Any] | Unset = UNSET
117
+ if not isinstance(self.option_details, Unset):
118
+ option_details = self.option_details.to_dict()
119
+
120
+ field_dict: dict[str, Any] = {}
121
+ field_dict.update(self.additional_properties)
122
+ field_dict.update(
123
+ {
124
+ "instrument": instrument,
125
+ "outcome": outcome,
126
+ }
127
+ )
128
+ if last is not UNSET:
129
+ field_dict["last"] = last
130
+ if last_timestamp is not UNSET:
131
+ field_dict["lastTimestamp"] = last_timestamp
132
+ if bid is not UNSET:
133
+ field_dict["bid"] = bid
134
+ if bid_size is not UNSET:
135
+ field_dict["bidSize"] = bid_size
136
+ if bid_timestamp is not UNSET:
137
+ field_dict["bidTimestamp"] = bid_timestamp
138
+ if ask is not UNSET:
139
+ field_dict["ask"] = ask
140
+ if ask_size is not UNSET:
141
+ field_dict["askSize"] = ask_size
142
+ if ask_timestamp is not UNSET:
143
+ field_dict["askTimestamp"] = ask_timestamp
144
+ if volume is not UNSET:
145
+ field_dict["volume"] = volume
146
+ if open_interest is not UNSET:
147
+ field_dict["openInterest"] = open_interest
148
+ if previous_close is not UNSET:
149
+ field_dict["previousClose"] = previous_close
150
+ if one_day_change is not UNSET:
151
+ field_dict["oneDayChange"] = one_day_change
152
+ if option_details is not UNSET:
153
+ field_dict["optionDetails"] = option_details
154
+
155
+ return field_dict
156
+
157
+ @classmethod
158
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
159
+ from ..models.com_hellopublic_userapigateway_api_rest_marketdata_quote_one_day_change import (
160
+ ComHellopublicUserapigatewayApiRestMarketdataQuoteOneDayChange,
161
+ )
162
+ from ..models.com_hellopublic_userapigateway_api_rest_marketdata_quote_option_details import (
163
+ ComHellopublicUserapigatewayApiRestMarketdataQuoteOptionDetails,
164
+ )
165
+ from ..models.com_hellopublic_userapigateway_api_rest_order_gateway_order_instrument import (
166
+ ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument,
167
+ )
168
+
169
+ d = dict(src_dict)
170
+ instrument = ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument.from_dict(
171
+ d.pop("instrument")
172
+ )
173
+
174
+ outcome = ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayQuoteOutcome(
175
+ d.pop("outcome")
176
+ )
177
+
178
+ last = d.pop("last", UNSET)
179
+
180
+ _last_timestamp = d.pop("lastTimestamp", UNSET)
181
+ last_timestamp: datetime.datetime | Unset
182
+ if isinstance(_last_timestamp, Unset):
183
+ last_timestamp = UNSET
184
+ else:
185
+ last_timestamp = isoparse(_last_timestamp)
186
+
187
+ bid = d.pop("bid", UNSET)
188
+
189
+ bid_size = d.pop("bidSize", UNSET)
190
+
191
+ _bid_timestamp = d.pop("bidTimestamp", UNSET)
192
+ bid_timestamp: datetime.datetime | Unset
193
+ if isinstance(_bid_timestamp, Unset):
194
+ bid_timestamp = UNSET
195
+ else:
196
+ bid_timestamp = isoparse(_bid_timestamp)
197
+
198
+ ask = d.pop("ask", UNSET)
199
+
200
+ ask_size = d.pop("askSize", UNSET)
201
+
202
+ _ask_timestamp = d.pop("askTimestamp", UNSET)
203
+ ask_timestamp: datetime.datetime | Unset
204
+ if isinstance(_ask_timestamp, Unset):
205
+ ask_timestamp = UNSET
206
+ else:
207
+ ask_timestamp = isoparse(_ask_timestamp)
208
+
209
+ volume = d.pop("volume", UNSET)
210
+
211
+ open_interest = d.pop("openInterest", UNSET)
212
+
213
+ previous_close = d.pop("previousClose", UNSET)
214
+
215
+ _one_day_change = d.pop("oneDayChange", UNSET)
216
+ one_day_change: ComHellopublicUserapigatewayApiRestMarketdataQuoteOneDayChange | Unset
217
+ if isinstance(_one_day_change, Unset):
218
+ one_day_change = UNSET
219
+ else:
220
+ one_day_change = (
221
+ ComHellopublicUserapigatewayApiRestMarketdataQuoteOneDayChange.from_dict(
222
+ _one_day_change
223
+ )
224
+ )
225
+
226
+ _option_details = d.pop("optionDetails", UNSET)
227
+ option_details: ComHellopublicUserapigatewayApiRestMarketdataQuoteOptionDetails | Unset
228
+ if isinstance(_option_details, Unset):
229
+ option_details = UNSET
230
+ else:
231
+ option_details = (
232
+ ComHellopublicUserapigatewayApiRestMarketdataQuoteOptionDetails.from_dict(
233
+ _option_details
234
+ )
235
+ )
236
+
237
+ com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_quote = cls(
238
+ instrument=instrument,
239
+ outcome=outcome,
240
+ last=last,
241
+ last_timestamp=last_timestamp,
242
+ bid=bid,
243
+ bid_size=bid_size,
244
+ bid_timestamp=bid_timestamp,
245
+ ask=ask,
246
+ ask_size=ask_size,
247
+ ask_timestamp=ask_timestamp,
248
+ volume=volume,
249
+ open_interest=open_interest,
250
+ previous_close=previous_close,
251
+ one_day_change=one_day_change,
252
+ option_details=option_details,
253
+ )
254
+
255
+ com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_quote.additional_properties = d
256
+ return com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_quote
257
+
258
+ @property
259
+ def additional_keys(self) -> list[str]:
260
+ return list(self.additional_properties.keys())
261
+
262
+ def __getitem__(self, key: str) -> Any:
263
+ return self.additional_properties[key]
264
+
265
+ def __setitem__(self, key: str, value: Any) -> None:
266
+ self.additional_properties[key] = value
267
+
268
+ def __delitem__(self, key: str) -> None:
269
+ del self.additional_properties[key]
270
+
271
+ def __contains__(self, key: str) -> bool:
272
+ return key in self.additional_properties
@@ -0,0 +1,9 @@
1
+ from enum import Enum
2
+
3
+
4
+ class ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayQuoteOutcome(str, Enum):
5
+ SUCCESS = "SUCCESS"
6
+ UNKNOWN = "UNKNOWN"
7
+
8
+ def __str__(self) -> str:
9
+ return str(self.value)
@@ -0,0 +1,84 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import TYPE_CHECKING, Any, TypeVar
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ if TYPE_CHECKING:
10
+ from ..models.com_hellopublic_userapigateway_api_rest_order_gateway_order_instrument import (
11
+ ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument,
12
+ )
13
+
14
+
15
+ T = TypeVar("T", bound="ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayQuoteRequest")
16
+
17
+
18
+ @_attrs_define
19
+ class ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayQuoteRequest:
20
+ """
21
+ Attributes:
22
+ instruments (list[ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument]): List of instruments to query
23
+ quotes.
24
+ """
25
+
26
+ instruments: list[ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument]
27
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
28
+
29
+ def to_dict(self) -> dict[str, Any]:
30
+ instruments = []
31
+ for instruments_item_data in self.instruments:
32
+ instruments_item = instruments_item_data.to_dict()
33
+ instruments.append(instruments_item)
34
+
35
+ field_dict: dict[str, Any] = {}
36
+ field_dict.update(self.additional_properties)
37
+ field_dict.update(
38
+ {
39
+ "instruments": instruments,
40
+ }
41
+ )
42
+
43
+ return field_dict
44
+
45
+ @classmethod
46
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
47
+ from ..models.com_hellopublic_userapigateway_api_rest_order_gateway_order_instrument import (
48
+ ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument,
49
+ )
50
+
51
+ d = dict(src_dict)
52
+ instruments = []
53
+ _instruments = d.pop("instruments")
54
+ for instruments_item_data in _instruments:
55
+ instruments_item = (
56
+ ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument.from_dict(
57
+ instruments_item_data
58
+ )
59
+ )
60
+
61
+ instruments.append(instruments_item)
62
+
63
+ com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_quote_request = cls(
64
+ instruments=instruments,
65
+ )
66
+
67
+ com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_quote_request.additional_properties = d
68
+ return com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_quote_request
69
+
70
+ @property
71
+ def additional_keys(self) -> list[str]:
72
+ return list(self.additional_properties.keys())
73
+
74
+ def __getitem__(self, key: str) -> Any:
75
+ return self.additional_properties[key]
76
+
77
+ def __setitem__(self, key: str, value: Any) -> None:
78
+ self.additional_properties[key] = value
79
+
80
+ def __delitem__(self, key: str) -> None:
81
+ del self.additional_properties[key]
82
+
83
+ def __contains__(self, key: str) -> bool:
84
+ return key in self.additional_properties
@@ -0,0 +1,87 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import TYPE_CHECKING, Any, TypeVar
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ from ..types import UNSET, Unset
10
+
11
+ if TYPE_CHECKING:
12
+ from ..models.com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_quote import (
13
+ ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayQuote,
14
+ )
15
+
16
+
17
+ T = TypeVar("T", bound="ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayQuoteResponse")
18
+
19
+
20
+ @_attrs_define
21
+ class ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayQuoteResponse:
22
+ """
23
+ Attributes:
24
+ quotes (list[ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayQuote] | Unset): List of quotes
25
+ """
26
+
27
+ quotes: list[ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayQuote] | Unset = UNSET
28
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
29
+
30
+ def to_dict(self) -> dict[str, Any]:
31
+ quotes: list[dict[str, Any]] | Unset = UNSET
32
+ if not isinstance(self.quotes, Unset):
33
+ quotes = []
34
+ for quotes_item_data in self.quotes:
35
+ quotes_item = quotes_item_data.to_dict()
36
+ quotes.append(quotes_item)
37
+
38
+ field_dict: dict[str, Any] = {}
39
+ field_dict.update(self.additional_properties)
40
+ field_dict.update({})
41
+ if quotes is not UNSET:
42
+ field_dict["quotes"] = quotes
43
+
44
+ return field_dict
45
+
46
+ @classmethod
47
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
48
+ from ..models.com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_quote import (
49
+ ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayQuote,
50
+ )
51
+
52
+ d = dict(src_dict)
53
+ _quotes = d.pop("quotes", UNSET)
54
+ quotes: list[ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayQuote] | Unset = UNSET
55
+ if _quotes is not UNSET:
56
+ quotes = []
57
+ for quotes_item_data in _quotes:
58
+ quotes_item = (
59
+ ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayQuote.from_dict(
60
+ quotes_item_data
61
+ )
62
+ )
63
+
64
+ quotes.append(quotes_item)
65
+
66
+ com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_quote_response = cls(
67
+ quotes=quotes,
68
+ )
69
+
70
+ com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_quote_response.additional_properties = d
71
+ return com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_quote_response
72
+
73
+ @property
74
+ def additional_keys(self) -> list[str]:
75
+ return list(self.additional_properties.keys())
76
+
77
+ def __getitem__(self, key: str) -> Any:
78
+ return self.additional_properties[key]
79
+
80
+ def __setitem__(self, key: str, value: Any) -> None:
81
+ self.additional_properties[key] = value
82
+
83
+ def __delitem__(self, key: str) -> None:
84
+ del self.additional_properties[key]
85
+
86
+ def __contains__(self, key: str) -> bool:
87
+ return key in self.additional_properties
@@ -0,0 +1,74 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import Any, TypeVar
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ from ..types import UNSET, Unset
10
+
11
+ T = TypeVar("T", bound="ComHellopublicUserapigatewayApiRestMarketdataQuoteOneDayChange")
12
+
13
+
14
+ @_attrs_define
15
+ class ComHellopublicUserapigatewayApiRestMarketdataQuoteOneDayChange:
16
+ """Represents the one-day price change data for a quote.
17
+
18
+ The change values are provided by the data source (e.g., Xignite) and may differ from simple subtraction
19
+ of current price minus previous close due to corporate actions, stock splits, or other adjustments.
20
+
21
+ Attributes:
22
+ change (str | Unset): The one-day price change in dollars
23
+ percent_change (str | Unset): The one-day price change as a percentage
24
+ """
25
+
26
+ change: str | Unset = UNSET
27
+ percent_change: str | Unset = UNSET
28
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
29
+
30
+ def to_dict(self) -> dict[str, Any]:
31
+ change = self.change
32
+
33
+ percent_change = self.percent_change
34
+
35
+ field_dict: dict[str, Any] = {}
36
+ field_dict.update(self.additional_properties)
37
+ field_dict.update({})
38
+ if change is not UNSET:
39
+ field_dict["change"] = change
40
+ if percent_change is not UNSET:
41
+ field_dict["percentChange"] = percent_change
42
+
43
+ return field_dict
44
+
45
+ @classmethod
46
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
47
+ d = dict(src_dict)
48
+ change = d.pop("change", UNSET)
49
+
50
+ percent_change = d.pop("percentChange", UNSET)
51
+
52
+ com_hellopublic_userapigateway_api_rest_marketdata_quote_one_day_change = cls(
53
+ change=change,
54
+ percent_change=percent_change,
55
+ )
56
+
57
+ com_hellopublic_userapigateway_api_rest_marketdata_quote_one_day_change.additional_properties = d
58
+ return com_hellopublic_userapigateway_api_rest_marketdata_quote_one_day_change
59
+
60
+ @property
61
+ def additional_keys(self) -> list[str]:
62
+ return list(self.additional_properties.keys())
63
+
64
+ def __getitem__(self, key: str) -> Any:
65
+ return self.additional_properties[key]
66
+
67
+ def __setitem__(self, key: str, value: Any) -> None:
68
+ self.additional_properties[key] = value
69
+
70
+ def __delitem__(self, key: str) -> None:
71
+ del self.additional_properties[key]
72
+
73
+ def __contains__(self, key: str) -> bool:
74
+ return key in self.additional_properties
@@ -0,0 +1,135 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import TYPE_CHECKING, Any, TypeVar, cast
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ from ..types import UNSET, Unset
10
+
11
+ if TYPE_CHECKING:
12
+ from ..models.com_hellopublic_userapigateway_api_rest_options_option_greeks_type_0 import (
13
+ ComHellopublicUserapigatewayApiRestOptionsOptionGreeksType0,
14
+ )
15
+
16
+
17
+ T = TypeVar("T", bound="ComHellopublicUserapigatewayApiRestMarketdataQuoteOptionDetails")
18
+
19
+
20
+ @_attrs_define
21
+ class ComHellopublicUserapigatewayApiRestMarketdataQuoteOptionDetails:
22
+ """Option-specific details including Greeks, strike price, and mid price.
23
+
24
+ Attributes:
25
+ strike_price (str): The strike price for the option contract.
26
+ greeks (ComHellopublicUserapigatewayApiRestOptionsOptionGreeksType0 | None | Unset):
27
+ mid_price (None | str | Unset): The mid price (average of bid and ask) for the option contract.
28
+ Null if bid/ask data is not available.
29
+ """
30
+
31
+ strike_price: str
32
+ greeks: ComHellopublicUserapigatewayApiRestOptionsOptionGreeksType0 | None | Unset = UNSET
33
+ mid_price: None | str | Unset = UNSET
34
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
35
+
36
+ def to_dict(self) -> dict[str, Any]:
37
+ from ..models.com_hellopublic_userapigateway_api_rest_options_option_greeks_type_0 import (
38
+ ComHellopublicUserapigatewayApiRestOptionsOptionGreeksType0,
39
+ )
40
+
41
+ strike_price = self.strike_price
42
+
43
+ greeks: dict[str, Any] | None | Unset
44
+ if isinstance(self.greeks, Unset):
45
+ greeks = UNSET
46
+ elif isinstance(self.greeks, ComHellopublicUserapigatewayApiRestOptionsOptionGreeksType0):
47
+ greeks = self.greeks.to_dict()
48
+ else:
49
+ greeks = self.greeks
50
+
51
+ mid_price: None | str | Unset
52
+ if isinstance(self.mid_price, Unset):
53
+ mid_price = UNSET
54
+ else:
55
+ mid_price = self.mid_price
56
+
57
+ field_dict: dict[str, Any] = {}
58
+ field_dict.update(self.additional_properties)
59
+ field_dict.update(
60
+ {
61
+ "strikePrice": strike_price,
62
+ }
63
+ )
64
+ if greeks is not UNSET:
65
+ field_dict["greeks"] = greeks
66
+ if mid_price is not UNSET:
67
+ field_dict["midPrice"] = mid_price
68
+
69
+ return field_dict
70
+
71
+ @classmethod
72
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
73
+ from ..models.com_hellopublic_userapigateway_api_rest_options_option_greeks_type_0 import (
74
+ ComHellopublicUserapigatewayApiRestOptionsOptionGreeksType0,
75
+ )
76
+
77
+ d = dict(src_dict)
78
+ strike_price = d.pop("strikePrice")
79
+
80
+ def _parse_greeks(
81
+ data: object,
82
+ ) -> ComHellopublicUserapigatewayApiRestOptionsOptionGreeksType0 | None | Unset:
83
+ if data is None:
84
+ return data
85
+ if isinstance(data, Unset):
86
+ return data
87
+ try:
88
+ if not isinstance(data, dict):
89
+ raise TypeError()
90
+ componentsschemascom_hellopublic_userapigateway_api_rest_options_option_greeks_type_0 = ComHellopublicUserapigatewayApiRestOptionsOptionGreeksType0.from_dict(
91
+ data
92
+ )
93
+
94
+ return componentsschemascom_hellopublic_userapigateway_api_rest_options_option_greeks_type_0
95
+ except (TypeError, ValueError, AttributeError, KeyError):
96
+ pass
97
+ return cast(
98
+ ComHellopublicUserapigatewayApiRestOptionsOptionGreeksType0 | None | Unset, data
99
+ )
100
+
101
+ greeks = _parse_greeks(d.pop("greeks", UNSET))
102
+
103
+ def _parse_mid_price(data: object) -> None | str | Unset:
104
+ if data is None:
105
+ return data
106
+ if isinstance(data, Unset):
107
+ return data
108
+ return cast(None | str | Unset, data)
109
+
110
+ mid_price = _parse_mid_price(d.pop("midPrice", UNSET))
111
+
112
+ com_hellopublic_userapigateway_api_rest_marketdata_quote_option_details = cls(
113
+ strike_price=strike_price,
114
+ greeks=greeks,
115
+ mid_price=mid_price,
116
+ )
117
+
118
+ com_hellopublic_userapigateway_api_rest_marketdata_quote_option_details.additional_properties = d
119
+ return com_hellopublic_userapigateway_api_rest_marketdata_quote_option_details
120
+
121
+ @property
122
+ def additional_keys(self) -> list[str]:
123
+ return list(self.additional_properties.keys())
124
+
125
+ def __getitem__(self, key: str) -> Any:
126
+ return self.additional_properties[key]
127
+
128
+ def __setitem__(self, key: str, value: Any) -> None:
129
+ self.additional_properties[key] = value
130
+
131
+ def __delitem__(self, key: str) -> None:
132
+ del self.additional_properties[key]
133
+
134
+ def __contains__(self, key: str) -> bool:
135
+ return key in self.additional_properties