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,225 @@
|
|
|
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 ..models.com_hellopublic_userapigateway_api_rest_preflight_preflight_single_leg_request_equity_market_session import (
|
|
10
|
+
ComHellopublicUserapigatewayApiRestPreflightPreflightSingleLegRequestEquityMarketSession,
|
|
11
|
+
)
|
|
12
|
+
from ..models.com_hellopublic_userapigateway_api_rest_preflight_preflight_single_leg_request_open_close_indicator import (
|
|
13
|
+
ComHellopublicUserapigatewayApiRestPreflightPreflightSingleLegRequestOpenCloseIndicator,
|
|
14
|
+
)
|
|
15
|
+
from ..models.com_hellopublic_userapigateway_api_rest_preflight_preflight_single_leg_request_order_side import (
|
|
16
|
+
ComHellopublicUserapigatewayApiRestPreflightPreflightSingleLegRequestOrderSide,
|
|
17
|
+
)
|
|
18
|
+
from ..models.com_hellopublic_userapigateway_api_rest_preflight_preflight_single_leg_request_order_type import (
|
|
19
|
+
ComHellopublicUserapigatewayApiRestPreflightPreflightSingleLegRequestOrderType,
|
|
20
|
+
)
|
|
21
|
+
from ..types import UNSET, Unset
|
|
22
|
+
|
|
23
|
+
if TYPE_CHECKING:
|
|
24
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_gateway_order_instrument import (
|
|
25
|
+
ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument,
|
|
26
|
+
)
|
|
27
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_order_expiration import (
|
|
28
|
+
ComHellopublicUserapigatewayApiRestOrderOrderExpiration,
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
T = TypeVar("T", bound="ComHellopublicUserapigatewayApiRestPreflightPreflightSingleLegRequest")
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
@_attrs_define
|
|
36
|
+
class ComHellopublicUserapigatewayApiRestPreflightPreflightSingleLegRequest:
|
|
37
|
+
"""
|
|
38
|
+
Attributes:
|
|
39
|
+
instrument (ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument):
|
|
40
|
+
order_side (ComHellopublicUserapigatewayApiRestPreflightPreflightSingleLegRequestOrderSide): The Order Side
|
|
41
|
+
BUY/SELL. For Options also include the openCloseIndicator
|
|
42
|
+
order_type (ComHellopublicUserapigatewayApiRestPreflightPreflightSingleLegRequestOrderType): The Type of order
|
|
43
|
+
expiration (ComHellopublicUserapigatewayApiRestOrderOrderExpiration):
|
|
44
|
+
quantity (str | Unset): The order quantity. Used when buying/selling whole shares and when selling fractional.
|
|
45
|
+
Mutually exclusive with `amount`
|
|
46
|
+
amount (str | Unset): The order amount. Used when buying/selling shares for a specific notional value
|
|
47
|
+
limit_price (str | Unset): The limit price. Used when orderType = LIMIT or orderType = STOP_LIMIT
|
|
48
|
+
stop_price (str | Unset): The stop price. Used when orderType = STOP or orderType = STOP_LIMIT
|
|
49
|
+
equity_market_session (ComHellopublicUserapigatewayApiRestPreflightPreflightSingleLegRequestEquityMarketSession
|
|
50
|
+
| Unset): The market session in which the order may execute.
|
|
51
|
+
Extended hours are available only for DAY time-in-force equity orders and can execute any time from 4:00 a.m. ET
|
|
52
|
+
through 8:00 p.m. ET.
|
|
53
|
+
If omitted, the session defaults to CORE.
|
|
54
|
+
open_close_indicator (ComHellopublicUserapigatewayApiRestPreflightPreflightSingleLegRequestOpenCloseIndicator |
|
|
55
|
+
Unset): Used for options to indicate if this is BUY to OPEN/CLOSE. Also used for shorting equities to indicate
|
|
56
|
+
SELL-to-OPEN (opening a short position) or BUY-to-CLOSE (closing a short position).
|
|
57
|
+
validate_order (bool | Unset): If true, the order will be validated against current account state. Defaults to
|
|
58
|
+
true.
|
|
59
|
+
"""
|
|
60
|
+
|
|
61
|
+
instrument: ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument
|
|
62
|
+
order_side: ComHellopublicUserapigatewayApiRestPreflightPreflightSingleLegRequestOrderSide
|
|
63
|
+
order_type: ComHellopublicUserapigatewayApiRestPreflightPreflightSingleLegRequestOrderType
|
|
64
|
+
expiration: ComHellopublicUserapigatewayApiRestOrderOrderExpiration
|
|
65
|
+
quantity: str | Unset = UNSET
|
|
66
|
+
amount: str | Unset = UNSET
|
|
67
|
+
limit_price: str | Unset = UNSET
|
|
68
|
+
stop_price: str | Unset = UNSET
|
|
69
|
+
equity_market_session: (
|
|
70
|
+
ComHellopublicUserapigatewayApiRestPreflightPreflightSingleLegRequestEquityMarketSession
|
|
71
|
+
| Unset
|
|
72
|
+
) = UNSET
|
|
73
|
+
open_close_indicator: (
|
|
74
|
+
ComHellopublicUserapigatewayApiRestPreflightPreflightSingleLegRequestOpenCloseIndicator
|
|
75
|
+
| Unset
|
|
76
|
+
) = UNSET
|
|
77
|
+
validate_order: bool | Unset = UNSET
|
|
78
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
79
|
+
|
|
80
|
+
def to_dict(self) -> dict[str, Any]:
|
|
81
|
+
instrument = self.instrument.to_dict()
|
|
82
|
+
|
|
83
|
+
order_side = self.order_side.value
|
|
84
|
+
|
|
85
|
+
order_type = self.order_type.value
|
|
86
|
+
|
|
87
|
+
expiration = self.expiration.to_dict()
|
|
88
|
+
|
|
89
|
+
quantity = self.quantity
|
|
90
|
+
|
|
91
|
+
amount = self.amount
|
|
92
|
+
|
|
93
|
+
limit_price = self.limit_price
|
|
94
|
+
|
|
95
|
+
stop_price = self.stop_price
|
|
96
|
+
|
|
97
|
+
equity_market_session: str | Unset = UNSET
|
|
98
|
+
if not isinstance(self.equity_market_session, Unset):
|
|
99
|
+
equity_market_session = self.equity_market_session.value
|
|
100
|
+
|
|
101
|
+
open_close_indicator: str | Unset = UNSET
|
|
102
|
+
if not isinstance(self.open_close_indicator, Unset):
|
|
103
|
+
open_close_indicator = self.open_close_indicator.value
|
|
104
|
+
|
|
105
|
+
validate_order = self.validate_order
|
|
106
|
+
|
|
107
|
+
field_dict: dict[str, Any] = {}
|
|
108
|
+
field_dict.update(self.additional_properties)
|
|
109
|
+
field_dict.update(
|
|
110
|
+
{
|
|
111
|
+
"instrument": instrument,
|
|
112
|
+
"orderSide": order_side,
|
|
113
|
+
"orderType": order_type,
|
|
114
|
+
"expiration": expiration,
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
if quantity is not UNSET:
|
|
118
|
+
field_dict["quantity"] = quantity
|
|
119
|
+
if amount is not UNSET:
|
|
120
|
+
field_dict["amount"] = amount
|
|
121
|
+
if limit_price is not UNSET:
|
|
122
|
+
field_dict["limitPrice"] = limit_price
|
|
123
|
+
if stop_price is not UNSET:
|
|
124
|
+
field_dict["stopPrice"] = stop_price
|
|
125
|
+
if equity_market_session is not UNSET:
|
|
126
|
+
field_dict["equityMarketSession"] = equity_market_session
|
|
127
|
+
if open_close_indicator is not UNSET:
|
|
128
|
+
field_dict["openCloseIndicator"] = open_close_indicator
|
|
129
|
+
if validate_order is not UNSET:
|
|
130
|
+
field_dict["validateOrder"] = validate_order
|
|
131
|
+
|
|
132
|
+
return field_dict
|
|
133
|
+
|
|
134
|
+
@classmethod
|
|
135
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
136
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_gateway_order_instrument import (
|
|
137
|
+
ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument,
|
|
138
|
+
)
|
|
139
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_order_expiration import (
|
|
140
|
+
ComHellopublicUserapigatewayApiRestOrderOrderExpiration,
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
d = dict(src_dict)
|
|
144
|
+
instrument = ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument.from_dict(
|
|
145
|
+
d.pop("instrument")
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
order_side = ComHellopublicUserapigatewayApiRestPreflightPreflightSingleLegRequestOrderSide(
|
|
149
|
+
d.pop("orderSide")
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
order_type = ComHellopublicUserapigatewayApiRestPreflightPreflightSingleLegRequestOrderType(
|
|
153
|
+
d.pop("orderType")
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
expiration = ComHellopublicUserapigatewayApiRestOrderOrderExpiration.from_dict(
|
|
157
|
+
d.pop("expiration")
|
|
158
|
+
)
|
|
159
|
+
|
|
160
|
+
quantity = d.pop("quantity", UNSET)
|
|
161
|
+
|
|
162
|
+
amount = d.pop("amount", UNSET)
|
|
163
|
+
|
|
164
|
+
limit_price = d.pop("limitPrice", UNSET)
|
|
165
|
+
|
|
166
|
+
stop_price = d.pop("stopPrice", UNSET)
|
|
167
|
+
|
|
168
|
+
_equity_market_session = d.pop("equityMarketSession", UNSET)
|
|
169
|
+
equity_market_session: (
|
|
170
|
+
ComHellopublicUserapigatewayApiRestPreflightPreflightSingleLegRequestEquityMarketSession
|
|
171
|
+
| Unset
|
|
172
|
+
)
|
|
173
|
+
if isinstance(_equity_market_session, Unset):
|
|
174
|
+
equity_market_session = UNSET
|
|
175
|
+
else:
|
|
176
|
+
equity_market_session = ComHellopublicUserapigatewayApiRestPreflightPreflightSingleLegRequestEquityMarketSession(
|
|
177
|
+
_equity_market_session
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
_open_close_indicator = d.pop("openCloseIndicator", UNSET)
|
|
181
|
+
open_close_indicator: (
|
|
182
|
+
ComHellopublicUserapigatewayApiRestPreflightPreflightSingleLegRequestOpenCloseIndicator
|
|
183
|
+
| Unset
|
|
184
|
+
)
|
|
185
|
+
if isinstance(_open_close_indicator, Unset):
|
|
186
|
+
open_close_indicator = UNSET
|
|
187
|
+
else:
|
|
188
|
+
open_close_indicator = ComHellopublicUserapigatewayApiRestPreflightPreflightSingleLegRequestOpenCloseIndicator(
|
|
189
|
+
_open_close_indicator
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
validate_order = d.pop("validateOrder", UNSET)
|
|
193
|
+
|
|
194
|
+
com_hellopublic_userapigateway_api_rest_preflight_preflight_single_leg_request = cls(
|
|
195
|
+
instrument=instrument,
|
|
196
|
+
order_side=order_side,
|
|
197
|
+
order_type=order_type,
|
|
198
|
+
expiration=expiration,
|
|
199
|
+
quantity=quantity,
|
|
200
|
+
amount=amount,
|
|
201
|
+
limit_price=limit_price,
|
|
202
|
+
stop_price=stop_price,
|
|
203
|
+
equity_market_session=equity_market_session,
|
|
204
|
+
open_close_indicator=open_close_indicator,
|
|
205
|
+
validate_order=validate_order,
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
com_hellopublic_userapigateway_api_rest_preflight_preflight_single_leg_request.additional_properties = d
|
|
209
|
+
return com_hellopublic_userapigateway_api_rest_preflight_preflight_single_leg_request
|
|
210
|
+
|
|
211
|
+
@property
|
|
212
|
+
def additional_keys(self) -> list[str]:
|
|
213
|
+
return list(self.additional_properties.keys())
|
|
214
|
+
|
|
215
|
+
def __getitem__(self, key: str) -> Any:
|
|
216
|
+
return self.additional_properties[key]
|
|
217
|
+
|
|
218
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
219
|
+
self.additional_properties[key] = value
|
|
220
|
+
|
|
221
|
+
def __delitem__(self, key: str) -> None:
|
|
222
|
+
del self.additional_properties[key]
|
|
223
|
+
|
|
224
|
+
def __contains__(self, key: str) -> bool:
|
|
225
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ComHellopublicUserapigatewayApiRestPreflightPreflightSingleLegRequestOrderType(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)
|
|
@@ -0,0 +1,410 @@
|
|
|
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_order_gateway_order_instrument import (
|
|
13
|
+
ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument,
|
|
14
|
+
)
|
|
15
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_gateway_short_selling import (
|
|
16
|
+
ComHellopublicUserapigatewayApiRestOrderGatewayShortSelling,
|
|
17
|
+
)
|
|
18
|
+
from ..models.com_hellopublic_userapigateway_api_rest_preflight_gateway_margin_impact import (
|
|
19
|
+
ComHellopublicUserapigatewayApiRestPreflightGatewayMarginImpact,
|
|
20
|
+
)
|
|
21
|
+
from ..models.com_hellopublic_userapigateway_api_rest_preflight_gateway_margin_requirement import (
|
|
22
|
+
ComHellopublicUserapigatewayApiRestPreflightGatewayMarginRequirement,
|
|
23
|
+
)
|
|
24
|
+
from ..models.com_hellopublic_userapigateway_api_rest_preflight_gateway_option_details import (
|
|
25
|
+
ComHellopublicUserapigatewayApiRestPreflightGatewayOptionDetails,
|
|
26
|
+
)
|
|
27
|
+
from ..models.com_hellopublic_userapigateway_api_rest_preflight_gateway_option_rebate import (
|
|
28
|
+
ComHellopublicUserapigatewayApiRestPreflightGatewayOptionRebate,
|
|
29
|
+
)
|
|
30
|
+
from ..models.com_hellopublic_userapigateway_api_rest_preflight_gateway_price_increment import (
|
|
31
|
+
ComHellopublicUserapigatewayApiRestPreflightGatewayPriceIncrement,
|
|
32
|
+
)
|
|
33
|
+
from ..models.com_hellopublic_userapigateway_api_rest_preflight_gateway_regulatory_fees import (
|
|
34
|
+
ComHellopublicUserapigatewayApiRestPreflightGatewayRegulatoryFees,
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
T = TypeVar("T", bound="ComHellopublicUserapigatewayApiRestPreflightPreflightSingleLegResponse")
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
@_attrs_define
|
|
42
|
+
class ComHellopublicUserapigatewayApiRestPreflightPreflightSingleLegResponse:
|
|
43
|
+
"""# PreflightSingleLegResponse
|
|
44
|
+
Response containing estimated costs, fees, and other information needed before placing a single-leg order.
|
|
45
|
+
|
|
46
|
+
## Fields
|
|
47
|
+
|
|
48
|
+
### Instrument Information
|
|
49
|
+
- **symbol** - The trading symbol for the instrument
|
|
50
|
+
- **cusip** - The CUSIP identifier for the instrument (if applicable)
|
|
51
|
+
- **securityType** - The type of security (EQUITY, OPTION, BOND, etc.)
|
|
52
|
+
- **rootSymbol** - The root symbol for options and other derivatives
|
|
53
|
+
- **rootOptionSymbol** - The root option symbol for option chains
|
|
54
|
+
|
|
55
|
+
### Cost and Fee Information
|
|
56
|
+
- **estimatedCommission** - The estimated commission amount that will be charged if the order executes
|
|
57
|
+
- **regulatoryFees** - The estimated gateway regulatory fees breakdown including SEC, TAF, ORF, OCC, CAT fees
|
|
58
|
+
- **estimatedIndexOptionFee** - The estimated gateway fee when buying index options
|
|
59
|
+
- **estimatedExecutionFee** - The estimated gateway fee when using specific venues for buying stocks
|
|
60
|
+
- **estimatedCost** - The total estimated cost including all fees and commissions
|
|
61
|
+
- **buyingPowerRequirement** - The buying power required for this order
|
|
62
|
+
|
|
63
|
+
### Order Details
|
|
64
|
+
- **orderValue** - The estimated order value, excluding fees and commission
|
|
65
|
+
- **estimatedQuantity** - For quantity orders this is exact, for amount-based orders this is an estimate
|
|
66
|
+
- **estimatedProceeds** - The estimated proceeds from the order (for sell orders)
|
|
67
|
+
|
|
68
|
+
### Option-Specific Information
|
|
69
|
+
- **optionDetails** - Consolidated option-specific details including strike price, expiration, rebates, and fees
|
|
70
|
+
- **priceIncrement** - Price increment information for option orders
|
|
71
|
+
|
|
72
|
+
### Shorting-Specific Information
|
|
73
|
+
- **shortSelling** - Information about short selling rules and fees
|
|
74
|
+
|
|
75
|
+
Attributes:
|
|
76
|
+
instrument (ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument):
|
|
77
|
+
order_value (str):
|
|
78
|
+
cusip (str | Unset):
|
|
79
|
+
root_symbol (str | Unset):
|
|
80
|
+
root_option_symbol (str | Unset):
|
|
81
|
+
estimated_commission (str | Unset):
|
|
82
|
+
regulatory_fees (ComHellopublicUserapigatewayApiRestPreflightGatewayRegulatoryFees | Unset): #
|
|
83
|
+
GatewayRegulatoryFees
|
|
84
|
+
Represents various regulatory fees associated with trading orders.
|
|
85
|
+
<br/>
|
|
86
|
+
## Fields
|
|
87
|
+
- **secFee** - The SEC charges a regulatory fee for sell orders that execute. The fee is based on the dollar
|
|
88
|
+
amount of the order.
|
|
89
|
+
- **tafFee** - The Trading Activity Fee is a FINRA fee. The fee is based on the order quantity.
|
|
90
|
+
- **orfFee** - The Options Regulatory Fee (ORF). This is the combined exchange fee rate for all exchanges.
|
|
91
|
+
Changes monthly.
|
|
92
|
+
- **exchangeFee** - The exchange charges a fee for executing orders for index options.
|
|
93
|
+
- **occFee** - The Options Clearing Corporation Fee (OCC)
|
|
94
|
+
- **catFee** - The Consolidated Audit Trail Fee (CAT)
|
|
95
|
+
estimated_index_option_fee (str | Unset):
|
|
96
|
+
estimated_execution_fee (str | Unset):
|
|
97
|
+
estimated_quantity (str | Unset):
|
|
98
|
+
estimated_cost (str | Unset):
|
|
99
|
+
buying_power_requirement (str | Unset):
|
|
100
|
+
estimated_proceeds (str | Unset):
|
|
101
|
+
option_details (ComHellopublicUserapigatewayApiRestPreflightGatewayOptionDetails | Unset):
|
|
102
|
+
estimated_order_rebate (ComHellopublicUserapigatewayApiRestPreflightGatewayOptionRebate | Unset):
|
|
103
|
+
margin_requirement (ComHellopublicUserapigatewayApiRestPreflightGatewayMarginRequirement | Unset):
|
|
104
|
+
margin_impact (ComHellopublicUserapigatewayApiRestPreflightGatewayMarginImpact | Unset):
|
|
105
|
+
short_selling (ComHellopublicUserapigatewayApiRestOrderGatewayShortSelling | Unset): Short-selling information
|
|
106
|
+
for the given instrument.
|
|
107
|
+
price_increment (ComHellopublicUserapigatewayApiRestPreflightGatewayPriceIncrement | Unset): Price increment
|
|
108
|
+
information for option orders.
|
|
109
|
+
"""
|
|
110
|
+
|
|
111
|
+
instrument: ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument
|
|
112
|
+
order_value: str
|
|
113
|
+
cusip: str | Unset = UNSET
|
|
114
|
+
root_symbol: str | Unset = UNSET
|
|
115
|
+
root_option_symbol: str | Unset = UNSET
|
|
116
|
+
estimated_commission: str | Unset = UNSET
|
|
117
|
+
regulatory_fees: ComHellopublicUserapigatewayApiRestPreflightGatewayRegulatoryFees | Unset = (
|
|
118
|
+
UNSET
|
|
119
|
+
)
|
|
120
|
+
estimated_index_option_fee: str | Unset = UNSET
|
|
121
|
+
estimated_execution_fee: str | Unset = UNSET
|
|
122
|
+
estimated_quantity: str | Unset = UNSET
|
|
123
|
+
estimated_cost: str | Unset = UNSET
|
|
124
|
+
buying_power_requirement: str | Unset = UNSET
|
|
125
|
+
estimated_proceeds: str | Unset = UNSET
|
|
126
|
+
option_details: ComHellopublicUserapigatewayApiRestPreflightGatewayOptionDetails | Unset = UNSET
|
|
127
|
+
estimated_order_rebate: (
|
|
128
|
+
ComHellopublicUserapigatewayApiRestPreflightGatewayOptionRebate | Unset
|
|
129
|
+
) = UNSET
|
|
130
|
+
margin_requirement: (
|
|
131
|
+
ComHellopublicUserapigatewayApiRestPreflightGatewayMarginRequirement | Unset
|
|
132
|
+
) = UNSET
|
|
133
|
+
margin_impact: ComHellopublicUserapigatewayApiRestPreflightGatewayMarginImpact | Unset = UNSET
|
|
134
|
+
short_selling: ComHellopublicUserapigatewayApiRestOrderGatewayShortSelling | Unset = UNSET
|
|
135
|
+
price_increment: ComHellopublicUserapigatewayApiRestPreflightGatewayPriceIncrement | Unset = (
|
|
136
|
+
UNSET
|
|
137
|
+
)
|
|
138
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
139
|
+
|
|
140
|
+
def to_dict(self) -> dict[str, Any]:
|
|
141
|
+
instrument = self.instrument.to_dict()
|
|
142
|
+
|
|
143
|
+
order_value = self.order_value
|
|
144
|
+
|
|
145
|
+
cusip = self.cusip
|
|
146
|
+
|
|
147
|
+
root_symbol = self.root_symbol
|
|
148
|
+
|
|
149
|
+
root_option_symbol = self.root_option_symbol
|
|
150
|
+
|
|
151
|
+
estimated_commission = self.estimated_commission
|
|
152
|
+
|
|
153
|
+
regulatory_fees: dict[str, Any] | Unset = UNSET
|
|
154
|
+
if not isinstance(self.regulatory_fees, Unset):
|
|
155
|
+
regulatory_fees = self.regulatory_fees.to_dict()
|
|
156
|
+
|
|
157
|
+
estimated_index_option_fee = self.estimated_index_option_fee
|
|
158
|
+
|
|
159
|
+
estimated_execution_fee = self.estimated_execution_fee
|
|
160
|
+
|
|
161
|
+
estimated_quantity = self.estimated_quantity
|
|
162
|
+
|
|
163
|
+
estimated_cost = self.estimated_cost
|
|
164
|
+
|
|
165
|
+
buying_power_requirement = self.buying_power_requirement
|
|
166
|
+
|
|
167
|
+
estimated_proceeds = self.estimated_proceeds
|
|
168
|
+
|
|
169
|
+
option_details: dict[str, Any] | Unset = UNSET
|
|
170
|
+
if not isinstance(self.option_details, Unset):
|
|
171
|
+
option_details = self.option_details.to_dict()
|
|
172
|
+
|
|
173
|
+
estimated_order_rebate: dict[str, Any] | Unset = UNSET
|
|
174
|
+
if not isinstance(self.estimated_order_rebate, Unset):
|
|
175
|
+
estimated_order_rebate = self.estimated_order_rebate.to_dict()
|
|
176
|
+
|
|
177
|
+
margin_requirement: dict[str, Any] | Unset = UNSET
|
|
178
|
+
if not isinstance(self.margin_requirement, Unset):
|
|
179
|
+
margin_requirement = self.margin_requirement.to_dict()
|
|
180
|
+
|
|
181
|
+
margin_impact: dict[str, Any] | Unset = UNSET
|
|
182
|
+
if not isinstance(self.margin_impact, Unset):
|
|
183
|
+
margin_impact = self.margin_impact.to_dict()
|
|
184
|
+
|
|
185
|
+
short_selling: dict[str, Any] | Unset = UNSET
|
|
186
|
+
if not isinstance(self.short_selling, Unset):
|
|
187
|
+
short_selling = self.short_selling.to_dict()
|
|
188
|
+
|
|
189
|
+
price_increment: dict[str, Any] | Unset = UNSET
|
|
190
|
+
if not isinstance(self.price_increment, Unset):
|
|
191
|
+
price_increment = self.price_increment.to_dict()
|
|
192
|
+
|
|
193
|
+
field_dict: dict[str, Any] = {}
|
|
194
|
+
field_dict.update(self.additional_properties)
|
|
195
|
+
field_dict.update(
|
|
196
|
+
{
|
|
197
|
+
"instrument": instrument,
|
|
198
|
+
"orderValue": order_value,
|
|
199
|
+
}
|
|
200
|
+
)
|
|
201
|
+
if cusip is not UNSET:
|
|
202
|
+
field_dict["cusip"] = cusip
|
|
203
|
+
if root_symbol is not UNSET:
|
|
204
|
+
field_dict["rootSymbol"] = root_symbol
|
|
205
|
+
if root_option_symbol is not UNSET:
|
|
206
|
+
field_dict["rootOptionSymbol"] = root_option_symbol
|
|
207
|
+
if estimated_commission is not UNSET:
|
|
208
|
+
field_dict["estimatedCommission"] = estimated_commission
|
|
209
|
+
if regulatory_fees is not UNSET:
|
|
210
|
+
field_dict["regulatoryFees"] = regulatory_fees
|
|
211
|
+
if estimated_index_option_fee is not UNSET:
|
|
212
|
+
field_dict["estimatedIndexOptionFee"] = estimated_index_option_fee
|
|
213
|
+
if estimated_execution_fee is not UNSET:
|
|
214
|
+
field_dict["estimatedExecutionFee"] = estimated_execution_fee
|
|
215
|
+
if estimated_quantity is not UNSET:
|
|
216
|
+
field_dict["estimatedQuantity"] = estimated_quantity
|
|
217
|
+
if estimated_cost is not UNSET:
|
|
218
|
+
field_dict["estimatedCost"] = estimated_cost
|
|
219
|
+
if buying_power_requirement is not UNSET:
|
|
220
|
+
field_dict["buyingPowerRequirement"] = buying_power_requirement
|
|
221
|
+
if estimated_proceeds is not UNSET:
|
|
222
|
+
field_dict["estimatedProceeds"] = estimated_proceeds
|
|
223
|
+
if option_details is not UNSET:
|
|
224
|
+
field_dict["optionDetails"] = option_details
|
|
225
|
+
if estimated_order_rebate is not UNSET:
|
|
226
|
+
field_dict["estimatedOrderRebate"] = estimated_order_rebate
|
|
227
|
+
if margin_requirement is not UNSET:
|
|
228
|
+
field_dict["marginRequirement"] = margin_requirement
|
|
229
|
+
if margin_impact is not UNSET:
|
|
230
|
+
field_dict["marginImpact"] = margin_impact
|
|
231
|
+
if short_selling is not UNSET:
|
|
232
|
+
field_dict["shortSelling"] = short_selling
|
|
233
|
+
if price_increment is not UNSET:
|
|
234
|
+
field_dict["priceIncrement"] = price_increment
|
|
235
|
+
|
|
236
|
+
return field_dict
|
|
237
|
+
|
|
238
|
+
@classmethod
|
|
239
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
240
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_gateway_order_instrument import (
|
|
241
|
+
ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument,
|
|
242
|
+
)
|
|
243
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_gateway_short_selling import (
|
|
244
|
+
ComHellopublicUserapigatewayApiRestOrderGatewayShortSelling,
|
|
245
|
+
)
|
|
246
|
+
from ..models.com_hellopublic_userapigateway_api_rest_preflight_gateway_margin_impact import (
|
|
247
|
+
ComHellopublicUserapigatewayApiRestPreflightGatewayMarginImpact,
|
|
248
|
+
)
|
|
249
|
+
from ..models.com_hellopublic_userapigateway_api_rest_preflight_gateway_margin_requirement import (
|
|
250
|
+
ComHellopublicUserapigatewayApiRestPreflightGatewayMarginRequirement,
|
|
251
|
+
)
|
|
252
|
+
from ..models.com_hellopublic_userapigateway_api_rest_preflight_gateway_option_details import (
|
|
253
|
+
ComHellopublicUserapigatewayApiRestPreflightGatewayOptionDetails,
|
|
254
|
+
)
|
|
255
|
+
from ..models.com_hellopublic_userapigateway_api_rest_preflight_gateway_option_rebate import (
|
|
256
|
+
ComHellopublicUserapigatewayApiRestPreflightGatewayOptionRebate,
|
|
257
|
+
)
|
|
258
|
+
from ..models.com_hellopublic_userapigateway_api_rest_preflight_gateway_price_increment import (
|
|
259
|
+
ComHellopublicUserapigatewayApiRestPreflightGatewayPriceIncrement,
|
|
260
|
+
)
|
|
261
|
+
from ..models.com_hellopublic_userapigateway_api_rest_preflight_gateway_regulatory_fees import (
|
|
262
|
+
ComHellopublicUserapigatewayApiRestPreflightGatewayRegulatoryFees,
|
|
263
|
+
)
|
|
264
|
+
|
|
265
|
+
d = dict(src_dict)
|
|
266
|
+
instrument = ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument.from_dict(
|
|
267
|
+
d.pop("instrument")
|
|
268
|
+
)
|
|
269
|
+
|
|
270
|
+
order_value = d.pop("orderValue")
|
|
271
|
+
|
|
272
|
+
cusip = d.pop("cusip", UNSET)
|
|
273
|
+
|
|
274
|
+
root_symbol = d.pop("rootSymbol", UNSET)
|
|
275
|
+
|
|
276
|
+
root_option_symbol = d.pop("rootOptionSymbol", UNSET)
|
|
277
|
+
|
|
278
|
+
estimated_commission = d.pop("estimatedCommission", UNSET)
|
|
279
|
+
|
|
280
|
+
_regulatory_fees = d.pop("regulatoryFees", UNSET)
|
|
281
|
+
regulatory_fees: ComHellopublicUserapigatewayApiRestPreflightGatewayRegulatoryFees | Unset
|
|
282
|
+
if isinstance(_regulatory_fees, Unset):
|
|
283
|
+
regulatory_fees = UNSET
|
|
284
|
+
else:
|
|
285
|
+
regulatory_fees = (
|
|
286
|
+
ComHellopublicUserapigatewayApiRestPreflightGatewayRegulatoryFees.from_dict(
|
|
287
|
+
_regulatory_fees
|
|
288
|
+
)
|
|
289
|
+
)
|
|
290
|
+
|
|
291
|
+
estimated_index_option_fee = d.pop("estimatedIndexOptionFee", UNSET)
|
|
292
|
+
|
|
293
|
+
estimated_execution_fee = d.pop("estimatedExecutionFee", UNSET)
|
|
294
|
+
|
|
295
|
+
estimated_quantity = d.pop("estimatedQuantity", UNSET)
|
|
296
|
+
|
|
297
|
+
estimated_cost = d.pop("estimatedCost", UNSET)
|
|
298
|
+
|
|
299
|
+
buying_power_requirement = d.pop("buyingPowerRequirement", UNSET)
|
|
300
|
+
|
|
301
|
+
estimated_proceeds = d.pop("estimatedProceeds", UNSET)
|
|
302
|
+
|
|
303
|
+
_option_details = d.pop("optionDetails", UNSET)
|
|
304
|
+
option_details: ComHellopublicUserapigatewayApiRestPreflightGatewayOptionDetails | Unset
|
|
305
|
+
if isinstance(_option_details, Unset):
|
|
306
|
+
option_details = UNSET
|
|
307
|
+
else:
|
|
308
|
+
option_details = (
|
|
309
|
+
ComHellopublicUserapigatewayApiRestPreflightGatewayOptionDetails.from_dict(
|
|
310
|
+
_option_details
|
|
311
|
+
)
|
|
312
|
+
)
|
|
313
|
+
|
|
314
|
+
_estimated_order_rebate = d.pop("estimatedOrderRebate", UNSET)
|
|
315
|
+
estimated_order_rebate: (
|
|
316
|
+
ComHellopublicUserapigatewayApiRestPreflightGatewayOptionRebate | Unset
|
|
317
|
+
)
|
|
318
|
+
if isinstance(_estimated_order_rebate, Unset):
|
|
319
|
+
estimated_order_rebate = UNSET
|
|
320
|
+
else:
|
|
321
|
+
estimated_order_rebate = (
|
|
322
|
+
ComHellopublicUserapigatewayApiRestPreflightGatewayOptionRebate.from_dict(
|
|
323
|
+
_estimated_order_rebate
|
|
324
|
+
)
|
|
325
|
+
)
|
|
326
|
+
|
|
327
|
+
_margin_requirement = d.pop("marginRequirement", UNSET)
|
|
328
|
+
margin_requirement: (
|
|
329
|
+
ComHellopublicUserapigatewayApiRestPreflightGatewayMarginRequirement | Unset
|
|
330
|
+
)
|
|
331
|
+
if isinstance(_margin_requirement, Unset):
|
|
332
|
+
margin_requirement = UNSET
|
|
333
|
+
else:
|
|
334
|
+
margin_requirement = (
|
|
335
|
+
ComHellopublicUserapigatewayApiRestPreflightGatewayMarginRequirement.from_dict(
|
|
336
|
+
_margin_requirement
|
|
337
|
+
)
|
|
338
|
+
)
|
|
339
|
+
|
|
340
|
+
_margin_impact = d.pop("marginImpact", UNSET)
|
|
341
|
+
margin_impact: ComHellopublicUserapigatewayApiRestPreflightGatewayMarginImpact | Unset
|
|
342
|
+
if isinstance(_margin_impact, Unset):
|
|
343
|
+
margin_impact = UNSET
|
|
344
|
+
else:
|
|
345
|
+
margin_impact = (
|
|
346
|
+
ComHellopublicUserapigatewayApiRestPreflightGatewayMarginImpact.from_dict(
|
|
347
|
+
_margin_impact
|
|
348
|
+
)
|
|
349
|
+
)
|
|
350
|
+
|
|
351
|
+
_short_selling = d.pop("shortSelling", UNSET)
|
|
352
|
+
short_selling: ComHellopublicUserapigatewayApiRestOrderGatewayShortSelling | Unset
|
|
353
|
+
if isinstance(_short_selling, Unset):
|
|
354
|
+
short_selling = UNSET
|
|
355
|
+
else:
|
|
356
|
+
short_selling = ComHellopublicUserapigatewayApiRestOrderGatewayShortSelling.from_dict(
|
|
357
|
+
_short_selling
|
|
358
|
+
)
|
|
359
|
+
|
|
360
|
+
_price_increment = d.pop("priceIncrement", UNSET)
|
|
361
|
+
price_increment: ComHellopublicUserapigatewayApiRestPreflightGatewayPriceIncrement | Unset
|
|
362
|
+
if isinstance(_price_increment, Unset):
|
|
363
|
+
price_increment = UNSET
|
|
364
|
+
else:
|
|
365
|
+
price_increment = (
|
|
366
|
+
ComHellopublicUserapigatewayApiRestPreflightGatewayPriceIncrement.from_dict(
|
|
367
|
+
_price_increment
|
|
368
|
+
)
|
|
369
|
+
)
|
|
370
|
+
|
|
371
|
+
com_hellopublic_userapigateway_api_rest_preflight_preflight_single_leg_response = cls(
|
|
372
|
+
instrument=instrument,
|
|
373
|
+
order_value=order_value,
|
|
374
|
+
cusip=cusip,
|
|
375
|
+
root_symbol=root_symbol,
|
|
376
|
+
root_option_symbol=root_option_symbol,
|
|
377
|
+
estimated_commission=estimated_commission,
|
|
378
|
+
regulatory_fees=regulatory_fees,
|
|
379
|
+
estimated_index_option_fee=estimated_index_option_fee,
|
|
380
|
+
estimated_execution_fee=estimated_execution_fee,
|
|
381
|
+
estimated_quantity=estimated_quantity,
|
|
382
|
+
estimated_cost=estimated_cost,
|
|
383
|
+
buying_power_requirement=buying_power_requirement,
|
|
384
|
+
estimated_proceeds=estimated_proceeds,
|
|
385
|
+
option_details=option_details,
|
|
386
|
+
estimated_order_rebate=estimated_order_rebate,
|
|
387
|
+
margin_requirement=margin_requirement,
|
|
388
|
+
margin_impact=margin_impact,
|
|
389
|
+
short_selling=short_selling,
|
|
390
|
+
price_increment=price_increment,
|
|
391
|
+
)
|
|
392
|
+
|
|
393
|
+
com_hellopublic_userapigateway_api_rest_preflight_preflight_single_leg_response.additional_properties = d
|
|
394
|
+
return com_hellopublic_userapigateway_api_rest_preflight_preflight_single_leg_response
|
|
395
|
+
|
|
396
|
+
@property
|
|
397
|
+
def additional_keys(self) -> list[str]:
|
|
398
|
+
return list(self.additional_properties.keys())
|
|
399
|
+
|
|
400
|
+
def __getitem__(self, key: str) -> Any:
|
|
401
|
+
return self.additional_properties[key]
|
|
402
|
+
|
|
403
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
404
|
+
self.additional_properties[key] = value
|
|
405
|
+
|
|
406
|
+
def __delitem__(self, key: str) -> None:
|
|
407
|
+
del self.additional_properties[key]
|
|
408
|
+
|
|
409
|
+
def __contains__(self, key: str) -> bool:
|
|
410
|
+
return key in self.additional_properties
|