snaptrade-python-sdk 11.0.115__py3-none-any.whl → 11.0.116__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 +3 -3
- snaptrade_client/apis/paths/accounts_account_id_trading_cancel.py +7 -0
- snaptrade_client/apis/tags/trading_api_generated.py +1 -1
- snaptrade_client/configuration.py +1 -1
- snaptrade_client/model/cancel_order_response.py +96 -0
- snaptrade_client/model/cancel_order_response.pyi +96 -0
- snaptrade_client/model/cancel_order_response_raw_response.py +62 -0
- snaptrade_client/model/cancel_order_response_raw_response.pyi +62 -0
- snaptrade_client/models/__init__.py +2 -0
- snaptrade_client/operation_parameter_map.py +2 -2
- snaptrade_client/paths/__init__.py +1 -1
- snaptrade_client/paths/{accounts_account_id_trading_simple_brokerage_order_id_cancel → accounts_account_id_trading_cancel}/__init__.py +2 -2
- snaptrade_client/paths/{accounts_account_id_trading_simple_brokerage_order_id_cancel → accounts_account_id_trading_cancel}/post.py +120 -19
- snaptrade_client/paths/{accounts_account_id_trading_simple_brokerage_order_id_cancel → accounts_account_id_trading_cancel}/post.pyi +120 -19
- snaptrade_client/type/cancel_order_response.py +29 -0
- snaptrade_client/type/cancel_order_response_raw_response.py +19 -0
- {snaptrade_python_sdk-11.0.115.dist-info → snaptrade_python_sdk-11.0.116.dist-info}/METADATA +10 -5
- {snaptrade_python_sdk-11.0.115.dist-info → snaptrade_python_sdk-11.0.116.dist-info}/RECORD +22 -16
- snaptrade_client/apis/paths/accounts_account_id_trading_simple_brokerage_order_id_cancel.py +0 -7
- {snaptrade_python_sdk-11.0.115.dist-info → snaptrade_python_sdk-11.0.116.dist-info}/LICENSE +0 -0
- {snaptrade_python_sdk-11.0.115.dist-info → snaptrade_python_sdk-11.0.116.dist-info}/WHEEL +0 -0
|
@@ -33,10 +33,10 @@ import frozendict # noqa: F401
|
|
|
33
33
|
from snaptrade_client import schemas # noqa: F401
|
|
34
34
|
|
|
35
35
|
from snaptrade_client.model.model400_failed_request_response import Model400FailedRequestResponse as Model400FailedRequestResponseSchema
|
|
36
|
-
from snaptrade_client.model.
|
|
36
|
+
from snaptrade_client.model.cancel_order_response import CancelOrderResponse as CancelOrderResponseSchema
|
|
37
37
|
|
|
38
|
+
from snaptrade_client.type.cancel_order_response import CancelOrderResponse
|
|
38
39
|
from snaptrade_client.type.model400_failed_request_response import Model400FailedRequestResponse
|
|
39
|
-
from snaptrade_client.type.order_updated_response import OrderUpdatedResponse
|
|
40
40
|
|
|
41
41
|
# Query params
|
|
42
42
|
UserIdSchema = schemas.StrSchema
|
|
@@ -76,12 +76,10 @@ request_query_user_secret = api_client.QueryParameter(
|
|
|
76
76
|
)
|
|
77
77
|
# Path params
|
|
78
78
|
AccountIdSchema = schemas.UUIDSchema
|
|
79
|
-
BrokerageOrderIdSchema = schemas.StrSchema
|
|
80
79
|
RequestRequiredPathParams = typing_extensions.TypedDict(
|
|
81
80
|
'RequestRequiredPathParams',
|
|
82
81
|
{
|
|
83
82
|
'accountId': typing.Union[AccountIdSchema, str, uuid.UUID, ],
|
|
84
|
-
'brokerageOrderId': typing.Union[BrokerageOrderIdSchema, str, ],
|
|
85
83
|
}
|
|
86
84
|
)
|
|
87
85
|
RequestOptionalPathParams = typing_extensions.TypedDict(
|
|
@@ -102,23 +100,77 @@ request_path_account_id = api_client.PathParameter(
|
|
|
102
100
|
schema=AccountIdSchema,
|
|
103
101
|
required=True,
|
|
104
102
|
)
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
# body param
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
class SchemaForRequestBodyApplicationJson(
|
|
107
|
+
schemas.DictSchema
|
|
108
|
+
):
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
class MetaOapg:
|
|
112
|
+
|
|
113
|
+
class properties:
|
|
114
|
+
brokerage_order_id = schemas.StrSchema
|
|
115
|
+
__annotations__ = {
|
|
116
|
+
"brokerage_order_id": brokerage_order_id,
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
@typing.overload
|
|
120
|
+
def __getitem__(self, name: typing_extensions.Literal["brokerage_order_id"]) -> MetaOapg.properties.brokerage_order_id: ...
|
|
121
|
+
|
|
122
|
+
@typing.overload
|
|
123
|
+
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
|
124
|
+
|
|
125
|
+
def __getitem__(self, name: typing.Union[typing_extensions.Literal["brokerage_order_id", ], str]):
|
|
126
|
+
# dict_instance[name] accessor
|
|
127
|
+
return super().__getitem__(name)
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
@typing.overload
|
|
131
|
+
def get_item_oapg(self, name: typing_extensions.Literal["brokerage_order_id"]) -> typing.Union[MetaOapg.properties.brokerage_order_id, schemas.Unset]: ...
|
|
132
|
+
|
|
133
|
+
@typing.overload
|
|
134
|
+
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
|
135
|
+
|
|
136
|
+
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["brokerage_order_id", ], str]):
|
|
137
|
+
return super().get_item_oapg(name)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
def __new__(
|
|
141
|
+
cls,
|
|
142
|
+
*args: typing.Union[dict, frozendict.frozendict, ],
|
|
143
|
+
brokerage_order_id: typing.Union[MetaOapg.properties.brokerage_order_id, str, schemas.Unset] = schemas.unset,
|
|
144
|
+
_configuration: typing.Optional[schemas.Configuration] = None,
|
|
145
|
+
**kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes],
|
|
146
|
+
) -> 'SchemaForRequestBodyApplicationJson':
|
|
147
|
+
return super().__new__(
|
|
148
|
+
cls,
|
|
149
|
+
*args,
|
|
150
|
+
brokerage_order_id=brokerage_order_id,
|
|
151
|
+
_configuration=_configuration,
|
|
152
|
+
**kwargs,
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
request_body_typing_any = api_client.RequestBody(
|
|
157
|
+
content={
|
|
158
|
+
'application/json': api_client.MediaType(
|
|
159
|
+
schema=SchemaForRequestBodyApplicationJson),
|
|
160
|
+
},
|
|
109
161
|
required=True,
|
|
110
162
|
)
|
|
111
|
-
SchemaFor200ResponseBodyApplicationJson =
|
|
163
|
+
SchemaFor200ResponseBodyApplicationJson = CancelOrderResponseSchema
|
|
112
164
|
|
|
113
165
|
|
|
114
166
|
@dataclass
|
|
115
167
|
class ApiResponseFor200(api_client.ApiResponse):
|
|
116
|
-
body:
|
|
168
|
+
body: CancelOrderResponse
|
|
117
169
|
|
|
118
170
|
|
|
119
171
|
@dataclass
|
|
120
172
|
class ApiResponseFor200Async(api_client.AsyncApiResponse):
|
|
121
|
-
body:
|
|
173
|
+
body: CancelOrderResponse
|
|
122
174
|
|
|
123
175
|
|
|
124
176
|
_response_for_200 = api_client.OpenApiResponse(
|
|
@@ -175,6 +227,7 @@ class BaseApi(api_client.Api):
|
|
|
175
227
|
|
|
176
228
|
def _cancel_order_mapped_args(
|
|
177
229
|
self,
|
|
230
|
+
body: typing.Optional[typing.Any] = None,
|
|
178
231
|
user_id: typing.Optional[str] = None,
|
|
179
232
|
user_secret: typing.Optional[str] = None,
|
|
180
233
|
account_id: typing.Optional[str] = None,
|
|
@@ -185,25 +238,29 @@ class BaseApi(api_client.Api):
|
|
|
185
238
|
args: api_client.MappedArgs = api_client.MappedArgs()
|
|
186
239
|
_query_params = {}
|
|
187
240
|
_path_params = {}
|
|
241
|
+
_body = {}
|
|
242
|
+
if brokerage_order_id is not None:
|
|
243
|
+
_body["brokerage_order_id"] = brokerage_order_id
|
|
244
|
+
args.body = body if body is not None else _body
|
|
188
245
|
if user_id is not None:
|
|
189
246
|
_query_params["userId"] = user_id
|
|
190
247
|
if user_secret is not None:
|
|
191
248
|
_query_params["userSecret"] = user_secret
|
|
192
249
|
if account_id is not None:
|
|
193
250
|
_path_params["accountId"] = account_id
|
|
194
|
-
if brokerage_order_id is not None:
|
|
195
|
-
_path_params["brokerageOrderId"] = brokerage_order_id
|
|
196
251
|
args.query = query_params if query_params else _query_params
|
|
197
252
|
args.path = path_params if path_params else _path_params
|
|
198
253
|
return args
|
|
199
254
|
|
|
200
255
|
async def _acancel_order_oapg(
|
|
201
256
|
self,
|
|
257
|
+
body: typing.Any = None,
|
|
202
258
|
query_params: typing.Optional[dict] = {},
|
|
203
259
|
path_params: typing.Optional[dict] = {},
|
|
204
260
|
skip_deserialization: bool = True,
|
|
205
261
|
timeout: typing.Optional[typing.Union[float, typing.Tuple]] = None,
|
|
206
262
|
accept_content_types: typing.Tuple[str] = _all_accept_content_types,
|
|
263
|
+
content_type: str = 'application/json',
|
|
207
264
|
stream: bool = False,
|
|
208
265
|
**kwargs,
|
|
209
266
|
) -> typing.Union[
|
|
@@ -212,7 +269,7 @@ class BaseApi(api_client.Api):
|
|
|
212
269
|
AsyncGeneratorResponse,
|
|
213
270
|
]:
|
|
214
271
|
"""
|
|
215
|
-
Cancel
|
|
272
|
+
Cancel order
|
|
216
273
|
:param skip_deserialization: If true then api_response.response will be set but
|
|
217
274
|
api_response.body and api_response.headers will not be deserialized into schema
|
|
218
275
|
class instances
|
|
@@ -224,7 +281,6 @@ class BaseApi(api_client.Api):
|
|
|
224
281
|
_path_params = {}
|
|
225
282
|
for parameter in (
|
|
226
283
|
request_path_account_id,
|
|
227
|
-
request_path_brokerage_order_id,
|
|
228
284
|
):
|
|
229
285
|
parameter_data = path_params.get(parameter.name, schemas.unset)
|
|
230
286
|
if parameter_data is schemas.unset:
|
|
@@ -255,19 +311,35 @@ class BaseApi(api_client.Api):
|
|
|
255
311
|
for accept_content_type in accept_content_types:
|
|
256
312
|
_headers.add('Accept', accept_content_type)
|
|
257
313
|
method = 'post'.upper()
|
|
314
|
+
_headers.add('Content-Type', content_type)
|
|
315
|
+
|
|
316
|
+
if body is schemas.unset:
|
|
317
|
+
raise exceptions.ApiValueError(
|
|
318
|
+
'The required body parameter has an invalid value of: unset. Set a valid value instead')
|
|
319
|
+
_fields = None
|
|
320
|
+
_body = None
|
|
258
321
|
request_before_hook(
|
|
259
322
|
resource_path=used_path,
|
|
260
323
|
method=method,
|
|
261
324
|
configuration=self.api_client.configuration,
|
|
262
|
-
path_template='/accounts/{accountId}/trading/
|
|
325
|
+
path_template='/accounts/{accountId}/trading/cancel',
|
|
326
|
+
body=body,
|
|
263
327
|
auth_settings=_auth,
|
|
264
328
|
headers=_headers,
|
|
265
329
|
)
|
|
330
|
+
serialized_data = request_body_typing_any.serialize(body, content_type)
|
|
331
|
+
if 'fields' in serialized_data:
|
|
332
|
+
_fields = serialized_data['fields']
|
|
333
|
+
elif 'body' in serialized_data:
|
|
334
|
+
_body = serialized_data['body']
|
|
266
335
|
|
|
267
336
|
response = await self.api_client.async_call_api(
|
|
268
337
|
resource_path=used_path,
|
|
269
338
|
method=method,
|
|
270
339
|
headers=_headers,
|
|
340
|
+
fields=_fields,
|
|
341
|
+
serialized_body=_body,
|
|
342
|
+
body=body,
|
|
271
343
|
auth_settings=_auth,
|
|
272
344
|
prefix_separator_iterator=prefix_separator_iterator,
|
|
273
345
|
timeout=timeout,
|
|
@@ -330,18 +402,20 @@ class BaseApi(api_client.Api):
|
|
|
330
402
|
|
|
331
403
|
def _cancel_order_oapg(
|
|
332
404
|
self,
|
|
405
|
+
body: typing.Any = None,
|
|
333
406
|
query_params: typing.Optional[dict] = {},
|
|
334
407
|
path_params: typing.Optional[dict] = {},
|
|
335
408
|
skip_deserialization: bool = True,
|
|
336
409
|
timeout: typing.Optional[typing.Union[float, typing.Tuple]] = None,
|
|
337
410
|
accept_content_types: typing.Tuple[str] = _all_accept_content_types,
|
|
411
|
+
content_type: str = 'application/json',
|
|
338
412
|
stream: bool = False,
|
|
339
413
|
) -> typing.Union[
|
|
340
414
|
ApiResponseFor200,
|
|
341
415
|
api_client.ApiResponseWithoutDeserialization,
|
|
342
416
|
]:
|
|
343
417
|
"""
|
|
344
|
-
Cancel
|
|
418
|
+
Cancel order
|
|
345
419
|
:param skip_deserialization: If true then api_response.response will be set but
|
|
346
420
|
api_response.body and api_response.headers will not be deserialized into schema
|
|
347
421
|
class instances
|
|
@@ -353,7 +427,6 @@ class BaseApi(api_client.Api):
|
|
|
353
427
|
_path_params = {}
|
|
354
428
|
for parameter in (
|
|
355
429
|
request_path_account_id,
|
|
356
|
-
request_path_brokerage_order_id,
|
|
357
430
|
):
|
|
358
431
|
parameter_data = path_params.get(parameter.name, schemas.unset)
|
|
359
432
|
if parameter_data is schemas.unset:
|
|
@@ -384,19 +457,35 @@ class BaseApi(api_client.Api):
|
|
|
384
457
|
for accept_content_type in accept_content_types:
|
|
385
458
|
_headers.add('Accept', accept_content_type)
|
|
386
459
|
method = 'post'.upper()
|
|
460
|
+
_headers.add('Content-Type', content_type)
|
|
461
|
+
|
|
462
|
+
if body is schemas.unset:
|
|
463
|
+
raise exceptions.ApiValueError(
|
|
464
|
+
'The required body parameter has an invalid value of: unset. Set a valid value instead')
|
|
465
|
+
_fields = None
|
|
466
|
+
_body = None
|
|
387
467
|
request_before_hook(
|
|
388
468
|
resource_path=used_path,
|
|
389
469
|
method=method,
|
|
390
470
|
configuration=self.api_client.configuration,
|
|
391
|
-
path_template='/accounts/{accountId}/trading/
|
|
471
|
+
path_template='/accounts/{accountId}/trading/cancel',
|
|
472
|
+
body=body,
|
|
392
473
|
auth_settings=_auth,
|
|
393
474
|
headers=_headers,
|
|
394
475
|
)
|
|
476
|
+
serialized_data = request_body_typing_any.serialize(body, content_type)
|
|
477
|
+
if 'fields' in serialized_data:
|
|
478
|
+
_fields = serialized_data['fields']
|
|
479
|
+
elif 'body' in serialized_data:
|
|
480
|
+
_body = serialized_data['body']
|
|
395
481
|
|
|
396
482
|
response = self.api_client.call_api(
|
|
397
483
|
resource_path=used_path,
|
|
398
484
|
method=method,
|
|
399
485
|
headers=_headers,
|
|
486
|
+
fields=_fields,
|
|
487
|
+
serialized_body=_body,
|
|
488
|
+
body=body,
|
|
400
489
|
auth_settings=_auth,
|
|
401
490
|
prefix_separator_iterator=prefix_separator_iterator,
|
|
402
491
|
timeout=timeout,
|
|
@@ -431,6 +520,7 @@ class CancelOrder(BaseApi):
|
|
|
431
520
|
|
|
432
521
|
async def acancel_order(
|
|
433
522
|
self,
|
|
523
|
+
body: typing.Optional[typing.Any] = None,
|
|
434
524
|
user_id: typing.Optional[str] = None,
|
|
435
525
|
user_secret: typing.Optional[str] = None,
|
|
436
526
|
account_id: typing.Optional[str] = None,
|
|
@@ -444,6 +534,7 @@ class CancelOrder(BaseApi):
|
|
|
444
534
|
AsyncGeneratorResponse,
|
|
445
535
|
]:
|
|
446
536
|
args = self._cancel_order_mapped_args(
|
|
537
|
+
body=body,
|
|
447
538
|
query_params=query_params,
|
|
448
539
|
path_params=path_params,
|
|
449
540
|
user_id=user_id,
|
|
@@ -452,6 +543,7 @@ class CancelOrder(BaseApi):
|
|
|
452
543
|
brokerage_order_id=brokerage_order_id,
|
|
453
544
|
)
|
|
454
545
|
return await self._acancel_order_oapg(
|
|
546
|
+
body=args.body,
|
|
455
547
|
query_params=args.query,
|
|
456
548
|
path_params=args.path,
|
|
457
549
|
**kwargs,
|
|
@@ -459,6 +551,7 @@ class CancelOrder(BaseApi):
|
|
|
459
551
|
|
|
460
552
|
def cancel_order(
|
|
461
553
|
self,
|
|
554
|
+
body: typing.Optional[typing.Any] = None,
|
|
462
555
|
user_id: typing.Optional[str] = None,
|
|
463
556
|
user_secret: typing.Optional[str] = None,
|
|
464
557
|
account_id: typing.Optional[str] = None,
|
|
@@ -471,6 +564,7 @@ class CancelOrder(BaseApi):
|
|
|
471
564
|
]:
|
|
472
565
|
""" Cancels an order in the specified account. """
|
|
473
566
|
args = self._cancel_order_mapped_args(
|
|
567
|
+
body=body,
|
|
474
568
|
query_params=query_params,
|
|
475
569
|
path_params=path_params,
|
|
476
570
|
user_id=user_id,
|
|
@@ -479,6 +573,7 @@ class CancelOrder(BaseApi):
|
|
|
479
573
|
brokerage_order_id=brokerage_order_id,
|
|
480
574
|
)
|
|
481
575
|
return self._cancel_order_oapg(
|
|
576
|
+
body=args.body,
|
|
482
577
|
query_params=args.query,
|
|
483
578
|
path_params=args.path,
|
|
484
579
|
)
|
|
@@ -488,6 +583,7 @@ class ApiForpost(BaseApi):
|
|
|
488
583
|
|
|
489
584
|
async def apost(
|
|
490
585
|
self,
|
|
586
|
+
body: typing.Optional[typing.Any] = None,
|
|
491
587
|
user_id: typing.Optional[str] = None,
|
|
492
588
|
user_secret: typing.Optional[str] = None,
|
|
493
589
|
account_id: typing.Optional[str] = None,
|
|
@@ -501,6 +597,7 @@ class ApiForpost(BaseApi):
|
|
|
501
597
|
AsyncGeneratorResponse,
|
|
502
598
|
]:
|
|
503
599
|
args = self._cancel_order_mapped_args(
|
|
600
|
+
body=body,
|
|
504
601
|
query_params=query_params,
|
|
505
602
|
path_params=path_params,
|
|
506
603
|
user_id=user_id,
|
|
@@ -509,6 +606,7 @@ class ApiForpost(BaseApi):
|
|
|
509
606
|
brokerage_order_id=brokerage_order_id,
|
|
510
607
|
)
|
|
511
608
|
return await self._acancel_order_oapg(
|
|
609
|
+
body=args.body,
|
|
512
610
|
query_params=args.query,
|
|
513
611
|
path_params=args.path,
|
|
514
612
|
**kwargs,
|
|
@@ -516,6 +614,7 @@ class ApiForpost(BaseApi):
|
|
|
516
614
|
|
|
517
615
|
def post(
|
|
518
616
|
self,
|
|
617
|
+
body: typing.Optional[typing.Any] = None,
|
|
519
618
|
user_id: typing.Optional[str] = None,
|
|
520
619
|
user_secret: typing.Optional[str] = None,
|
|
521
620
|
account_id: typing.Optional[str] = None,
|
|
@@ -528,6 +627,7 @@ class ApiForpost(BaseApi):
|
|
|
528
627
|
]:
|
|
529
628
|
""" Cancels an order in the specified account. """
|
|
530
629
|
args = self._cancel_order_mapped_args(
|
|
630
|
+
body=body,
|
|
531
631
|
query_params=query_params,
|
|
532
632
|
path_params=path_params,
|
|
533
633
|
user_id=user_id,
|
|
@@ -536,6 +636,7 @@ class ApiForpost(BaseApi):
|
|
|
536
636
|
brokerage_order_id=brokerage_order_id,
|
|
537
637
|
)
|
|
538
638
|
return self._cancel_order_oapg(
|
|
639
|
+
body=args.body,
|
|
539
640
|
query_params=args.query,
|
|
540
641
|
path_params=args.path,
|
|
541
642
|
)
|
|
@@ -0,0 +1,29 @@
|
|
|
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 datetime, date
|
|
14
|
+
import typing
|
|
15
|
+
from enum import Enum
|
|
16
|
+
from typing_extensions import TypedDict, Literal, TYPE_CHECKING
|
|
17
|
+
|
|
18
|
+
from snaptrade_client.type.cancel_order_response_raw_response import CancelOrderResponseRawResponse
|
|
19
|
+
|
|
20
|
+
class RequiredCancelOrderResponse(TypedDict):
|
|
21
|
+
# Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.
|
|
22
|
+
brokerage_order_id: str
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class OptionalCancelOrderResponse(TypedDict, total=False):
|
|
26
|
+
raw_response: typing.Optional[CancelOrderResponseRawResponse]
|
|
27
|
+
|
|
28
|
+
class CancelOrderResponse(RequiredCancelOrderResponse, OptionalCancelOrderResponse):
|
|
29
|
+
pass
|
|
@@ -0,0 +1,19 @@
|
|
|
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 datetime, date
|
|
14
|
+
import typing
|
|
15
|
+
from enum import Enum
|
|
16
|
+
from typing_extensions import TypedDict, Literal, TYPE_CHECKING
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
CancelOrderResponseRawResponse = dict
|
{snaptrade_python_sdk-11.0.115.dist-info → snaptrade_python_sdk-11.0.116.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: snaptrade-python-sdk
|
|
3
|
-
Version: 11.0.
|
|
3
|
+
Version: 11.0.116
|
|
4
4
|
Summary: Client for SnapTrade
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: SnapTrade
|
|
@@ -30,7 +30,7 @@ Description-Content-Type: text/markdown
|
|
|
30
30
|
Connect brokerage accounts to your app for live positions and trading
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
[](https://pypi.org/project/snaptrade-python-sdk/11.0.116)
|
|
34
34
|
[](https://github.com/passiv/snaptrade-sdks/tree/master/sdks/python#readme)
|
|
35
35
|
[](https://snaptrade.com/)
|
|
36
36
|
|
|
@@ -110,7 +110,7 @@ Python >=3.8
|
|
|
110
110
|
## Installation<a id="installation"></a>
|
|
111
111
|
|
|
112
112
|
```sh
|
|
113
|
-
pip install snaptrade-python-sdk==11.0.
|
|
113
|
+
pip install snaptrade-python-sdk==11.0.116
|
|
114
114
|
```
|
|
115
115
|
|
|
116
116
|
## Getting Started<a id="getting-started"></a>
|
|
@@ -1706,13 +1706,18 @@ cancel_order_response = snaptrade.trading.cancel_order(
|
|
|
1706
1706
|
|
|
1707
1707
|
##### brokerage_order_id: `str`<a id="brokerage_order_id-str"></a>
|
|
1708
1708
|
|
|
1709
|
+
Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.
|
|
1710
|
+
|
|
1711
|
+
#### ⚙️ Request Body<a id="⚙️-request-body"></a>
|
|
1712
|
+
|
|
1713
|
+
[`Any`](./snaptrade_client/type/typing_any.py)
|
|
1709
1714
|
#### 🔄 Return<a id="🔄-return"></a>
|
|
1710
1715
|
|
|
1711
|
-
[`
|
|
1716
|
+
[`CancelOrderResponse`](./snaptrade_client/type/cancel_order_response.py)
|
|
1712
1717
|
|
|
1713
1718
|
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
1714
1719
|
|
|
1715
|
-
`/accounts/{accountId}/trading/
|
|
1720
|
+
`/accounts/{accountId}/trading/cancel` `post`
|
|
1716
1721
|
|
|
1717
1722
|
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1718
1723
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
snaptrade_client/__init__.py,sha256
|
|
2
|
-
snaptrade_client/api_client.py,sha256=
|
|
1
|
+
snaptrade_client/__init__.py,sha256=-s64hOccu7igQiPESqiy0jJgBODSVy6lhzJrJ8mJq0k,820
|
|
2
|
+
snaptrade_client/api_client.py,sha256=wk17Efb0hkP-MIBXLBs7vSpqIJdL5RbzhCEg7ZaziLM,73975
|
|
3
3
|
snaptrade_client/api_response.py,sha256=mZn18p_TNr6OY0HXTZW5InL9iXfqsJWstYGeGD-euPA,663
|
|
4
4
|
snaptrade_client/apis/__init__.py,sha256=RTosXhMn41tMsKPUjIy-VK-_efOWzhkKiuGggJ3A6E0,214
|
|
5
|
-
snaptrade_client/apis/path_to_api.py,sha256=
|
|
5
|
+
snaptrade_client/apis/path_to_api.py,sha256=5m9q1Jiuo6oZ_DJoEAcSwI2ZlWOeU9-L1AVDciEKSAo,13045
|
|
6
6
|
snaptrade_client/apis/paths/__init__.py,sha256=oIb-tz_ei5m0RWOOB0qXTkBKu61nYtwOUlWvQbD5gFE,243
|
|
7
7
|
snaptrade_client/apis/paths/accounts.py,sha256=aHSwrwNqPSa2ikmR-WP0dg2LbRBSNBB3n3_2OTCcxs4,103
|
|
8
8
|
snaptrade_client/apis/paths/accounts_account_id.py,sha256=Xv0hHwov50tVcdtqCS-Np0BmqMhUwrvjIQLaa9yPF3U,207
|
|
@@ -22,11 +22,11 @@ snaptrade_client/apis/paths/accounts_account_id_recent_orders.py,sha256=EeY-phJr
|
|
|
22
22
|
snaptrade_client/apis/paths/accounts_account_id_return_rates.py,sha256=2SjRXGvVAuR8JRGSBr_sFYBTM6VJiC1QamBonvmuI80,147
|
|
23
23
|
snaptrade_client/apis/paths/accounts_account_id_symbols.py,sha256=_ol99FPuyBGqr7jPZt6ktaWOE3rB73271UX2D51mVFY,141
|
|
24
24
|
snaptrade_client/apis/paths/accounts_account_id_trading_bracket.py,sha256=YmDB1r26n-xXHkwsAmj0zyPqJQPk3PD3Us2gXFd4OkA,156
|
|
25
|
+
snaptrade_client/apis/paths/accounts_account_id_trading_cancel.py,sha256=XJvYaGRuPQEnexj79YCskbeozmEF2Kd4qYE-uUw2RE8,154
|
|
25
26
|
snaptrade_client/apis/paths/accounts_account_id_trading_instruments_cryptocurrency_pairs.py,sha256=VVJ_dD2oK6B5yDjj-Gxj-S-4Jy1DgY1LibjVOUdkpi4,201
|
|
26
27
|
snaptrade_client/apis/paths/accounts_account_id_trading_instruments_cryptocurrency_pairs_instrument_symbol_quote.py,sha256=zVl0Ns3WGScqm1VoAiAY3Q4wG8qrMJ4HCokZ4Taf-_g,246
|
|
27
28
|
snaptrade_client/apis/paths/accounts_account_id_trading_options.py,sha256=rQch8UQAl-m1gxdF3xozFQ13xBu0lodLrodh7QUZF3I,156
|
|
28
29
|
snaptrade_client/apis/paths/accounts_account_id_trading_simple.py,sha256=0JM3K6nfRzrEsTVtHghFOMqNv_d1aA2hFiyoLJMtOac,154
|
|
29
|
-
snaptrade_client/apis/paths/accounts_account_id_trading_simple_brokerage_order_id_cancel.py,sha256=t_-62Lr7TlhIm3F9jkt6wk4pK_FeZqoucEmQ5hg4wqY,202
|
|
30
30
|
snaptrade_client/apis/paths/accounts_account_id_trading_simple_brokerage_order_id_replace.py,sha256=CbVr-zainmw6atTQZ4TuHHrzIkElbghWeYOkz25zQxs,207
|
|
31
31
|
snaptrade_client/apis/paths/accounts_account_id_trading_simple_preview.py,sha256=vd7NzddZovkqMKU88e9FklbzhVDLN3-8Y0uMgQhgtTY,169
|
|
32
32
|
snaptrade_client/apis/paths/activities.py,sha256=wnt8PsbaSdDKJAX5uUjwpxtb10yHb8PsTYMVtnNA-ts,107
|
|
@@ -72,13 +72,13 @@ snaptrade_client/apis/tags/options_api_generated.py,sha256=NehERRdEJhPpg2Q2XaHZc
|
|
|
72
72
|
snaptrade_client/apis/tags/reference_data_api.py,sha256=DdmRsoiG7nLk8EgXWT1KvurcQnPYAlr1Dz0kdpdWGRQ,172
|
|
73
73
|
snaptrade_client/apis/tags/reference_data_api_generated.py,sha256=0QKGp2TcqDmuYsuPuXL0Wf14aIihWLYXpnHTFT9oKwY,1499
|
|
74
74
|
snaptrade_client/apis/tags/trading_api.py,sha256=J0L9w7V4uoH3_fkvmJhpVQTIUQCACBgrb_QQ7VTILqI,147
|
|
75
|
-
snaptrade_client/apis/tags/trading_api_generated.py,sha256=
|
|
75
|
+
snaptrade_client/apis/tags/trading_api_generated.py,sha256=WieXJ5Eii7-4yu81f_bdu8j_7lJQ96LQIMwzF2rXL9w,1925
|
|
76
76
|
snaptrade_client/apis/tags/transactions_and_reporting_api.py,sha256=4qC3MPU73Cj2ePSxD_GIjrvvxLbjEEsan2VcDqVZXd4,217
|
|
77
77
|
snaptrade_client/apis/tags/transactions_and_reporting_api_generated.py,sha256=Tw43o6-dzwGDnD5hPtc5Vz2f7EdM-yFw8FQkLI5suak,573
|
|
78
78
|
snaptrade_client/client.py,sha256=goDwWRv9909OPXDnGGYst_mr53bg6RUs4PwIvnrl_kE,2116
|
|
79
79
|
snaptrade_client/client.pyi,sha256=goDwWRv9909OPXDnGGYst_mr53bg6RUs4PwIvnrl_kE,2116
|
|
80
80
|
snaptrade_client/client_custom.py,sha256=Jx9ulCzelMFlESjzVFQSjBlYcH4dWxSJJWZDMPLyetM,745
|
|
81
|
-
snaptrade_client/configuration.py,sha256=
|
|
81
|
+
snaptrade_client/configuration.py,sha256=m0pvehjwElU5_FTJNI7Y51d85z4MOlyivEfhqKe8VxE,19262
|
|
82
82
|
snaptrade_client/exceptions.py,sha256=X0apI_sgQpGpa-qIqPUClReCdHAxeSuA6GW0YH_RsWg,7771
|
|
83
83
|
snaptrade_client/exceptions_base.py,sha256=LAQkaC5C61-SdBLfyMjb0K7AYJkWVuLmg2uCvHa71FM,2274
|
|
84
84
|
snaptrade_client/model/__init__.py,sha256=ayi2MIzcf0eAIsY13ToiNplV9tW-pMBFrC0I9yckGM8,350
|
|
@@ -142,6 +142,10 @@ snaptrade_client/model/brokerage_symbol_id.py,sha256=RWUXZ6wc22he2Iv6vVhQdw6Lomm
|
|
|
142
142
|
snaptrade_client/model/brokerage_symbol_id.pyi,sha256=RWUXZ6wc22he2Iv6vVhQdw6LommJxOab0yRd_YIntgc,608
|
|
143
143
|
snaptrade_client/model/brokerage_type.py,sha256=OpTaztmZxLlBuT5YUmUUiIaF34enLtZ083LbnQ-x67U,3026
|
|
144
144
|
snaptrade_client/model/brokerage_type.pyi,sha256=OpTaztmZxLlBuT5YUmUUiIaF34enLtZ083LbnQ-x67U,3026
|
|
145
|
+
snaptrade_client/model/cancel_order_response.py,sha256=uLrZNw7TSDGQ00oC-5pS_wAY8Zy0_98oo2XWBhPnVzk,3547
|
|
146
|
+
snaptrade_client/model/cancel_order_response.pyi,sha256=uLrZNw7TSDGQ00oC-5pS_wAY8Zy0_98oo2XWBhPnVzk,3547
|
|
147
|
+
snaptrade_client/model/cancel_order_response_raw_response.py,sha256=JYYmgl25K4ulxa8PXDIETkHSh2bLDlTOO2BMq5UUbSc,1794
|
|
148
|
+
snaptrade_client/model/cancel_order_response_raw_response.pyi,sha256=JYYmgl25K4ulxa8PXDIETkHSh2bLDlTOO2BMq5UUbSc,1794
|
|
145
149
|
snaptrade_client/model/child_brokerage_order_ids.py,sha256=7R_YFkeKappQoxQBvOnx1qcNWj3Hl_huHD_Nqs77_Us,3360
|
|
146
150
|
snaptrade_client/model/child_brokerage_order_ids.pyi,sha256=7R_YFkeKappQoxQBvOnx1qcNWj3Hl_huHD_Nqs77_Us,3360
|
|
147
151
|
snaptrade_client/model/child_brokerage_order_ids_nullable.py,sha256=fkUaBL2_pxDUX7FzKtzycfcViQFF2lo6BoesBz-JJwA,3456
|
|
@@ -408,9 +412,9 @@ snaptrade_client/model/user_secret.py,sha256=7xf__S566WtTq7VthmdVtrCBIfgpnYWYqE9
|
|
|
408
412
|
snaptrade_client/model/user_secret.pyi,sha256=7xf__S566WtTq7VthmdVtrCBIfgpnYWYqE9cmz9vBMc,600
|
|
409
413
|
snaptrade_client/model/validated_trade_body.py,sha256=NkTel1ulgSjBd6K7vur6puEbfrg3u1vdmtUKArOu8ws,3085
|
|
410
414
|
snaptrade_client/model/validated_trade_body.pyi,sha256=NkTel1ulgSjBd6K7vur6puEbfrg3u1vdmtUKArOu8ws,3085
|
|
411
|
-
snaptrade_client/models/__init__.py,sha256=
|
|
412
|
-
snaptrade_client/operation_parameter_map.py,sha256=
|
|
413
|
-
snaptrade_client/paths/__init__.py,sha256=
|
|
415
|
+
snaptrade_client/models/__init__.py,sha256=bXb8yU4mpmmi4B0O9u3CkDBpH9ynJpp6yXH9L-KjrMM,12927
|
|
416
|
+
snaptrade_client/operation_parameter_map.py,sha256=I1v-gGfR7LPjzerjPt9IYiggo-7DdKTbKcKNiyLRPDo,19205
|
|
417
|
+
snaptrade_client/paths/__init__.py,sha256=LxX3Z8DA8Zk8KXRILSv1pDKUxRR5VVQ3b8T5GU0AqDc,3759
|
|
414
418
|
snaptrade_client/paths/accounts/__init__.py,sha256=_Bqi6B13A-kgd0AOpqmcE1vTxJDfoz-r3Hwf-AmwW6A,307
|
|
415
419
|
snaptrade_client/paths/accounts/get.py,sha256=MDE_4VCylBroYDkMQe9II1qCGf6gTTDGCShFyGLXf00,16463
|
|
416
420
|
snaptrade_client/paths/accounts/get.pyi,sha256=gna7qIU-95WqOFl6qTsP18ZY7SKi9CYEBAbARPAPPF4,16261
|
|
@@ -467,6 +471,9 @@ snaptrade_client/paths/accounts_account_id_symbols/post.pyi,sha256=7BOOwzqpCb39o
|
|
|
467
471
|
snaptrade_client/paths/accounts_account_id_trading_bracket/__init__.py,sha256=QBPAt6nOa154uffyl5sircs20NaIQEyV_d3ZBDGFIDo,361
|
|
468
472
|
snaptrade_client/paths/accounts_account_id_trading_bracket/post.py,sha256=8ElBo2s3zq9UyL9vcQAkDoPXNejEYXVwojxFm2CDFRA,28445
|
|
469
473
|
snaptrade_client/paths/accounts_account_id_trading_bracket/post.pyi,sha256=HxHl2SLumpgimMpKRrNo6gMsjjlPfWGvupp8PvqiiCk,28191
|
|
474
|
+
snaptrade_client/paths/accounts_account_id_trading_cancel/__init__.py,sha256=MJxSaVr3G9c_q18MFEhXT13t8kAeMsXQvpmfukC4T-8,359
|
|
475
|
+
snaptrade_client/paths/accounts_account_id_trading_cancel/post.py,sha256=TSODcUS71knCjX7hADFZNoVOcruuK_Oxh2R7TBsCBBc,23251
|
|
476
|
+
snaptrade_client/paths/accounts_account_id_trading_cancel/post.pyi,sha256=qakR2J1q3gs7w6Hb-yRTUmvDiRTBmZCvfJvvAJlaST0,23027
|
|
470
477
|
snaptrade_client/paths/accounts_account_id_trading_instruments_cryptocurrency_pairs/__init__.py,sha256=lahXV_MX3G5PheZJIbVfyjWukvODtPfgcDvjEaw2OkI,411
|
|
471
478
|
snaptrade_client/paths/accounts_account_id_trading_instruments_cryptocurrency_pairs/get.py,sha256=fGE8EldxKTuR4eeAqJw2B8fKkKOIQ6hjxOeTUVErmVo,23272
|
|
472
479
|
snaptrade_client/paths/accounts_account_id_trading_instruments_cryptocurrency_pairs/get.pyi,sha256=bi6v_C2jqdetQuVd7zDN13KbAsOXtISvDRTPx9t-vnE,23048
|
|
@@ -479,9 +486,6 @@ snaptrade_client/paths/accounts_account_id_trading_options/post.pyi,sha256=nUHg-
|
|
|
479
486
|
snaptrade_client/paths/accounts_account_id_trading_simple/__init__.py,sha256=1kfuRO4L1XUyRnv-XbLhv5SrvJ4UqjzjKDfRR9EIu9Y,359
|
|
480
487
|
snaptrade_client/paths/accounts_account_id_trading_simple/post.py,sha256=tDI-5-LFAMPGmwjayMH66YGyDp4K6V1teu-esNcbFYU,25869
|
|
481
488
|
snaptrade_client/paths/accounts_account_id_trading_simple/post.pyi,sha256=xJVttopVQwLJq-yApP6ioXGK2CQtC7y8ummgcLxqKlU,25645
|
|
482
|
-
snaptrade_client/paths/accounts_account_id_trading_simple_brokerage_order_id_cancel/__init__.py,sha256=MIas2oLBrQ1ygXwLaeBXHJiHUTOO_-UQBlcikzqdH9w,411
|
|
483
|
-
snaptrade_client/paths/accounts_account_id_trading_simple_brokerage_order_id_cancel/post.py,sha256=sKvRdujp_z9646vBYgJE8GeX0QasPjDj1dw6bPR8VOU,19639
|
|
484
|
-
snaptrade_client/paths/accounts_account_id_trading_simple_brokerage_order_id_cancel/post.pyi,sha256=13fLCJerlM2vEsX87hGxAWdvzekW-ZTDnwDiq1J_8s8,19415
|
|
485
489
|
snaptrade_client/paths/accounts_account_id_trading_simple_brokerage_order_id_replace/__init__.py,sha256=TL1dJxF1QEDBQVAYOCWuwb-vE21liUhT20nusDJnW14,413
|
|
486
490
|
snaptrade_client/paths/accounts_account_id_trading_simple_brokerage_order_id_replace/patch.py,sha256=DRcB4aQvuZJYQh3h7sCN2rHN0el7LSnxJZspimYdvSw,27740
|
|
487
491
|
snaptrade_client/paths/accounts_account_id_trading_simple_brokerage_order_id_replace/patch.pyi,sha256=693oA7dsRMLn-GF4pJEanfDa0PeFe1V-5lpl69zTc8s,27486
|
|
@@ -611,6 +615,8 @@ snaptrade_client/type/brokerage_exchanges.py,sha256=qKMI9-B8MQPz3W3fnAVJNrZmdFK6
|
|
|
611
615
|
snaptrade_client/type/brokerage_order_id.py,sha256=oE2d-GYvZjKRLR-eKg2iMVR3ESXhw7qEKC2w6ld4ldQ,394
|
|
612
616
|
snaptrade_client/type/brokerage_symbol_id.py,sha256=nR9N24PrsaUx1AsjtLRg7-Jay5zqWxvYukw3Xj9SrXY,395
|
|
613
617
|
snaptrade_client/type/brokerage_type.py,sha256=0euSMOfRSj26shEO7R64oRRL-crAcYxODCs203rsYXw,578
|
|
618
|
+
snaptrade_client/type/cancel_order_response.py,sha256=GYYHNHoHWlHPxx8YSYOYUG_zHHCFdaPivWSKT16lmc0,874
|
|
619
|
+
snaptrade_client/type/cancel_order_response_raw_response.py,sha256=3DylY07lqDipF3BzlAsGmO66aAm1FTXKO719bySt1pU,409
|
|
614
620
|
snaptrade_client/type/child_brokerage_order_ids.py,sha256=knJxS5Hel2yzps4pkVGKTp0aEV4D2HSddUtgvsbu50Q,801
|
|
615
621
|
snaptrade_client/type/child_brokerage_order_ids_nullable.py,sha256=-scm2hOxKhUa9WO80A8B8RCAqix7i_ycL-mCn5Xwvo4,841
|
|
616
622
|
snaptrade_client/type/client_id.py,sha256=A6BK1LZ7eX6qzRNndvKcGlxkgRf3tbzIZ_0by6FWhjM,386
|
|
@@ -746,7 +752,7 @@ snaptrade_client/type/user_secret.py,sha256=pKCVhqf1rROHwa6tvoyA5OAKXCBAmNDvIQCf
|
|
|
746
752
|
snaptrade_client/type/validated_trade_body.py,sha256=ZIPBQWii_a-9zHaBCJ6bQtmL1_I7AG0zwuvkY-ZQ6R4,890
|
|
747
753
|
snaptrade_client/type_util.py,sha256=JIrMYgJzd4IJ8Ne2vqcahlPA9dVmphL9sn8gwccCB4Y,563
|
|
748
754
|
snaptrade_client/validation_metadata.py,sha256=VTN5y-NudHXok1X468J4PnGze_tGEAcs1v3gsXmcrb0,3172
|
|
749
|
-
snaptrade_python_sdk-11.0.
|
|
750
|
-
snaptrade_python_sdk-11.0.
|
|
751
|
-
snaptrade_python_sdk-11.0.
|
|
752
|
-
snaptrade_python_sdk-11.0.
|
|
755
|
+
snaptrade_python_sdk-11.0.116.dist-info/LICENSE,sha256=W_1kcxEzOnZXIYJ1GVUipbmUu6dNLt-Pc-OI55h3k-A,1081
|
|
756
|
+
snaptrade_python_sdk-11.0.116.dist-info/METADATA,sha256=1yj2xUao3BjjOohkkh7NCaHBtRWL0AkrqkJlpGicako,94875
|
|
757
|
+
snaptrade_python_sdk-11.0.116.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
758
|
+
snaptrade_python_sdk-11.0.116.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|