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,231 @@
|
|
|
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_order_request_equity_market_session import (
|
|
11
|
+
ComHellopublicUserapigatewayApiRestOrderApiOrderRequestEquityMarketSession,
|
|
12
|
+
)
|
|
13
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_api_order_request_open_close_indicator import (
|
|
14
|
+
ComHellopublicUserapigatewayApiRestOrderApiOrderRequestOpenCloseIndicator,
|
|
15
|
+
)
|
|
16
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_api_order_request_order_side import (
|
|
17
|
+
ComHellopublicUserapigatewayApiRestOrderApiOrderRequestOrderSide,
|
|
18
|
+
)
|
|
19
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_api_order_request_order_type import (
|
|
20
|
+
ComHellopublicUserapigatewayApiRestOrderApiOrderRequestOrderType,
|
|
21
|
+
)
|
|
22
|
+
from ..types import UNSET, Unset
|
|
23
|
+
|
|
24
|
+
if TYPE_CHECKING:
|
|
25
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_gateway_order_instrument import (
|
|
26
|
+
ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument,
|
|
27
|
+
)
|
|
28
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_order_expiration import (
|
|
29
|
+
ComHellopublicUserapigatewayApiRestOrderOrderExpiration,
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
T = TypeVar("T", bound="ComHellopublicUserapigatewayApiRestOrderApiOrderRequest")
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
@_attrs_define
|
|
37
|
+
class ComHellopublicUserapigatewayApiRestOrderApiOrderRequest:
|
|
38
|
+
"""Used for orders placed via the UserApiGatewayService or other service where the order is just a single request and
|
|
39
|
+
the orderId is generated by the client
|
|
40
|
+
|
|
41
|
+
Attributes:
|
|
42
|
+
order_id (UUID): The OrderId, a UUID conforming to RFC 4122 (standard 8-4-4-4-12 format, e.g.,
|
|
43
|
+
0d2abd8d-3625-4c83-a806-98abf35567cc),
|
|
44
|
+
must be globally unique over time.
|
|
45
|
+
This value serves as the deduplication key; if reused on the same account, the operation is idempotent.
|
|
46
|
+
If the order is re-submitted due to a read timeout, do not modify any properties. If the original request
|
|
47
|
+
succeeded, altering fields will have no effect.
|
|
48
|
+
instrument (ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument):
|
|
49
|
+
order_side (ComHellopublicUserapigatewayApiRestOrderApiOrderRequestOrderSide): The Order Side BUY/SELL. For
|
|
50
|
+
Options also include the openCloseIndicator
|
|
51
|
+
order_type (ComHellopublicUserapigatewayApiRestOrderApiOrderRequestOrderType): The Type of order
|
|
52
|
+
expiration (ComHellopublicUserapigatewayApiRestOrderOrderExpiration):
|
|
53
|
+
quantity (str | Unset): The order quantity. Used when buying/selling whole shares and when selling fractional.
|
|
54
|
+
Mutually exclusive with `amount`
|
|
55
|
+
amount (str | Unset): The order amount. Used when buying/selling shares for a specific notional value
|
|
56
|
+
limit_price (str | Unset): The limit price. Used when orderType = LIMIT or orderType = STOP_LIMIT
|
|
57
|
+
stop_price (str | Unset): The stop price. Used when orderType = STOP or orderType = STOP_LIMIT
|
|
58
|
+
equity_market_session (ComHellopublicUserapigatewayApiRestOrderApiOrderRequestEquityMarketSession | Unset): The
|
|
59
|
+
market session in which the order may execute.
|
|
60
|
+
Extended hours are available only for DAY time-in-force equity orders and can execute any time from 4:00 a.m. ET
|
|
61
|
+
through 8:00 p.m. ET.
|
|
62
|
+
If omitted, the session defaults to CORE.
|
|
63
|
+
open_close_indicator (ComHellopublicUserapigatewayApiRestOrderApiOrderRequestOpenCloseIndicator | Unset): Used
|
|
64
|
+
for options to indicate if this is BUY to OPEN/CLOSE. Also used for shorting equities to indicate SELL-to-OPEN
|
|
65
|
+
(opening a short position) or BUY-to-CLOSE (closing a short position).
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
order_id: UUID
|
|
69
|
+
instrument: ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument
|
|
70
|
+
order_side: ComHellopublicUserapigatewayApiRestOrderApiOrderRequestOrderSide
|
|
71
|
+
order_type: ComHellopublicUserapigatewayApiRestOrderApiOrderRequestOrderType
|
|
72
|
+
expiration: ComHellopublicUserapigatewayApiRestOrderOrderExpiration
|
|
73
|
+
quantity: str | Unset = UNSET
|
|
74
|
+
amount: str | Unset = UNSET
|
|
75
|
+
limit_price: str | Unset = UNSET
|
|
76
|
+
stop_price: str | Unset = UNSET
|
|
77
|
+
equity_market_session: (
|
|
78
|
+
ComHellopublicUserapigatewayApiRestOrderApiOrderRequestEquityMarketSession | Unset
|
|
79
|
+
) = UNSET
|
|
80
|
+
open_close_indicator: (
|
|
81
|
+
ComHellopublicUserapigatewayApiRestOrderApiOrderRequestOpenCloseIndicator | Unset
|
|
82
|
+
) = UNSET
|
|
83
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
84
|
+
|
|
85
|
+
def to_dict(self) -> dict[str, Any]:
|
|
86
|
+
order_id = str(self.order_id)
|
|
87
|
+
|
|
88
|
+
instrument = self.instrument.to_dict()
|
|
89
|
+
|
|
90
|
+
order_side = self.order_side.value
|
|
91
|
+
|
|
92
|
+
order_type = self.order_type.value
|
|
93
|
+
|
|
94
|
+
expiration = self.expiration.to_dict()
|
|
95
|
+
|
|
96
|
+
quantity = self.quantity
|
|
97
|
+
|
|
98
|
+
amount = self.amount
|
|
99
|
+
|
|
100
|
+
limit_price = self.limit_price
|
|
101
|
+
|
|
102
|
+
stop_price = self.stop_price
|
|
103
|
+
|
|
104
|
+
equity_market_session: str | Unset = UNSET
|
|
105
|
+
if not isinstance(self.equity_market_session, Unset):
|
|
106
|
+
equity_market_session = self.equity_market_session.value
|
|
107
|
+
|
|
108
|
+
open_close_indicator: str | Unset = UNSET
|
|
109
|
+
if not isinstance(self.open_close_indicator, Unset):
|
|
110
|
+
open_close_indicator = self.open_close_indicator.value
|
|
111
|
+
|
|
112
|
+
field_dict: dict[str, Any] = {}
|
|
113
|
+
field_dict.update(self.additional_properties)
|
|
114
|
+
field_dict.update(
|
|
115
|
+
{
|
|
116
|
+
"orderId": order_id,
|
|
117
|
+
"instrument": instrument,
|
|
118
|
+
"orderSide": order_side,
|
|
119
|
+
"orderType": order_type,
|
|
120
|
+
"expiration": expiration,
|
|
121
|
+
}
|
|
122
|
+
)
|
|
123
|
+
if quantity is not UNSET:
|
|
124
|
+
field_dict["quantity"] = quantity
|
|
125
|
+
if amount is not UNSET:
|
|
126
|
+
field_dict["amount"] = amount
|
|
127
|
+
if limit_price is not UNSET:
|
|
128
|
+
field_dict["limitPrice"] = limit_price
|
|
129
|
+
if stop_price is not UNSET:
|
|
130
|
+
field_dict["stopPrice"] = stop_price
|
|
131
|
+
if equity_market_session is not UNSET:
|
|
132
|
+
field_dict["equityMarketSession"] = equity_market_session
|
|
133
|
+
if open_close_indicator is not UNSET:
|
|
134
|
+
field_dict["openCloseIndicator"] = open_close_indicator
|
|
135
|
+
|
|
136
|
+
return field_dict
|
|
137
|
+
|
|
138
|
+
@classmethod
|
|
139
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
140
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_gateway_order_instrument import (
|
|
141
|
+
ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument,
|
|
142
|
+
)
|
|
143
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_order_expiration import (
|
|
144
|
+
ComHellopublicUserapigatewayApiRestOrderOrderExpiration,
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
d = dict(src_dict)
|
|
148
|
+
order_id = UUID(d.pop("orderId"))
|
|
149
|
+
|
|
150
|
+
instrument = ComHellopublicUserapigatewayApiRestOrderGatewayOrderInstrument.from_dict(
|
|
151
|
+
d.pop("instrument")
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
order_side = ComHellopublicUserapigatewayApiRestOrderApiOrderRequestOrderSide(
|
|
155
|
+
d.pop("orderSide")
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
order_type = ComHellopublicUserapigatewayApiRestOrderApiOrderRequestOrderType(
|
|
159
|
+
d.pop("orderType")
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
expiration = ComHellopublicUserapigatewayApiRestOrderOrderExpiration.from_dict(
|
|
163
|
+
d.pop("expiration")
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
quantity = d.pop("quantity", UNSET)
|
|
167
|
+
|
|
168
|
+
amount = d.pop("amount", UNSET)
|
|
169
|
+
|
|
170
|
+
limit_price = d.pop("limitPrice", UNSET)
|
|
171
|
+
|
|
172
|
+
stop_price = d.pop("stopPrice", UNSET)
|
|
173
|
+
|
|
174
|
+
_equity_market_session = d.pop("equityMarketSession", UNSET)
|
|
175
|
+
equity_market_session: (
|
|
176
|
+
ComHellopublicUserapigatewayApiRestOrderApiOrderRequestEquityMarketSession | Unset
|
|
177
|
+
)
|
|
178
|
+
if isinstance(_equity_market_session, Unset):
|
|
179
|
+
equity_market_session = UNSET
|
|
180
|
+
else:
|
|
181
|
+
equity_market_session = (
|
|
182
|
+
ComHellopublicUserapigatewayApiRestOrderApiOrderRequestEquityMarketSession(
|
|
183
|
+
_equity_market_session
|
|
184
|
+
)
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
_open_close_indicator = d.pop("openCloseIndicator", UNSET)
|
|
188
|
+
open_close_indicator: (
|
|
189
|
+
ComHellopublicUserapigatewayApiRestOrderApiOrderRequestOpenCloseIndicator | Unset
|
|
190
|
+
)
|
|
191
|
+
if isinstance(_open_close_indicator, Unset):
|
|
192
|
+
open_close_indicator = UNSET
|
|
193
|
+
else:
|
|
194
|
+
open_close_indicator = (
|
|
195
|
+
ComHellopublicUserapigatewayApiRestOrderApiOrderRequestOpenCloseIndicator(
|
|
196
|
+
_open_close_indicator
|
|
197
|
+
)
|
|
198
|
+
)
|
|
199
|
+
|
|
200
|
+
com_hellopublic_userapigateway_api_rest_order_api_order_request = cls(
|
|
201
|
+
order_id=order_id,
|
|
202
|
+
instrument=instrument,
|
|
203
|
+
order_side=order_side,
|
|
204
|
+
order_type=order_type,
|
|
205
|
+
expiration=expiration,
|
|
206
|
+
quantity=quantity,
|
|
207
|
+
amount=amount,
|
|
208
|
+
limit_price=limit_price,
|
|
209
|
+
stop_price=stop_price,
|
|
210
|
+
equity_market_session=equity_market_session,
|
|
211
|
+
open_close_indicator=open_close_indicator,
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
com_hellopublic_userapigateway_api_rest_order_api_order_request.additional_properties = d
|
|
215
|
+
return com_hellopublic_userapigateway_api_rest_order_api_order_request
|
|
216
|
+
|
|
217
|
+
@property
|
|
218
|
+
def additional_keys(self) -> list[str]:
|
|
219
|
+
return list(self.additional_properties.keys())
|
|
220
|
+
|
|
221
|
+
def __getitem__(self, key: str) -> Any:
|
|
222
|
+
return self.additional_properties[key]
|
|
223
|
+
|
|
224
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
225
|
+
self.additional_properties[key] = value
|
|
226
|
+
|
|
227
|
+
def __delitem__(self, key: str) -> None:
|
|
228
|
+
del self.additional_properties[key]
|
|
229
|
+
|
|
230
|
+
def __contains__(self, key: str) -> bool:
|
|
231
|
+
return key in self.additional_properties
|
publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_api_order_result.py
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import 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 ..types import UNSET, Unset
|
|
11
|
+
|
|
12
|
+
T = TypeVar("T", bound="ComHellopublicUserapigatewayApiRestOrderApiOrderResult")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class ComHellopublicUserapigatewayApiRestOrderApiOrderResult:
|
|
17
|
+
"""
|
|
18
|
+
Attributes:
|
|
19
|
+
order_id (UUID | Unset):
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
order_id: UUID | Unset = UNSET
|
|
23
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
24
|
+
|
|
25
|
+
def to_dict(self) -> dict[str, Any]:
|
|
26
|
+
order_id: str | Unset = UNSET
|
|
27
|
+
if not isinstance(self.order_id, Unset):
|
|
28
|
+
order_id = str(self.order_id)
|
|
29
|
+
|
|
30
|
+
field_dict: dict[str, Any] = {}
|
|
31
|
+
field_dict.update(self.additional_properties)
|
|
32
|
+
field_dict.update({})
|
|
33
|
+
if order_id is not UNSET:
|
|
34
|
+
field_dict["orderId"] = order_id
|
|
35
|
+
|
|
36
|
+
return field_dict
|
|
37
|
+
|
|
38
|
+
@classmethod
|
|
39
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
40
|
+
d = dict(src_dict)
|
|
41
|
+
_order_id = d.pop("orderId", UNSET)
|
|
42
|
+
order_id: UUID | Unset
|
|
43
|
+
if isinstance(_order_id, Unset):
|
|
44
|
+
order_id = UNSET
|
|
45
|
+
else:
|
|
46
|
+
order_id = UUID(_order_id)
|
|
47
|
+
|
|
48
|
+
com_hellopublic_userapigateway_api_rest_order_api_order_result = cls(
|
|
49
|
+
order_id=order_id,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
com_hellopublic_userapigateway_api_rest_order_api_order_result.additional_properties = d
|
|
53
|
+
return com_hellopublic_userapigateway_api_rest_order_api_order_result
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def additional_keys(self) -> list[str]:
|
|
57
|
+
return list(self.additional_properties.keys())
|
|
58
|
+
|
|
59
|
+
def __getitem__(self, key: str) -> Any:
|
|
60
|
+
return self.additional_properties[key]
|
|
61
|
+
|
|
62
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
63
|
+
self.additional_properties[key] = value
|
|
64
|
+
|
|
65
|
+
def __delitem__(self, key: str) -> None:
|
|
66
|
+
del self.additional_properties[key]
|
|
67
|
+
|
|
68
|
+
def __contains__(self, key: str) -> bool:
|
|
69
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_gateway_leg_instrument_type import (
|
|
10
|
+
ComHellopublicUserapigatewayApiRestOrderGatewayLegInstrumentType,
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="ComHellopublicUserapigatewayApiRestOrderGatewayLegInstrument")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class ComHellopublicUserapigatewayApiRestOrderGatewayLegInstrument:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
symbol (str):
|
|
21
|
+
type_ (ComHellopublicUserapigatewayApiRestOrderGatewayLegInstrumentType):
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
symbol: str
|
|
25
|
+
type_: ComHellopublicUserapigatewayApiRestOrderGatewayLegInstrumentType
|
|
26
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
|
+
|
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
|
29
|
+
symbol = self.symbol
|
|
30
|
+
|
|
31
|
+
type_ = self.type_.value
|
|
32
|
+
|
|
33
|
+
field_dict: dict[str, Any] = {}
|
|
34
|
+
field_dict.update(self.additional_properties)
|
|
35
|
+
field_dict.update(
|
|
36
|
+
{
|
|
37
|
+
"symbol": symbol,
|
|
38
|
+
"type": type_,
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
return field_dict
|
|
43
|
+
|
|
44
|
+
@classmethod
|
|
45
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
46
|
+
d = dict(src_dict)
|
|
47
|
+
symbol = d.pop("symbol")
|
|
48
|
+
|
|
49
|
+
type_ = ComHellopublicUserapigatewayApiRestOrderGatewayLegInstrumentType(d.pop("type"))
|
|
50
|
+
|
|
51
|
+
com_hellopublic_userapigateway_api_rest_order_gateway_leg_instrument = cls(
|
|
52
|
+
symbol=symbol,
|
|
53
|
+
type_=type_,
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
com_hellopublic_userapigateway_api_rest_order_gateway_leg_instrument.additional_properties = d
|
|
57
|
+
return com_hellopublic_userapigateway_api_rest_order_gateway_leg_instrument
|
|
58
|
+
|
|
59
|
+
@property
|
|
60
|
+
def additional_keys(self) -> list[str]:
|
|
61
|
+
return list(self.additional_properties.keys())
|
|
62
|
+
|
|
63
|
+
def __getitem__(self, key: str) -> Any:
|
|
64
|
+
return self.additional_properties[key]
|
|
65
|
+
|
|
66
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
67
|
+
self.additional_properties[key] = value
|
|
68
|
+
|
|
69
|
+
def __delitem__(self, key: str) -> None:
|
|
70
|
+
del self.additional_properties[key]
|
|
71
|
+
|
|
72
|
+
def __contains__(self, key: str) -> bool:
|
|
73
|
+
return key in self.additional_properties
|