snaptrade-python-sdk 11.0.142__py3-none-any.whl → 11.0.144__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.
Files changed (49) hide show
  1. snaptrade_client/__init__.py +1 -1
  2. snaptrade_client/api_client.py +1 -1
  3. snaptrade_client/apis/path_to_api.py +6 -0
  4. snaptrade_client/apis/paths/accounts_account_id_orders_v2.py +7 -0
  5. snaptrade_client/apis/paths/accounts_account_id_recent_orders_v2.py +7 -0
  6. snaptrade_client/apis/tag_to_api.py +3 -0
  7. snaptrade_client/apis/tags/__init__.py +1 -0
  8. snaptrade_client/apis/tags/experimental_endpoints_api.py +6 -0
  9. snaptrade_client/apis/tags/experimental_endpoints_api_generated.py +23 -0
  10. snaptrade_client/client.py +2 -0
  11. snaptrade_client/client.pyi +2 -0
  12. snaptrade_client/configuration.py +1 -1
  13. snaptrade_client/model/account_order_record_leg.py +252 -0
  14. snaptrade_client/model/account_order_record_leg.pyi +252 -0
  15. snaptrade_client/model/account_order_record_leg_instrument.py +137 -0
  16. snaptrade_client/model/account_order_record_leg_instrument.pyi +137 -0
  17. snaptrade_client/model/account_order_record_status.py +18 -0
  18. snaptrade_client/model/account_order_record_status.pyi +18 -0
  19. snaptrade_client/model/account_order_record_status_v2.py +90 -0
  20. snaptrade_client/model/account_order_record_status_v2.pyi +75 -0
  21. snaptrade_client/model/account_order_record_status_v2_nullable.py +105 -0
  22. snaptrade_client/model/account_order_record_status_v2_nullable.pyi +105 -0
  23. snaptrade_client/model/account_order_record_v2.py +309 -0
  24. snaptrade_client/model/account_order_record_v2.pyi +309 -0
  25. snaptrade_client/model/account_orders_v2_response.py +110 -0
  26. snaptrade_client/model/account_orders_v2_response.pyi +110 -0
  27. snaptrade_client/model/action_strict_v2.py +25 -0
  28. snaptrade_client/model/action_strict_v2.pyi +25 -0
  29. snaptrade_client/models/__init__.py +7 -0
  30. snaptrade_client/operation_parameter_map.py +35 -0
  31. snaptrade_client/paths/__init__.py +2 -0
  32. snaptrade_client/paths/accounts_account_id_orders_v2/__init__.py +7 -0
  33. snaptrade_client/paths/accounts_account_id_orders_v2/get.py +592 -0
  34. snaptrade_client/paths/accounts_account_id_orders_v2/get.pyi +569 -0
  35. snaptrade_client/paths/accounts_account_id_recent_orders_v2/__init__.py +7 -0
  36. snaptrade_client/paths/accounts_account_id_recent_orders_v2/get.py +561 -0
  37. snaptrade_client/paths/accounts_account_id_recent_orders_v2/get.pyi +549 -0
  38. snaptrade_client/type/account_order_record_leg.py +48 -0
  39. snaptrade_client/type/account_order_record_leg_instrument.py +39 -0
  40. snaptrade_client/type/account_order_record_status_v2.py +19 -0
  41. snaptrade_client/type/account_order_record_status_v2_nullable.py +19 -0
  42. snaptrade_client/type/account_order_record_v2.py +58 -0
  43. snaptrade_client/type/account_orders_v2_response.py +28 -0
  44. snaptrade_client/type/account_universal_activity.py +1 -1
  45. snaptrade_client/type/action_strict_v2.py +19 -0
  46. {snaptrade_python_sdk-11.0.142.dist-info → snaptrade_python_sdk-11.0.144.dist-info}/METADATA +103 -4
  47. {snaptrade_python_sdk-11.0.142.dist-info → snaptrade_python_sdk-11.0.144.dist-info}/RECORD +49 -18
  48. {snaptrade_python_sdk-11.0.142.dist-info → snaptrade_python_sdk-11.0.144.dist-info}/LICENSE +0 -0
  49. {snaptrade_python_sdk-11.0.142.dist-info → snaptrade_python_sdk-11.0.144.dist-info}/WHEEL +0 -0
@@ -12,7 +12,7 @@
12
12
  Created by: https://snaptrade.com/
13
13
  """
14
14
 
15
- __version__ = "11.0.142"
15
+ __version__ = "11.0.144"
16
16
 
17
17
  # import ApiClient
18
18
  from snaptrade_client.api_client import ApiClient
@@ -1155,7 +1155,7 @@ class ApiClient:
1155
1155
  self.default_headers[header_name] = header_value
1156
1156
  self.cookie = cookie
1157
1157
  # Set default User-Agent.
1158
- self.user_agent = 'Konfig/11.0.142/python'
1158
+ self.user_agent = 'Konfig/11.0.144/python'
1159
1159
 
1160
1160
  def __enter__(self):
1161
1161
  return self
@@ -42,6 +42,8 @@ from snaptrade_client.apis.paths.accounts_account_id_trading_crypto import Accou
42
42
  from snaptrade_client.apis.paths.accounts_account_id_trading_cancel import AccountsAccountIdTradingCancel
43
43
  from snaptrade_client.apis.paths.accounts_account_id_trading_replace import AccountsAccountIdTradingReplace
44
44
  from snaptrade_client.apis.paths.snap_trade_partners import SnapTradePartners
45
+ from snaptrade_client.apis.paths.accounts_account_id_orders_v2 import AccountsAccountIdOrdersV2
46
+ from snaptrade_client.apis.paths.accounts_account_id_recent_orders_v2 import AccountsAccountIdRecentOrdersV2
45
47
  from snaptrade_client.apis.paths.accounts_account_id_symbols import AccountsAccountIdSymbols
46
48
  from snaptrade_client.apis.paths.brokerages import Brokerages
47
49
  from snaptrade_client.apis.paths.brokerages_slug_instruments import BrokeragesSlugInstruments
@@ -98,6 +100,8 @@ PathToApi = typing_extensions.TypedDict(
98
100
  PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_CANCEL: AccountsAccountIdTradingCancel,
99
101
  PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_REPLACE: AccountsAccountIdTradingReplace,
100
102
  PathValues.SNAP_TRADE_PARTNERS: SnapTradePartners,
103
+ PathValues.ACCOUNTS_ACCOUNT_ID_ORDERS_V2: AccountsAccountIdOrdersV2,
104
+ PathValues.ACCOUNTS_ACCOUNT_ID_RECENT_ORDERS_V2: AccountsAccountIdRecentOrdersV2,
101
105
  PathValues.ACCOUNTS_ACCOUNT_ID_SYMBOLS: AccountsAccountIdSymbols,
102
106
  PathValues.BROKERAGES: Brokerages,
103
107
  PathValues.BROKERAGES_SLUG_INSTRUMENTS: BrokeragesSlugInstruments,
@@ -155,6 +159,8 @@ path_to_api = PathToApi(
155
159
  PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_CANCEL: AccountsAccountIdTradingCancel,
156
160
  PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_REPLACE: AccountsAccountIdTradingReplace,
157
161
  PathValues.SNAP_TRADE_PARTNERS: SnapTradePartners,
162
+ PathValues.ACCOUNTS_ACCOUNT_ID_ORDERS_V2: AccountsAccountIdOrdersV2,
163
+ PathValues.ACCOUNTS_ACCOUNT_ID_RECENT_ORDERS_V2: AccountsAccountIdRecentOrdersV2,
158
164
  PathValues.ACCOUNTS_ACCOUNT_ID_SYMBOLS: AccountsAccountIdSymbols,
159
165
  PathValues.BROKERAGES: Brokerages,
160
166
  PathValues.BROKERAGES_SLUG_INSTRUMENTS: BrokeragesSlugInstruments,
@@ -0,0 +1,7 @@
1
+ from snaptrade_client.paths.accounts_account_id_orders_v2.get import ApiForget
2
+
3
+
4
+ class AccountsAccountIdOrdersV2(
5
+ ApiForget,
6
+ ):
7
+ pass
@@ -0,0 +1,7 @@
1
+ from snaptrade_client.paths.accounts_account_id_recent_orders_v2.get import ApiForget
2
+
3
+
4
+ class AccountsAccountIdRecentOrdersV2(
5
+ ApiForget,
6
+ ):
7
+ pass
@@ -9,6 +9,7 @@ from snaptrade_client.apis.tags.options_api import OptionsApi
9
9
  from snaptrade_client.apis.tags.transactions_and_reporting_api import TransactionsAndReportingApi
10
10
  from snaptrade_client.apis.tags.trading_api import TradingApi
11
11
  from snaptrade_client.apis.tags.reference_data_api import ReferenceDataApi
12
+ from snaptrade_client.apis.tags.experimental_endpoints_api import ExperimentalEndpointsApi
12
13
 
13
14
  TagToApi = typing_extensions.TypedDict(
14
15
  'TagToApi',
@@ -21,6 +22,7 @@ TagToApi = typing_extensions.TypedDict(
21
22
  TagValues.TRANSACTIONS_AND_REPORTING: TransactionsAndReportingApi,
22
23
  TagValues.TRADING: TradingApi,
23
24
  TagValues.REFERENCE_DATA: ReferenceDataApi,
25
+ TagValues.EXPERIMENTAL_ENDPOINTS: ExperimentalEndpointsApi,
24
26
  }
25
27
  )
26
28
 
@@ -34,5 +36,6 @@ tag_to_api = TagToApi(
34
36
  TagValues.TRANSACTIONS_AND_REPORTING: TransactionsAndReportingApi,
35
37
  TagValues.TRADING: TradingApi,
36
38
  TagValues.REFERENCE_DATA: ReferenceDataApi,
39
+ TagValues.EXPERIMENTAL_ENDPOINTS: ExperimentalEndpointsApi,
37
40
  }
38
41
  )
@@ -14,3 +14,4 @@ class TagValues(str, enum.Enum):
14
14
  TRANSACTIONS_AND_REPORTING = "Transactions And Reporting"
15
15
  TRADING = "Trading"
16
16
  REFERENCE_DATA = "Reference Data"
17
+ EXPERIMENTAL_ENDPOINTS = "Experimental endpoints"
@@ -0,0 +1,6 @@
1
+ # coding: utf-8
2
+
3
+ from snaptrade_client.apis.tags.experimental_endpoints_api_generated import ExperimentalEndpointsApiGenerated
4
+
5
+ class ExperimentalEndpointsApi(ExperimentalEndpointsApiGenerated):
6
+ pass
@@ -0,0 +1,23 @@
1
+ # coding: utf-8
2
+ """
3
+ SnapTrade
4
+
5
+ Connect brokerage accounts to your app for live positions and trading
6
+
7
+ The version of the OpenAPI document: 1.0.0
8
+ Contact: api@snaptrade.com
9
+ Created by: https://snaptrade.com/
10
+ """
11
+
12
+ from snaptrade_client.paths.accounts_account_id_orders_v2.get import GetUserAccountOrdersV2
13
+ from snaptrade_client.paths.accounts_account_id_recent_orders_v2.get import GetUserAccountRecentOrdersV2
14
+
15
+
16
+ class ExperimentalEndpointsApiGenerated(
17
+ GetUserAccountOrdersV2,
18
+ GetUserAccountRecentOrdersV2,
19
+ ):
20
+ """NOTE:
21
+ This class is auto generated by Konfig (https://konfigthis.com)
22
+ """
23
+ pass
@@ -20,6 +20,7 @@ from snaptrade_client.apis.tags.account_information_api import AccountInformatio
20
20
  from snaptrade_client.apis.tags.api_status_api import APIStatusApi
21
21
  from snaptrade_client.apis.tags.authentication_api import AuthenticationApi
22
22
  from snaptrade_client.apis.tags.connections_api import ConnectionsApi
23
+ from snaptrade_client.apis.tags.experimental_endpoints_api import ExperimentalEndpointsApi
23
24
  from snaptrade_client.apis.tags.options_api import OptionsApi
24
25
  from snaptrade_client.apis.tags.reference_data_api import ReferenceDataApi
25
26
  from snaptrade_client.apis.tags.trading_api import TradingApi
@@ -40,6 +41,7 @@ class SnapTrade(ClientCustom):
40
41
  self.api_status: APIStatusApi = APIStatusApi(api_client)
41
42
  self.authentication: AuthenticationApi = AuthenticationApi(api_client)
42
43
  self.connections: ConnectionsApi = ConnectionsApi(api_client)
44
+ self.experimental_endpoints: ExperimentalEndpointsApi = ExperimentalEndpointsApi(api_client)
43
45
  self.options: OptionsApi = OptionsApi(api_client)
44
46
  self.reference_data: ReferenceDataApi = ReferenceDataApi(api_client)
45
47
  self.trading: TradingApi = TradingApi(api_client)
@@ -20,6 +20,7 @@ from snaptrade_client.apis.tags.account_information_api import AccountInformatio
20
20
  from snaptrade_client.apis.tags.api_status_api import APIStatusApi
21
21
  from snaptrade_client.apis.tags.authentication_api import AuthenticationApi
22
22
  from snaptrade_client.apis.tags.connections_api import ConnectionsApi
23
+ from snaptrade_client.apis.tags.experimental_endpoints_api import ExperimentalEndpointsApi
23
24
  from snaptrade_client.apis.tags.options_api import OptionsApi
24
25
  from snaptrade_client.apis.tags.reference_data_api import ReferenceDataApi
25
26
  from snaptrade_client.apis.tags.trading_api import TradingApi
@@ -40,6 +41,7 @@ class SnapTrade(ClientCustom):
40
41
  self.api_status: APIStatusApi = APIStatusApi(api_client)
41
42
  self.authentication: AuthenticationApi = AuthenticationApi(api_client)
42
43
  self.connections: ConnectionsApi = ConnectionsApi(api_client)
44
+ self.experimental_endpoints: ExperimentalEndpointsApi = ExperimentalEndpointsApi(api_client)
43
45
  self.options: OptionsApi = OptionsApi(api_client)
44
46
  self.reference_data: ReferenceDataApi = ReferenceDataApi(api_client)
45
47
  self.trading: TradingApi = TradingApi(api_client)
@@ -438,7 +438,7 @@ conf = snaptrade_client.Configuration(
438
438
  "OS: {env}\n"\
439
439
  "Python Version: {pyversion}\n"\
440
440
  "Version of the API: 1.0.0\n"\
441
- "SDK Package Version: 11.0.142".\
441
+ "SDK Package Version: 11.0.144".\
442
442
  format(env=sys.platform, pyversion=sys.version)
443
443
 
444
444
  def get_host_settings(self):
@@ -0,0 +1,252 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ SnapTrade
5
+
6
+ Connect brokerage accounts to your app for live positions and trading
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Contact: api@snaptrade.com
10
+ Created by: https://snaptrade.com/
11
+ """
12
+
13
+ from datetime import date, datetime # noqa: F401
14
+ import decimal # noqa: F401
15
+ import functools # noqa: F401
16
+ import io # noqa: F401
17
+ import re # noqa: F401
18
+ import typing # noqa: F401
19
+ import typing_extensions # noqa: F401
20
+ import uuid # noqa: F401
21
+
22
+ import frozendict # noqa: F401
23
+
24
+ from snaptrade_client import schemas # noqa: F401
25
+
26
+
27
+ class AccountOrderRecordLeg(
28
+ schemas.DictSchema
29
+ ):
30
+ """
31
+ This class is auto generated by Konfig (https://konfigthis.com)
32
+
33
+ Describes an individual leg that makes up an order in the V2 format.
34
+ """
35
+
36
+
37
+ class MetaOapg:
38
+
39
+ class properties:
40
+
41
+
42
+ class leg_id(
43
+ schemas.StrBase,
44
+ schemas.NoneBase,
45
+ schemas.Schema,
46
+ schemas.NoneStrMixin
47
+ ):
48
+
49
+
50
+ def __new__(
51
+ cls,
52
+ *args: typing.Union[None, str, ],
53
+ _configuration: typing.Optional[schemas.Configuration] = None,
54
+ ) -> 'leg_id':
55
+ return super().__new__(
56
+ cls,
57
+ *args,
58
+ _configuration=_configuration,
59
+ )
60
+
61
+ @staticmethod
62
+ def instrument() -> typing.Type['AccountOrderRecordLegInstrument']:
63
+ return AccountOrderRecordLegInstrument
64
+ action = schemas.StrSchema
65
+
66
+
67
+ class execution_price(
68
+ schemas.NumberBase,
69
+ schemas.NoneBase,
70
+ schemas.Schema,
71
+ schemas.NoneDecimalMixin
72
+ ):
73
+
74
+
75
+ def __new__(
76
+ cls,
77
+ *args: typing.Union[None, decimal.Decimal, int, float, ],
78
+ _configuration: typing.Optional[schemas.Configuration] = None,
79
+ ) -> 'execution_price':
80
+ return super().__new__(
81
+ cls,
82
+ *args,
83
+ _configuration=_configuration,
84
+ )
85
+
86
+
87
+ class total_quantity(
88
+ schemas.StrBase,
89
+ schemas.NoneBase,
90
+ schemas.Schema,
91
+ schemas.NoneStrMixin
92
+ ):
93
+
94
+
95
+ def __new__(
96
+ cls,
97
+ *args: typing.Union[None, str, ],
98
+ _configuration: typing.Optional[schemas.Configuration] = None,
99
+ ) -> 'total_quantity':
100
+ return super().__new__(
101
+ cls,
102
+ *args,
103
+ _configuration=_configuration,
104
+ )
105
+
106
+
107
+ class canceled_quantity(
108
+ schemas.StrBase,
109
+ schemas.NoneBase,
110
+ schemas.Schema,
111
+ schemas.NoneStrMixin
112
+ ):
113
+
114
+
115
+ def __new__(
116
+ cls,
117
+ *args: typing.Union[None, str, ],
118
+ _configuration: typing.Optional[schemas.Configuration] = None,
119
+ ) -> 'canceled_quantity':
120
+ return super().__new__(
121
+ cls,
122
+ *args,
123
+ _configuration=_configuration,
124
+ )
125
+
126
+
127
+ class filled_quantity(
128
+ schemas.StrBase,
129
+ schemas.NoneBase,
130
+ schemas.Schema,
131
+ schemas.NoneStrMixin
132
+ ):
133
+
134
+
135
+ def __new__(
136
+ cls,
137
+ *args: typing.Union[None, str, ],
138
+ _configuration: typing.Optional[schemas.Configuration] = None,
139
+ ) -> 'filled_quantity':
140
+ return super().__new__(
141
+ cls,
142
+ *args,
143
+ _configuration=_configuration,
144
+ )
145
+
146
+ @staticmethod
147
+ def status() -> typing.Type['AccountOrderRecordStatusV2Nullable']:
148
+ return AccountOrderRecordStatusV2Nullable
149
+ __annotations__ = {
150
+ "leg_id": leg_id,
151
+ "instrument": instrument,
152
+ "action": action,
153
+ "execution_price": execution_price,
154
+ "total_quantity": total_quantity,
155
+ "canceled_quantity": canceled_quantity,
156
+ "filled_quantity": filled_quantity,
157
+ "status": status,
158
+ }
159
+ additional_properties = schemas.AnyTypeSchema
160
+
161
+ @typing.overload
162
+ def __getitem__(self, name: typing_extensions.Literal["leg_id"]) -> MetaOapg.properties.leg_id: ...
163
+
164
+ @typing.overload
165
+ def __getitem__(self, name: typing_extensions.Literal["instrument"]) -> 'AccountOrderRecordLegInstrument': ...
166
+
167
+ @typing.overload
168
+ def __getitem__(self, name: typing_extensions.Literal["action"]) -> MetaOapg.properties.action: ...
169
+
170
+ @typing.overload
171
+ def __getitem__(self, name: typing_extensions.Literal["execution_price"]) -> MetaOapg.properties.execution_price: ...
172
+
173
+ @typing.overload
174
+ def __getitem__(self, name: typing_extensions.Literal["total_quantity"]) -> MetaOapg.properties.total_quantity: ...
175
+
176
+ @typing.overload
177
+ def __getitem__(self, name: typing_extensions.Literal["canceled_quantity"]) -> MetaOapg.properties.canceled_quantity: ...
178
+
179
+ @typing.overload
180
+ def __getitem__(self, name: typing_extensions.Literal["filled_quantity"]) -> MetaOapg.properties.filled_quantity: ...
181
+
182
+ @typing.overload
183
+ def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'AccountOrderRecordStatusV2Nullable': ...
184
+
185
+ @typing.overload
186
+ def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
187
+
188
+ def __getitem__(self, name: typing.Union[typing_extensions.Literal["leg_id"], typing_extensions.Literal["instrument"], typing_extensions.Literal["action"], typing_extensions.Literal["execution_price"], typing_extensions.Literal["total_quantity"], typing_extensions.Literal["canceled_quantity"], typing_extensions.Literal["filled_quantity"], typing_extensions.Literal["status"], str, ]):
189
+ # dict_instance[name] accessor
190
+ return super().__getitem__(name)
191
+
192
+ @typing.overload
193
+ def get_item_oapg(self, name: typing_extensions.Literal["leg_id"]) -> typing.Union[MetaOapg.properties.leg_id, schemas.Unset]: ...
194
+
195
+ @typing.overload
196
+ def get_item_oapg(self, name: typing_extensions.Literal["instrument"]) -> typing.Union['AccountOrderRecordLegInstrument', schemas.Unset]: ...
197
+
198
+ @typing.overload
199
+ def get_item_oapg(self, name: typing_extensions.Literal["action"]) -> typing.Union[MetaOapg.properties.action, schemas.Unset]: ...
200
+
201
+ @typing.overload
202
+ def get_item_oapg(self, name: typing_extensions.Literal["execution_price"]) -> typing.Union[MetaOapg.properties.execution_price, schemas.Unset]: ...
203
+
204
+ @typing.overload
205
+ def get_item_oapg(self, name: typing_extensions.Literal["total_quantity"]) -> typing.Union[MetaOapg.properties.total_quantity, schemas.Unset]: ...
206
+
207
+ @typing.overload
208
+ def get_item_oapg(self, name: typing_extensions.Literal["canceled_quantity"]) -> typing.Union[MetaOapg.properties.canceled_quantity, schemas.Unset]: ...
209
+
210
+ @typing.overload
211
+ def get_item_oapg(self, name: typing_extensions.Literal["filled_quantity"]) -> typing.Union[MetaOapg.properties.filled_quantity, schemas.Unset]: ...
212
+
213
+ @typing.overload
214
+ def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> typing.Union['AccountOrderRecordStatusV2Nullable', schemas.Unset]: ...
215
+
216
+ @typing.overload
217
+ def get_item_oapg(self, name: str) -> typing.Union[MetaOapg.additional_properties, schemas.Unset]: ...
218
+
219
+ def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["leg_id"], typing_extensions.Literal["instrument"], typing_extensions.Literal["action"], typing_extensions.Literal["execution_price"], typing_extensions.Literal["total_quantity"], typing_extensions.Literal["canceled_quantity"], typing_extensions.Literal["filled_quantity"], typing_extensions.Literal["status"], str, ]):
220
+ return super().get_item_oapg(name)
221
+
222
+ def __new__(
223
+ cls,
224
+ *args: typing.Union[dict, frozendict.frozendict, ],
225
+ leg_id: typing.Union[MetaOapg.properties.leg_id, None, str, schemas.Unset] = schemas.unset,
226
+ instrument: typing.Union['AccountOrderRecordLegInstrument', schemas.Unset] = schemas.unset,
227
+ action: typing.Union[MetaOapg.properties.action, str, schemas.Unset] = schemas.unset,
228
+ execution_price: typing.Union[MetaOapg.properties.execution_price, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset,
229
+ total_quantity: typing.Union[MetaOapg.properties.total_quantity, None, str, schemas.Unset] = schemas.unset,
230
+ canceled_quantity: typing.Union[MetaOapg.properties.canceled_quantity, None, str, schemas.Unset] = schemas.unset,
231
+ filled_quantity: typing.Union[MetaOapg.properties.filled_quantity, None, str, schemas.Unset] = schemas.unset,
232
+ status: typing.Union['AccountOrderRecordStatusV2Nullable', schemas.Unset] = schemas.unset,
233
+ _configuration: typing.Optional[schemas.Configuration] = None,
234
+ **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ],
235
+ ) -> 'AccountOrderRecordLeg':
236
+ return super().__new__(
237
+ cls,
238
+ *args,
239
+ leg_id=leg_id,
240
+ instrument=instrument,
241
+ action=action,
242
+ execution_price=execution_price,
243
+ total_quantity=total_quantity,
244
+ canceled_quantity=canceled_quantity,
245
+ filled_quantity=filled_quantity,
246
+ status=status,
247
+ _configuration=_configuration,
248
+ **kwargs,
249
+ )
250
+
251
+ from snaptrade_client.model.account_order_record_leg_instrument import AccountOrderRecordLegInstrument
252
+ from snaptrade_client.model.account_order_record_status_v2_nullable import AccountOrderRecordStatusV2Nullable
@@ -0,0 +1,252 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ SnapTrade
5
+
6
+ Connect brokerage accounts to your app for live positions and trading
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Contact: api@snaptrade.com
10
+ Created by: https://snaptrade.com/
11
+ """
12
+
13
+ from datetime import date, datetime # noqa: F401
14
+ import decimal # noqa: F401
15
+ import functools # noqa: F401
16
+ import io # noqa: F401
17
+ import re # noqa: F401
18
+ import typing # noqa: F401
19
+ import typing_extensions # noqa: F401
20
+ import uuid # noqa: F401
21
+
22
+ import frozendict # noqa: F401
23
+
24
+ from snaptrade_client import schemas # noqa: F401
25
+
26
+
27
+ class AccountOrderRecordLeg(
28
+ schemas.DictSchema
29
+ ):
30
+ """
31
+ This class is auto generated by Konfig (https://konfigthis.com)
32
+
33
+ Describes an individual leg that makes up an order in the V2 format.
34
+ """
35
+
36
+
37
+ class MetaOapg:
38
+
39
+ class properties:
40
+
41
+
42
+ class leg_id(
43
+ schemas.StrBase,
44
+ schemas.NoneBase,
45
+ schemas.Schema,
46
+ schemas.NoneStrMixin
47
+ ):
48
+
49
+
50
+ def __new__(
51
+ cls,
52
+ *args: typing.Union[None, str, ],
53
+ _configuration: typing.Optional[schemas.Configuration] = None,
54
+ ) -> 'leg_id':
55
+ return super().__new__(
56
+ cls,
57
+ *args,
58
+ _configuration=_configuration,
59
+ )
60
+
61
+ @staticmethod
62
+ def instrument() -> typing.Type['AccountOrderRecordLegInstrument']:
63
+ return AccountOrderRecordLegInstrument
64
+ action = schemas.StrSchema
65
+
66
+
67
+ class execution_price(
68
+ schemas.NumberBase,
69
+ schemas.NoneBase,
70
+ schemas.Schema,
71
+ schemas.NoneDecimalMixin
72
+ ):
73
+
74
+
75
+ def __new__(
76
+ cls,
77
+ *args: typing.Union[None, decimal.Decimal, int, float, ],
78
+ _configuration: typing.Optional[schemas.Configuration] = None,
79
+ ) -> 'execution_price':
80
+ return super().__new__(
81
+ cls,
82
+ *args,
83
+ _configuration=_configuration,
84
+ )
85
+
86
+
87
+ class total_quantity(
88
+ schemas.StrBase,
89
+ schemas.NoneBase,
90
+ schemas.Schema,
91
+ schemas.NoneStrMixin
92
+ ):
93
+
94
+
95
+ def __new__(
96
+ cls,
97
+ *args: typing.Union[None, str, ],
98
+ _configuration: typing.Optional[schemas.Configuration] = None,
99
+ ) -> 'total_quantity':
100
+ return super().__new__(
101
+ cls,
102
+ *args,
103
+ _configuration=_configuration,
104
+ )
105
+
106
+
107
+ class canceled_quantity(
108
+ schemas.StrBase,
109
+ schemas.NoneBase,
110
+ schemas.Schema,
111
+ schemas.NoneStrMixin
112
+ ):
113
+
114
+
115
+ def __new__(
116
+ cls,
117
+ *args: typing.Union[None, str, ],
118
+ _configuration: typing.Optional[schemas.Configuration] = None,
119
+ ) -> 'canceled_quantity':
120
+ return super().__new__(
121
+ cls,
122
+ *args,
123
+ _configuration=_configuration,
124
+ )
125
+
126
+
127
+ class filled_quantity(
128
+ schemas.StrBase,
129
+ schemas.NoneBase,
130
+ schemas.Schema,
131
+ schemas.NoneStrMixin
132
+ ):
133
+
134
+
135
+ def __new__(
136
+ cls,
137
+ *args: typing.Union[None, str, ],
138
+ _configuration: typing.Optional[schemas.Configuration] = None,
139
+ ) -> 'filled_quantity':
140
+ return super().__new__(
141
+ cls,
142
+ *args,
143
+ _configuration=_configuration,
144
+ )
145
+
146
+ @staticmethod
147
+ def status() -> typing.Type['AccountOrderRecordStatusV2Nullable']:
148
+ return AccountOrderRecordStatusV2Nullable
149
+ __annotations__ = {
150
+ "leg_id": leg_id,
151
+ "instrument": instrument,
152
+ "action": action,
153
+ "execution_price": execution_price,
154
+ "total_quantity": total_quantity,
155
+ "canceled_quantity": canceled_quantity,
156
+ "filled_quantity": filled_quantity,
157
+ "status": status,
158
+ }
159
+ additional_properties = schemas.AnyTypeSchema
160
+
161
+ @typing.overload
162
+ def __getitem__(self, name: typing_extensions.Literal["leg_id"]) -> MetaOapg.properties.leg_id: ...
163
+
164
+ @typing.overload
165
+ def __getitem__(self, name: typing_extensions.Literal["instrument"]) -> 'AccountOrderRecordLegInstrument': ...
166
+
167
+ @typing.overload
168
+ def __getitem__(self, name: typing_extensions.Literal["action"]) -> MetaOapg.properties.action: ...
169
+
170
+ @typing.overload
171
+ def __getitem__(self, name: typing_extensions.Literal["execution_price"]) -> MetaOapg.properties.execution_price: ...
172
+
173
+ @typing.overload
174
+ def __getitem__(self, name: typing_extensions.Literal["total_quantity"]) -> MetaOapg.properties.total_quantity: ...
175
+
176
+ @typing.overload
177
+ def __getitem__(self, name: typing_extensions.Literal["canceled_quantity"]) -> MetaOapg.properties.canceled_quantity: ...
178
+
179
+ @typing.overload
180
+ def __getitem__(self, name: typing_extensions.Literal["filled_quantity"]) -> MetaOapg.properties.filled_quantity: ...
181
+
182
+ @typing.overload
183
+ def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'AccountOrderRecordStatusV2Nullable': ...
184
+
185
+ @typing.overload
186
+ def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
187
+
188
+ def __getitem__(self, name: typing.Union[typing_extensions.Literal["leg_id"], typing_extensions.Literal["instrument"], typing_extensions.Literal["action"], typing_extensions.Literal["execution_price"], typing_extensions.Literal["total_quantity"], typing_extensions.Literal["canceled_quantity"], typing_extensions.Literal["filled_quantity"], typing_extensions.Literal["status"], str, ]):
189
+ # dict_instance[name] accessor
190
+ return super().__getitem__(name)
191
+
192
+ @typing.overload
193
+ def get_item_oapg(self, name: typing_extensions.Literal["leg_id"]) -> typing.Union[MetaOapg.properties.leg_id, schemas.Unset]: ...
194
+
195
+ @typing.overload
196
+ def get_item_oapg(self, name: typing_extensions.Literal["instrument"]) -> typing.Union['AccountOrderRecordLegInstrument', schemas.Unset]: ...
197
+
198
+ @typing.overload
199
+ def get_item_oapg(self, name: typing_extensions.Literal["action"]) -> typing.Union[MetaOapg.properties.action, schemas.Unset]: ...
200
+
201
+ @typing.overload
202
+ def get_item_oapg(self, name: typing_extensions.Literal["execution_price"]) -> typing.Union[MetaOapg.properties.execution_price, schemas.Unset]: ...
203
+
204
+ @typing.overload
205
+ def get_item_oapg(self, name: typing_extensions.Literal["total_quantity"]) -> typing.Union[MetaOapg.properties.total_quantity, schemas.Unset]: ...
206
+
207
+ @typing.overload
208
+ def get_item_oapg(self, name: typing_extensions.Literal["canceled_quantity"]) -> typing.Union[MetaOapg.properties.canceled_quantity, schemas.Unset]: ...
209
+
210
+ @typing.overload
211
+ def get_item_oapg(self, name: typing_extensions.Literal["filled_quantity"]) -> typing.Union[MetaOapg.properties.filled_quantity, schemas.Unset]: ...
212
+
213
+ @typing.overload
214
+ def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> typing.Union['AccountOrderRecordStatusV2Nullable', schemas.Unset]: ...
215
+
216
+ @typing.overload
217
+ def get_item_oapg(self, name: str) -> typing.Union[MetaOapg.additional_properties, schemas.Unset]: ...
218
+
219
+ def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["leg_id"], typing_extensions.Literal["instrument"], typing_extensions.Literal["action"], typing_extensions.Literal["execution_price"], typing_extensions.Literal["total_quantity"], typing_extensions.Literal["canceled_quantity"], typing_extensions.Literal["filled_quantity"], typing_extensions.Literal["status"], str, ]):
220
+ return super().get_item_oapg(name)
221
+
222
+ def __new__(
223
+ cls,
224
+ *args: typing.Union[dict, frozendict.frozendict, ],
225
+ leg_id: typing.Union[MetaOapg.properties.leg_id, None, str, schemas.Unset] = schemas.unset,
226
+ instrument: typing.Union['AccountOrderRecordLegInstrument', schemas.Unset] = schemas.unset,
227
+ action: typing.Union[MetaOapg.properties.action, str, schemas.Unset] = schemas.unset,
228
+ execution_price: typing.Union[MetaOapg.properties.execution_price, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset,
229
+ total_quantity: typing.Union[MetaOapg.properties.total_quantity, None, str, schemas.Unset] = schemas.unset,
230
+ canceled_quantity: typing.Union[MetaOapg.properties.canceled_quantity, None, str, schemas.Unset] = schemas.unset,
231
+ filled_quantity: typing.Union[MetaOapg.properties.filled_quantity, None, str, schemas.Unset] = schemas.unset,
232
+ status: typing.Union['AccountOrderRecordStatusV2Nullable', schemas.Unset] = schemas.unset,
233
+ _configuration: typing.Optional[schemas.Configuration] = None,
234
+ **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ],
235
+ ) -> 'AccountOrderRecordLeg':
236
+ return super().__new__(
237
+ cls,
238
+ *args,
239
+ leg_id=leg_id,
240
+ instrument=instrument,
241
+ action=action,
242
+ execution_price=execution_price,
243
+ total_quantity=total_quantity,
244
+ canceled_quantity=canceled_quantity,
245
+ filled_quantity=filled_quantity,
246
+ status=status,
247
+ _configuration=_configuration,
248
+ **kwargs,
249
+ )
250
+
251
+ from snaptrade_client.model.account_order_record_leg_instrument import AccountOrderRecordLegInstrument
252
+ from snaptrade_client.model.account_order_record_status_v2_nullable import AccountOrderRecordStatusV2Nullable