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,265 @@
|
|
|
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_order_api_instrument_dto_fractional_trading import (
|
|
10
|
+
ComHellopublicUserapigatewayApiRestOrderApiInstrumentDtoFractionalTrading,
|
|
11
|
+
)
|
|
12
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_api_instrument_dto_option_spread_trading import (
|
|
13
|
+
ComHellopublicUserapigatewayApiRestOrderApiInstrumentDtoOptionSpreadTrading,
|
|
14
|
+
)
|
|
15
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_api_instrument_dto_option_trading import (
|
|
16
|
+
ComHellopublicUserapigatewayApiRestOrderApiInstrumentDtoOptionTrading,
|
|
17
|
+
)
|
|
18
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_api_instrument_dto_shorting_availability import (
|
|
19
|
+
ComHellopublicUserapigatewayApiRestOrderApiInstrumentDtoShortingAvailability,
|
|
20
|
+
)
|
|
21
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_api_instrument_dto_trading import (
|
|
22
|
+
ComHellopublicUserapigatewayApiRestOrderApiInstrumentDtoTrading,
|
|
23
|
+
)
|
|
24
|
+
from ..types import UNSET, Unset
|
|
25
|
+
|
|
26
|
+
if TYPE_CHECKING:
|
|
27
|
+
from ..models.com_hellopublic_holdingsystem_core_types_option_price_increment import (
|
|
28
|
+
ComHellopublicHoldingsystemCoreTypesOptionPriceIncrement,
|
|
29
|
+
)
|
|
30
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_gateway_order_instrument import (
|
|
31
|
+
ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument,
|
|
32
|
+
)
|
|
33
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_instrumentdetails_api_instrument_details_bond import (
|
|
34
|
+
ComHellopublicUserapigatewayApiRestOrderInstrumentdetailsApiInstrumentDetailsBond,
|
|
35
|
+
)
|
|
36
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_instrumentdetails_api_instrument_details_crypto import (
|
|
37
|
+
ComHellopublicUserapigatewayApiRestOrderInstrumentdetailsApiInstrumentDetailsCrypto,
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
T = TypeVar("T", bound="ComHellopublicUserapigatewayApiRestOrderApiInstrumentDto")
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@_attrs_define
|
|
45
|
+
class ComHellopublicUserapigatewayApiRestOrderApiInstrumentDto:
|
|
46
|
+
"""
|
|
47
|
+
Attributes:
|
|
48
|
+
instrument (ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument):
|
|
49
|
+
trading (ComHellopublicUserapigatewayApiRestOrderApiInstrumentDtoTrading):
|
|
50
|
+
fractional_trading (ComHellopublicUserapigatewayApiRestOrderApiInstrumentDtoFractionalTrading):
|
|
51
|
+
option_trading (ComHellopublicUserapigatewayApiRestOrderApiInstrumentDtoOptionTrading):
|
|
52
|
+
option_spread_trading (ComHellopublicUserapigatewayApiRestOrderApiInstrumentDtoOptionSpreadTrading):
|
|
53
|
+
instrument_details (ComHellopublicUserapigatewayApiRestOrderInstrumentdetailsApiInstrumentDetailsBond |
|
|
54
|
+
ComHellopublicUserapigatewayApiRestOrderInstrumentdetailsApiInstrumentDetailsCrypto | Unset):
|
|
55
|
+
shorting_availability (ComHellopublicUserapigatewayApiRestOrderApiInstrumentDtoShortingAvailability | Unset):
|
|
56
|
+
The short-selling availability.
|
|
57
|
+
hard_to_borrow_percentage_rate (str | Unset): The hard to borrow rate as a percentage value.
|
|
58
|
+
option_contract_price_increments (ComHellopublicHoldingsystemCoreTypesOptionPriceIncrement | Unset): Record
|
|
59
|
+
representing price increments below and above $3.
|
|
60
|
+
"""
|
|
61
|
+
|
|
62
|
+
instrument: ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument
|
|
63
|
+
trading: ComHellopublicUserapigatewayApiRestOrderApiInstrumentDtoTrading
|
|
64
|
+
fractional_trading: ComHellopublicUserapigatewayApiRestOrderApiInstrumentDtoFractionalTrading
|
|
65
|
+
option_trading: ComHellopublicUserapigatewayApiRestOrderApiInstrumentDtoOptionTrading
|
|
66
|
+
option_spread_trading: (
|
|
67
|
+
ComHellopublicUserapigatewayApiRestOrderApiInstrumentDtoOptionSpreadTrading
|
|
68
|
+
)
|
|
69
|
+
instrument_details: (
|
|
70
|
+
ComHellopublicUserapigatewayApiRestOrderInstrumentdetailsApiInstrumentDetailsBond
|
|
71
|
+
| ComHellopublicUserapigatewayApiRestOrderInstrumentdetailsApiInstrumentDetailsCrypto
|
|
72
|
+
| Unset
|
|
73
|
+
) = UNSET
|
|
74
|
+
shorting_availability: (
|
|
75
|
+
ComHellopublicUserapigatewayApiRestOrderApiInstrumentDtoShortingAvailability | Unset
|
|
76
|
+
) = UNSET
|
|
77
|
+
hard_to_borrow_percentage_rate: str | Unset = UNSET
|
|
78
|
+
option_contract_price_increments: (
|
|
79
|
+
ComHellopublicHoldingsystemCoreTypesOptionPriceIncrement | Unset
|
|
80
|
+
) = UNSET
|
|
81
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
82
|
+
|
|
83
|
+
def to_dict(self) -> dict[str, Any]:
|
|
84
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_instrumentdetails_api_instrument_details_bond import (
|
|
85
|
+
ComHellopublicUserapigatewayApiRestOrderInstrumentdetailsApiInstrumentDetailsBond,
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
instrument = self.instrument.to_dict()
|
|
89
|
+
|
|
90
|
+
trading = self.trading.value
|
|
91
|
+
|
|
92
|
+
fractional_trading = self.fractional_trading.value
|
|
93
|
+
|
|
94
|
+
option_trading = self.option_trading.value
|
|
95
|
+
|
|
96
|
+
option_spread_trading = self.option_spread_trading.value
|
|
97
|
+
|
|
98
|
+
instrument_details: dict[str, Any] | Unset
|
|
99
|
+
if isinstance(self.instrument_details, Unset):
|
|
100
|
+
instrument_details = UNSET
|
|
101
|
+
elif isinstance(
|
|
102
|
+
self.instrument_details,
|
|
103
|
+
ComHellopublicUserapigatewayApiRestOrderInstrumentdetailsApiInstrumentDetailsBond,
|
|
104
|
+
):
|
|
105
|
+
instrument_details = self.instrument_details.to_dict()
|
|
106
|
+
else:
|
|
107
|
+
instrument_details = self.instrument_details.to_dict()
|
|
108
|
+
|
|
109
|
+
shorting_availability: str | Unset = UNSET
|
|
110
|
+
if not isinstance(self.shorting_availability, Unset):
|
|
111
|
+
shorting_availability = self.shorting_availability.value
|
|
112
|
+
|
|
113
|
+
hard_to_borrow_percentage_rate = self.hard_to_borrow_percentage_rate
|
|
114
|
+
|
|
115
|
+
option_contract_price_increments: dict[str, Any] | Unset = UNSET
|
|
116
|
+
if not isinstance(self.option_contract_price_increments, Unset):
|
|
117
|
+
option_contract_price_increments = self.option_contract_price_increments.to_dict()
|
|
118
|
+
|
|
119
|
+
field_dict: dict[str, Any] = {}
|
|
120
|
+
field_dict.update(self.additional_properties)
|
|
121
|
+
field_dict.update(
|
|
122
|
+
{
|
|
123
|
+
"instrument": instrument,
|
|
124
|
+
"trading": trading,
|
|
125
|
+
"fractionalTrading": fractional_trading,
|
|
126
|
+
"optionTrading": option_trading,
|
|
127
|
+
"optionSpreadTrading": option_spread_trading,
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
if instrument_details is not UNSET:
|
|
131
|
+
field_dict["instrumentDetails"] = instrument_details
|
|
132
|
+
if shorting_availability is not UNSET:
|
|
133
|
+
field_dict["shortingAvailability"] = shorting_availability
|
|
134
|
+
if hard_to_borrow_percentage_rate is not UNSET:
|
|
135
|
+
field_dict["hardToBorrowPercentageRate"] = hard_to_borrow_percentage_rate
|
|
136
|
+
if option_contract_price_increments is not UNSET:
|
|
137
|
+
field_dict["optionContractPriceIncrements"] = option_contract_price_increments
|
|
138
|
+
|
|
139
|
+
return field_dict
|
|
140
|
+
|
|
141
|
+
@classmethod
|
|
142
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
143
|
+
from ..models.com_hellopublic_holdingsystem_core_types_option_price_increment import (
|
|
144
|
+
ComHellopublicHoldingsystemCoreTypesOptionPriceIncrement,
|
|
145
|
+
)
|
|
146
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_gateway_order_instrument import (
|
|
147
|
+
ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument,
|
|
148
|
+
)
|
|
149
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_instrumentdetails_api_instrument_details_bond import (
|
|
150
|
+
ComHellopublicUserapigatewayApiRestOrderInstrumentdetailsApiInstrumentDetailsBond,
|
|
151
|
+
)
|
|
152
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_instrumentdetails_api_instrument_details_crypto import (
|
|
153
|
+
ComHellopublicUserapigatewayApiRestOrderInstrumentdetailsApiInstrumentDetailsCrypto,
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
d = dict(src_dict)
|
|
157
|
+
instrument = ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument.from_dict(
|
|
158
|
+
d.pop("instrument")
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
trading = ComHellopublicUserapigatewayApiRestOrderApiInstrumentDtoTrading(d.pop("trading"))
|
|
162
|
+
|
|
163
|
+
fractional_trading = (
|
|
164
|
+
ComHellopublicUserapigatewayApiRestOrderApiInstrumentDtoFractionalTrading(
|
|
165
|
+
d.pop("fractionalTrading")
|
|
166
|
+
)
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
option_trading = ComHellopublicUserapigatewayApiRestOrderApiInstrumentDtoOptionTrading(
|
|
170
|
+
d.pop("optionTrading")
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
option_spread_trading = (
|
|
174
|
+
ComHellopublicUserapigatewayApiRestOrderApiInstrumentDtoOptionSpreadTrading(
|
|
175
|
+
d.pop("optionSpreadTrading")
|
|
176
|
+
)
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
def _parse_instrument_details(
|
|
180
|
+
data: object,
|
|
181
|
+
) -> (
|
|
182
|
+
ComHellopublicUserapigatewayApiRestOrderInstrumentdetailsApiInstrumentDetailsBond
|
|
183
|
+
| ComHellopublicUserapigatewayApiRestOrderInstrumentdetailsApiInstrumentDetailsCrypto
|
|
184
|
+
| Unset
|
|
185
|
+
):
|
|
186
|
+
if isinstance(data, Unset):
|
|
187
|
+
return data
|
|
188
|
+
try:
|
|
189
|
+
if not isinstance(data, dict):
|
|
190
|
+
raise TypeError()
|
|
191
|
+
instrument_details_type_0 = ComHellopublicUserapigatewayApiRestOrderInstrumentdetailsApiInstrumentDetailsBond.from_dict(
|
|
192
|
+
data
|
|
193
|
+
)
|
|
194
|
+
|
|
195
|
+
return instrument_details_type_0
|
|
196
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
197
|
+
pass
|
|
198
|
+
if not isinstance(data, dict):
|
|
199
|
+
raise TypeError()
|
|
200
|
+
instrument_details_type_1 = ComHellopublicUserapigatewayApiRestOrderInstrumentdetailsApiInstrumentDetailsCrypto.from_dict(
|
|
201
|
+
data
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
return instrument_details_type_1
|
|
205
|
+
|
|
206
|
+
instrument_details = _parse_instrument_details(d.pop("instrumentDetails", UNSET))
|
|
207
|
+
|
|
208
|
+
_shorting_availability = d.pop("shortingAvailability", UNSET)
|
|
209
|
+
shorting_availability: (
|
|
210
|
+
ComHellopublicUserapigatewayApiRestOrderApiInstrumentDtoShortingAvailability | Unset
|
|
211
|
+
)
|
|
212
|
+
if isinstance(_shorting_availability, Unset):
|
|
213
|
+
shorting_availability = UNSET
|
|
214
|
+
else:
|
|
215
|
+
shorting_availability = (
|
|
216
|
+
ComHellopublicUserapigatewayApiRestOrderApiInstrumentDtoShortingAvailability(
|
|
217
|
+
_shorting_availability
|
|
218
|
+
)
|
|
219
|
+
)
|
|
220
|
+
|
|
221
|
+
hard_to_borrow_percentage_rate = d.pop("hardToBorrowPercentageRate", UNSET)
|
|
222
|
+
|
|
223
|
+
_option_contract_price_increments = d.pop("optionContractPriceIncrements", UNSET)
|
|
224
|
+
option_contract_price_increments: (
|
|
225
|
+
ComHellopublicHoldingsystemCoreTypesOptionPriceIncrement | Unset
|
|
226
|
+
)
|
|
227
|
+
if isinstance(_option_contract_price_increments, Unset):
|
|
228
|
+
option_contract_price_increments = UNSET
|
|
229
|
+
else:
|
|
230
|
+
option_contract_price_increments = (
|
|
231
|
+
ComHellopublicHoldingsystemCoreTypesOptionPriceIncrement.from_dict(
|
|
232
|
+
_option_contract_price_increments
|
|
233
|
+
)
|
|
234
|
+
)
|
|
235
|
+
|
|
236
|
+
com_hellopublic_userapigateway_api_rest_order_api_instrument_dto = cls(
|
|
237
|
+
instrument=instrument,
|
|
238
|
+
trading=trading,
|
|
239
|
+
fractional_trading=fractional_trading,
|
|
240
|
+
option_trading=option_trading,
|
|
241
|
+
option_spread_trading=option_spread_trading,
|
|
242
|
+
instrument_details=instrument_details,
|
|
243
|
+
shorting_availability=shorting_availability,
|
|
244
|
+
hard_to_borrow_percentage_rate=hard_to_borrow_percentage_rate,
|
|
245
|
+
option_contract_price_increments=option_contract_price_increments,
|
|
246
|
+
)
|
|
247
|
+
|
|
248
|
+
com_hellopublic_userapigateway_api_rest_order_api_instrument_dto.additional_properties = d
|
|
249
|
+
return com_hellopublic_userapigateway_api_rest_order_api_instrument_dto
|
|
250
|
+
|
|
251
|
+
@property
|
|
252
|
+
def additional_keys(self) -> list[str]:
|
|
253
|
+
return list(self.additional_properties.keys())
|
|
254
|
+
|
|
255
|
+
def __getitem__(self, key: str) -> Any:
|
|
256
|
+
return self.additional_properties[key]
|
|
257
|
+
|
|
258
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
259
|
+
self.additional_properties[key] = value
|
|
260
|
+
|
|
261
|
+
def __delitem__(self, key: str) -> None:
|
|
262
|
+
del self.additional_properties[key]
|
|
263
|
+
|
|
264
|
+
def __contains__(self, key: str) -> bool:
|
|
265
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ComHellopublicUserapigatewayApiRestOrderApiInstrumentDtoFractionalTrading(str, Enum):
|
|
5
|
+
BUY_AND_SELL = "BUY_AND_SELL"
|
|
6
|
+
DISABLED = "DISABLED"
|
|
7
|
+
LIQUIDATION_ONLY = "LIQUIDATION_ONLY"
|
|
8
|
+
|
|
9
|
+
def __str__(self) -> str:
|
|
10
|
+
return str(self.value)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ComHellopublicUserapigatewayApiRestOrderApiInstrumentDtoOptionSpreadTrading(str, Enum):
|
|
5
|
+
BUY_AND_SELL = "BUY_AND_SELL"
|
|
6
|
+
DISABLED = "DISABLED"
|
|
7
|
+
LIQUIDATION_ONLY = "LIQUIDATION_ONLY"
|
|
8
|
+
|
|
9
|
+
def __str__(self) -> str:
|
|
10
|
+
return str(self.value)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ComHellopublicUserapigatewayApiRestOrderApiInstrumentDtoOptionTrading(str, Enum):
|
|
5
|
+
BUY_AND_SELL = "BUY_AND_SELL"
|
|
6
|
+
DISABLED = "DISABLED"
|
|
7
|
+
LIQUIDATION_ONLY = "LIQUIDATION_ONLY"
|
|
8
|
+
|
|
9
|
+
def __str__(self) -> str:
|
|
10
|
+
return str(self.value)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ComHellopublicUserapigatewayApiRestOrderApiInstrumentDtoShortingAvailability(str, Enum):
|
|
5
|
+
EASY_TO_BORROW = "EASY_TO_BORROW"
|
|
6
|
+
HARD_TO_BORROW = "HARD_TO_BORROW"
|
|
7
|
+
NOT_SHORTABLE = "NOT_SHORTABLE"
|
|
8
|
+
|
|
9
|
+
def __str__(self) -> str:
|
|
10
|
+
return str(self.value)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ComHellopublicUserapigatewayApiRestOrderApiInstrumentDtoTrading(str, Enum):
|
|
5
|
+
BUY_AND_SELL = "BUY_AND_SELL"
|
|
6
|
+
DISABLED = "DISABLED"
|
|
7
|
+
LIQUIDATION_ONLY = "LIQUIDATION_ONLY"
|
|
8
|
+
|
|
9
|
+
def __str__(self) -> str:
|
|
10
|
+
return str(self.value)
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
if TYPE_CHECKING:
|
|
12
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_api_instrument_dto import (
|
|
13
|
+
ComHellopublicUserapigatewayApiRestOrderApiInstrumentDto,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
T = TypeVar("T", bound="ComHellopublicUserapigatewayApiRestOrderApiInstrumentResponse")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@_attrs_define
|
|
21
|
+
class ComHellopublicUserapigatewayApiRestOrderApiInstrumentResponse:
|
|
22
|
+
"""
|
|
23
|
+
Attributes:
|
|
24
|
+
instruments (list[ComHellopublicUserapigatewayApiRestOrderApiInstrumentDto] | Unset):
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
instruments: list[ComHellopublicUserapigatewayApiRestOrderApiInstrumentDto] | Unset = UNSET
|
|
28
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
29
|
+
|
|
30
|
+
def to_dict(self) -> dict[str, Any]:
|
|
31
|
+
instruments: list[dict[str, Any]] | Unset = UNSET
|
|
32
|
+
if not isinstance(self.instruments, Unset):
|
|
33
|
+
instruments = []
|
|
34
|
+
for instruments_item_data in self.instruments:
|
|
35
|
+
instruments_item = instruments_item_data.to_dict()
|
|
36
|
+
instruments.append(instruments_item)
|
|
37
|
+
|
|
38
|
+
field_dict: dict[str, Any] = {}
|
|
39
|
+
field_dict.update(self.additional_properties)
|
|
40
|
+
field_dict.update({})
|
|
41
|
+
if instruments is not UNSET:
|
|
42
|
+
field_dict["instruments"] = instruments
|
|
43
|
+
|
|
44
|
+
return field_dict
|
|
45
|
+
|
|
46
|
+
@classmethod
|
|
47
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
48
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_api_instrument_dto import (
|
|
49
|
+
ComHellopublicUserapigatewayApiRestOrderApiInstrumentDto,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
d = dict(src_dict)
|
|
53
|
+
_instruments = d.pop("instruments", UNSET)
|
|
54
|
+
instruments: list[ComHellopublicUserapigatewayApiRestOrderApiInstrumentDto] | Unset = UNSET
|
|
55
|
+
if _instruments is not UNSET:
|
|
56
|
+
instruments = []
|
|
57
|
+
for instruments_item_data in _instruments:
|
|
58
|
+
instruments_item = (
|
|
59
|
+
ComHellopublicUserapigatewayApiRestOrderApiInstrumentDto.from_dict(
|
|
60
|
+
instruments_item_data
|
|
61
|
+
)
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
instruments.append(instruments_item)
|
|
65
|
+
|
|
66
|
+
com_hellopublic_userapigateway_api_rest_order_api_instrument_response = cls(
|
|
67
|
+
instruments=instruments,
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
com_hellopublic_userapigateway_api_rest_order_api_instrument_response.additional_properties = d
|
|
71
|
+
return com_hellopublic_userapigateway_api_rest_order_api_instrument_response
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def additional_keys(self) -> list[str]:
|
|
75
|
+
return list(self.additional_properties.keys())
|
|
76
|
+
|
|
77
|
+
def __getitem__(self, key: str) -> Any:
|
|
78
|
+
return self.additional_properties[key]
|
|
79
|
+
|
|
80
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
81
|
+
self.additional_properties[key] = value
|
|
82
|
+
|
|
83
|
+
def __delitem__(self, key: str) -> None:
|
|
84
|
+
del self.additional_properties[key]
|
|
85
|
+
|
|
86
|
+
def __contains__(self, key: str) -> bool:
|
|
87
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,141 @@
|
|
|
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_multileg_order_request_type import (
|
|
11
|
+
ComHellopublicUserapigatewayApiRestOrderApiMultilegOrderRequestType,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
if TYPE_CHECKING:
|
|
15
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_gateway_order_leg import (
|
|
16
|
+
ComHellopublicUserapigatewayApiRestOrderGatewayOrderLeg,
|
|
17
|
+
)
|
|
18
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_order_expiration import (
|
|
19
|
+
ComHellopublicUserapigatewayApiRestOrderOrderExpiration,
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
T = TypeVar("T", bound="ComHellopublicUserapigatewayApiRestOrderApiMultilegOrderRequest")
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@_attrs_define
|
|
27
|
+
class ComHellopublicUserapigatewayApiRestOrderApiMultilegOrderRequest:
|
|
28
|
+
"""Used for multileg orders placed via the UserApiGatewayService or other service where the order is just a single
|
|
29
|
+
request and the orderId is generated by the client
|
|
30
|
+
|
|
31
|
+
Attributes:
|
|
32
|
+
order_id (UUID): The OrderId, a UUID conforming to RFC 4122 (8-4-4-4-12 format, e.g.,
|
|
33
|
+
0d2abd8d-3625-4c83-a806-98abf35567cc), globally unique over time. Serves as the deduplication key; if reused on
|
|
34
|
+
the same account, the operation is idempotent.
|
|
35
|
+
quantity (int): The order quantity
|
|
36
|
+
type_ (ComHellopublicUserapigatewayApiRestOrderApiMultilegOrderRequestType): The order type. Only LIMIT order
|
|
37
|
+
are allowed
|
|
38
|
+
limit_price (str): The limit price for the order. For debit spreads the limit price must be positive, for create
|
|
39
|
+
spreads the limit price is negative
|
|
40
|
+
expiration (ComHellopublicUserapigatewayApiRestOrderOrderExpiration):
|
|
41
|
+
legs (list[ComHellopublicUserapigatewayApiRestOrderGatewayOrderLeg]): From 2-6 legs. There can be at most 1
|
|
42
|
+
equity leg
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
order_id: UUID
|
|
46
|
+
quantity: int
|
|
47
|
+
type_: ComHellopublicUserapigatewayApiRestOrderApiMultilegOrderRequestType
|
|
48
|
+
limit_price: str
|
|
49
|
+
expiration: ComHellopublicUserapigatewayApiRestOrderOrderExpiration
|
|
50
|
+
legs: list[ComHellopublicUserapigatewayApiRestOrderGatewayOrderLeg]
|
|
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
|
+
quantity = self.quantity
|
|
57
|
+
|
|
58
|
+
type_ = self.type_.value
|
|
59
|
+
|
|
60
|
+
limit_price = self.limit_price
|
|
61
|
+
|
|
62
|
+
expiration = self.expiration.to_dict()
|
|
63
|
+
|
|
64
|
+
legs = []
|
|
65
|
+
for legs_item_data in self.legs:
|
|
66
|
+
legs_item = legs_item_data.to_dict()
|
|
67
|
+
legs.append(legs_item)
|
|
68
|
+
|
|
69
|
+
field_dict: dict[str, Any] = {}
|
|
70
|
+
field_dict.update(self.additional_properties)
|
|
71
|
+
field_dict.update(
|
|
72
|
+
{
|
|
73
|
+
"orderId": order_id,
|
|
74
|
+
"quantity": quantity,
|
|
75
|
+
"type": type_,
|
|
76
|
+
"limitPrice": limit_price,
|
|
77
|
+
"expiration": expiration,
|
|
78
|
+
"legs": legs,
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
return field_dict
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
86
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_gateway_order_leg import (
|
|
87
|
+
ComHellopublicUserapigatewayApiRestOrderGatewayOrderLeg,
|
|
88
|
+
)
|
|
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
|
+
quantity = d.pop("quantity")
|
|
97
|
+
|
|
98
|
+
type_ = ComHellopublicUserapigatewayApiRestOrderApiMultilegOrderRequestType(d.pop("type"))
|
|
99
|
+
|
|
100
|
+
limit_price = d.pop("limitPrice")
|
|
101
|
+
|
|
102
|
+
expiration = ComHellopublicUserapigatewayApiRestOrderOrderExpiration.from_dict(
|
|
103
|
+
d.pop("expiration")
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
legs = []
|
|
107
|
+
_legs = d.pop("legs")
|
|
108
|
+
for legs_item_data in _legs:
|
|
109
|
+
legs_item = ComHellopublicUserapigatewayApiRestOrderGatewayOrderLeg.from_dict(
|
|
110
|
+
legs_item_data
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
legs.append(legs_item)
|
|
114
|
+
|
|
115
|
+
com_hellopublic_userapigateway_api_rest_order_api_multileg_order_request = cls(
|
|
116
|
+
order_id=order_id,
|
|
117
|
+
quantity=quantity,
|
|
118
|
+
type_=type_,
|
|
119
|
+
limit_price=limit_price,
|
|
120
|
+
expiration=expiration,
|
|
121
|
+
legs=legs,
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
com_hellopublic_userapigateway_api_rest_order_api_multileg_order_request.additional_properties = d
|
|
125
|
+
return com_hellopublic_userapigateway_api_rest_order_api_multileg_order_request
|
|
126
|
+
|
|
127
|
+
@property
|
|
128
|
+
def additional_keys(self) -> list[str]:
|
|
129
|
+
return list(self.additional_properties.keys())
|
|
130
|
+
|
|
131
|
+
def __getitem__(self, key: str) -> Any:
|
|
132
|
+
return self.additional_properties[key]
|
|
133
|
+
|
|
134
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
135
|
+
self.additional_properties[key] = value
|
|
136
|
+
|
|
137
|
+
def __delitem__(self, key: str) -> None:
|
|
138
|
+
del self.additional_properties[key]
|
|
139
|
+
|
|
140
|
+
def __contains__(self, key: str) -> bool:
|
|
141
|
+
return key in self.additional_properties
|