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.
- publicdotcom_cli/__init__.py +3 -0
- publicdotcom_cli/__main__.py +5 -0
- publicdotcom_cli/_generated/__init__.py +8 -0
- publicdotcom_cli/_generated/api/__init__.py +1 -0
- publicdotcom_cli/_generated/api/account_details/__init__.py +1 -0
- publicdotcom_cli/_generated/api/account_details/get_account_portfolio_v2.py +182 -0
- publicdotcom_cli/_generated/api/account_details/get_history.py +250 -0
- publicdotcom_cli/_generated/api/authorization/__init__.py +1 -0
- publicdotcom_cli/_generated/api/authorization/create_personal_access_token.py +230 -0
- publicdotcom_cli/_generated/api/instrument_details/__init__.py +1 -0
- publicdotcom_cli/_generated/api/instrument_details/get_all_instruments.py +303 -0
- publicdotcom_cli/_generated/api/instrument_details/get_instrument.py +170 -0
- publicdotcom_cli/_generated/api/list_accounts/__init__.py +1 -0
- publicdotcom_cli/_generated/api/list_accounts/get_accounts.py +172 -0
- publicdotcom_cli/_generated/api/market_data/__init__.py +1 -0
- publicdotcom_cli/_generated/api/market_data/get_option_chain.py +200 -0
- publicdotcom_cli/_generated/api/market_data/get_option_expirations.py +210 -0
- publicdotcom_cli/_generated/api/market_data/get_quotes.py +200 -0
- publicdotcom_cli/_generated/api/option_details/__init__.py +1 -0
- publicdotcom_cli/_generated/api/option_details/get_option_greeks.py +194 -0
- publicdotcom_cli/_generated/api/order_placement/__init__.py +1 -0
- publicdotcom_cli/_generated/api/order_placement/cancel_order.py +123 -0
- publicdotcom_cli/_generated/api/order_placement/get_order.py +206 -0
- publicdotcom_cli/_generated/api/order_placement/place_multileg_order.py +214 -0
- publicdotcom_cli/_generated/api/order_placement/place_order.py +222 -0
- publicdotcom_cli/_generated/api/order_placement/preflight_multi_leg.py +276 -0
- publicdotcom_cli/_generated/api/order_placement/preflight_single_leg.py +220 -0
- publicdotcom_cli/_generated/api/order_placement/replace_order.py +222 -0
- publicdotcom_cli/_generated/client.py +272 -0
- publicdotcom_cli/_generated/errors.py +16 -0
- publicdotcom_cli/_generated/models/__init__.py +417 -0
- publicdotcom_cli/_generated/models/com_hellopublic_holdingsystem_core_types_option_price_increment.py +71 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapiauthservice_api_personal_create_access_token_request.py +84 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapiauthservice_api_personal_create_access_token_response.py +61 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapiauthservice_domain_error_error_body.py +70 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_account_account_settings.py +161 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_account_account_settings_account_type.py +14 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_account_account_settings_brokerage_account_type.py +9 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_account_account_settings_options_level.py +12 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_account_account_settings_response.py +85 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_account_account_settings_trade_permissions.py +11 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_history_gateway_history_response_page.py +195 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_history_gateway_history_transaction.py +263 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_history_gateway_history_transaction_direction.py +9 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_history_gateway_history_transaction_security_type.py +13 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_history_gateway_history_transaction_side.py +9 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_history_gateway_history_transaction_sub_type.py +19 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_history_gateway_history_transaction_type.py +10 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_option_chain_request.py +85 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_option_chain_response.py +115 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_option_expirations_request.py +75 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_option_expirations_response.py +81 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_quote.py +272 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_quote_outcome.py +9 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_quote_request.py +84 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_quote_response.py +87 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_marketdata_quote_one_day_change.py +74 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_marketdata_quote_option_details.py +135 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_options_greek_response.py +113 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_options_greeks_response.py +86 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_options_option_greeks_type_0.py +117 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_cancel_replace_order_request.py +139 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_cancel_replace_order_request_order_type.py +11 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_instrument_dto.py +265 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_instrument_dto_fractional_trading.py +10 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_instrument_dto_option_spread_trading.py +10 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_instrument_dto_option_trading.py +10 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_instrument_dto_shorting_availability.py +10 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_instrument_dto_trading.py +10 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_instrument_response.py +87 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_multileg_order_request.py +141 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_multileg_order_request_type.py +11 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_order_request.py +231 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_order_request_equity_market_session.py +9 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_order_request_open_close_indicator.py +9 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_order_request_order_side.py +9 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_order_request_order_type.py +11 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_order_result.py +69 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_leg_instrument.py +73 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_leg_instrument_type.py +9 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_order.py +334 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_order_instrument.py +73 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_order_instrument_type.py +15 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_order_leg.py +125 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_order_leg_open_close_indicator.py +9 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_order_leg_side.py +9 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_order_open_close_indicator.py +9 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_order_side.py +9 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_order_status.py +17 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_order_type.py +11 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_short_selling.py +127 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_short_selling_availability.py +10 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_gateway_short_selling_uptick_rule.py +9 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_instrumentdetails_api_instrument_details.py +67 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_instrumentdetails_api_instrument_details_bond.py +74 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_instrumentdetails_api_instrument_details_crypto.py +92 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_order_expiration.py +87 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_order_expiration_time_in_force.py +9 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_portfolio_gain_type_0.py +88 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_portfolio_gateway_buying_power.py +77 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_portfolio_gateway_cost_basis_type_0.py +167 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_portfolio_gateway_portfolio_account_v2.py +233 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_portfolio_gateway_portfolio_account_v2_account_type.py +14 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_portfolio_gateway_portfolio_equity_v2.py +100 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_portfolio_gateway_portfolio_equity_v2_type.py +14 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_portfolio_gateway_portfolio_instrument.py +93 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_portfolio_gateway_portfolio_instrument_type.py +14 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_portfolio_gateway_portfolio_position.py +352 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_portfolio_gateway_strategy.py +276 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_portfolio_gateway_strategy_leg.py +78 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_portfolio_price_type_0.py +79 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_gateway_margin_impact.py +70 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_gateway_margin_requirement.py +70 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_gateway_option_details.py +91 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_gateway_option_details_type.py +9 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_gateway_option_rebate.py +79 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_gateway_price_increment.py +80 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_gateway_regulatory_fees.py +118 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_preflight_leg_response.py +167 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_preflight_leg_response_open_close_indicator.py +9 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_preflight_leg_response_side.py +9 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_preflight_multi_leg_request.py +148 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_preflight_multi_leg_request_order_type.py +11 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_preflight_multi_leg_response.py +313 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_preflight_single_leg_request.py +225 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_preflight_single_leg_request_equity_market_session.py +11 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_preflight_single_leg_request_open_close_indicator.py +11 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_preflight_single_leg_request_order_side.py +9 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_preflight_single_leg_request_order_type.py +11 -0
- publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_preflight_preflight_single_leg_response.py +410 -0
- publicdotcom_cli/_generated/models/get_all_instruments_fractional_trading_filter_item.py +10 -0
- publicdotcom_cli/_generated/models/get_all_instruments_option_spread_trading_filter_item.py +10 -0
- publicdotcom_cli/_generated/models/get_all_instruments_option_trading_filter_item.py +10 -0
- publicdotcom_cli/_generated/models/get_all_instruments_trading_filter_item.py +10 -0
- publicdotcom_cli/_generated/models/get_all_instruments_type_filter_item.py +15 -0
- publicdotcom_cli/_generated/models/get_instrument_type.py +15 -0
- publicdotcom_cli/_generated/types.py +54 -0
- publicdotcom_cli/cli.py +761 -0
- publicdotcom_cli/client.py +83 -0
- publicdotcom_cli/config.py +222 -0
- publicdotcom_cli/output.py +77 -0
- publicdotcom_cli/payloads.py +36 -0
- publicdotcom_cli-1.0.0.dist-info/METADATA +256 -0
- publicdotcom_cli-1.0.0.dist-info/RECORD +146 -0
- publicdotcom_cli-1.0.0.dist-info/WHEEL +4 -0
- publicdotcom_cli-1.0.0.dist-info/entry_points.txt +2 -0
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import datetime
|
|
4
|
+
from collections.abc import Mapping
|
|
5
|
+
from typing import 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_history_gateway_history_transaction_direction import (
|
|
12
|
+
ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransactionDirection,
|
|
13
|
+
)
|
|
14
|
+
from ..models.com_hellopublic_userapigateway_api_rest_history_gateway_history_transaction_security_type import (
|
|
15
|
+
ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransactionSecurityType,
|
|
16
|
+
)
|
|
17
|
+
from ..models.com_hellopublic_userapigateway_api_rest_history_gateway_history_transaction_side import (
|
|
18
|
+
ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransactionSide,
|
|
19
|
+
)
|
|
20
|
+
from ..models.com_hellopublic_userapigateway_api_rest_history_gateway_history_transaction_sub_type import (
|
|
21
|
+
ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransactionSubType,
|
|
22
|
+
)
|
|
23
|
+
from ..models.com_hellopublic_userapigateway_api_rest_history_gateway_history_transaction_type import (
|
|
24
|
+
ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransactionType,
|
|
25
|
+
)
|
|
26
|
+
from ..types import UNSET, Unset
|
|
27
|
+
|
|
28
|
+
T = TypeVar("T", bound="ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransaction")
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
@_attrs_define
|
|
32
|
+
class ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransaction:
|
|
33
|
+
"""Represents a transaction in the history of an account
|
|
34
|
+
|
|
35
|
+
Attributes:
|
|
36
|
+
timestamp (datetime.datetime | Unset): The timestamp when the transaction happened
|
|
37
|
+
id (str | Unset): The id of the transaction
|
|
38
|
+
type_ (ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransactionType | Unset): The type of the
|
|
39
|
+
transaction
|
|
40
|
+
sub_type (ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransactionSubType | Unset): The subtype of
|
|
41
|
+
the transaction
|
|
42
|
+
account_number (str | Unset): The account the transaction happened on
|
|
43
|
+
symbol (str | Unset): The symbol of the transaction
|
|
44
|
+
security_type (ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransactionSecurityType | Unset): The
|
|
45
|
+
security type of the transaction
|
|
46
|
+
side (ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransactionSide | Unset): The side of the
|
|
47
|
+
transaction - relevant for trades
|
|
48
|
+
description (str | Unset): The description of the transaction
|
|
49
|
+
net_amount (str | Unset): The net amount of the transaction
|
|
50
|
+
principal_amount (str | Unset): The principal amount of the transaction
|
|
51
|
+
quantity (str | Unset): The quantity of the transaction
|
|
52
|
+
direction (ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransactionDirection | Unset): The direction
|
|
53
|
+
of the transaction
|
|
54
|
+
fees (str | Unset): The fees of the transaction
|
|
55
|
+
"""
|
|
56
|
+
|
|
57
|
+
timestamp: datetime.datetime | Unset = UNSET
|
|
58
|
+
id: str | Unset = UNSET
|
|
59
|
+
type_: ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransactionType | Unset = UNSET
|
|
60
|
+
sub_type: ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransactionSubType | Unset = (
|
|
61
|
+
UNSET
|
|
62
|
+
)
|
|
63
|
+
account_number: str | Unset = UNSET
|
|
64
|
+
symbol: str | Unset = UNSET
|
|
65
|
+
security_type: (
|
|
66
|
+
ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransactionSecurityType | Unset
|
|
67
|
+
) = UNSET
|
|
68
|
+
side: ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransactionSide | Unset = UNSET
|
|
69
|
+
description: str | Unset = UNSET
|
|
70
|
+
net_amount: str | Unset = UNSET
|
|
71
|
+
principal_amount: str | Unset = UNSET
|
|
72
|
+
quantity: str | Unset = UNSET
|
|
73
|
+
direction: (
|
|
74
|
+
ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransactionDirection | Unset
|
|
75
|
+
) = UNSET
|
|
76
|
+
fees: str | Unset = UNSET
|
|
77
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
78
|
+
|
|
79
|
+
def to_dict(self) -> dict[str, Any]:
|
|
80
|
+
timestamp: str | Unset = UNSET
|
|
81
|
+
if not isinstance(self.timestamp, Unset):
|
|
82
|
+
timestamp = self.timestamp.isoformat()
|
|
83
|
+
|
|
84
|
+
id = self.id
|
|
85
|
+
|
|
86
|
+
type_: str | Unset = UNSET
|
|
87
|
+
if not isinstance(self.type_, Unset):
|
|
88
|
+
type_ = self.type_.value
|
|
89
|
+
|
|
90
|
+
sub_type: str | Unset = UNSET
|
|
91
|
+
if not isinstance(self.sub_type, Unset):
|
|
92
|
+
sub_type = self.sub_type.value
|
|
93
|
+
|
|
94
|
+
account_number = self.account_number
|
|
95
|
+
|
|
96
|
+
symbol = self.symbol
|
|
97
|
+
|
|
98
|
+
security_type: str | Unset = UNSET
|
|
99
|
+
if not isinstance(self.security_type, Unset):
|
|
100
|
+
security_type = self.security_type.value
|
|
101
|
+
|
|
102
|
+
side: str | Unset = UNSET
|
|
103
|
+
if not isinstance(self.side, Unset):
|
|
104
|
+
side = self.side.value
|
|
105
|
+
|
|
106
|
+
description = self.description
|
|
107
|
+
|
|
108
|
+
net_amount = self.net_amount
|
|
109
|
+
|
|
110
|
+
principal_amount = self.principal_amount
|
|
111
|
+
|
|
112
|
+
quantity = self.quantity
|
|
113
|
+
|
|
114
|
+
direction: str | Unset = UNSET
|
|
115
|
+
if not isinstance(self.direction, Unset):
|
|
116
|
+
direction = self.direction.value
|
|
117
|
+
|
|
118
|
+
fees = self.fees
|
|
119
|
+
|
|
120
|
+
field_dict: dict[str, Any] = {}
|
|
121
|
+
field_dict.update(self.additional_properties)
|
|
122
|
+
field_dict.update({})
|
|
123
|
+
if timestamp is not UNSET:
|
|
124
|
+
field_dict["timestamp"] = timestamp
|
|
125
|
+
if id is not UNSET:
|
|
126
|
+
field_dict["id"] = id
|
|
127
|
+
if type_ is not UNSET:
|
|
128
|
+
field_dict["type"] = type_
|
|
129
|
+
if sub_type is not UNSET:
|
|
130
|
+
field_dict["subType"] = sub_type
|
|
131
|
+
if account_number is not UNSET:
|
|
132
|
+
field_dict["accountNumber"] = account_number
|
|
133
|
+
if symbol is not UNSET:
|
|
134
|
+
field_dict["symbol"] = symbol
|
|
135
|
+
if security_type is not UNSET:
|
|
136
|
+
field_dict["securityType"] = security_type
|
|
137
|
+
if side is not UNSET:
|
|
138
|
+
field_dict["side"] = side
|
|
139
|
+
if description is not UNSET:
|
|
140
|
+
field_dict["description"] = description
|
|
141
|
+
if net_amount is not UNSET:
|
|
142
|
+
field_dict["netAmount"] = net_amount
|
|
143
|
+
if principal_amount is not UNSET:
|
|
144
|
+
field_dict["principalAmount"] = principal_amount
|
|
145
|
+
if quantity is not UNSET:
|
|
146
|
+
field_dict["quantity"] = quantity
|
|
147
|
+
if direction is not UNSET:
|
|
148
|
+
field_dict["direction"] = direction
|
|
149
|
+
if fees is not UNSET:
|
|
150
|
+
field_dict["fees"] = fees
|
|
151
|
+
|
|
152
|
+
return field_dict
|
|
153
|
+
|
|
154
|
+
@classmethod
|
|
155
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
156
|
+
d = dict(src_dict)
|
|
157
|
+
_timestamp = d.pop("timestamp", UNSET)
|
|
158
|
+
timestamp: datetime.datetime | Unset
|
|
159
|
+
if isinstance(_timestamp, Unset):
|
|
160
|
+
timestamp = UNSET
|
|
161
|
+
else:
|
|
162
|
+
timestamp = isoparse(_timestamp)
|
|
163
|
+
|
|
164
|
+
id = d.pop("id", UNSET)
|
|
165
|
+
|
|
166
|
+
_type_ = d.pop("type", UNSET)
|
|
167
|
+
type_: ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransactionType | Unset
|
|
168
|
+
if isinstance(_type_, Unset):
|
|
169
|
+
type_ = UNSET
|
|
170
|
+
else:
|
|
171
|
+
type_ = ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransactionType(_type_)
|
|
172
|
+
|
|
173
|
+
_sub_type = d.pop("subType", UNSET)
|
|
174
|
+
sub_type: ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransactionSubType | Unset
|
|
175
|
+
if isinstance(_sub_type, Unset):
|
|
176
|
+
sub_type = UNSET
|
|
177
|
+
else:
|
|
178
|
+
sub_type = ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransactionSubType(
|
|
179
|
+
_sub_type
|
|
180
|
+
)
|
|
181
|
+
|
|
182
|
+
account_number = d.pop("accountNumber", UNSET)
|
|
183
|
+
|
|
184
|
+
symbol = d.pop("symbol", UNSET)
|
|
185
|
+
|
|
186
|
+
_security_type = d.pop("securityType", UNSET)
|
|
187
|
+
security_type: (
|
|
188
|
+
ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransactionSecurityType | Unset
|
|
189
|
+
)
|
|
190
|
+
if isinstance(_security_type, Unset):
|
|
191
|
+
security_type = UNSET
|
|
192
|
+
else:
|
|
193
|
+
security_type = (
|
|
194
|
+
ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransactionSecurityType(
|
|
195
|
+
_security_type
|
|
196
|
+
)
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
_side = d.pop("side", UNSET)
|
|
200
|
+
side: ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransactionSide | Unset
|
|
201
|
+
if isinstance(_side, Unset):
|
|
202
|
+
side = UNSET
|
|
203
|
+
else:
|
|
204
|
+
side = ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransactionSide(_side)
|
|
205
|
+
|
|
206
|
+
description = d.pop("description", UNSET)
|
|
207
|
+
|
|
208
|
+
net_amount = d.pop("netAmount", UNSET)
|
|
209
|
+
|
|
210
|
+
principal_amount = d.pop("principalAmount", UNSET)
|
|
211
|
+
|
|
212
|
+
quantity = d.pop("quantity", UNSET)
|
|
213
|
+
|
|
214
|
+
_direction = d.pop("direction", UNSET)
|
|
215
|
+
direction: (
|
|
216
|
+
ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransactionDirection | Unset
|
|
217
|
+
)
|
|
218
|
+
if isinstance(_direction, Unset):
|
|
219
|
+
direction = UNSET
|
|
220
|
+
else:
|
|
221
|
+
direction = (
|
|
222
|
+
ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransactionDirection(
|
|
223
|
+
_direction
|
|
224
|
+
)
|
|
225
|
+
)
|
|
226
|
+
|
|
227
|
+
fees = d.pop("fees", UNSET)
|
|
228
|
+
|
|
229
|
+
com_hellopublic_userapigateway_api_rest_history_gateway_history_transaction = cls(
|
|
230
|
+
timestamp=timestamp,
|
|
231
|
+
id=id,
|
|
232
|
+
type_=type_,
|
|
233
|
+
sub_type=sub_type,
|
|
234
|
+
account_number=account_number,
|
|
235
|
+
symbol=symbol,
|
|
236
|
+
security_type=security_type,
|
|
237
|
+
side=side,
|
|
238
|
+
description=description,
|
|
239
|
+
net_amount=net_amount,
|
|
240
|
+
principal_amount=principal_amount,
|
|
241
|
+
quantity=quantity,
|
|
242
|
+
direction=direction,
|
|
243
|
+
fees=fees,
|
|
244
|
+
)
|
|
245
|
+
|
|
246
|
+
com_hellopublic_userapigateway_api_rest_history_gateway_history_transaction.additional_properties = d
|
|
247
|
+
return com_hellopublic_userapigateway_api_rest_history_gateway_history_transaction
|
|
248
|
+
|
|
249
|
+
@property
|
|
250
|
+
def additional_keys(self) -> list[str]:
|
|
251
|
+
return list(self.additional_properties.keys())
|
|
252
|
+
|
|
253
|
+
def __getitem__(self, key: str) -> Any:
|
|
254
|
+
return self.additional_properties[key]
|
|
255
|
+
|
|
256
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
257
|
+
self.additional_properties[key] = value
|
|
258
|
+
|
|
259
|
+
def __delitem__(self, key: str) -> None:
|
|
260
|
+
del self.additional_properties[key]
|
|
261
|
+
|
|
262
|
+
def __contains__(self, key: str) -> bool:
|
|
263
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransactionSecurityType(str, Enum):
|
|
5
|
+
ALT = "ALT"
|
|
6
|
+
BOND = "BOND"
|
|
7
|
+
CRYPTO = "CRYPTO"
|
|
8
|
+
EQUITY = "EQUITY"
|
|
9
|
+
OPTION = "OPTION"
|
|
10
|
+
TREASURY = "TREASURY"
|
|
11
|
+
|
|
12
|
+
def __str__(self) -> str:
|
|
13
|
+
return str(self.value)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransactionSubType(str, Enum):
|
|
5
|
+
DEPOSIT = "DEPOSIT"
|
|
6
|
+
DEPOSIT_RETURNED = "DEPOSIT_RETURNED"
|
|
7
|
+
DIVIDEND = "DIVIDEND"
|
|
8
|
+
FEE = "FEE"
|
|
9
|
+
INTEREST = "INTEREST"
|
|
10
|
+
MISC = "MISC"
|
|
11
|
+
REWARD = "REWARD"
|
|
12
|
+
TRADE = "TRADE"
|
|
13
|
+
TRANSFER = "TRANSFER"
|
|
14
|
+
TREASURY_BILL_TRANSFER = "TREASURY_BILL_TRANSFER"
|
|
15
|
+
WITHDRAWAL = "WITHDRAWAL"
|
|
16
|
+
WITHDRAWAL_RETURNED = "WITHDRAWAL_RETURNED"
|
|
17
|
+
|
|
18
|
+
def __str__(self) -> str:
|
|
19
|
+
return str(self.value)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ComHellopublicUserapigatewayApiRestHistoryGatewayHistoryTransactionType(str, Enum):
|
|
5
|
+
MONEY_MOVEMENT = "MONEY_MOVEMENT"
|
|
6
|
+
POSITION_ADJUSTMENT = "POSITION_ADJUSTMENT"
|
|
7
|
+
TRADE = "TRADE"
|
|
8
|
+
|
|
9
|
+
def __str__(self) -> str:
|
|
10
|
+
return str(self.value)
|
|
@@ -0,0 +1,85 @@
|
|
|
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
|
+
if TYPE_CHECKING:
|
|
12
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_gateway_order_instrument import (
|
|
13
|
+
ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
T = TypeVar(
|
|
18
|
+
"T", bound="ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayOptionChainRequest"
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@_attrs_define
|
|
23
|
+
class ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayOptionChainRequest:
|
|
24
|
+
"""
|
|
25
|
+
Attributes:
|
|
26
|
+
instrument (ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument):
|
|
27
|
+
expiration_date (datetime.date): The expiration date of the option chain.
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
instrument: ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument
|
|
31
|
+
expiration_date: datetime.date
|
|
32
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
|
+
|
|
34
|
+
def to_dict(self) -> dict[str, Any]:
|
|
35
|
+
instrument = self.instrument.to_dict()
|
|
36
|
+
|
|
37
|
+
expiration_date = self.expiration_date.isoformat()
|
|
38
|
+
|
|
39
|
+
field_dict: dict[str, Any] = {}
|
|
40
|
+
field_dict.update(self.additional_properties)
|
|
41
|
+
field_dict.update(
|
|
42
|
+
{
|
|
43
|
+
"instrument": instrument,
|
|
44
|
+
"expirationDate": expiration_date,
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
return field_dict
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
52
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_gateway_order_instrument import (
|
|
53
|
+
ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument,
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
d = dict(src_dict)
|
|
57
|
+
instrument = ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument.from_dict(
|
|
58
|
+
d.pop("instrument")
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
expiration_date = isoparse(d.pop("expirationDate")).date()
|
|
62
|
+
|
|
63
|
+
com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_option_chain_request = cls(
|
|
64
|
+
instrument=instrument,
|
|
65
|
+
expiration_date=expiration_date,
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_option_chain_request.additional_properties = d
|
|
69
|
+
return com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_option_chain_request
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
def additional_keys(self) -> list[str]:
|
|
73
|
+
return list(self.additional_properties.keys())
|
|
74
|
+
|
|
75
|
+
def __getitem__(self, key: str) -> Any:
|
|
76
|
+
return self.additional_properties[key]
|
|
77
|
+
|
|
78
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
79
|
+
self.additional_properties[key] = value
|
|
80
|
+
|
|
81
|
+
def __delitem__(self, key: str) -> None:
|
|
82
|
+
del self.additional_properties[key]
|
|
83
|
+
|
|
84
|
+
def __contains__(self, key: str) -> bool:
|
|
85
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,115 @@
|
|
|
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_marketdata_quote_gateway_quote import (
|
|
11
|
+
ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayQuote,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
T = TypeVar(
|
|
16
|
+
"T", bound="ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayOptionChainResponse"
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@_attrs_define
|
|
21
|
+
class ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayOptionChainResponse:
|
|
22
|
+
"""
|
|
23
|
+
Attributes:
|
|
24
|
+
base_symbol (str): The base symbol for which the option chain belongs.
|
|
25
|
+
calls (list[ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayQuote]): List of call quotes for the given
|
|
26
|
+
option chain.
|
|
27
|
+
puts (list[ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayQuote]): List of put quotes for the given
|
|
28
|
+
option chain.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
base_symbol: str
|
|
32
|
+
calls: list[ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayQuote]
|
|
33
|
+
puts: list[ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayQuote]
|
|
34
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
35
|
+
|
|
36
|
+
def to_dict(self) -> dict[str, Any]:
|
|
37
|
+
base_symbol = self.base_symbol
|
|
38
|
+
|
|
39
|
+
calls = []
|
|
40
|
+
for calls_item_data in self.calls:
|
|
41
|
+
calls_item = calls_item_data.to_dict()
|
|
42
|
+
calls.append(calls_item)
|
|
43
|
+
|
|
44
|
+
puts = []
|
|
45
|
+
for puts_item_data in self.puts:
|
|
46
|
+
puts_item = puts_item_data.to_dict()
|
|
47
|
+
puts.append(puts_item)
|
|
48
|
+
|
|
49
|
+
field_dict: dict[str, Any] = {}
|
|
50
|
+
field_dict.update(self.additional_properties)
|
|
51
|
+
field_dict.update(
|
|
52
|
+
{
|
|
53
|
+
"baseSymbol": base_symbol,
|
|
54
|
+
"calls": calls,
|
|
55
|
+
"puts": puts,
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
return field_dict
|
|
60
|
+
|
|
61
|
+
@classmethod
|
|
62
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
63
|
+
from ..models.com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_quote import (
|
|
64
|
+
ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayQuote,
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
d = dict(src_dict)
|
|
68
|
+
base_symbol = d.pop("baseSymbol")
|
|
69
|
+
|
|
70
|
+
calls = []
|
|
71
|
+
_calls = d.pop("calls")
|
|
72
|
+
for calls_item_data in _calls:
|
|
73
|
+
calls_item = ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayQuote.from_dict(
|
|
74
|
+
calls_item_data
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
calls.append(calls_item)
|
|
78
|
+
|
|
79
|
+
puts = []
|
|
80
|
+
_puts = d.pop("puts")
|
|
81
|
+
for puts_item_data in _puts:
|
|
82
|
+
puts_item = ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayQuote.from_dict(
|
|
83
|
+
puts_item_data
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
puts.append(puts_item)
|
|
87
|
+
|
|
88
|
+
com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_option_chain_response = (
|
|
89
|
+
cls(
|
|
90
|
+
base_symbol=base_symbol,
|
|
91
|
+
calls=calls,
|
|
92
|
+
puts=puts,
|
|
93
|
+
)
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_option_chain_response.additional_properties = d
|
|
97
|
+
return (
|
|
98
|
+
com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_option_chain_response
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
@property
|
|
102
|
+
def additional_keys(self) -> list[str]:
|
|
103
|
+
return list(self.additional_properties.keys())
|
|
104
|
+
|
|
105
|
+
def __getitem__(self, key: str) -> Any:
|
|
106
|
+
return self.additional_properties[key]
|
|
107
|
+
|
|
108
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
109
|
+
self.additional_properties[key] = value
|
|
110
|
+
|
|
111
|
+
def __delitem__(self, key: str) -> None:
|
|
112
|
+
del self.additional_properties[key]
|
|
113
|
+
|
|
114
|
+
def __contains__(self, key: str) -> bool:
|
|
115
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,75 @@
|
|
|
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(
|
|
16
|
+
"T", bound="ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayOptionExpirationsRequest"
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@_attrs_define
|
|
21
|
+
class ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayOptionExpirationsRequest:
|
|
22
|
+
"""
|
|
23
|
+
Attributes:
|
|
24
|
+
instrument (ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument):
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
instrument: ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument
|
|
28
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
29
|
+
|
|
30
|
+
def to_dict(self) -> dict[str, Any]:
|
|
31
|
+
instrument = self.instrument.to_dict()
|
|
32
|
+
|
|
33
|
+
field_dict: dict[str, Any] = {}
|
|
34
|
+
field_dict.update(self.additional_properties)
|
|
35
|
+
field_dict.update(
|
|
36
|
+
{
|
|
37
|
+
"instrument": instrument,
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
return field_dict
|
|
42
|
+
|
|
43
|
+
@classmethod
|
|
44
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
45
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_gateway_order_instrument import (
|
|
46
|
+
ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument,
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
d = dict(src_dict)
|
|
50
|
+
instrument = ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument.from_dict(
|
|
51
|
+
d.pop("instrument")
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_option_expirations_request = cls(
|
|
55
|
+
instrument=instrument,
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_option_expirations_request.additional_properties = d
|
|
59
|
+
return com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_option_expirations_request
|
|
60
|
+
|
|
61
|
+
@property
|
|
62
|
+
def additional_keys(self) -> list[str]:
|
|
63
|
+
return list(self.additional_properties.keys())
|
|
64
|
+
|
|
65
|
+
def __getitem__(self, key: str) -> Any:
|
|
66
|
+
return self.additional_properties[key]
|
|
67
|
+
|
|
68
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
69
|
+
self.additional_properties[key] = value
|
|
70
|
+
|
|
71
|
+
def __delitem__(self, key: str) -> None:
|
|
72
|
+
del self.additional_properties[key]
|
|
73
|
+
|
|
74
|
+
def __contains__(self, key: str) -> bool:
|
|
75
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import datetime
|
|
4
|
+
from collections.abc import Mapping
|
|
5
|
+
from typing import 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
|
+
T = TypeVar(
|
|
12
|
+
"T", bound="ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayOptionExpirationsResponse"
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class ComHellopublicUserapigatewayApiRestMarketdataQuoteGatewayOptionExpirationsResponse:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
base_symbol (str): The base symbol for which the option expirations belong.
|
|
21
|
+
expirations (list[datetime.date]): List of option expirations for the given symbol.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
base_symbol: str
|
|
25
|
+
expirations: list[datetime.date]
|
|
26
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
|
+
|
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
|
29
|
+
base_symbol = self.base_symbol
|
|
30
|
+
|
|
31
|
+
expirations = []
|
|
32
|
+
for expirations_item_data in self.expirations:
|
|
33
|
+
expirations_item = expirations_item_data.isoformat()
|
|
34
|
+
expirations.append(expirations_item)
|
|
35
|
+
|
|
36
|
+
field_dict: dict[str, Any] = {}
|
|
37
|
+
field_dict.update(self.additional_properties)
|
|
38
|
+
field_dict.update(
|
|
39
|
+
{
|
|
40
|
+
"baseSymbol": base_symbol,
|
|
41
|
+
"expirations": expirations,
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
return field_dict
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
49
|
+
d = dict(src_dict)
|
|
50
|
+
base_symbol = d.pop("baseSymbol")
|
|
51
|
+
|
|
52
|
+
expirations = []
|
|
53
|
+
_expirations = d.pop("expirations")
|
|
54
|
+
for expirations_item_data in _expirations:
|
|
55
|
+
expirations_item = isoparse(expirations_item_data).date()
|
|
56
|
+
|
|
57
|
+
expirations.append(expirations_item)
|
|
58
|
+
|
|
59
|
+
com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_option_expirations_response = cls(
|
|
60
|
+
base_symbol=base_symbol,
|
|
61
|
+
expirations=expirations,
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_option_expirations_response.additional_properties = d
|
|
65
|
+
return com_hellopublic_userapigateway_api_rest_marketdata_quote_gateway_option_expirations_response
|
|
66
|
+
|
|
67
|
+
@property
|
|
68
|
+
def additional_keys(self) -> list[str]:
|
|
69
|
+
return list(self.additional_properties.keys())
|
|
70
|
+
|
|
71
|
+
def __getitem__(self, key: str) -> Any:
|
|
72
|
+
return self.additional_properties[key]
|
|
73
|
+
|
|
74
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
75
|
+
self.additional_properties[key] = value
|
|
76
|
+
|
|
77
|
+
def __delitem__(self, key: str) -> None:
|
|
78
|
+
del self.additional_properties[key]
|
|
79
|
+
|
|
80
|
+
def __contains__(self, key: str) -> bool:
|
|
81
|
+
return key in self.additional_properties
|