snaptrade-python-sdk 11.0.118__py3-none-any.whl → 11.0.120__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 +9 -9
- snaptrade_client/apis/paths/accounts_account_id_trading_crypto.py +7 -0
- snaptrade_client/apis/paths/accounts_account_id_trading_crypto_preview.py +7 -0
- snaptrade_client/apis/paths/accounts_account_id_trading_replace.py +7 -0
- snaptrade_client/apis/tags/trading_api_generated.py +5 -5
- snaptrade_client/configuration.py +1 -1
- snaptrade_client/model/crypto_order_form.py +249 -0
- snaptrade_client/model/crypto_order_form.pyi +229 -0
- snaptrade_client/model/{simple_order_preview.pyi → crypto_order_preview.py} +8 -8
- snaptrade_client/model/{simple_order_preview.py → crypto_order_preview.pyi} +8 -8
- snaptrade_client/model/{simple_order_preview_estimated_fee.py → crypto_order_preview_estimated_fee.py} +2 -2
- snaptrade_client/model/{simple_order_preview_estimated_fee.pyi → crypto_order_preview_estimated_fee.pyi} +2 -2
- snaptrade_client/model/crypto_trading_instrument.py +113 -0
- snaptrade_client/model/crypto_trading_instrument.pyi +106 -0
- snaptrade_client/model/manual_trade_replace_form.py +15 -3
- snaptrade_client/model/manual_trade_replace_form.pyi +15 -3
- snaptrade_client/model/simple_order_form.py +14 -15
- snaptrade_client/model/simple_order_form.pyi +14 -15
- snaptrade_client/models/__init__.py +4 -2
- snaptrade_client/operation_parameter_map.py +43 -43
- snaptrade_client/paths/__init__.py +3 -3
- snaptrade_client/paths/accounts_account_id_orders_cancel/post.py +6 -2
- snaptrade_client/paths/accounts_account_id_orders_cancel/post.pyi +6 -2
- snaptrade_client/paths/accounts_account_id_trading_cancel/post.py +2 -2
- snaptrade_client/paths/accounts_account_id_trading_cancel/post.pyi +2 -2
- snaptrade_client/paths/{accounts_account_id_trading_simple → accounts_account_id_trading_crypto}/__init__.py +2 -2
- snaptrade_client/paths/{accounts_account_id_trading_simple → accounts_account_id_trading_crypto}/post.py +34 -34
- snaptrade_client/paths/{accounts_account_id_trading_simple → accounts_account_id_trading_crypto}/post.pyi +34 -34
- snaptrade_client/paths/{accounts_account_id_trading_simple_preview → accounts_account_id_trading_crypto_preview}/__init__.py +2 -2
- snaptrade_client/paths/{accounts_account_id_trading_simple_preview → accounts_account_id_trading_crypto_preview}/post.py +39 -39
- snaptrade_client/paths/{accounts_account_id_trading_simple_preview → accounts_account_id_trading_crypto_preview}/post.pyi +39 -39
- snaptrade_client/paths/{accounts_account_id_trading_simple_brokerage_order_id_replace → accounts_account_id_trading_replace}/__init__.py +2 -2
- snaptrade_client/paths/{accounts_account_id_trading_simple_brokerage_order_id_replace/patch.py → accounts_account_id_trading_replace/post.py} +18 -28
- snaptrade_client/paths/{accounts_account_id_trading_simple_brokerage_order_id_replace/patch.pyi → accounts_account_id_trading_replace/post.pyi} +18 -28
- snaptrade_client/type/crypto_order_form.py +50 -0
- snaptrade_client/type/{simple_order_preview.py → crypto_order_preview.py} +5 -5
- snaptrade_client/type/{simple_order_preview_estimated_fee.py → crypto_order_preview_estimated_fee.py} +3 -3
- snaptrade_client/type/crypto_trading_instrument.py +30 -0
- snaptrade_client/type/manual_trade_form_with_options.py +1 -1
- snaptrade_client/type/manual_trade_replace_form.py +3 -0
- {snaptrade_python_sdk-11.0.118.dist-info → snaptrade_python_sdk-11.0.120.dist-info}/METADATA +108 -106
- {snaptrade_python_sdk-11.0.118.dist-info → snaptrade_python_sdk-11.0.120.dist-info}/RECORD +46 -40
- snaptrade_client/apis/paths/accounts_account_id_trading_simple.py +0 -7
- snaptrade_client/apis/paths/accounts_account_id_trading_simple_brokerage_order_id_replace.py +0 -7
- snaptrade_client/apis/paths/accounts_account_id_trading_simple_preview.py +0 -7
- {snaptrade_python_sdk-11.0.118.dist-info → snaptrade_python_sdk-11.0.120.dist-info}/LICENSE +0 -0
- {snaptrade_python_sdk-11.0.118.dist-info → snaptrade_python_sdk-11.0.120.dist-info}/WHEEL +0 -0
|
@@ -32,17 +32,17 @@ import frozendict # noqa: F401
|
|
|
32
32
|
|
|
33
33
|
from snaptrade_client import schemas # noqa: F401
|
|
34
34
|
|
|
35
|
-
from snaptrade_client.model.trading_instrument import TradingInstrument as TradingInstrumentSchema
|
|
36
35
|
from snaptrade_client.model.model400_failed_request_response import Model400FailedRequestResponse as Model400FailedRequestResponseSchema
|
|
37
36
|
from snaptrade_client.model.action_strict import ActionStrict as ActionStrictSchema
|
|
38
|
-
from snaptrade_client.model.
|
|
39
|
-
from snaptrade_client.model.
|
|
37
|
+
from snaptrade_client.model.crypto_order_form import CryptoOrderForm as CryptoOrderFormSchema
|
|
38
|
+
from snaptrade_client.model.crypto_trading_instrument import CryptoTradingInstrument as CryptoTradingInstrumentSchema
|
|
39
|
+
from snaptrade_client.model.crypto_order_preview import CryptoOrderPreview as CryptoOrderPreviewSchema
|
|
40
40
|
|
|
41
|
-
from snaptrade_client.type.
|
|
42
|
-
from snaptrade_client.type.simple_order_preview import SimpleOrderPreview
|
|
41
|
+
from snaptrade_client.type.crypto_order_form import CryptoOrderForm
|
|
43
42
|
from snaptrade_client.type.model400_failed_request_response import Model400FailedRequestResponse
|
|
43
|
+
from snaptrade_client.type.crypto_trading_instrument import CryptoTradingInstrument
|
|
44
44
|
from snaptrade_client.type.action_strict import ActionStrict
|
|
45
|
-
from snaptrade_client.type.
|
|
45
|
+
from snaptrade_client.type.crypto_order_preview import CryptoOrderPreview
|
|
46
46
|
|
|
47
47
|
# Query params
|
|
48
48
|
UserIdSchema = schemas.StrSchema
|
|
@@ -107,27 +107,27 @@ request_path_account_id = api_client.PathParameter(
|
|
|
107
107
|
required=True,
|
|
108
108
|
)
|
|
109
109
|
# body param
|
|
110
|
-
SchemaForRequestBodyApplicationJson =
|
|
110
|
+
SchemaForRequestBodyApplicationJson = CryptoOrderFormSchema
|
|
111
111
|
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
request_body_crypto_order_form = api_client.RequestBody(
|
|
114
114
|
content={
|
|
115
115
|
'application/json': api_client.MediaType(
|
|
116
116
|
schema=SchemaForRequestBodyApplicationJson),
|
|
117
117
|
},
|
|
118
118
|
required=True,
|
|
119
119
|
)
|
|
120
|
-
SchemaFor200ResponseBodyApplicationJson =
|
|
120
|
+
SchemaFor200ResponseBodyApplicationJson = CryptoOrderPreviewSchema
|
|
121
121
|
|
|
122
122
|
|
|
123
123
|
@dataclass
|
|
124
124
|
class ApiResponseFor200(api_client.ApiResponse):
|
|
125
|
-
body:
|
|
125
|
+
body: CryptoOrderPreview
|
|
126
126
|
|
|
127
127
|
|
|
128
128
|
@dataclass
|
|
129
129
|
class ApiResponseFor200Async(api_client.AsyncApiResponse):
|
|
130
|
-
body:
|
|
130
|
+
body: CryptoOrderPreview
|
|
131
131
|
|
|
132
132
|
|
|
133
133
|
_response_for_200 = api_client.OpenApiResponse(
|
|
@@ -182,10 +182,10 @@ _all_accept_content_types = (
|
|
|
182
182
|
|
|
183
183
|
class BaseApi(api_client.Api):
|
|
184
184
|
|
|
185
|
-
def
|
|
185
|
+
def _preview_crypto_order_mapped_args(
|
|
186
186
|
self,
|
|
187
|
-
body: typing.Optional[
|
|
188
|
-
instrument: typing.Optional[
|
|
187
|
+
body: typing.Optional[CryptoOrderForm] = None,
|
|
188
|
+
instrument: typing.Optional[CryptoTradingInstrument] = None,
|
|
189
189
|
side: typing.Optional[ActionStrict] = None,
|
|
190
190
|
type: typing.Optional[str] = None,
|
|
191
191
|
time_in_force: typing.Optional[str] = None,
|
|
@@ -233,7 +233,7 @@ class BaseApi(api_client.Api):
|
|
|
233
233
|
args.path = path_params if path_params else _path_params
|
|
234
234
|
return args
|
|
235
235
|
|
|
236
|
-
async def
|
|
236
|
+
async def _apreview_crypto_order_oapg(
|
|
237
237
|
self,
|
|
238
238
|
body: typing.Any = None,
|
|
239
239
|
query_params: typing.Optional[dict] = {},
|
|
@@ -303,12 +303,12 @@ class BaseApi(api_client.Api):
|
|
|
303
303
|
resource_path=used_path,
|
|
304
304
|
method=method,
|
|
305
305
|
configuration=self.api_client.configuration,
|
|
306
|
-
path_template='/accounts/{accountId}/trading/
|
|
306
|
+
path_template='/accounts/{accountId}/trading/crypto/preview',
|
|
307
307
|
body=body,
|
|
308
308
|
auth_settings=_auth,
|
|
309
309
|
headers=_headers,
|
|
310
310
|
)
|
|
311
|
-
serialized_data =
|
|
311
|
+
serialized_data = request_body_crypto_order_form.serialize(body, content_type)
|
|
312
312
|
if 'fields' in serialized_data:
|
|
313
313
|
_fields = serialized_data['fields']
|
|
314
314
|
elif 'body' in serialized_data:
|
|
@@ -381,7 +381,7 @@ class BaseApi(api_client.Api):
|
|
|
381
381
|
return api_response
|
|
382
382
|
|
|
383
383
|
|
|
384
|
-
def
|
|
384
|
+
def _preview_crypto_order_oapg(
|
|
385
385
|
self,
|
|
386
386
|
body: typing.Any = None,
|
|
387
387
|
query_params: typing.Optional[dict] = {},
|
|
@@ -449,12 +449,12 @@ class BaseApi(api_client.Api):
|
|
|
449
449
|
resource_path=used_path,
|
|
450
450
|
method=method,
|
|
451
451
|
configuration=self.api_client.configuration,
|
|
452
|
-
path_template='/accounts/{accountId}/trading/
|
|
452
|
+
path_template='/accounts/{accountId}/trading/crypto/preview',
|
|
453
453
|
body=body,
|
|
454
454
|
auth_settings=_auth,
|
|
455
455
|
headers=_headers,
|
|
456
456
|
)
|
|
457
|
-
serialized_data =
|
|
457
|
+
serialized_data = request_body_crypto_order_form.serialize(body, content_type)
|
|
458
458
|
if 'fields' in serialized_data:
|
|
459
459
|
_fields = serialized_data['fields']
|
|
460
460
|
elif 'body' in serialized_data:
|
|
@@ -496,13 +496,13 @@ class BaseApi(api_client.Api):
|
|
|
496
496
|
return api_response
|
|
497
497
|
|
|
498
498
|
|
|
499
|
-
class
|
|
499
|
+
class PreviewCryptoOrder(BaseApi):
|
|
500
500
|
# this class is used by api classes that refer to endpoints with operationId fn names
|
|
501
501
|
|
|
502
|
-
async def
|
|
502
|
+
async def apreview_crypto_order(
|
|
503
503
|
self,
|
|
504
|
-
body: typing.Optional[
|
|
505
|
-
instrument: typing.Optional[
|
|
504
|
+
body: typing.Optional[CryptoOrderForm] = None,
|
|
505
|
+
instrument: typing.Optional[CryptoTradingInstrument] = None,
|
|
506
506
|
side: typing.Optional[ActionStrict] = None,
|
|
507
507
|
type: typing.Optional[str] = None,
|
|
508
508
|
time_in_force: typing.Optional[str] = None,
|
|
@@ -522,7 +522,7 @@ class PreviewSimpleOrder(BaseApi):
|
|
|
522
522
|
api_client.ApiResponseWithoutDeserializationAsync,
|
|
523
523
|
AsyncGeneratorResponse,
|
|
524
524
|
]:
|
|
525
|
-
args = self.
|
|
525
|
+
args = self._preview_crypto_order_mapped_args(
|
|
526
526
|
body=body,
|
|
527
527
|
query_params=query_params,
|
|
528
528
|
path_params=path_params,
|
|
@@ -539,17 +539,17 @@ class PreviewSimpleOrder(BaseApi):
|
|
|
539
539
|
post_only=post_only,
|
|
540
540
|
expiration_date=expiration_date,
|
|
541
541
|
)
|
|
542
|
-
return await self.
|
|
542
|
+
return await self._apreview_crypto_order_oapg(
|
|
543
543
|
body=args.body,
|
|
544
544
|
query_params=args.query,
|
|
545
545
|
path_params=args.path,
|
|
546
546
|
**kwargs,
|
|
547
547
|
)
|
|
548
548
|
|
|
549
|
-
def
|
|
549
|
+
def preview_crypto_order(
|
|
550
550
|
self,
|
|
551
|
-
body: typing.Optional[
|
|
552
|
-
instrument: typing.Optional[
|
|
551
|
+
body: typing.Optional[CryptoOrderForm] = None,
|
|
552
|
+
instrument: typing.Optional[CryptoTradingInstrument] = None,
|
|
553
553
|
side: typing.Optional[ActionStrict] = None,
|
|
554
554
|
type: typing.Optional[str] = None,
|
|
555
555
|
time_in_force: typing.Optional[str] = None,
|
|
@@ -568,7 +568,7 @@ class PreviewSimpleOrder(BaseApi):
|
|
|
568
568
|
api_client.ApiResponseWithoutDeserialization,
|
|
569
569
|
]:
|
|
570
570
|
""" Previews an order using the specified account. """
|
|
571
|
-
args = self.
|
|
571
|
+
args = self._preview_crypto_order_mapped_args(
|
|
572
572
|
body=body,
|
|
573
573
|
query_params=query_params,
|
|
574
574
|
path_params=path_params,
|
|
@@ -585,7 +585,7 @@ class PreviewSimpleOrder(BaseApi):
|
|
|
585
585
|
post_only=post_only,
|
|
586
586
|
expiration_date=expiration_date,
|
|
587
587
|
)
|
|
588
|
-
return self.
|
|
588
|
+
return self._preview_crypto_order_oapg(
|
|
589
589
|
body=args.body,
|
|
590
590
|
query_params=args.query,
|
|
591
591
|
path_params=args.path,
|
|
@@ -596,8 +596,8 @@ class ApiForpost(BaseApi):
|
|
|
596
596
|
|
|
597
597
|
async def apost(
|
|
598
598
|
self,
|
|
599
|
-
body: typing.Optional[
|
|
600
|
-
instrument: typing.Optional[
|
|
599
|
+
body: typing.Optional[CryptoOrderForm] = None,
|
|
600
|
+
instrument: typing.Optional[CryptoTradingInstrument] = None,
|
|
601
601
|
side: typing.Optional[ActionStrict] = None,
|
|
602
602
|
type: typing.Optional[str] = None,
|
|
603
603
|
time_in_force: typing.Optional[str] = None,
|
|
@@ -617,7 +617,7 @@ class ApiForpost(BaseApi):
|
|
|
617
617
|
api_client.ApiResponseWithoutDeserializationAsync,
|
|
618
618
|
AsyncGeneratorResponse,
|
|
619
619
|
]:
|
|
620
|
-
args = self.
|
|
620
|
+
args = self._preview_crypto_order_mapped_args(
|
|
621
621
|
body=body,
|
|
622
622
|
query_params=query_params,
|
|
623
623
|
path_params=path_params,
|
|
@@ -634,7 +634,7 @@ class ApiForpost(BaseApi):
|
|
|
634
634
|
post_only=post_only,
|
|
635
635
|
expiration_date=expiration_date,
|
|
636
636
|
)
|
|
637
|
-
return await self.
|
|
637
|
+
return await self._apreview_crypto_order_oapg(
|
|
638
638
|
body=args.body,
|
|
639
639
|
query_params=args.query,
|
|
640
640
|
path_params=args.path,
|
|
@@ -643,8 +643,8 @@ class ApiForpost(BaseApi):
|
|
|
643
643
|
|
|
644
644
|
def post(
|
|
645
645
|
self,
|
|
646
|
-
body: typing.Optional[
|
|
647
|
-
instrument: typing.Optional[
|
|
646
|
+
body: typing.Optional[CryptoOrderForm] = None,
|
|
647
|
+
instrument: typing.Optional[CryptoTradingInstrument] = None,
|
|
648
648
|
side: typing.Optional[ActionStrict] = None,
|
|
649
649
|
type: typing.Optional[str] = None,
|
|
650
650
|
time_in_force: typing.Optional[str] = None,
|
|
@@ -663,7 +663,7 @@ class ApiForpost(BaseApi):
|
|
|
663
663
|
api_client.ApiResponseWithoutDeserialization,
|
|
664
664
|
]:
|
|
665
665
|
""" Previews an order using the specified account. """
|
|
666
|
-
args = self.
|
|
666
|
+
args = self._preview_crypto_order_mapped_args(
|
|
667
667
|
body=body,
|
|
668
668
|
query_params=query_params,
|
|
669
669
|
path_params=path_params,
|
|
@@ -680,7 +680,7 @@ class ApiForpost(BaseApi):
|
|
|
680
680
|
post_only=post_only,
|
|
681
681
|
expiration_date=expiration_date,
|
|
682
682
|
)
|
|
683
|
-
return self.
|
|
683
|
+
return self._preview_crypto_order_oapg(
|
|
684
684
|
body=args.body,
|
|
685
685
|
query_params=args.query,
|
|
686
686
|
path_params=args.path,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# do not import all endpoints into this module because that uses a lot of memory and stack frames
|
|
2
2
|
# if you need the ability to import all endpoints from this module, import them with
|
|
3
|
-
# from snaptrade_client.paths.
|
|
3
|
+
# from snaptrade_client.paths.accounts_account_id_trading_replace import Api
|
|
4
4
|
|
|
5
5
|
from snaptrade_client.paths import PathValues
|
|
6
6
|
|
|
7
|
-
path = PathValues.
|
|
7
|
+
path = PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_REPLACE
|
|
@@ -90,12 +90,10 @@ request_query_user_secret = api_client.QueryParameter(
|
|
|
90
90
|
)
|
|
91
91
|
# Path params
|
|
92
92
|
AccountIdSchema = schemas.UUIDSchema
|
|
93
|
-
BrokerageOrderIdSchema = schemas.StrSchema
|
|
94
93
|
RequestRequiredPathParams = typing_extensions.TypedDict(
|
|
95
94
|
'RequestRequiredPathParams',
|
|
96
95
|
{
|
|
97
96
|
'accountId': typing.Union[AccountIdSchema, str, uuid.UUID, ],
|
|
98
|
-
'brokerageOrderId': typing.Union[BrokerageOrderIdSchema, str, ],
|
|
99
97
|
}
|
|
100
98
|
)
|
|
101
99
|
RequestOptionalPathParams = typing_extensions.TypedDict(
|
|
@@ -116,12 +114,6 @@ request_path_account_id = api_client.PathParameter(
|
|
|
116
114
|
schema=AccountIdSchema,
|
|
117
115
|
required=True,
|
|
118
116
|
)
|
|
119
|
-
request_path_brokerage_order_id = api_client.PathParameter(
|
|
120
|
-
name="brokerageOrderId",
|
|
121
|
-
style=api_client.ParameterStyle.SIMPLE,
|
|
122
|
-
schema=BrokerageOrderIdSchema,
|
|
123
|
-
required=True,
|
|
124
|
-
)
|
|
125
117
|
# body param
|
|
126
118
|
SchemaForRequestBodyApplicationJson = ManualTradeReplaceFormSchema
|
|
127
119
|
|
|
@@ -233,11 +225,11 @@ class BaseApi(api_client.Api):
|
|
|
233
225
|
def _replace_order_mapped_args(
|
|
234
226
|
self,
|
|
235
227
|
body: typing.Optional[ManualTradeReplaceForm] = None,
|
|
228
|
+
brokerage_order_id: typing.Optional[str] = None,
|
|
236
229
|
action: typing.Optional[ActionStrict] = None,
|
|
237
230
|
order_type: typing.Optional[OrderTypeStrict] = None,
|
|
238
231
|
time_in_force: typing.Optional[TimeInForceStrict] = None,
|
|
239
232
|
account_id: typing.Optional[str] = None,
|
|
240
|
-
brokerage_order_id: typing.Optional[str] = None,
|
|
241
233
|
user_id: typing.Optional[str] = None,
|
|
242
234
|
user_secret: typing.Optional[str] = None,
|
|
243
235
|
price: typing.Optional[typing.Optional[typing.Union[int, float]]] = None,
|
|
@@ -251,6 +243,8 @@ class BaseApi(api_client.Api):
|
|
|
251
243
|
_query_params = {}
|
|
252
244
|
_path_params = {}
|
|
253
245
|
_body = {}
|
|
246
|
+
if brokerage_order_id is not None:
|
|
247
|
+
_body["brokerage_order_id"] = brokerage_order_id
|
|
254
248
|
if action is not None:
|
|
255
249
|
_body["action"] = action
|
|
256
250
|
if order_type is not None:
|
|
@@ -272,8 +266,6 @@ class BaseApi(api_client.Api):
|
|
|
272
266
|
_query_params["userSecret"] = user_secret
|
|
273
267
|
if account_id is not None:
|
|
274
268
|
_path_params["accountId"] = account_id
|
|
275
|
-
if brokerage_order_id is not None:
|
|
276
|
-
_path_params["brokerageOrderId"] = brokerage_order_id
|
|
277
269
|
args.query = query_params if query_params else _query_params
|
|
278
270
|
args.path = path_params if path_params else _path_params
|
|
279
271
|
return args
|
|
@@ -307,7 +299,6 @@ class BaseApi(api_client.Api):
|
|
|
307
299
|
_path_params = {}
|
|
308
300
|
for parameter in (
|
|
309
301
|
request_path_account_id,
|
|
310
|
-
request_path_brokerage_order_id,
|
|
311
302
|
):
|
|
312
303
|
parameter_data = path_params.get(parameter.name, schemas.unset)
|
|
313
304
|
if parameter_data is schemas.unset:
|
|
@@ -337,7 +328,7 @@ class BaseApi(api_client.Api):
|
|
|
337
328
|
if accept_content_types:
|
|
338
329
|
for accept_content_type in accept_content_types:
|
|
339
330
|
_headers.add('Accept', accept_content_type)
|
|
340
|
-
method = '
|
|
331
|
+
method = 'post'.upper()
|
|
341
332
|
_headers.add('Content-Type', content_type)
|
|
342
333
|
|
|
343
334
|
if body is schemas.unset:
|
|
@@ -349,7 +340,7 @@ class BaseApi(api_client.Api):
|
|
|
349
340
|
resource_path=used_path,
|
|
350
341
|
method=method,
|
|
351
342
|
configuration=self.api_client.configuration,
|
|
352
|
-
path_template='/accounts/{accountId}/trading/
|
|
343
|
+
path_template='/accounts/{accountId}/trading/replace',
|
|
353
344
|
body=body,
|
|
354
345
|
auth_settings=_auth,
|
|
355
346
|
headers=_headers,
|
|
@@ -454,7 +445,6 @@ class BaseApi(api_client.Api):
|
|
|
454
445
|
_path_params = {}
|
|
455
446
|
for parameter in (
|
|
456
447
|
request_path_account_id,
|
|
457
|
-
request_path_brokerage_order_id,
|
|
458
448
|
):
|
|
459
449
|
parameter_data = path_params.get(parameter.name, schemas.unset)
|
|
460
450
|
if parameter_data is schemas.unset:
|
|
@@ -484,7 +474,7 @@ class BaseApi(api_client.Api):
|
|
|
484
474
|
if accept_content_types:
|
|
485
475
|
for accept_content_type in accept_content_types:
|
|
486
476
|
_headers.add('Accept', accept_content_type)
|
|
487
|
-
method = '
|
|
477
|
+
method = 'post'.upper()
|
|
488
478
|
_headers.add('Content-Type', content_type)
|
|
489
479
|
|
|
490
480
|
if body is schemas.unset:
|
|
@@ -496,7 +486,7 @@ class BaseApi(api_client.Api):
|
|
|
496
486
|
resource_path=used_path,
|
|
497
487
|
method=method,
|
|
498
488
|
configuration=self.api_client.configuration,
|
|
499
|
-
path_template='/accounts/{accountId}/trading/
|
|
489
|
+
path_template='/accounts/{accountId}/trading/replace',
|
|
500
490
|
body=body,
|
|
501
491
|
auth_settings=_auth,
|
|
502
492
|
headers=_headers,
|
|
@@ -549,11 +539,11 @@ class ReplaceOrder(BaseApi):
|
|
|
549
539
|
async def areplace_order(
|
|
550
540
|
self,
|
|
551
541
|
body: typing.Optional[ManualTradeReplaceForm] = None,
|
|
542
|
+
brokerage_order_id: typing.Optional[str] = None,
|
|
552
543
|
action: typing.Optional[ActionStrict] = None,
|
|
553
544
|
order_type: typing.Optional[OrderTypeStrict] = None,
|
|
554
545
|
time_in_force: typing.Optional[TimeInForceStrict] = None,
|
|
555
546
|
account_id: typing.Optional[str] = None,
|
|
556
|
-
brokerage_order_id: typing.Optional[str] = None,
|
|
557
547
|
user_id: typing.Optional[str] = None,
|
|
558
548
|
user_secret: typing.Optional[str] = None,
|
|
559
549
|
price: typing.Optional[typing.Optional[typing.Union[int, float]]] = None,
|
|
@@ -572,11 +562,11 @@ class ReplaceOrder(BaseApi):
|
|
|
572
562
|
body=body,
|
|
573
563
|
query_params=query_params,
|
|
574
564
|
path_params=path_params,
|
|
565
|
+
brokerage_order_id=brokerage_order_id,
|
|
575
566
|
action=action,
|
|
576
567
|
order_type=order_type,
|
|
577
568
|
time_in_force=time_in_force,
|
|
578
569
|
account_id=account_id,
|
|
579
|
-
brokerage_order_id=brokerage_order_id,
|
|
580
570
|
user_id=user_id,
|
|
581
571
|
user_secret=user_secret,
|
|
582
572
|
price=price,
|
|
@@ -594,11 +584,11 @@ class ReplaceOrder(BaseApi):
|
|
|
594
584
|
def replace_order(
|
|
595
585
|
self,
|
|
596
586
|
body: typing.Optional[ManualTradeReplaceForm] = None,
|
|
587
|
+
brokerage_order_id: typing.Optional[str] = None,
|
|
597
588
|
action: typing.Optional[ActionStrict] = None,
|
|
598
589
|
order_type: typing.Optional[OrderTypeStrict] = None,
|
|
599
590
|
time_in_force: typing.Optional[TimeInForceStrict] = None,
|
|
600
591
|
account_id: typing.Optional[str] = None,
|
|
601
|
-
brokerage_order_id: typing.Optional[str] = None,
|
|
602
592
|
user_id: typing.Optional[str] = None,
|
|
603
593
|
user_secret: typing.Optional[str] = None,
|
|
604
594
|
price: typing.Optional[typing.Optional[typing.Union[int, float]]] = None,
|
|
@@ -616,11 +606,11 @@ class ReplaceOrder(BaseApi):
|
|
|
616
606
|
body=body,
|
|
617
607
|
query_params=query_params,
|
|
618
608
|
path_params=path_params,
|
|
609
|
+
brokerage_order_id=brokerage_order_id,
|
|
619
610
|
action=action,
|
|
620
611
|
order_type=order_type,
|
|
621
612
|
time_in_force=time_in_force,
|
|
622
613
|
account_id=account_id,
|
|
623
|
-
brokerage_order_id=brokerage_order_id,
|
|
624
614
|
user_id=user_id,
|
|
625
615
|
user_secret=user_secret,
|
|
626
616
|
price=price,
|
|
@@ -634,17 +624,17 @@ class ReplaceOrder(BaseApi):
|
|
|
634
624
|
path_params=args.path,
|
|
635
625
|
)
|
|
636
626
|
|
|
637
|
-
class
|
|
627
|
+
class ApiForpost(BaseApi):
|
|
638
628
|
# this class is used by api classes that refer to endpoints by path and http method names
|
|
639
629
|
|
|
640
|
-
async def
|
|
630
|
+
async def apost(
|
|
641
631
|
self,
|
|
642
632
|
body: typing.Optional[ManualTradeReplaceForm] = None,
|
|
633
|
+
brokerage_order_id: typing.Optional[str] = None,
|
|
643
634
|
action: typing.Optional[ActionStrict] = None,
|
|
644
635
|
order_type: typing.Optional[OrderTypeStrict] = None,
|
|
645
636
|
time_in_force: typing.Optional[TimeInForceStrict] = None,
|
|
646
637
|
account_id: typing.Optional[str] = None,
|
|
647
|
-
brokerage_order_id: typing.Optional[str] = None,
|
|
648
638
|
user_id: typing.Optional[str] = None,
|
|
649
639
|
user_secret: typing.Optional[str] = None,
|
|
650
640
|
price: typing.Optional[typing.Optional[typing.Union[int, float]]] = None,
|
|
@@ -663,11 +653,11 @@ class ApiForpatch(BaseApi):
|
|
|
663
653
|
body=body,
|
|
664
654
|
query_params=query_params,
|
|
665
655
|
path_params=path_params,
|
|
656
|
+
brokerage_order_id=brokerage_order_id,
|
|
666
657
|
action=action,
|
|
667
658
|
order_type=order_type,
|
|
668
659
|
time_in_force=time_in_force,
|
|
669
660
|
account_id=account_id,
|
|
670
|
-
brokerage_order_id=brokerage_order_id,
|
|
671
661
|
user_id=user_id,
|
|
672
662
|
user_secret=user_secret,
|
|
673
663
|
price=price,
|
|
@@ -682,14 +672,14 @@ class ApiForpatch(BaseApi):
|
|
|
682
672
|
**kwargs,
|
|
683
673
|
)
|
|
684
674
|
|
|
685
|
-
def
|
|
675
|
+
def post(
|
|
686
676
|
self,
|
|
687
677
|
body: typing.Optional[ManualTradeReplaceForm] = None,
|
|
678
|
+
brokerage_order_id: typing.Optional[str] = None,
|
|
688
679
|
action: typing.Optional[ActionStrict] = None,
|
|
689
680
|
order_type: typing.Optional[OrderTypeStrict] = None,
|
|
690
681
|
time_in_force: typing.Optional[TimeInForceStrict] = None,
|
|
691
682
|
account_id: typing.Optional[str] = None,
|
|
692
|
-
brokerage_order_id: typing.Optional[str] = None,
|
|
693
683
|
user_id: typing.Optional[str] = None,
|
|
694
684
|
user_secret: typing.Optional[str] = None,
|
|
695
685
|
price: typing.Optional[typing.Optional[typing.Union[int, float]]] = None,
|
|
@@ -707,11 +697,11 @@ class ApiForpatch(BaseApi):
|
|
|
707
697
|
body=body,
|
|
708
698
|
query_params=query_params,
|
|
709
699
|
path_params=path_params,
|
|
700
|
+
brokerage_order_id=brokerage_order_id,
|
|
710
701
|
action=action,
|
|
711
702
|
order_type=order_type,
|
|
712
703
|
time_in_force=time_in_force,
|
|
713
704
|
account_id=account_id,
|
|
714
|
-
brokerage_order_id=brokerage_order_id,
|
|
715
705
|
user_id=user_id,
|
|
716
706
|
user_secret=user_secret,
|
|
717
707
|
price=price,
|