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,113 @@
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="ComHellopublicUserapigatewayApiRestOptionsGreekResponse")
18
+
19
+
20
+ @_attrs_define
21
+ class ComHellopublicUserapigatewayApiRestOptionsGreekResponse:
22
+ """
23
+ Attributes:
24
+ symbol (str): The OSI-normalized format of the option symbol
25
+ greeks (ComHellopublicUserapigatewayApiRestOptionsOptionGreeksType0 | None | Unset):
26
+ """
27
+
28
+ symbol: str
29
+ greeks: ComHellopublicUserapigatewayApiRestOptionsOptionGreeksType0 | None | Unset = UNSET
30
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
31
+
32
+ def to_dict(self) -> dict[str, Any]:
33
+ from ..models.com_hellopublic_userapigateway_api_rest_options_option_greeks_type_0 import (
34
+ ComHellopublicUserapigatewayApiRestOptionsOptionGreeksType0,
35
+ )
36
+
37
+ symbol = self.symbol
38
+
39
+ greeks: dict[str, Any] | None | Unset
40
+ if isinstance(self.greeks, Unset):
41
+ greeks = UNSET
42
+ elif isinstance(self.greeks, ComHellopublicUserapigatewayApiRestOptionsOptionGreeksType0):
43
+ greeks = self.greeks.to_dict()
44
+ else:
45
+ greeks = self.greeks
46
+
47
+ field_dict: dict[str, Any] = {}
48
+ field_dict.update(self.additional_properties)
49
+ field_dict.update(
50
+ {
51
+ "symbol": symbol,
52
+ }
53
+ )
54
+ if greeks is not UNSET:
55
+ field_dict["greeks"] = greeks
56
+
57
+ return field_dict
58
+
59
+ @classmethod
60
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
61
+ from ..models.com_hellopublic_userapigateway_api_rest_options_option_greeks_type_0 import (
62
+ ComHellopublicUserapigatewayApiRestOptionsOptionGreeksType0,
63
+ )
64
+
65
+ d = dict(src_dict)
66
+ symbol = d.pop("symbol")
67
+
68
+ def _parse_greeks(
69
+ data: object,
70
+ ) -> ComHellopublicUserapigatewayApiRestOptionsOptionGreeksType0 | None | Unset:
71
+ if data is None:
72
+ return data
73
+ if isinstance(data, Unset):
74
+ return data
75
+ try:
76
+ if not isinstance(data, dict):
77
+ raise TypeError()
78
+ componentsschemascom_hellopublic_userapigateway_api_rest_options_option_greeks_type_0 = ComHellopublicUserapigatewayApiRestOptionsOptionGreeksType0.from_dict(
79
+ data
80
+ )
81
+
82
+ return componentsschemascom_hellopublic_userapigateway_api_rest_options_option_greeks_type_0
83
+ except (TypeError, ValueError, AttributeError, KeyError):
84
+ pass
85
+ return cast(
86
+ ComHellopublicUserapigatewayApiRestOptionsOptionGreeksType0 | None | Unset, data
87
+ )
88
+
89
+ greeks = _parse_greeks(d.pop("greeks", UNSET))
90
+
91
+ com_hellopublic_userapigateway_api_rest_options_greek_response = cls(
92
+ symbol=symbol,
93
+ greeks=greeks,
94
+ )
95
+
96
+ com_hellopublic_userapigateway_api_rest_options_greek_response.additional_properties = d
97
+ return com_hellopublic_userapigateway_api_rest_options_greek_response
98
+
99
+ @property
100
+ def additional_keys(self) -> list[str]:
101
+ return list(self.additional_properties.keys())
102
+
103
+ def __getitem__(self, key: str) -> Any:
104
+ return self.additional_properties[key]
105
+
106
+ def __setitem__(self, key: str, value: Any) -> None:
107
+ self.additional_properties[key] = value
108
+
109
+ def __delitem__(self, key: str) -> None:
110
+ del self.additional_properties[key]
111
+
112
+ def __contains__(self, key: str) -> bool:
113
+ return key in self.additional_properties
@@ -0,0 +1,86 @@
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_options_greek_response import (
13
+ ComHellopublicUserapigatewayApiRestOptionsGreekResponse,
14
+ )
15
+
16
+
17
+ T = TypeVar("T", bound="ComHellopublicUserapigatewayApiRestOptionsGreeksResponse")
18
+
19
+
20
+ @_attrs_define
21
+ class ComHellopublicUserapigatewayApiRestOptionsGreeksResponse:
22
+ """
23
+ Attributes:
24
+ greeks (list[ComHellopublicUserapigatewayApiRestOptionsGreekResponse] | Unset): List of greeks for each symbol
25
+ in the request
26
+ """
27
+
28
+ greeks: list[ComHellopublicUserapigatewayApiRestOptionsGreekResponse] | Unset = UNSET
29
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
30
+
31
+ def to_dict(self) -> dict[str, Any]:
32
+ greeks: list[dict[str, Any]] | Unset = UNSET
33
+ if not isinstance(self.greeks, Unset):
34
+ greeks = []
35
+ for greeks_item_data in self.greeks:
36
+ greeks_item = greeks_item_data.to_dict()
37
+ greeks.append(greeks_item)
38
+
39
+ field_dict: dict[str, Any] = {}
40
+ field_dict.update(self.additional_properties)
41
+ field_dict.update({})
42
+ if greeks is not UNSET:
43
+ field_dict["greeks"] = greeks
44
+
45
+ return field_dict
46
+
47
+ @classmethod
48
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
49
+ from ..models.com_hellopublic_userapigateway_api_rest_options_greek_response import (
50
+ ComHellopublicUserapigatewayApiRestOptionsGreekResponse,
51
+ )
52
+
53
+ d = dict(src_dict)
54
+ _greeks = d.pop("greeks", UNSET)
55
+ greeks: list[ComHellopublicUserapigatewayApiRestOptionsGreekResponse] | Unset = UNSET
56
+ if _greeks is not UNSET:
57
+ greeks = []
58
+ for greeks_item_data in _greeks:
59
+ greeks_item = ComHellopublicUserapigatewayApiRestOptionsGreekResponse.from_dict(
60
+ greeks_item_data
61
+ )
62
+
63
+ greeks.append(greeks_item)
64
+
65
+ com_hellopublic_userapigateway_api_rest_options_greeks_response = cls(
66
+ greeks=greeks,
67
+ )
68
+
69
+ com_hellopublic_userapigateway_api_rest_options_greeks_response.additional_properties = d
70
+ return com_hellopublic_userapigateway_api_rest_options_greeks_response
71
+
72
+ @property
73
+ def additional_keys(self) -> list[str]:
74
+ return list(self.additional_properties.keys())
75
+
76
+ def __getitem__(self, key: str) -> Any:
77
+ return self.additional_properties[key]
78
+
79
+ def __setitem__(self, key: str, value: Any) -> None:
80
+ self.additional_properties[key] = value
81
+
82
+ def __delitem__(self, key: str) -> None:
83
+ del self.additional_properties[key]
84
+
85
+ def __contains__(self, key: str) -> bool:
86
+ return key in self.additional_properties
@@ -0,0 +1,117 @@
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="ComHellopublicUserapigatewayApiRestOptionsOptionGreeksType0")
12
+
13
+
14
+ @_attrs_define
15
+ class ComHellopublicUserapigatewayApiRestOptionsOptionGreeksType0:
16
+ """
17
+ Attributes:
18
+ delta (str | Unset): Delta is the theoretical estimate of how much an option's value may change given a $1 move
19
+ UP or DOWN in the underlying security.
20
+ The Delta values range from -1 to +1, with 0 representing an option where the premium barely moves relative to
21
+ price changes in the underlying stock.
22
+ gamma (str | Unset): Gamma represents the rate of change between an option's Delta and the underlying asset's
23
+ price.
24
+ Higher Gamma values indicate that the Delta could change dramatically with even very small price changes in the
25
+ underlying stock or fund.
26
+ theta (str | Unset): Theta represents the rate of change between the option price and time, or time
27
+ sensitivity—sometimes known as an option's time decay.
28
+ Theta indicates the amount an option's price would decrease as the time to expiration decreases, all else equal.
29
+ vega (str | Unset): Vega measures the amount of increase or decrease in an option premium based on a 1% change
30
+ in implied volatility.
31
+ rho (str | Unset): Rho represents the rate of change between an option's value and a 1% change in the interest
32
+ rate. This measures sensitivity to the interest rate.
33
+ implied_volatility (str | Unset): Implied volatility (IV) is a theoretical forecast of how volatile an
34
+ underlying stock is expected to be in the future.
35
+ """
36
+
37
+ delta: str | Unset = UNSET
38
+ gamma: str | Unset = UNSET
39
+ theta: str | Unset = UNSET
40
+ vega: str | Unset = UNSET
41
+ rho: str | Unset = UNSET
42
+ implied_volatility: str | Unset = UNSET
43
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
44
+
45
+ def to_dict(self) -> dict[str, Any]:
46
+ delta = self.delta
47
+
48
+ gamma = self.gamma
49
+
50
+ theta = self.theta
51
+
52
+ vega = self.vega
53
+
54
+ rho = self.rho
55
+
56
+ implied_volatility = self.implied_volatility
57
+
58
+ field_dict: dict[str, Any] = {}
59
+ field_dict.update(self.additional_properties)
60
+ field_dict.update({})
61
+ if delta is not UNSET:
62
+ field_dict["delta"] = delta
63
+ if gamma is not UNSET:
64
+ field_dict["gamma"] = gamma
65
+ if theta is not UNSET:
66
+ field_dict["theta"] = theta
67
+ if vega is not UNSET:
68
+ field_dict["vega"] = vega
69
+ if rho is not UNSET:
70
+ field_dict["rho"] = rho
71
+ if implied_volatility is not UNSET:
72
+ field_dict["impliedVolatility"] = implied_volatility
73
+
74
+ return field_dict
75
+
76
+ @classmethod
77
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
78
+ d = dict(src_dict)
79
+ delta = d.pop("delta", UNSET)
80
+
81
+ gamma = d.pop("gamma", UNSET)
82
+
83
+ theta = d.pop("theta", UNSET)
84
+
85
+ vega = d.pop("vega", UNSET)
86
+
87
+ rho = d.pop("rho", UNSET)
88
+
89
+ implied_volatility = d.pop("impliedVolatility", UNSET)
90
+
91
+ com_hellopublic_userapigateway_api_rest_options_option_greeks_type_0 = cls(
92
+ delta=delta,
93
+ gamma=gamma,
94
+ theta=theta,
95
+ vega=vega,
96
+ rho=rho,
97
+ implied_volatility=implied_volatility,
98
+ )
99
+
100
+ com_hellopublic_userapigateway_api_rest_options_option_greeks_type_0.additional_properties = d
101
+ return com_hellopublic_userapigateway_api_rest_options_option_greeks_type_0
102
+
103
+ @property
104
+ def additional_keys(self) -> list[str]:
105
+ return list(self.additional_properties.keys())
106
+
107
+ def __getitem__(self, key: str) -> Any:
108
+ return self.additional_properties[key]
109
+
110
+ def __setitem__(self, key: str, value: Any) -> None:
111
+ self.additional_properties[key] = value
112
+
113
+ def __delitem__(self, key: str) -> None:
114
+ del self.additional_properties[key]
115
+
116
+ def __contains__(self, key: str) -> bool:
117
+ return key in self.additional_properties
@@ -0,0 +1,139 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import TYPE_CHECKING, Any, TypeVar
5
+ from uuid import UUID
6
+
7
+ from attrs import define as _attrs_define
8
+ from attrs import field as _attrs_field
9
+
10
+ from ..models.com_hellopublic_userapigateway_api_rest_order_api_cancel_replace_order_request_order_type import (
11
+ ComHellopublicUserapigatewayApiRestOrderApiCancelReplaceOrderRequestOrderType,
12
+ )
13
+ from ..types import UNSET, Unset
14
+
15
+ if TYPE_CHECKING:
16
+ from ..models.com_hellopublic_userapigateway_api_rest_order_order_expiration import (
17
+ ComHellopublicUserapigatewayApiRestOrderOrderExpiration,
18
+ )
19
+
20
+
21
+ T = TypeVar("T", bound="ComHellopublicUserapigatewayApiRestOrderApiCancelReplaceOrderRequest")
22
+
23
+
24
+ @_attrs_define
25
+ class ComHellopublicUserapigatewayApiRestOrderApiCancelReplaceOrderRequest:
26
+ """Used for replacing orders placed via the UserApiGatewayService or other service
27
+ Replaces should not be placed in parallel as ordering is not guaranteed for individual HTTP calls
28
+
29
+ Attributes:
30
+ order_id (UUID): This value identifies the order to be replaced; if reused on the same account, the operation is
31
+ idempotent.
32
+ If the order is re-submitted due to a read timeout, do not modify any properties. If the original request
33
+ succeeded, altering fields will have no effect.
34
+ request_id (UUID): Id of the new order in UUID-format conforming to RFC 4122 (standard 8-4-4-4-12 format, e.g.,
35
+ 0d2abd8d-3625-4c83-a806-98abf35567cc).
36
+ The new orderId must be globally unique over time.
37
+ order_type (ComHellopublicUserapigatewayApiRestOrderApiCancelReplaceOrderRequestOrderType): The Type of order
38
+ expiration (ComHellopublicUserapigatewayApiRestOrderOrderExpiration):
39
+ quantity (str | Unset): The order quantity. Used when buying/selling whole shares and when selling fractional.
40
+ limit_price (str | Unset): The limit price. Used when orderType = LIMIT or orderType = STOP_LIMIT
41
+ stop_price (str | Unset): The stop price. Used when orderType = STOP or orderType = STOP_LIMIT
42
+ """
43
+
44
+ order_id: UUID
45
+ request_id: UUID
46
+ order_type: ComHellopublicUserapigatewayApiRestOrderApiCancelReplaceOrderRequestOrderType
47
+ expiration: ComHellopublicUserapigatewayApiRestOrderOrderExpiration
48
+ quantity: str | Unset = UNSET
49
+ limit_price: str | Unset = UNSET
50
+ stop_price: str | Unset = UNSET
51
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
52
+
53
+ def to_dict(self) -> dict[str, Any]:
54
+ order_id = str(self.order_id)
55
+
56
+ request_id = str(self.request_id)
57
+
58
+ order_type = self.order_type.value
59
+
60
+ expiration = self.expiration.to_dict()
61
+
62
+ quantity = self.quantity
63
+
64
+ limit_price = self.limit_price
65
+
66
+ stop_price = self.stop_price
67
+
68
+ field_dict: dict[str, Any] = {}
69
+ field_dict.update(self.additional_properties)
70
+ field_dict.update(
71
+ {
72
+ "orderId": order_id,
73
+ "requestId": request_id,
74
+ "orderType": order_type,
75
+ "expiration": expiration,
76
+ }
77
+ )
78
+ if quantity is not UNSET:
79
+ field_dict["quantity"] = quantity
80
+ if limit_price is not UNSET:
81
+ field_dict["limitPrice"] = limit_price
82
+ if stop_price is not UNSET:
83
+ field_dict["stopPrice"] = stop_price
84
+
85
+ return field_dict
86
+
87
+ @classmethod
88
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
89
+ from ..models.com_hellopublic_userapigateway_api_rest_order_order_expiration import (
90
+ ComHellopublicUserapigatewayApiRestOrderOrderExpiration,
91
+ )
92
+
93
+ d = dict(src_dict)
94
+ order_id = UUID(d.pop("orderId"))
95
+
96
+ request_id = UUID(d.pop("requestId"))
97
+
98
+ order_type = ComHellopublicUserapigatewayApiRestOrderApiCancelReplaceOrderRequestOrderType(
99
+ d.pop("orderType")
100
+ )
101
+
102
+ expiration = ComHellopublicUserapigatewayApiRestOrderOrderExpiration.from_dict(
103
+ d.pop("expiration")
104
+ )
105
+
106
+ quantity = d.pop("quantity", UNSET)
107
+
108
+ limit_price = d.pop("limitPrice", UNSET)
109
+
110
+ stop_price = d.pop("stopPrice", UNSET)
111
+
112
+ com_hellopublic_userapigateway_api_rest_order_api_cancel_replace_order_request = cls(
113
+ order_id=order_id,
114
+ request_id=request_id,
115
+ order_type=order_type,
116
+ expiration=expiration,
117
+ quantity=quantity,
118
+ limit_price=limit_price,
119
+ stop_price=stop_price,
120
+ )
121
+
122
+ com_hellopublic_userapigateway_api_rest_order_api_cancel_replace_order_request.additional_properties = d
123
+ return com_hellopublic_userapigateway_api_rest_order_api_cancel_replace_order_request
124
+
125
+ @property
126
+ def additional_keys(self) -> list[str]:
127
+ return list(self.additional_properties.keys())
128
+
129
+ def __getitem__(self, key: str) -> Any:
130
+ return self.additional_properties[key]
131
+
132
+ def __setitem__(self, key: str, value: Any) -> None:
133
+ self.additional_properties[key] = value
134
+
135
+ def __delitem__(self, key: str) -> None:
136
+ del self.additional_properties[key]
137
+
138
+ def __contains__(self, key: str) -> bool:
139
+ return key in self.additional_properties
@@ -0,0 +1,11 @@
1
+ from enum import Enum
2
+
3
+
4
+ class ComHellopublicUserapigatewayApiRestOrderApiCancelReplaceOrderRequestOrderType(str, Enum):
5
+ LIMIT = "LIMIT"
6
+ MARKET = "MARKET"
7
+ STOP = "STOP"
8
+ STOP_LIMIT = "STOP_LIMIT"
9
+
10
+ def __str__(self) -> str:
11
+ return str(self.value)