snaptrade-python-sdk 11.0.143__py3-none-any.whl → 11.0.145__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.
- snaptrade_client/__init__.py +1 -1
- snaptrade_client/api_client.py +1 -1
- snaptrade_client/apis/path_to_api.py +6 -0
- snaptrade_client/apis/paths/accounts_account_id_orders_v2.py +7 -0
- snaptrade_client/apis/paths/accounts_account_id_recent_orders_v2.py +7 -0
- snaptrade_client/apis/tag_to_api.py +3 -0
- snaptrade_client/apis/tags/__init__.py +1 -0
- snaptrade_client/apis/tags/experimental_endpoints_api.py +6 -0
- snaptrade_client/apis/tags/experimental_endpoints_api_generated.py +23 -0
- snaptrade_client/client.py +2 -0
- snaptrade_client/client.pyi +2 -0
- snaptrade_client/configuration.py +1 -1
- snaptrade_client/model/account_order_record_leg.py +252 -0
- snaptrade_client/model/account_order_record_leg.pyi +252 -0
- snaptrade_client/model/account_order_record_leg_instrument.py +137 -0
- snaptrade_client/model/account_order_record_leg_instrument.pyi +137 -0
- snaptrade_client/model/account_order_record_status_v2.py +90 -0
- snaptrade_client/model/account_order_record_status_v2.pyi +75 -0
- snaptrade_client/model/account_order_record_status_v2_nullable.py +105 -0
- snaptrade_client/model/account_order_record_status_v2_nullable.pyi +105 -0
- snaptrade_client/model/account_order_record_v2.py +309 -0
- snaptrade_client/model/account_order_record_v2.pyi +309 -0
- snaptrade_client/model/account_orders_v2_response.py +110 -0
- snaptrade_client/model/account_orders_v2_response.pyi +110 -0
- snaptrade_client/model/action_strict_v2.py +25 -0
- snaptrade_client/model/action_strict_v2.pyi +25 -0
- snaptrade_client/models/__init__.py +7 -0
- snaptrade_client/operation_parameter_map.py +35 -0
- snaptrade_client/paths/__init__.py +2 -0
- snaptrade_client/paths/accounts/get.py +2 -2
- snaptrade_client/paths/accounts/get.pyi +2 -2
- snaptrade_client/paths/accounts_account_id/get.py +2 -2
- snaptrade_client/paths/accounts_account_id/get.pyi +2 -2
- snaptrade_client/paths/accounts_account_id_balances/get.py +2 -2
- snaptrade_client/paths/accounts_account_id_balances/get.pyi +2 -2
- snaptrade_client/paths/accounts_account_id_holdings/get.py +2 -2
- snaptrade_client/paths/accounts_account_id_holdings/get.pyi +2 -2
- snaptrade_client/paths/accounts_account_id_options/get.py +2 -2
- snaptrade_client/paths/accounts_account_id_options/get.pyi +2 -2
- snaptrade_client/paths/accounts_account_id_orders/get.py +2 -2
- snaptrade_client/paths/accounts_account_id_orders/get.pyi +2 -2
- snaptrade_client/paths/accounts_account_id_orders_v2/__init__.py +7 -0
- snaptrade_client/paths/accounts_account_id_orders_v2/get.py +592 -0
- snaptrade_client/paths/accounts_account_id_orders_v2/get.pyi +569 -0
- snaptrade_client/paths/accounts_account_id_positions/get.py +2 -2
- snaptrade_client/paths/accounts_account_id_positions/get.pyi +2 -2
- snaptrade_client/paths/accounts_account_id_recent_orders_v2/__init__.py +7 -0
- snaptrade_client/paths/accounts_account_id_recent_orders_v2/get.py +561 -0
- snaptrade_client/paths/accounts_account_id_recent_orders_v2/get.pyi +549 -0
- snaptrade_client/paths/authorizations_authorization_id_refresh/post.py +2 -2
- snaptrade_client/paths/authorizations_authorization_id_refresh/post.pyi +2 -2
- snaptrade_client/type/account_order_record_leg.py +48 -0
- snaptrade_client/type/account_order_record_leg_instrument.py +39 -0
- snaptrade_client/type/account_order_record_status_v2.py +19 -0
- snaptrade_client/type/account_order_record_status_v2_nullable.py +19 -0
- snaptrade_client/type/account_order_record_v2.py +58 -0
- snaptrade_client/type/account_orders_v2_response.py +28 -0
- snaptrade_client/type/action_strict_v2.py +19 -0
- {snaptrade_python_sdk-11.0.143.dist-info → snaptrade_python_sdk-11.0.145.dist-info}/METADATA +124 -11
- {snaptrade_python_sdk-11.0.143.dist-info → snaptrade_python_sdk-11.0.145.dist-info}/RECORD +62 -31
- {snaptrade_python_sdk-11.0.143.dist-info → snaptrade_python_sdk-11.0.145.dist-info}/LICENSE +0 -0
- {snaptrade_python_sdk-11.0.143.dist-info → snaptrade_python_sdk-11.0.145.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,309 @@
|
|
|
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 AccountOrderRecordV2(
|
|
28
|
+
schemas.DictSchema
|
|
29
|
+
):
|
|
30
|
+
"""
|
|
31
|
+
This class is auto generated by Konfig (https://konfigthis.com)
|
|
32
|
+
|
|
33
|
+
Describes a single order in the standardized V2 format.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class MetaOapg:
|
|
38
|
+
|
|
39
|
+
class properties:
|
|
40
|
+
brokerage_order_id = schemas.StrSchema
|
|
41
|
+
|
|
42
|
+
@staticmethod
|
|
43
|
+
def status() -> typing.Type['AccountOrderRecordStatus']:
|
|
44
|
+
return AccountOrderRecordStatus
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class order_type(
|
|
48
|
+
schemas.StrBase,
|
|
49
|
+
schemas.NoneBase,
|
|
50
|
+
schemas.Schema,
|
|
51
|
+
schemas.NoneStrMixin
|
|
52
|
+
):
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def __new__(
|
|
56
|
+
cls,
|
|
57
|
+
*args: typing.Union[None, str, ],
|
|
58
|
+
_configuration: typing.Optional[schemas.Configuration] = None,
|
|
59
|
+
) -> 'order_type':
|
|
60
|
+
return super().__new__(
|
|
61
|
+
cls,
|
|
62
|
+
*args,
|
|
63
|
+
_configuration=_configuration,
|
|
64
|
+
)
|
|
65
|
+
time_in_force = schemas.StrSchema
|
|
66
|
+
time_placed = schemas.DateTimeSchema
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class time_executed(
|
|
70
|
+
schemas.DateTimeBase,
|
|
71
|
+
schemas.StrBase,
|
|
72
|
+
schemas.NoneBase,
|
|
73
|
+
schemas.Schema,
|
|
74
|
+
schemas.NoneStrMixin
|
|
75
|
+
):
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class MetaOapg:
|
|
79
|
+
format = 'date-time'
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def __new__(
|
|
83
|
+
cls,
|
|
84
|
+
*args: typing.Union[None, str, datetime, ],
|
|
85
|
+
_configuration: typing.Optional[schemas.Configuration] = None,
|
|
86
|
+
) -> 'time_executed':
|
|
87
|
+
return super().__new__(
|
|
88
|
+
cls,
|
|
89
|
+
*args,
|
|
90
|
+
_configuration=_configuration,
|
|
91
|
+
)
|
|
92
|
+
quote_currency = schemas.StrSchema
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
class execution_price(
|
|
96
|
+
schemas.NumberBase,
|
|
97
|
+
schemas.NoneBase,
|
|
98
|
+
schemas.Schema,
|
|
99
|
+
schemas.NoneDecimalMixin
|
|
100
|
+
):
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def __new__(
|
|
104
|
+
cls,
|
|
105
|
+
*args: typing.Union[None, decimal.Decimal, int, float, ],
|
|
106
|
+
_configuration: typing.Optional[schemas.Configuration] = None,
|
|
107
|
+
) -> 'execution_price':
|
|
108
|
+
return super().__new__(
|
|
109
|
+
cls,
|
|
110
|
+
*args,
|
|
111
|
+
_configuration=_configuration,
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
class limit_price(
|
|
116
|
+
schemas.NumberBase,
|
|
117
|
+
schemas.NoneBase,
|
|
118
|
+
schemas.Schema,
|
|
119
|
+
schemas.NoneDecimalMixin
|
|
120
|
+
):
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def __new__(
|
|
124
|
+
cls,
|
|
125
|
+
*args: typing.Union[None, decimal.Decimal, int, float, ],
|
|
126
|
+
_configuration: typing.Optional[schemas.Configuration] = None,
|
|
127
|
+
) -> 'limit_price':
|
|
128
|
+
return super().__new__(
|
|
129
|
+
cls,
|
|
130
|
+
*args,
|
|
131
|
+
_configuration=_configuration,
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
class stop_price(
|
|
136
|
+
schemas.NumberBase,
|
|
137
|
+
schemas.NoneBase,
|
|
138
|
+
schemas.Schema,
|
|
139
|
+
schemas.NoneDecimalMixin
|
|
140
|
+
):
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def __new__(
|
|
144
|
+
cls,
|
|
145
|
+
*args: typing.Union[None, decimal.Decimal, int, float, ],
|
|
146
|
+
_configuration: typing.Optional[schemas.Configuration] = None,
|
|
147
|
+
) -> 'stop_price':
|
|
148
|
+
return super().__new__(
|
|
149
|
+
cls,
|
|
150
|
+
*args,
|
|
151
|
+
_configuration=_configuration,
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
class legs(
|
|
156
|
+
schemas.ListSchema
|
|
157
|
+
):
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
class MetaOapg:
|
|
161
|
+
|
|
162
|
+
@staticmethod
|
|
163
|
+
def items() -> typing.Type['AccountOrderRecordLeg']:
|
|
164
|
+
return AccountOrderRecordLeg
|
|
165
|
+
|
|
166
|
+
def __new__(
|
|
167
|
+
cls,
|
|
168
|
+
arg: typing.Union[typing.Tuple['AccountOrderRecordLeg'], typing.List['AccountOrderRecordLeg']],
|
|
169
|
+
_configuration: typing.Optional[schemas.Configuration] = None,
|
|
170
|
+
) -> 'legs':
|
|
171
|
+
return super().__new__(
|
|
172
|
+
cls,
|
|
173
|
+
arg,
|
|
174
|
+
_configuration=_configuration,
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
def __getitem__(self, i: int) -> 'AccountOrderRecordLeg':
|
|
178
|
+
return super().__getitem__(i)
|
|
179
|
+
__annotations__ = {
|
|
180
|
+
"brokerage_order_id": brokerage_order_id,
|
|
181
|
+
"status": status,
|
|
182
|
+
"order_type": order_type,
|
|
183
|
+
"time_in_force": time_in_force,
|
|
184
|
+
"time_placed": time_placed,
|
|
185
|
+
"time_executed": time_executed,
|
|
186
|
+
"quote_currency": quote_currency,
|
|
187
|
+
"execution_price": execution_price,
|
|
188
|
+
"limit_price": limit_price,
|
|
189
|
+
"stop_price": stop_price,
|
|
190
|
+
"legs": legs,
|
|
191
|
+
}
|
|
192
|
+
additional_properties = schemas.AnyTypeSchema
|
|
193
|
+
|
|
194
|
+
@typing.overload
|
|
195
|
+
def __getitem__(self, name: typing_extensions.Literal["brokerage_order_id"]) -> MetaOapg.properties.brokerage_order_id: ...
|
|
196
|
+
|
|
197
|
+
@typing.overload
|
|
198
|
+
def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'AccountOrderRecordStatus': ...
|
|
199
|
+
|
|
200
|
+
@typing.overload
|
|
201
|
+
def __getitem__(self, name: typing_extensions.Literal["order_type"]) -> MetaOapg.properties.order_type: ...
|
|
202
|
+
|
|
203
|
+
@typing.overload
|
|
204
|
+
def __getitem__(self, name: typing_extensions.Literal["time_in_force"]) -> MetaOapg.properties.time_in_force: ...
|
|
205
|
+
|
|
206
|
+
@typing.overload
|
|
207
|
+
def __getitem__(self, name: typing_extensions.Literal["time_placed"]) -> MetaOapg.properties.time_placed: ...
|
|
208
|
+
|
|
209
|
+
@typing.overload
|
|
210
|
+
def __getitem__(self, name: typing_extensions.Literal["time_executed"]) -> MetaOapg.properties.time_executed: ...
|
|
211
|
+
|
|
212
|
+
@typing.overload
|
|
213
|
+
def __getitem__(self, name: typing_extensions.Literal["quote_currency"]) -> MetaOapg.properties.quote_currency: ...
|
|
214
|
+
|
|
215
|
+
@typing.overload
|
|
216
|
+
def __getitem__(self, name: typing_extensions.Literal["execution_price"]) -> MetaOapg.properties.execution_price: ...
|
|
217
|
+
|
|
218
|
+
@typing.overload
|
|
219
|
+
def __getitem__(self, name: typing_extensions.Literal["limit_price"]) -> MetaOapg.properties.limit_price: ...
|
|
220
|
+
|
|
221
|
+
@typing.overload
|
|
222
|
+
def __getitem__(self, name: typing_extensions.Literal["stop_price"]) -> MetaOapg.properties.stop_price: ...
|
|
223
|
+
|
|
224
|
+
@typing.overload
|
|
225
|
+
def __getitem__(self, name: typing_extensions.Literal["legs"]) -> MetaOapg.properties.legs: ...
|
|
226
|
+
|
|
227
|
+
@typing.overload
|
|
228
|
+
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
|
|
229
|
+
|
|
230
|
+
def __getitem__(self, name: typing.Union[typing_extensions.Literal["brokerage_order_id"], typing_extensions.Literal["status"], typing_extensions.Literal["order_type"], typing_extensions.Literal["time_in_force"], typing_extensions.Literal["time_placed"], typing_extensions.Literal["time_executed"], typing_extensions.Literal["quote_currency"], typing_extensions.Literal["execution_price"], typing_extensions.Literal["limit_price"], typing_extensions.Literal["stop_price"], typing_extensions.Literal["legs"], str, ]):
|
|
231
|
+
# dict_instance[name] accessor
|
|
232
|
+
return super().__getitem__(name)
|
|
233
|
+
|
|
234
|
+
@typing.overload
|
|
235
|
+
def get_item_oapg(self, name: typing_extensions.Literal["brokerage_order_id"]) -> typing.Union[MetaOapg.properties.brokerage_order_id, schemas.Unset]: ...
|
|
236
|
+
|
|
237
|
+
@typing.overload
|
|
238
|
+
def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> typing.Union['AccountOrderRecordStatus', schemas.Unset]: ...
|
|
239
|
+
|
|
240
|
+
@typing.overload
|
|
241
|
+
def get_item_oapg(self, name: typing_extensions.Literal["order_type"]) -> typing.Union[MetaOapg.properties.order_type, schemas.Unset]: ...
|
|
242
|
+
|
|
243
|
+
@typing.overload
|
|
244
|
+
def get_item_oapg(self, name: typing_extensions.Literal["time_in_force"]) -> typing.Union[MetaOapg.properties.time_in_force, schemas.Unset]: ...
|
|
245
|
+
|
|
246
|
+
@typing.overload
|
|
247
|
+
def get_item_oapg(self, name: typing_extensions.Literal["time_placed"]) -> typing.Union[MetaOapg.properties.time_placed, schemas.Unset]: ...
|
|
248
|
+
|
|
249
|
+
@typing.overload
|
|
250
|
+
def get_item_oapg(self, name: typing_extensions.Literal["time_executed"]) -> typing.Union[MetaOapg.properties.time_executed, schemas.Unset]: ...
|
|
251
|
+
|
|
252
|
+
@typing.overload
|
|
253
|
+
def get_item_oapg(self, name: typing_extensions.Literal["quote_currency"]) -> typing.Union[MetaOapg.properties.quote_currency, schemas.Unset]: ...
|
|
254
|
+
|
|
255
|
+
@typing.overload
|
|
256
|
+
def get_item_oapg(self, name: typing_extensions.Literal["execution_price"]) -> typing.Union[MetaOapg.properties.execution_price, schemas.Unset]: ...
|
|
257
|
+
|
|
258
|
+
@typing.overload
|
|
259
|
+
def get_item_oapg(self, name: typing_extensions.Literal["limit_price"]) -> typing.Union[MetaOapg.properties.limit_price, schemas.Unset]: ...
|
|
260
|
+
|
|
261
|
+
@typing.overload
|
|
262
|
+
def get_item_oapg(self, name: typing_extensions.Literal["stop_price"]) -> typing.Union[MetaOapg.properties.stop_price, schemas.Unset]: ...
|
|
263
|
+
|
|
264
|
+
@typing.overload
|
|
265
|
+
def get_item_oapg(self, name: typing_extensions.Literal["legs"]) -> typing.Union[MetaOapg.properties.legs, schemas.Unset]: ...
|
|
266
|
+
|
|
267
|
+
@typing.overload
|
|
268
|
+
def get_item_oapg(self, name: str) -> typing.Union[MetaOapg.additional_properties, schemas.Unset]: ...
|
|
269
|
+
|
|
270
|
+
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["brokerage_order_id"], typing_extensions.Literal["status"], typing_extensions.Literal["order_type"], typing_extensions.Literal["time_in_force"], typing_extensions.Literal["time_placed"], typing_extensions.Literal["time_executed"], typing_extensions.Literal["quote_currency"], typing_extensions.Literal["execution_price"], typing_extensions.Literal["limit_price"], typing_extensions.Literal["stop_price"], typing_extensions.Literal["legs"], str, ]):
|
|
271
|
+
return super().get_item_oapg(name)
|
|
272
|
+
|
|
273
|
+
def __new__(
|
|
274
|
+
cls,
|
|
275
|
+
*args: typing.Union[dict, frozendict.frozendict, ],
|
|
276
|
+
brokerage_order_id: typing.Union[MetaOapg.properties.brokerage_order_id, str, schemas.Unset] = schemas.unset,
|
|
277
|
+
status: typing.Union['AccountOrderRecordStatus', schemas.Unset] = schemas.unset,
|
|
278
|
+
order_type: typing.Union[MetaOapg.properties.order_type, None, str, schemas.Unset] = schemas.unset,
|
|
279
|
+
time_in_force: typing.Union[MetaOapg.properties.time_in_force, str, schemas.Unset] = schemas.unset,
|
|
280
|
+
time_placed: typing.Union[MetaOapg.properties.time_placed, str, datetime, schemas.Unset] = schemas.unset,
|
|
281
|
+
time_executed: typing.Union[MetaOapg.properties.time_executed, None, str, datetime, schemas.Unset] = schemas.unset,
|
|
282
|
+
quote_currency: typing.Union[MetaOapg.properties.quote_currency, str, schemas.Unset] = schemas.unset,
|
|
283
|
+
execution_price: typing.Union[MetaOapg.properties.execution_price, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset,
|
|
284
|
+
limit_price: typing.Union[MetaOapg.properties.limit_price, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset,
|
|
285
|
+
stop_price: typing.Union[MetaOapg.properties.stop_price, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset,
|
|
286
|
+
legs: typing.Union[MetaOapg.properties.legs, list, tuple, schemas.Unset] = schemas.unset,
|
|
287
|
+
_configuration: typing.Optional[schemas.Configuration] = None,
|
|
288
|
+
**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, ],
|
|
289
|
+
) -> 'AccountOrderRecordV2':
|
|
290
|
+
return super().__new__(
|
|
291
|
+
cls,
|
|
292
|
+
*args,
|
|
293
|
+
brokerage_order_id=brokerage_order_id,
|
|
294
|
+
status=status,
|
|
295
|
+
order_type=order_type,
|
|
296
|
+
time_in_force=time_in_force,
|
|
297
|
+
time_placed=time_placed,
|
|
298
|
+
time_executed=time_executed,
|
|
299
|
+
quote_currency=quote_currency,
|
|
300
|
+
execution_price=execution_price,
|
|
301
|
+
limit_price=limit_price,
|
|
302
|
+
stop_price=stop_price,
|
|
303
|
+
legs=legs,
|
|
304
|
+
_configuration=_configuration,
|
|
305
|
+
**kwargs,
|
|
306
|
+
)
|
|
307
|
+
|
|
308
|
+
from snaptrade_client.model.account_order_record_leg import AccountOrderRecordLeg
|
|
309
|
+
from snaptrade_client.model.account_order_record_status import AccountOrderRecordStatus
|
|
@@ -0,0 +1,309 @@
|
|
|
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 AccountOrderRecordV2(
|
|
28
|
+
schemas.DictSchema
|
|
29
|
+
):
|
|
30
|
+
"""
|
|
31
|
+
This class is auto generated by Konfig (https://konfigthis.com)
|
|
32
|
+
|
|
33
|
+
Describes a single order in the standardized V2 format.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class MetaOapg:
|
|
38
|
+
|
|
39
|
+
class properties:
|
|
40
|
+
brokerage_order_id = schemas.StrSchema
|
|
41
|
+
|
|
42
|
+
@staticmethod
|
|
43
|
+
def status() -> typing.Type['AccountOrderRecordStatus']:
|
|
44
|
+
return AccountOrderRecordStatus
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class order_type(
|
|
48
|
+
schemas.StrBase,
|
|
49
|
+
schemas.NoneBase,
|
|
50
|
+
schemas.Schema,
|
|
51
|
+
schemas.NoneStrMixin
|
|
52
|
+
):
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def __new__(
|
|
56
|
+
cls,
|
|
57
|
+
*args: typing.Union[None, str, ],
|
|
58
|
+
_configuration: typing.Optional[schemas.Configuration] = None,
|
|
59
|
+
) -> 'order_type':
|
|
60
|
+
return super().__new__(
|
|
61
|
+
cls,
|
|
62
|
+
*args,
|
|
63
|
+
_configuration=_configuration,
|
|
64
|
+
)
|
|
65
|
+
time_in_force = schemas.StrSchema
|
|
66
|
+
time_placed = schemas.DateTimeSchema
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class time_executed(
|
|
70
|
+
schemas.DateTimeBase,
|
|
71
|
+
schemas.StrBase,
|
|
72
|
+
schemas.NoneBase,
|
|
73
|
+
schemas.Schema,
|
|
74
|
+
schemas.NoneStrMixin
|
|
75
|
+
):
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class MetaOapg:
|
|
79
|
+
format = 'date-time'
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def __new__(
|
|
83
|
+
cls,
|
|
84
|
+
*args: typing.Union[None, str, datetime, ],
|
|
85
|
+
_configuration: typing.Optional[schemas.Configuration] = None,
|
|
86
|
+
) -> 'time_executed':
|
|
87
|
+
return super().__new__(
|
|
88
|
+
cls,
|
|
89
|
+
*args,
|
|
90
|
+
_configuration=_configuration,
|
|
91
|
+
)
|
|
92
|
+
quote_currency = schemas.StrSchema
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
class execution_price(
|
|
96
|
+
schemas.NumberBase,
|
|
97
|
+
schemas.NoneBase,
|
|
98
|
+
schemas.Schema,
|
|
99
|
+
schemas.NoneDecimalMixin
|
|
100
|
+
):
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def __new__(
|
|
104
|
+
cls,
|
|
105
|
+
*args: typing.Union[None, decimal.Decimal, int, float, ],
|
|
106
|
+
_configuration: typing.Optional[schemas.Configuration] = None,
|
|
107
|
+
) -> 'execution_price':
|
|
108
|
+
return super().__new__(
|
|
109
|
+
cls,
|
|
110
|
+
*args,
|
|
111
|
+
_configuration=_configuration,
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
class limit_price(
|
|
116
|
+
schemas.NumberBase,
|
|
117
|
+
schemas.NoneBase,
|
|
118
|
+
schemas.Schema,
|
|
119
|
+
schemas.NoneDecimalMixin
|
|
120
|
+
):
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def __new__(
|
|
124
|
+
cls,
|
|
125
|
+
*args: typing.Union[None, decimal.Decimal, int, float, ],
|
|
126
|
+
_configuration: typing.Optional[schemas.Configuration] = None,
|
|
127
|
+
) -> 'limit_price':
|
|
128
|
+
return super().__new__(
|
|
129
|
+
cls,
|
|
130
|
+
*args,
|
|
131
|
+
_configuration=_configuration,
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
class stop_price(
|
|
136
|
+
schemas.NumberBase,
|
|
137
|
+
schemas.NoneBase,
|
|
138
|
+
schemas.Schema,
|
|
139
|
+
schemas.NoneDecimalMixin
|
|
140
|
+
):
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def __new__(
|
|
144
|
+
cls,
|
|
145
|
+
*args: typing.Union[None, decimal.Decimal, int, float, ],
|
|
146
|
+
_configuration: typing.Optional[schemas.Configuration] = None,
|
|
147
|
+
) -> 'stop_price':
|
|
148
|
+
return super().__new__(
|
|
149
|
+
cls,
|
|
150
|
+
*args,
|
|
151
|
+
_configuration=_configuration,
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
class legs(
|
|
156
|
+
schemas.ListSchema
|
|
157
|
+
):
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
class MetaOapg:
|
|
161
|
+
|
|
162
|
+
@staticmethod
|
|
163
|
+
def items() -> typing.Type['AccountOrderRecordLeg']:
|
|
164
|
+
return AccountOrderRecordLeg
|
|
165
|
+
|
|
166
|
+
def __new__(
|
|
167
|
+
cls,
|
|
168
|
+
arg: typing.Union[typing.Tuple['AccountOrderRecordLeg'], typing.List['AccountOrderRecordLeg']],
|
|
169
|
+
_configuration: typing.Optional[schemas.Configuration] = None,
|
|
170
|
+
) -> 'legs':
|
|
171
|
+
return super().__new__(
|
|
172
|
+
cls,
|
|
173
|
+
arg,
|
|
174
|
+
_configuration=_configuration,
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
def __getitem__(self, i: int) -> 'AccountOrderRecordLeg':
|
|
178
|
+
return super().__getitem__(i)
|
|
179
|
+
__annotations__ = {
|
|
180
|
+
"brokerage_order_id": brokerage_order_id,
|
|
181
|
+
"status": status,
|
|
182
|
+
"order_type": order_type,
|
|
183
|
+
"time_in_force": time_in_force,
|
|
184
|
+
"time_placed": time_placed,
|
|
185
|
+
"time_executed": time_executed,
|
|
186
|
+
"quote_currency": quote_currency,
|
|
187
|
+
"execution_price": execution_price,
|
|
188
|
+
"limit_price": limit_price,
|
|
189
|
+
"stop_price": stop_price,
|
|
190
|
+
"legs": legs,
|
|
191
|
+
}
|
|
192
|
+
additional_properties = schemas.AnyTypeSchema
|
|
193
|
+
|
|
194
|
+
@typing.overload
|
|
195
|
+
def __getitem__(self, name: typing_extensions.Literal["brokerage_order_id"]) -> MetaOapg.properties.brokerage_order_id: ...
|
|
196
|
+
|
|
197
|
+
@typing.overload
|
|
198
|
+
def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'AccountOrderRecordStatus': ...
|
|
199
|
+
|
|
200
|
+
@typing.overload
|
|
201
|
+
def __getitem__(self, name: typing_extensions.Literal["order_type"]) -> MetaOapg.properties.order_type: ...
|
|
202
|
+
|
|
203
|
+
@typing.overload
|
|
204
|
+
def __getitem__(self, name: typing_extensions.Literal["time_in_force"]) -> MetaOapg.properties.time_in_force: ...
|
|
205
|
+
|
|
206
|
+
@typing.overload
|
|
207
|
+
def __getitem__(self, name: typing_extensions.Literal["time_placed"]) -> MetaOapg.properties.time_placed: ...
|
|
208
|
+
|
|
209
|
+
@typing.overload
|
|
210
|
+
def __getitem__(self, name: typing_extensions.Literal["time_executed"]) -> MetaOapg.properties.time_executed: ...
|
|
211
|
+
|
|
212
|
+
@typing.overload
|
|
213
|
+
def __getitem__(self, name: typing_extensions.Literal["quote_currency"]) -> MetaOapg.properties.quote_currency: ...
|
|
214
|
+
|
|
215
|
+
@typing.overload
|
|
216
|
+
def __getitem__(self, name: typing_extensions.Literal["execution_price"]) -> MetaOapg.properties.execution_price: ...
|
|
217
|
+
|
|
218
|
+
@typing.overload
|
|
219
|
+
def __getitem__(self, name: typing_extensions.Literal["limit_price"]) -> MetaOapg.properties.limit_price: ...
|
|
220
|
+
|
|
221
|
+
@typing.overload
|
|
222
|
+
def __getitem__(self, name: typing_extensions.Literal["stop_price"]) -> MetaOapg.properties.stop_price: ...
|
|
223
|
+
|
|
224
|
+
@typing.overload
|
|
225
|
+
def __getitem__(self, name: typing_extensions.Literal["legs"]) -> MetaOapg.properties.legs: ...
|
|
226
|
+
|
|
227
|
+
@typing.overload
|
|
228
|
+
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
|
|
229
|
+
|
|
230
|
+
def __getitem__(self, name: typing.Union[typing_extensions.Literal["brokerage_order_id"], typing_extensions.Literal["status"], typing_extensions.Literal["order_type"], typing_extensions.Literal["time_in_force"], typing_extensions.Literal["time_placed"], typing_extensions.Literal["time_executed"], typing_extensions.Literal["quote_currency"], typing_extensions.Literal["execution_price"], typing_extensions.Literal["limit_price"], typing_extensions.Literal["stop_price"], typing_extensions.Literal["legs"], str, ]):
|
|
231
|
+
# dict_instance[name] accessor
|
|
232
|
+
return super().__getitem__(name)
|
|
233
|
+
|
|
234
|
+
@typing.overload
|
|
235
|
+
def get_item_oapg(self, name: typing_extensions.Literal["brokerage_order_id"]) -> typing.Union[MetaOapg.properties.brokerage_order_id, schemas.Unset]: ...
|
|
236
|
+
|
|
237
|
+
@typing.overload
|
|
238
|
+
def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> typing.Union['AccountOrderRecordStatus', schemas.Unset]: ...
|
|
239
|
+
|
|
240
|
+
@typing.overload
|
|
241
|
+
def get_item_oapg(self, name: typing_extensions.Literal["order_type"]) -> typing.Union[MetaOapg.properties.order_type, schemas.Unset]: ...
|
|
242
|
+
|
|
243
|
+
@typing.overload
|
|
244
|
+
def get_item_oapg(self, name: typing_extensions.Literal["time_in_force"]) -> typing.Union[MetaOapg.properties.time_in_force, schemas.Unset]: ...
|
|
245
|
+
|
|
246
|
+
@typing.overload
|
|
247
|
+
def get_item_oapg(self, name: typing_extensions.Literal["time_placed"]) -> typing.Union[MetaOapg.properties.time_placed, schemas.Unset]: ...
|
|
248
|
+
|
|
249
|
+
@typing.overload
|
|
250
|
+
def get_item_oapg(self, name: typing_extensions.Literal["time_executed"]) -> typing.Union[MetaOapg.properties.time_executed, schemas.Unset]: ...
|
|
251
|
+
|
|
252
|
+
@typing.overload
|
|
253
|
+
def get_item_oapg(self, name: typing_extensions.Literal["quote_currency"]) -> typing.Union[MetaOapg.properties.quote_currency, schemas.Unset]: ...
|
|
254
|
+
|
|
255
|
+
@typing.overload
|
|
256
|
+
def get_item_oapg(self, name: typing_extensions.Literal["execution_price"]) -> typing.Union[MetaOapg.properties.execution_price, schemas.Unset]: ...
|
|
257
|
+
|
|
258
|
+
@typing.overload
|
|
259
|
+
def get_item_oapg(self, name: typing_extensions.Literal["limit_price"]) -> typing.Union[MetaOapg.properties.limit_price, schemas.Unset]: ...
|
|
260
|
+
|
|
261
|
+
@typing.overload
|
|
262
|
+
def get_item_oapg(self, name: typing_extensions.Literal["stop_price"]) -> typing.Union[MetaOapg.properties.stop_price, schemas.Unset]: ...
|
|
263
|
+
|
|
264
|
+
@typing.overload
|
|
265
|
+
def get_item_oapg(self, name: typing_extensions.Literal["legs"]) -> typing.Union[MetaOapg.properties.legs, schemas.Unset]: ...
|
|
266
|
+
|
|
267
|
+
@typing.overload
|
|
268
|
+
def get_item_oapg(self, name: str) -> typing.Union[MetaOapg.additional_properties, schemas.Unset]: ...
|
|
269
|
+
|
|
270
|
+
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["brokerage_order_id"], typing_extensions.Literal["status"], typing_extensions.Literal["order_type"], typing_extensions.Literal["time_in_force"], typing_extensions.Literal["time_placed"], typing_extensions.Literal["time_executed"], typing_extensions.Literal["quote_currency"], typing_extensions.Literal["execution_price"], typing_extensions.Literal["limit_price"], typing_extensions.Literal["stop_price"], typing_extensions.Literal["legs"], str, ]):
|
|
271
|
+
return super().get_item_oapg(name)
|
|
272
|
+
|
|
273
|
+
def __new__(
|
|
274
|
+
cls,
|
|
275
|
+
*args: typing.Union[dict, frozendict.frozendict, ],
|
|
276
|
+
brokerage_order_id: typing.Union[MetaOapg.properties.brokerage_order_id, str, schemas.Unset] = schemas.unset,
|
|
277
|
+
status: typing.Union['AccountOrderRecordStatus', schemas.Unset] = schemas.unset,
|
|
278
|
+
order_type: typing.Union[MetaOapg.properties.order_type, None, str, schemas.Unset] = schemas.unset,
|
|
279
|
+
time_in_force: typing.Union[MetaOapg.properties.time_in_force, str, schemas.Unset] = schemas.unset,
|
|
280
|
+
time_placed: typing.Union[MetaOapg.properties.time_placed, str, datetime, schemas.Unset] = schemas.unset,
|
|
281
|
+
time_executed: typing.Union[MetaOapg.properties.time_executed, None, str, datetime, schemas.Unset] = schemas.unset,
|
|
282
|
+
quote_currency: typing.Union[MetaOapg.properties.quote_currency, str, schemas.Unset] = schemas.unset,
|
|
283
|
+
execution_price: typing.Union[MetaOapg.properties.execution_price, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset,
|
|
284
|
+
limit_price: typing.Union[MetaOapg.properties.limit_price, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset,
|
|
285
|
+
stop_price: typing.Union[MetaOapg.properties.stop_price, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset,
|
|
286
|
+
legs: typing.Union[MetaOapg.properties.legs, list, tuple, schemas.Unset] = schemas.unset,
|
|
287
|
+
_configuration: typing.Optional[schemas.Configuration] = None,
|
|
288
|
+
**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, ],
|
|
289
|
+
) -> 'AccountOrderRecordV2':
|
|
290
|
+
return super().__new__(
|
|
291
|
+
cls,
|
|
292
|
+
*args,
|
|
293
|
+
brokerage_order_id=brokerage_order_id,
|
|
294
|
+
status=status,
|
|
295
|
+
order_type=order_type,
|
|
296
|
+
time_in_force=time_in_force,
|
|
297
|
+
time_placed=time_placed,
|
|
298
|
+
time_executed=time_executed,
|
|
299
|
+
quote_currency=quote_currency,
|
|
300
|
+
execution_price=execution_price,
|
|
301
|
+
limit_price=limit_price,
|
|
302
|
+
stop_price=stop_price,
|
|
303
|
+
legs=legs,
|
|
304
|
+
_configuration=_configuration,
|
|
305
|
+
**kwargs,
|
|
306
|
+
)
|
|
307
|
+
|
|
308
|
+
from snaptrade_client.model.account_order_record_leg import AccountOrderRecordLeg
|
|
309
|
+
from snaptrade_client.model.account_order_record_status import AccountOrderRecordStatus
|