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,127 @@
|
|
|
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_short_selling_availability import (
|
|
10
|
+
ComHellopublicUserapigatewayApiRestOrderGatewayShortSellingAvailability,
|
|
11
|
+
)
|
|
12
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_gateway_short_selling_uptick_rule import (
|
|
13
|
+
ComHellopublicUserapigatewayApiRestOrderGatewayShortSellingUptickRule,
|
|
14
|
+
)
|
|
15
|
+
from ..types import UNSET, Unset
|
|
16
|
+
|
|
17
|
+
T = TypeVar("T", bound="ComHellopublicUserapigatewayApiRestOrderGatewayShortSelling")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@_attrs_define
|
|
21
|
+
class ComHellopublicUserapigatewayApiRestOrderGatewayShortSelling:
|
|
22
|
+
"""Short-selling information for the given instrument.
|
|
23
|
+
|
|
24
|
+
Attributes:
|
|
25
|
+
availability (ComHellopublicUserapigatewayApiRestOrderGatewayShortSellingAvailability): the availability of
|
|
26
|
+
short-selling for this instrument.
|
|
27
|
+
uptick_rule (ComHellopublicUserapigatewayApiRestOrderGatewayShortSellingUptickRule): the Uptick Rule is
|
|
28
|
+
triggered for equities when the price today or yesterday has dropped at least 10 percent since previous days'
|
|
29
|
+
closing price.
|
|
30
|
+
hard_to_borrow_percentage_rate (str | Unset): the hard to borrow rate as a percentage value.
|
|
31
|
+
initial_margin_requirement_percentage (str | Unset): the initial margin requirement as a percentage value.
|
|
32
|
+
maintenance_margin_requirement_percentage (str | Unset): the maintenance margin requirement as a percentage
|
|
33
|
+
value.
|
|
34
|
+
max_quantity_for_locate (int | Unset): the maximum quantity that we can request to locate for all hard-to-borrow
|
|
35
|
+
stocks. The actual number we can locate can be lower for concrete stocks.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
availability: ComHellopublicUserapigatewayApiRestOrderGatewayShortSellingAvailability
|
|
39
|
+
uptick_rule: ComHellopublicUserapigatewayApiRestOrderGatewayShortSellingUptickRule
|
|
40
|
+
hard_to_borrow_percentage_rate: str | Unset = UNSET
|
|
41
|
+
initial_margin_requirement_percentage: str | Unset = UNSET
|
|
42
|
+
maintenance_margin_requirement_percentage: str | Unset = UNSET
|
|
43
|
+
max_quantity_for_locate: int | Unset = UNSET
|
|
44
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
45
|
+
|
|
46
|
+
def to_dict(self) -> dict[str, Any]:
|
|
47
|
+
availability = self.availability.value
|
|
48
|
+
|
|
49
|
+
uptick_rule = self.uptick_rule.value
|
|
50
|
+
|
|
51
|
+
hard_to_borrow_percentage_rate = self.hard_to_borrow_percentage_rate
|
|
52
|
+
|
|
53
|
+
initial_margin_requirement_percentage = self.initial_margin_requirement_percentage
|
|
54
|
+
|
|
55
|
+
maintenance_margin_requirement_percentage = self.maintenance_margin_requirement_percentage
|
|
56
|
+
|
|
57
|
+
max_quantity_for_locate = self.max_quantity_for_locate
|
|
58
|
+
|
|
59
|
+
field_dict: dict[str, Any] = {}
|
|
60
|
+
field_dict.update(self.additional_properties)
|
|
61
|
+
field_dict.update(
|
|
62
|
+
{
|
|
63
|
+
"availability": availability,
|
|
64
|
+
"uptickRule": uptick_rule,
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
if hard_to_borrow_percentage_rate is not UNSET:
|
|
68
|
+
field_dict["hardToBorrowPercentageRate"] = hard_to_borrow_percentage_rate
|
|
69
|
+
if initial_margin_requirement_percentage is not UNSET:
|
|
70
|
+
field_dict["initialMarginRequirementPercentage"] = initial_margin_requirement_percentage
|
|
71
|
+
if maintenance_margin_requirement_percentage is not UNSET:
|
|
72
|
+
field_dict["maintenanceMarginRequirementPercentage"] = (
|
|
73
|
+
maintenance_margin_requirement_percentage
|
|
74
|
+
)
|
|
75
|
+
if max_quantity_for_locate is not UNSET:
|
|
76
|
+
field_dict["maxQuantityForLocate"] = max_quantity_for_locate
|
|
77
|
+
|
|
78
|
+
return field_dict
|
|
79
|
+
|
|
80
|
+
@classmethod
|
|
81
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
82
|
+
d = dict(src_dict)
|
|
83
|
+
availability = ComHellopublicUserapigatewayApiRestOrderGatewayShortSellingAvailability(
|
|
84
|
+
d.pop("availability")
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
uptick_rule = ComHellopublicUserapigatewayApiRestOrderGatewayShortSellingUptickRule(
|
|
88
|
+
d.pop("uptickRule")
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
hard_to_borrow_percentage_rate = d.pop("hardToBorrowPercentageRate", UNSET)
|
|
92
|
+
|
|
93
|
+
initial_margin_requirement_percentage = d.pop("initialMarginRequirementPercentage", UNSET)
|
|
94
|
+
|
|
95
|
+
maintenance_margin_requirement_percentage = d.pop(
|
|
96
|
+
"maintenanceMarginRequirementPercentage", UNSET
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
max_quantity_for_locate = d.pop("maxQuantityForLocate", UNSET)
|
|
100
|
+
|
|
101
|
+
com_hellopublic_userapigateway_api_rest_order_gateway_short_selling = cls(
|
|
102
|
+
availability=availability,
|
|
103
|
+
uptick_rule=uptick_rule,
|
|
104
|
+
hard_to_borrow_percentage_rate=hard_to_borrow_percentage_rate,
|
|
105
|
+
initial_margin_requirement_percentage=initial_margin_requirement_percentage,
|
|
106
|
+
maintenance_margin_requirement_percentage=maintenance_margin_requirement_percentage,
|
|
107
|
+
max_quantity_for_locate=max_quantity_for_locate,
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
com_hellopublic_userapigateway_api_rest_order_gateway_short_selling.additional_properties = d
|
|
111
|
+
return com_hellopublic_userapigateway_api_rest_order_gateway_short_selling
|
|
112
|
+
|
|
113
|
+
@property
|
|
114
|
+
def additional_keys(self) -> list[str]:
|
|
115
|
+
return list(self.additional_properties.keys())
|
|
116
|
+
|
|
117
|
+
def __getitem__(self, key: str) -> Any:
|
|
118
|
+
return self.additional_properties[key]
|
|
119
|
+
|
|
120
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
121
|
+
self.additional_properties[key] = value
|
|
122
|
+
|
|
123
|
+
def __delitem__(self, key: str) -> None:
|
|
124
|
+
del self.additional_properties[key]
|
|
125
|
+
|
|
126
|
+
def __contains__(self, key: str) -> bool:
|
|
127
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ComHellopublicUserapigatewayApiRestOrderGatewayShortSellingAvailability(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,67 @@
|
|
|
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
|
+
T = TypeVar(
|
|
10
|
+
"T", bound="ComHellopublicUserapigatewayApiRestOrderInstrumentdetailsApiInstrumentDetails"
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class ComHellopublicUserapigatewayApiRestOrderInstrumentdetailsApiInstrumentDetails:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
payload_type (str):
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
payload_type: str
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
payload_type = self.payload_type
|
|
26
|
+
|
|
27
|
+
field_dict: dict[str, Any] = {}
|
|
28
|
+
field_dict.update(self.additional_properties)
|
|
29
|
+
field_dict.update(
|
|
30
|
+
{
|
|
31
|
+
"payloadType": payload_type,
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
return field_dict
|
|
36
|
+
|
|
37
|
+
@classmethod
|
|
38
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
39
|
+
d = dict(src_dict)
|
|
40
|
+
payload_type = d.pop("payloadType")
|
|
41
|
+
|
|
42
|
+
com_hellopublic_userapigateway_api_rest_order_instrumentdetails_api_instrument_details = (
|
|
43
|
+
cls(
|
|
44
|
+
payload_type=payload_type,
|
|
45
|
+
)
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
com_hellopublic_userapigateway_api_rest_order_instrumentdetails_api_instrument_details.additional_properties = d
|
|
49
|
+
return (
|
|
50
|
+
com_hellopublic_userapigateway_api_rest_order_instrumentdetails_api_instrument_details
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
@property
|
|
54
|
+
def additional_keys(self) -> list[str]:
|
|
55
|
+
return list(self.additional_properties.keys())
|
|
56
|
+
|
|
57
|
+
def __getitem__(self, key: str) -> Any:
|
|
58
|
+
return self.additional_properties[key]
|
|
59
|
+
|
|
60
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
61
|
+
self.additional_properties[key] = value
|
|
62
|
+
|
|
63
|
+
def __delitem__(self, key: str) -> None:
|
|
64
|
+
del self.additional_properties[key]
|
|
65
|
+
|
|
66
|
+
def __contains__(self, key: str) -> bool:
|
|
67
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar(
|
|
12
|
+
"T", bound="ComHellopublicUserapigatewayApiRestOrderInstrumentdetailsApiInstrumentDetailsBond"
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class ComHellopublicUserapigatewayApiRestOrderInstrumentdetailsApiInstrumentDetailsBond:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
payload_type (str):
|
|
21
|
+
has_outstanding (bool | Unset):
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
payload_type: str
|
|
25
|
+
has_outstanding: bool | Unset = UNSET
|
|
26
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
|
+
|
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
|
29
|
+
payload_type = self.payload_type
|
|
30
|
+
|
|
31
|
+
has_outstanding = self.has_outstanding
|
|
32
|
+
|
|
33
|
+
field_dict: dict[str, Any] = {}
|
|
34
|
+
field_dict.update(self.additional_properties)
|
|
35
|
+
field_dict.update(
|
|
36
|
+
{
|
|
37
|
+
"payloadType": payload_type,
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
if has_outstanding is not UNSET:
|
|
41
|
+
field_dict["hasOutstanding"] = has_outstanding
|
|
42
|
+
|
|
43
|
+
return field_dict
|
|
44
|
+
|
|
45
|
+
@classmethod
|
|
46
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
47
|
+
d = dict(src_dict)
|
|
48
|
+
payload_type = d.pop("payloadType")
|
|
49
|
+
|
|
50
|
+
has_outstanding = d.pop("hasOutstanding", UNSET)
|
|
51
|
+
|
|
52
|
+
com_hellopublic_userapigateway_api_rest_order_instrumentdetails_api_instrument_details_bond = cls(
|
|
53
|
+
payload_type=payload_type,
|
|
54
|
+
has_outstanding=has_outstanding,
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
com_hellopublic_userapigateway_api_rest_order_instrumentdetails_api_instrument_details_bond.additional_properties = d
|
|
58
|
+
return com_hellopublic_userapigateway_api_rest_order_instrumentdetails_api_instrument_details_bond
|
|
59
|
+
|
|
60
|
+
@property
|
|
61
|
+
def additional_keys(self) -> list[str]:
|
|
62
|
+
return list(self.additional_properties.keys())
|
|
63
|
+
|
|
64
|
+
def __getitem__(self, key: str) -> Any:
|
|
65
|
+
return self.additional_properties[key]
|
|
66
|
+
|
|
67
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
68
|
+
self.additional_properties[key] = value
|
|
69
|
+
|
|
70
|
+
def __delitem__(self, key: str) -> None:
|
|
71
|
+
del self.additional_properties[key]
|
|
72
|
+
|
|
73
|
+
def __contains__(self, key: str) -> bool:
|
|
74
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar(
|
|
12
|
+
"T", bound="ComHellopublicUserapigatewayApiRestOrderInstrumentdetailsApiInstrumentDetailsCrypto"
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class ComHellopublicUserapigatewayApiRestOrderInstrumentdetailsApiInstrumentDetailsCrypto:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
payload_type (str):
|
|
21
|
+
crypto_quantity_precision (int | Unset):
|
|
22
|
+
crypto_price_precision (int | Unset):
|
|
23
|
+
tradable_in_new_york (bool | Unset):
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
payload_type: str
|
|
27
|
+
crypto_quantity_precision: int | Unset = UNSET
|
|
28
|
+
crypto_price_precision: int | Unset = UNSET
|
|
29
|
+
tradable_in_new_york: bool | Unset = UNSET
|
|
30
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
31
|
+
|
|
32
|
+
def to_dict(self) -> dict[str, Any]:
|
|
33
|
+
payload_type = self.payload_type
|
|
34
|
+
|
|
35
|
+
crypto_quantity_precision = self.crypto_quantity_precision
|
|
36
|
+
|
|
37
|
+
crypto_price_precision = self.crypto_price_precision
|
|
38
|
+
|
|
39
|
+
tradable_in_new_york = self.tradable_in_new_york
|
|
40
|
+
|
|
41
|
+
field_dict: dict[str, Any] = {}
|
|
42
|
+
field_dict.update(self.additional_properties)
|
|
43
|
+
field_dict.update(
|
|
44
|
+
{
|
|
45
|
+
"payloadType": payload_type,
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
if crypto_quantity_precision is not UNSET:
|
|
49
|
+
field_dict["cryptoQuantityPrecision"] = crypto_quantity_precision
|
|
50
|
+
if crypto_price_precision is not UNSET:
|
|
51
|
+
field_dict["cryptoPricePrecision"] = crypto_price_precision
|
|
52
|
+
if tradable_in_new_york is not UNSET:
|
|
53
|
+
field_dict["tradableInNewYork"] = tradable_in_new_york
|
|
54
|
+
|
|
55
|
+
return field_dict
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
59
|
+
d = dict(src_dict)
|
|
60
|
+
payload_type = d.pop("payloadType")
|
|
61
|
+
|
|
62
|
+
crypto_quantity_precision = d.pop("cryptoQuantityPrecision", UNSET)
|
|
63
|
+
|
|
64
|
+
crypto_price_precision = d.pop("cryptoPricePrecision", UNSET)
|
|
65
|
+
|
|
66
|
+
tradable_in_new_york = d.pop("tradableInNewYork", UNSET)
|
|
67
|
+
|
|
68
|
+
com_hellopublic_userapigateway_api_rest_order_instrumentdetails_api_instrument_details_crypto = cls(
|
|
69
|
+
payload_type=payload_type,
|
|
70
|
+
crypto_quantity_precision=crypto_quantity_precision,
|
|
71
|
+
crypto_price_precision=crypto_price_precision,
|
|
72
|
+
tradable_in_new_york=tradable_in_new_york,
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
com_hellopublic_userapigateway_api_rest_order_instrumentdetails_api_instrument_details_crypto.additional_properties = d
|
|
76
|
+
return com_hellopublic_userapigateway_api_rest_order_instrumentdetails_api_instrument_details_crypto
|
|
77
|
+
|
|
78
|
+
@property
|
|
79
|
+
def additional_keys(self) -> list[str]:
|
|
80
|
+
return list(self.additional_properties.keys())
|
|
81
|
+
|
|
82
|
+
def __getitem__(self, key: str) -> Any:
|
|
83
|
+
return self.additional_properties[key]
|
|
84
|
+
|
|
85
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
86
|
+
self.additional_properties[key] = value
|
|
87
|
+
|
|
88
|
+
def __delitem__(self, key: str) -> None:
|
|
89
|
+
del self.additional_properties[key]
|
|
90
|
+
|
|
91
|
+
def __contains__(self, key: str) -> bool:
|
|
92
|
+
return key in self.additional_properties
|
publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_order_order_expiration.py
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import datetime
|
|
4
|
+
from collections.abc import Mapping
|
|
5
|
+
from typing import Any, TypeVar
|
|
6
|
+
|
|
7
|
+
from attrs import define as _attrs_define
|
|
8
|
+
from attrs import field as _attrs_field
|
|
9
|
+
from dateutil.parser import isoparse
|
|
10
|
+
|
|
11
|
+
from ..models.com_hellopublic_userapigateway_api_rest_order_order_expiration_time_in_force import (
|
|
12
|
+
ComHellopublicUserapigatewayApiRestOrderOrderExpirationTimeInForce,
|
|
13
|
+
)
|
|
14
|
+
from ..types import UNSET, Unset
|
|
15
|
+
|
|
16
|
+
T = TypeVar("T", bound="ComHellopublicUserapigatewayApiRestOrderOrderExpiration")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@_attrs_define
|
|
20
|
+
class ComHellopublicUserapigatewayApiRestOrderOrderExpiration:
|
|
21
|
+
"""
|
|
22
|
+
Attributes:
|
|
23
|
+
time_in_force (ComHellopublicUserapigatewayApiRestOrderOrderExpirationTimeInForce): The time in for the order
|
|
24
|
+
expiration_time (datetime.datetime | Unset): The expiration date. Only used when timeInForce is GTD, cannot be
|
|
25
|
+
more than 90 days in the future
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
time_in_force: ComHellopublicUserapigatewayApiRestOrderOrderExpirationTimeInForce
|
|
29
|
+
expiration_time: datetime.datetime | Unset = UNSET
|
|
30
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
31
|
+
|
|
32
|
+
def to_dict(self) -> dict[str, Any]:
|
|
33
|
+
time_in_force = self.time_in_force.value
|
|
34
|
+
|
|
35
|
+
expiration_time: str | Unset = UNSET
|
|
36
|
+
if not isinstance(self.expiration_time, Unset):
|
|
37
|
+
expiration_time = self.expiration_time.isoformat()
|
|
38
|
+
|
|
39
|
+
field_dict: dict[str, Any] = {}
|
|
40
|
+
field_dict.update(self.additional_properties)
|
|
41
|
+
field_dict.update(
|
|
42
|
+
{
|
|
43
|
+
"timeInForce": time_in_force,
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
if expiration_time is not UNSET:
|
|
47
|
+
field_dict["expirationTime"] = expiration_time
|
|
48
|
+
|
|
49
|
+
return field_dict
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
53
|
+
d = dict(src_dict)
|
|
54
|
+
time_in_force = ComHellopublicUserapigatewayApiRestOrderOrderExpirationTimeInForce(
|
|
55
|
+
d.pop("timeInForce")
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
_expiration_time = d.pop("expirationTime", UNSET)
|
|
59
|
+
expiration_time: datetime.datetime | Unset
|
|
60
|
+
if isinstance(_expiration_time, Unset):
|
|
61
|
+
expiration_time = UNSET
|
|
62
|
+
else:
|
|
63
|
+
expiration_time = isoparse(_expiration_time)
|
|
64
|
+
|
|
65
|
+
com_hellopublic_userapigateway_api_rest_order_order_expiration = cls(
|
|
66
|
+
time_in_force=time_in_force,
|
|
67
|
+
expiration_time=expiration_time,
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
com_hellopublic_userapigateway_api_rest_order_order_expiration.additional_properties = d
|
|
71
|
+
return com_hellopublic_userapigateway_api_rest_order_order_expiration
|
|
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
|
publicdotcom_cli/_generated/models/com_hellopublic_userapigateway_api_rest_portfolio_gain_type_0.py
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import datetime
|
|
4
|
+
from collections.abc import Mapping
|
|
5
|
+
from typing import Any, TypeVar
|
|
6
|
+
|
|
7
|
+
from attrs import define as _attrs_define
|
|
8
|
+
from attrs import field as _attrs_field
|
|
9
|
+
from dateutil.parser import isoparse
|
|
10
|
+
|
|
11
|
+
from ..types import UNSET, Unset
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="ComHellopublicUserapigatewayApiRestPortfolioGainType0")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class ComHellopublicUserapigatewayApiRestPortfolioGainType0:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
gain_value (str | Unset):
|
|
21
|
+
gain_percentage (str | Unset):
|
|
22
|
+
timestamp (datetime.datetime | Unset):
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
gain_value: str | Unset = UNSET
|
|
26
|
+
gain_percentage: str | Unset = UNSET
|
|
27
|
+
timestamp: datetime.datetime | Unset = UNSET
|
|
28
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
29
|
+
|
|
30
|
+
def to_dict(self) -> dict[str, Any]:
|
|
31
|
+
gain_value = self.gain_value
|
|
32
|
+
|
|
33
|
+
gain_percentage = self.gain_percentage
|
|
34
|
+
|
|
35
|
+
timestamp: str | Unset = UNSET
|
|
36
|
+
if not isinstance(self.timestamp, Unset):
|
|
37
|
+
timestamp = self.timestamp.isoformat()
|
|
38
|
+
|
|
39
|
+
field_dict: dict[str, Any] = {}
|
|
40
|
+
field_dict.update(self.additional_properties)
|
|
41
|
+
field_dict.update({})
|
|
42
|
+
if gain_value is not UNSET:
|
|
43
|
+
field_dict["gainValue"] = gain_value
|
|
44
|
+
if gain_percentage is not UNSET:
|
|
45
|
+
field_dict["gainPercentage"] = gain_percentage
|
|
46
|
+
if timestamp is not UNSET:
|
|
47
|
+
field_dict["timestamp"] = timestamp
|
|
48
|
+
|
|
49
|
+
return field_dict
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
53
|
+
d = dict(src_dict)
|
|
54
|
+
gain_value = d.pop("gainValue", UNSET)
|
|
55
|
+
|
|
56
|
+
gain_percentage = d.pop("gainPercentage", UNSET)
|
|
57
|
+
|
|
58
|
+
_timestamp = d.pop("timestamp", UNSET)
|
|
59
|
+
timestamp: datetime.datetime | Unset
|
|
60
|
+
if isinstance(_timestamp, Unset):
|
|
61
|
+
timestamp = UNSET
|
|
62
|
+
else:
|
|
63
|
+
timestamp = isoparse(_timestamp)
|
|
64
|
+
|
|
65
|
+
com_hellopublic_userapigateway_api_rest_portfolio_gain_type_0 = cls(
|
|
66
|
+
gain_value=gain_value,
|
|
67
|
+
gain_percentage=gain_percentage,
|
|
68
|
+
timestamp=timestamp,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
com_hellopublic_userapigateway_api_rest_portfolio_gain_type_0.additional_properties = d
|
|
72
|
+
return com_hellopublic_userapigateway_api_rest_portfolio_gain_type_0
|
|
73
|
+
|
|
74
|
+
@property
|
|
75
|
+
def additional_keys(self) -> list[str]:
|
|
76
|
+
return list(self.additional_properties.keys())
|
|
77
|
+
|
|
78
|
+
def __getitem__(self, key: str) -> Any:
|
|
79
|
+
return self.additional_properties[key]
|
|
80
|
+
|
|
81
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
82
|
+
self.additional_properties[key] = value
|
|
83
|
+
|
|
84
|
+
def __delitem__(self, key: str) -> None:
|
|
85
|
+
del self.additional_properties[key]
|
|
86
|
+
|
|
87
|
+
def __contains__(self, key: str) -> bool:
|
|
88
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
T = TypeVar("T", bound="ComHellopublicUserapigatewayApiRestPortfolioGatewayBuyingPower")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class ComHellopublicUserapigatewayApiRestPortfolioGatewayBuyingPower:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
cash_only_buying_power (str): Buying power available for trading on cash only without taking loans.
|
|
17
|
+
buying_power (str): Buying power available for trading marginable assets.
|
|
18
|
+
options_buying_power (str): Buying power available for trading options.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
cash_only_buying_power: str
|
|
22
|
+
buying_power: str
|
|
23
|
+
options_buying_power: str
|
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
+
|
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
|
27
|
+
cash_only_buying_power = self.cash_only_buying_power
|
|
28
|
+
|
|
29
|
+
buying_power = self.buying_power
|
|
30
|
+
|
|
31
|
+
options_buying_power = self.options_buying_power
|
|
32
|
+
|
|
33
|
+
field_dict: dict[str, Any] = {}
|
|
34
|
+
field_dict.update(self.additional_properties)
|
|
35
|
+
field_dict.update(
|
|
36
|
+
{
|
|
37
|
+
"cashOnlyBuyingPower": cash_only_buying_power,
|
|
38
|
+
"buyingPower": buying_power,
|
|
39
|
+
"optionsBuyingPower": options_buying_power,
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
return field_dict
|
|
44
|
+
|
|
45
|
+
@classmethod
|
|
46
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
47
|
+
d = dict(src_dict)
|
|
48
|
+
cash_only_buying_power = d.pop("cashOnlyBuyingPower")
|
|
49
|
+
|
|
50
|
+
buying_power = d.pop("buyingPower")
|
|
51
|
+
|
|
52
|
+
options_buying_power = d.pop("optionsBuyingPower")
|
|
53
|
+
|
|
54
|
+
com_hellopublic_userapigateway_api_rest_portfolio_gateway_buying_power = cls(
|
|
55
|
+
cash_only_buying_power=cash_only_buying_power,
|
|
56
|
+
buying_power=buying_power,
|
|
57
|
+
options_buying_power=options_buying_power,
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
com_hellopublic_userapigateway_api_rest_portfolio_gateway_buying_power.additional_properties = d
|
|
61
|
+
return com_hellopublic_userapigateway_api_rest_portfolio_gateway_buying_power
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def additional_keys(self) -> list[str]:
|
|
65
|
+
return list(self.additional_properties.keys())
|
|
66
|
+
|
|
67
|
+
def __getitem__(self, key: str) -> Any:
|
|
68
|
+
return self.additional_properties[key]
|
|
69
|
+
|
|
70
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
71
|
+
self.additional_properties[key] = value
|
|
72
|
+
|
|
73
|
+
def __delitem__(self, key: str) -> None:
|
|
74
|
+
del self.additional_properties[key]
|
|
75
|
+
|
|
76
|
+
def __contains__(self, key: str) -> bool:
|
|
77
|
+
return key in self.additional_properties
|