snaptrade-python-sdk 11.0.122__py3-none-any.whl → 11.0.124__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 -9
- snaptrade_client/apis/paths/accounts_account_id_orders_brokerage_order_id.py +7 -0
- snaptrade_client/apis/tags/account_information_api_generated.py +2 -0
- snaptrade_client/apis/tags/options_api_generated.py +0 -6
- snaptrade_client/configuration.py +1 -1
- snaptrade_client/model/account.py +5 -0
- snaptrade_client/model/account.pyi +5 -0
- snaptrade_client/operation_parameter_map.py +16 -63
- snaptrade_client/paths/__init__.py +1 -3
- snaptrade_client/paths/{accounts_account_id_option_strategy → accounts_account_id_orders_brokerage_order_id}/__init__.py +2 -2
- snaptrade_client/paths/{accounts_account_id_option_strategy_option_strategy_id → accounts_account_id_orders_brokerage_order_id}/get.py +67 -43
- snaptrade_client/paths/{accounts_account_id_option_strategy_option_strategy_id → accounts_account_id_orders_brokerage_order_id}/get.pyi +66 -43
- {snaptrade_python_sdk-11.0.122.dist-info → snaptrade_python_sdk-11.0.124.dist-info}/METADATA +44 -156
- {snaptrade_python_sdk-11.0.122.dist-info → snaptrade_python_sdk-11.0.124.dist-info}/RECORD +18 -26
- snaptrade_client/apis/paths/accounts_account_id_option_strategy.py +0 -7
- snaptrade_client/apis/paths/accounts_account_id_option_strategy_option_strategy_id.py +0 -7
- snaptrade_client/apis/paths/accounts_account_id_option_strategy_option_strategy_id_execute.py +0 -7
- snaptrade_client/paths/accounts_account_id_option_strategy/post.py +0 -731
- snaptrade_client/paths/accounts_account_id_option_strategy/post.pyi +0 -714
- snaptrade_client/paths/accounts_account_id_option_strategy_option_strategy_id/__init__.py +0 -7
- snaptrade_client/paths/accounts_account_id_option_strategy_option_strategy_id_execute/__init__.py +0 -7
- snaptrade_client/paths/accounts_account_id_option_strategy_option_strategy_id_execute/post.py +0 -723
- snaptrade_client/paths/accounts_account_id_option_strategy_option_strategy_id_execute/post.pyi +0 -712
- {snaptrade_python_sdk-11.0.122.dist-info → snaptrade_python_sdk-11.0.124.dist-info}/LICENSE +0 -0
- {snaptrade_python_sdk-11.0.122.dist-info → snaptrade_python_sdk-11.0.124.dist-info}/WHEEL +0 -0
snaptrade_client/__init__.py
CHANGED
snaptrade_client/api_client.py
CHANGED
|
@@ -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.
|
|
1158
|
+
self.user_agent = 'Konfig/11.0.124/python'
|
|
1159
1159
|
|
|
1160
1160
|
def __enter__(self):
|
|
1161
1161
|
return self
|
|
@@ -20,14 +20,12 @@ from snaptrade_client.apis.paths.accounts_account_id import AccountsAccountId
|
|
|
20
20
|
from snaptrade_client.apis.paths.accounts_account_id_balances import AccountsAccountIdBalances
|
|
21
21
|
from snaptrade_client.apis.paths.accounts_account_id_positions import AccountsAccountIdPositions
|
|
22
22
|
from snaptrade_client.apis.paths.accounts_account_id_orders import AccountsAccountIdOrders
|
|
23
|
+
from snaptrade_client.apis.paths.accounts_account_id_orders_brokerage_order_id import AccountsAccountIdOrdersBrokerageOrderId
|
|
23
24
|
from snaptrade_client.apis.paths.accounts_account_id_recent_orders import AccountsAccountIdRecentOrders
|
|
24
25
|
from snaptrade_client.apis.paths.accounts_account_id_return_rates import AccountsAccountIdReturnRates
|
|
25
26
|
from snaptrade_client.apis.paths.accounts_account_id_activities import AccountsAccountIdActivities
|
|
26
27
|
from snaptrade_client.apis.paths.accounts_account_id_options import AccountsAccountIdOptions
|
|
27
28
|
from snaptrade_client.apis.paths.accounts_account_id_options_chain import AccountsAccountIdOptionsChain
|
|
28
|
-
from snaptrade_client.apis.paths.accounts_account_id_option_strategy import AccountsAccountIdOptionStrategy
|
|
29
|
-
from snaptrade_client.apis.paths.accounts_account_id_option_strategy_option_strategy_id import AccountsAccountIdOptionStrategyOptionStrategyId
|
|
30
|
-
from snaptrade_client.apis.paths.accounts_account_id_option_strategy_option_strategy_id_execute import AccountsAccountIdOptionStrategyOptionStrategyIdExecute
|
|
31
29
|
from snaptrade_client.apis.paths.activities import Activities
|
|
32
30
|
from snaptrade_client.apis.paths.performance_custom import PerformanceCustom
|
|
33
31
|
from snaptrade_client.apis.paths.accounts_account_id_quotes import AccountsAccountIdQuotes
|
|
@@ -78,14 +76,12 @@ PathToApi = typing_extensions.TypedDict(
|
|
|
78
76
|
PathValues.ACCOUNTS_ACCOUNT_ID_BALANCES: AccountsAccountIdBalances,
|
|
79
77
|
PathValues.ACCOUNTS_ACCOUNT_ID_POSITIONS: AccountsAccountIdPositions,
|
|
80
78
|
PathValues.ACCOUNTS_ACCOUNT_ID_ORDERS: AccountsAccountIdOrders,
|
|
79
|
+
PathValues.ACCOUNTS_ACCOUNT_ID_ORDERS_BROKERAGE_ORDER_ID: AccountsAccountIdOrdersBrokerageOrderId,
|
|
81
80
|
PathValues.ACCOUNTS_ACCOUNT_ID_RECENT_ORDERS: AccountsAccountIdRecentOrders,
|
|
82
81
|
PathValues.ACCOUNTS_ACCOUNT_ID_RETURN_RATES: AccountsAccountIdReturnRates,
|
|
83
82
|
PathValues.ACCOUNTS_ACCOUNT_ID_ACTIVITIES: AccountsAccountIdActivities,
|
|
84
83
|
PathValues.ACCOUNTS_ACCOUNT_ID_OPTIONS: AccountsAccountIdOptions,
|
|
85
84
|
PathValues.ACCOUNTS_ACCOUNT_ID_OPTIONS_CHAIN: AccountsAccountIdOptionsChain,
|
|
86
|
-
PathValues.ACCOUNTS_ACCOUNT_ID_OPTION_STRATEGY: AccountsAccountIdOptionStrategy,
|
|
87
|
-
PathValues.ACCOUNTS_ACCOUNT_ID_OPTION_STRATEGY_OPTION_STRATEGY_ID: AccountsAccountIdOptionStrategyOptionStrategyId,
|
|
88
|
-
PathValues.ACCOUNTS_ACCOUNT_ID_OPTION_STRATEGY_OPTION_STRATEGY_ID_EXECUTE: AccountsAccountIdOptionStrategyOptionStrategyIdExecute,
|
|
89
85
|
PathValues.ACTIVITIES: Activities,
|
|
90
86
|
PathValues.PERFORMANCE_CUSTOM: PerformanceCustom,
|
|
91
87
|
PathValues.ACCOUNTS_ACCOUNT_ID_QUOTES: AccountsAccountIdQuotes,
|
|
@@ -137,14 +133,12 @@ path_to_api = PathToApi(
|
|
|
137
133
|
PathValues.ACCOUNTS_ACCOUNT_ID_BALANCES: AccountsAccountIdBalances,
|
|
138
134
|
PathValues.ACCOUNTS_ACCOUNT_ID_POSITIONS: AccountsAccountIdPositions,
|
|
139
135
|
PathValues.ACCOUNTS_ACCOUNT_ID_ORDERS: AccountsAccountIdOrders,
|
|
136
|
+
PathValues.ACCOUNTS_ACCOUNT_ID_ORDERS_BROKERAGE_ORDER_ID: AccountsAccountIdOrdersBrokerageOrderId,
|
|
140
137
|
PathValues.ACCOUNTS_ACCOUNT_ID_RECENT_ORDERS: AccountsAccountIdRecentOrders,
|
|
141
138
|
PathValues.ACCOUNTS_ACCOUNT_ID_RETURN_RATES: AccountsAccountIdReturnRates,
|
|
142
139
|
PathValues.ACCOUNTS_ACCOUNT_ID_ACTIVITIES: AccountsAccountIdActivities,
|
|
143
140
|
PathValues.ACCOUNTS_ACCOUNT_ID_OPTIONS: AccountsAccountIdOptions,
|
|
144
141
|
PathValues.ACCOUNTS_ACCOUNT_ID_OPTIONS_CHAIN: AccountsAccountIdOptionsChain,
|
|
145
|
-
PathValues.ACCOUNTS_ACCOUNT_ID_OPTION_STRATEGY: AccountsAccountIdOptionStrategy,
|
|
146
|
-
PathValues.ACCOUNTS_ACCOUNT_ID_OPTION_STRATEGY_OPTION_STRATEGY_ID: AccountsAccountIdOptionStrategyOptionStrategyId,
|
|
147
|
-
PathValues.ACCOUNTS_ACCOUNT_ID_OPTION_STRATEGY_OPTION_STRATEGY_ID_EXECUTE: AccountsAccountIdOptionStrategyOptionStrategyIdExecute,
|
|
148
142
|
PathValues.ACTIVITIES: Activities,
|
|
149
143
|
PathValues.PERFORMANCE_CUSTOM: PerformanceCustom,
|
|
150
144
|
PathValues.ACCOUNTS_ACCOUNT_ID_QUOTES: AccountsAccountIdQuotes,
|
|
@@ -13,6 +13,7 @@ from snaptrade_client.paths.accounts_account_id_activities.get import GetAccount
|
|
|
13
13
|
from snaptrade_client.paths.holdings.get import GetAllUserHoldings
|
|
14
14
|
from snaptrade_client.paths.accounts_account_id_balances.get import GetUserAccountBalance
|
|
15
15
|
from snaptrade_client.paths.accounts_account_id.get import GetUserAccountDetails
|
|
16
|
+
from snaptrade_client.paths.accounts_account_id_orders_brokerage_order_id.get import GetUserAccountOrderDetail
|
|
16
17
|
from snaptrade_client.paths.accounts_account_id_orders.get import GetUserAccountOrders
|
|
17
18
|
from snaptrade_client.paths.accounts_account_id_positions.get import GetUserAccountPositions
|
|
18
19
|
from snaptrade_client.paths.accounts_account_id_recent_orders.get import GetUserAccountRecentOrders
|
|
@@ -27,6 +28,7 @@ class AccountInformationApiGenerated(
|
|
|
27
28
|
GetAllUserHoldings,
|
|
28
29
|
GetUserAccountBalance,
|
|
29
30
|
GetUserAccountDetails,
|
|
31
|
+
GetUserAccountOrderDetail,
|
|
30
32
|
GetUserAccountOrders,
|
|
31
33
|
GetUserAccountPositions,
|
|
32
34
|
GetUserAccountRecentOrders,
|
|
@@ -9,19 +9,13 @@
|
|
|
9
9
|
Created by: https://snaptrade.com/
|
|
10
10
|
"""
|
|
11
11
|
|
|
12
|
-
from snaptrade_client.paths.accounts_account_id_option_strategy.post import GetOptionStrategy
|
|
13
12
|
from snaptrade_client.paths.accounts_account_id_options_chain.get import GetOptionsChain
|
|
14
|
-
from snaptrade_client.paths.accounts_account_id_option_strategy_option_strategy_id.get import GetOptionsStrategyQuote
|
|
15
13
|
from snaptrade_client.paths.accounts_account_id_options.get import ListOptionHoldings
|
|
16
|
-
from snaptrade_client.paths.accounts_account_id_option_strategy_option_strategy_id_execute.post import PlaceOptionStrategy
|
|
17
14
|
|
|
18
15
|
|
|
19
16
|
class OptionsApiGenerated(
|
|
20
|
-
GetOptionStrategy,
|
|
21
17
|
GetOptionsChain,
|
|
22
|
-
GetOptionsStrategyQuote,
|
|
23
18
|
ListOptionHoldings,
|
|
24
|
-
PlaceOptionStrategy,
|
|
25
19
|
):
|
|
26
20
|
"""NOTE:
|
|
27
21
|
This class is auto generated by Konfig (https://konfigthis.com)
|
|
@@ -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.
|
|
441
|
+
"SDK Package Version: 11.0.124".\
|
|
442
442
|
format(env=sys.platform, pyversion=sys.version)
|
|
443
443
|
|
|
444
444
|
def get_host_settings(self):
|
|
@@ -132,6 +132,7 @@ class Account(
|
|
|
132
132
|
"open": "OPEN",
|
|
133
133
|
"closed": "CLOSED",
|
|
134
134
|
"archived": "ARCHIVED",
|
|
135
|
+
"unavailable": "UNAVAILABLE",
|
|
135
136
|
}
|
|
136
137
|
|
|
137
138
|
@schemas.classproperty
|
|
@@ -145,6 +146,10 @@ class Account(
|
|
|
145
146
|
@schemas.classproperty
|
|
146
147
|
def ARCHIVED(cls):
|
|
147
148
|
return cls("archived")
|
|
149
|
+
|
|
150
|
+
@schemas.classproperty
|
|
151
|
+
def UNAVAILABLE(cls):
|
|
152
|
+
return cls("unavailable")
|
|
148
153
|
|
|
149
154
|
|
|
150
155
|
def __new__(
|
|
@@ -132,6 +132,7 @@ class Account(
|
|
|
132
132
|
"open": "OPEN",
|
|
133
133
|
"closed": "CLOSED",
|
|
134
134
|
"archived": "ARCHIVED",
|
|
135
|
+
"unavailable": "UNAVAILABLE",
|
|
135
136
|
}
|
|
136
137
|
|
|
137
138
|
@schemas.classproperty
|
|
@@ -145,6 +146,10 @@ class Account(
|
|
|
145
146
|
@schemas.classproperty
|
|
146
147
|
def ARCHIVED(cls):
|
|
147
148
|
return cls("archived")
|
|
149
|
+
|
|
150
|
+
@schemas.classproperty
|
|
151
|
+
def UNAVAILABLE(cls):
|
|
152
|
+
return cls("unavailable")
|
|
148
153
|
|
|
149
154
|
|
|
150
155
|
def __new__(
|
|
@@ -66,6 +66,22 @@ operation_parameter_map = {
|
|
|
66
66
|
},
|
|
67
67
|
]
|
|
68
68
|
},
|
|
69
|
+
'/accounts/{accountId}/orders/{brokerageOrderId}-GET': {
|
|
70
|
+
'parameters': [
|
|
71
|
+
{
|
|
72
|
+
'name': 'userId'
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
'name': 'userSecret'
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
'name': 'accountId'
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
'name': 'brokerageOrderId'
|
|
82
|
+
},
|
|
83
|
+
]
|
|
84
|
+
},
|
|
69
85
|
'/accounts/{accountId}/orders-GET': {
|
|
70
86
|
'parameters': [
|
|
71
87
|
{
|
|
@@ -311,28 +327,6 @@ operation_parameter_map = {
|
|
|
311
327
|
},
|
|
312
328
|
]
|
|
313
329
|
},
|
|
314
|
-
'/accounts/{accountId}/optionStrategy-POST': {
|
|
315
|
-
'parameters': [
|
|
316
|
-
{
|
|
317
|
-
'name': 'underlying_symbol_id'
|
|
318
|
-
},
|
|
319
|
-
{
|
|
320
|
-
'name': 'legs'
|
|
321
|
-
},
|
|
322
|
-
{
|
|
323
|
-
'name': 'strategy_type'
|
|
324
|
-
},
|
|
325
|
-
{
|
|
326
|
-
'name': 'userId'
|
|
327
|
-
},
|
|
328
|
-
{
|
|
329
|
-
'name': 'userSecret'
|
|
330
|
-
},
|
|
331
|
-
{
|
|
332
|
-
'name': 'accountId'
|
|
333
|
-
},
|
|
334
|
-
]
|
|
335
|
-
},
|
|
336
330
|
'/accounts/{accountId}/optionsChain-GET': {
|
|
337
331
|
'parameters': [
|
|
338
332
|
{
|
|
@@ -349,22 +343,6 @@ operation_parameter_map = {
|
|
|
349
343
|
},
|
|
350
344
|
]
|
|
351
345
|
},
|
|
352
|
-
'/accounts/{accountId}/optionStrategy/{optionStrategyId}-GET': {
|
|
353
|
-
'parameters': [
|
|
354
|
-
{
|
|
355
|
-
'name': 'userId'
|
|
356
|
-
},
|
|
357
|
-
{
|
|
358
|
-
'name': 'userSecret'
|
|
359
|
-
},
|
|
360
|
-
{
|
|
361
|
-
'name': 'accountId'
|
|
362
|
-
},
|
|
363
|
-
{
|
|
364
|
-
'name': 'optionStrategyId'
|
|
365
|
-
},
|
|
366
|
-
]
|
|
367
|
-
},
|
|
368
346
|
'/accounts/{accountId}/options-GET': {
|
|
369
347
|
'parameters': [
|
|
370
348
|
{
|
|
@@ -378,31 +356,6 @@ operation_parameter_map = {
|
|
|
378
356
|
},
|
|
379
357
|
]
|
|
380
358
|
},
|
|
381
|
-
'/accounts/{accountId}/optionStrategy/{optionStrategyId}/execute-POST': {
|
|
382
|
-
'parameters': [
|
|
383
|
-
{
|
|
384
|
-
'name': 'order_type'
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
'name': 'time_in_force'
|
|
388
|
-
},
|
|
389
|
-
{
|
|
390
|
-
'name': 'userId'
|
|
391
|
-
},
|
|
392
|
-
{
|
|
393
|
-
'name': 'userSecret'
|
|
394
|
-
},
|
|
395
|
-
{
|
|
396
|
-
'name': 'accountId'
|
|
397
|
-
},
|
|
398
|
-
{
|
|
399
|
-
'name': 'optionStrategyId'
|
|
400
|
-
},
|
|
401
|
-
{
|
|
402
|
-
'name': 'price'
|
|
403
|
-
},
|
|
404
|
-
]
|
|
405
|
-
},
|
|
406
359
|
'/currencies/rates/{currencyPair}-GET': {
|
|
407
360
|
'parameters': [
|
|
408
361
|
{
|
|
@@ -25,14 +25,12 @@ class PathValues(str, enum.Enum):
|
|
|
25
25
|
ACCOUNTS_ACCOUNT_ID_BALANCES = "/accounts/{accountId}/balances"
|
|
26
26
|
ACCOUNTS_ACCOUNT_ID_POSITIONS = "/accounts/{accountId}/positions"
|
|
27
27
|
ACCOUNTS_ACCOUNT_ID_ORDERS = "/accounts/{accountId}/orders"
|
|
28
|
+
ACCOUNTS_ACCOUNT_ID_ORDERS_BROKERAGE_ORDER_ID = "/accounts/{accountId}/orders/{brokerageOrderId}"
|
|
28
29
|
ACCOUNTS_ACCOUNT_ID_RECENT_ORDERS = "/accounts/{accountId}/recentOrders"
|
|
29
30
|
ACCOUNTS_ACCOUNT_ID_RETURN_RATES = "/accounts/{accountId}/returnRates"
|
|
30
31
|
ACCOUNTS_ACCOUNT_ID_ACTIVITIES = "/accounts/{accountId}/activities"
|
|
31
32
|
ACCOUNTS_ACCOUNT_ID_OPTIONS = "/accounts/{accountId}/options"
|
|
32
33
|
ACCOUNTS_ACCOUNT_ID_OPTIONS_CHAIN = "/accounts/{accountId}/optionsChain"
|
|
33
|
-
ACCOUNTS_ACCOUNT_ID_OPTION_STRATEGY = "/accounts/{accountId}/optionStrategy"
|
|
34
|
-
ACCOUNTS_ACCOUNT_ID_OPTION_STRATEGY_OPTION_STRATEGY_ID = "/accounts/{accountId}/optionStrategy/{optionStrategyId}"
|
|
35
|
-
ACCOUNTS_ACCOUNT_ID_OPTION_STRATEGY_OPTION_STRATEGY_ID_EXECUTE = "/accounts/{accountId}/optionStrategy/{optionStrategyId}/execute"
|
|
36
34
|
ACTIVITIES = "/activities"
|
|
37
35
|
PERFORMANCE_CUSTOM = "/performance/custom"
|
|
38
36
|
ACCOUNTS_ACCOUNT_ID_QUOTES = "/accounts/{accountId}/quotes"
|
|
@@ -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_orders_brokerage_order_id import Api
|
|
4
4
|
|
|
5
5
|
from snaptrade_client.paths import PathValues
|
|
6
6
|
|
|
7
|
-
path = PathValues.
|
|
7
|
+
path = PathValues.ACCOUNTS_ACCOUNT_ID_ORDERS_BROKERAGE_ORDER_ID
|
|
@@ -32,11 +32,13 @@ import frozendict # noqa: F401
|
|
|
32
32
|
|
|
33
33
|
from snaptrade_client import schemas # noqa: F401
|
|
34
34
|
|
|
35
|
+
from snaptrade_client.model.account_order_record import AccountOrderRecord as AccountOrderRecordSchema
|
|
35
36
|
from snaptrade_client.model.model500_unexpected_exception_response import Model500UnexpectedExceptionResponse as Model500UnexpectedExceptionResponseSchema
|
|
36
|
-
from snaptrade_client.model.
|
|
37
|
+
from snaptrade_client.model.model404_failed_request_response import Model404FailedRequestResponse as Model404FailedRequestResponseSchema
|
|
37
38
|
|
|
38
|
-
from snaptrade_client.type.strategy_quotes import StrategyQuotes
|
|
39
39
|
from snaptrade_client.type.model500_unexpected_exception_response import Model500UnexpectedExceptionResponse
|
|
40
|
+
from snaptrade_client.type.account_order_record import AccountOrderRecord
|
|
41
|
+
from snaptrade_client.type.model404_failed_request_response import Model404FailedRequestResponse
|
|
40
42
|
|
|
41
43
|
from . import path
|
|
42
44
|
|
|
@@ -78,12 +80,12 @@ request_query_user_secret = api_client.QueryParameter(
|
|
|
78
80
|
)
|
|
79
81
|
# Path params
|
|
80
82
|
AccountIdSchema = schemas.UUIDSchema
|
|
81
|
-
|
|
83
|
+
BrokerageOrderIdSchema = schemas.StrSchema
|
|
82
84
|
RequestRequiredPathParams = typing_extensions.TypedDict(
|
|
83
85
|
'RequestRequiredPathParams',
|
|
84
86
|
{
|
|
85
87
|
'accountId': typing.Union[AccountIdSchema, str, uuid.UUID, ],
|
|
86
|
-
'
|
|
88
|
+
'brokerageOrderId': typing.Union[BrokerageOrderIdSchema, str, ],
|
|
87
89
|
}
|
|
88
90
|
)
|
|
89
91
|
RequestOptionalPathParams = typing_extensions.TypedDict(
|
|
@@ -104,10 +106,10 @@ request_path_account_id = api_client.PathParameter(
|
|
|
104
106
|
schema=AccountIdSchema,
|
|
105
107
|
required=True,
|
|
106
108
|
)
|
|
107
|
-
|
|
108
|
-
name="
|
|
109
|
+
request_path_brokerage_order_id = api_client.PathParameter(
|
|
110
|
+
name="brokerageOrderId",
|
|
109
111
|
style=api_client.ParameterStyle.SIMPLE,
|
|
110
|
-
schema=
|
|
112
|
+
schema=BrokerageOrderIdSchema,
|
|
111
113
|
required=True,
|
|
112
114
|
)
|
|
113
115
|
_auth = [
|
|
@@ -115,17 +117,17 @@ _auth = [
|
|
|
115
117
|
'PartnerSignature',
|
|
116
118
|
'PartnerTimestamp',
|
|
117
119
|
]
|
|
118
|
-
SchemaFor200ResponseBodyApplicationJson =
|
|
120
|
+
SchemaFor200ResponseBodyApplicationJson = AccountOrderRecordSchema
|
|
119
121
|
|
|
120
122
|
|
|
121
123
|
@dataclass
|
|
122
124
|
class ApiResponseFor200(api_client.ApiResponse):
|
|
123
|
-
body:
|
|
125
|
+
body: AccountOrderRecord
|
|
124
126
|
|
|
125
127
|
|
|
126
128
|
@dataclass
|
|
127
129
|
class ApiResponseFor200Async(api_client.AsyncApiResponse):
|
|
128
|
-
body:
|
|
130
|
+
body: AccountOrderRecord
|
|
129
131
|
|
|
130
132
|
|
|
131
133
|
_response_for_200 = api_client.OpenApiResponse(
|
|
@@ -136,6 +138,27 @@ _response_for_200 = api_client.OpenApiResponse(
|
|
|
136
138
|
schema=SchemaFor200ResponseBodyApplicationJson),
|
|
137
139
|
},
|
|
138
140
|
)
|
|
141
|
+
SchemaFor404ResponseBodyApplicationJson = Model404FailedRequestResponseSchema
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
@dataclass
|
|
145
|
+
class ApiResponseFor404(api_client.ApiResponse):
|
|
146
|
+
body: Model404FailedRequestResponse
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
@dataclass
|
|
150
|
+
class ApiResponseFor404Async(api_client.AsyncApiResponse):
|
|
151
|
+
body: Model404FailedRequestResponse
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
_response_for_404 = api_client.OpenApiResponse(
|
|
155
|
+
response_cls=ApiResponseFor404,
|
|
156
|
+
response_cls_async=ApiResponseFor404Async,
|
|
157
|
+
content={
|
|
158
|
+
'application/json': api_client.MediaType(
|
|
159
|
+
schema=SchemaFor404ResponseBodyApplicationJson),
|
|
160
|
+
},
|
|
161
|
+
)
|
|
139
162
|
SchemaFor500ResponseBodyApplicationJson = Model500UnexpectedExceptionResponseSchema
|
|
140
163
|
|
|
141
164
|
|
|
@@ -159,6 +182,7 @@ _response_for_500 = api_client.OpenApiResponse(
|
|
|
159
182
|
)
|
|
160
183
|
_status_code_to_response = {
|
|
161
184
|
'200': _response_for_200,
|
|
185
|
+
'404': _response_for_404,
|
|
162
186
|
'500': _response_for_500,
|
|
163
187
|
}
|
|
164
188
|
_all_accept_content_types = (
|
|
@@ -168,12 +192,12 @@ _all_accept_content_types = (
|
|
|
168
192
|
|
|
169
193
|
class BaseApi(api_client.Api):
|
|
170
194
|
|
|
171
|
-
def
|
|
195
|
+
def _get_user_account_order_detail_mapped_args(
|
|
172
196
|
self,
|
|
173
197
|
user_id: typing.Optional[str] = None,
|
|
174
198
|
user_secret: typing.Optional[str] = None,
|
|
175
199
|
account_id: typing.Optional[str] = None,
|
|
176
|
-
|
|
200
|
+
brokerage_order_id: typing.Optional[str] = None,
|
|
177
201
|
query_params: typing.Optional[dict] = {},
|
|
178
202
|
path_params: typing.Optional[dict] = {},
|
|
179
203
|
) -> api_client.MappedArgs:
|
|
@@ -186,13 +210,13 @@ class BaseApi(api_client.Api):
|
|
|
186
210
|
_query_params["userSecret"] = user_secret
|
|
187
211
|
if account_id is not None:
|
|
188
212
|
_path_params["accountId"] = account_id
|
|
189
|
-
if
|
|
190
|
-
_path_params["
|
|
213
|
+
if brokerage_order_id is not None:
|
|
214
|
+
_path_params["brokerageOrderId"] = brokerage_order_id
|
|
191
215
|
args.query = query_params if query_params else _query_params
|
|
192
216
|
args.path = path_params if path_params else _path_params
|
|
193
217
|
return args
|
|
194
218
|
|
|
195
|
-
async def
|
|
219
|
+
async def _aget_user_account_order_detail_oapg(
|
|
196
220
|
self,
|
|
197
221
|
query_params: typing.Optional[dict] = {},
|
|
198
222
|
path_params: typing.Optional[dict] = {},
|
|
@@ -207,7 +231,7 @@ class BaseApi(api_client.Api):
|
|
|
207
231
|
AsyncGeneratorResponse,
|
|
208
232
|
]:
|
|
209
233
|
"""
|
|
210
|
-
Get
|
|
234
|
+
Get account order detail
|
|
211
235
|
:param skip_deserialization: If true then api_response.response will be set but
|
|
212
236
|
api_response.body and api_response.headers will not be deserialized into schema
|
|
213
237
|
class instances
|
|
@@ -219,7 +243,7 @@ class BaseApi(api_client.Api):
|
|
|
219
243
|
_path_params = {}
|
|
220
244
|
for parameter in (
|
|
221
245
|
request_path_account_id,
|
|
222
|
-
|
|
246
|
+
request_path_brokerage_order_id,
|
|
223
247
|
):
|
|
224
248
|
parameter_data = path_params.get(parameter.name, schemas.unset)
|
|
225
249
|
if parameter_data is schemas.unset:
|
|
@@ -254,7 +278,7 @@ class BaseApi(api_client.Api):
|
|
|
254
278
|
resource_path=used_path,
|
|
255
279
|
method=method,
|
|
256
280
|
configuration=self.api_client.configuration,
|
|
257
|
-
path_template='/accounts/{accountId}/
|
|
281
|
+
path_template='/accounts/{accountId}/orders/{brokerageOrderId}',
|
|
258
282
|
auth_settings=_auth,
|
|
259
283
|
headers=_headers,
|
|
260
284
|
)
|
|
@@ -323,7 +347,7 @@ class BaseApi(api_client.Api):
|
|
|
323
347
|
return api_response
|
|
324
348
|
|
|
325
349
|
|
|
326
|
-
def
|
|
350
|
+
def _get_user_account_order_detail_oapg(
|
|
327
351
|
self,
|
|
328
352
|
query_params: typing.Optional[dict] = {},
|
|
329
353
|
path_params: typing.Optional[dict] = {},
|
|
@@ -336,7 +360,7 @@ class BaseApi(api_client.Api):
|
|
|
336
360
|
api_client.ApiResponseWithoutDeserialization,
|
|
337
361
|
]:
|
|
338
362
|
"""
|
|
339
|
-
Get
|
|
363
|
+
Get account order detail
|
|
340
364
|
:param skip_deserialization: If true then api_response.response will be set but
|
|
341
365
|
api_response.body and api_response.headers will not be deserialized into schema
|
|
342
366
|
class instances
|
|
@@ -348,7 +372,7 @@ class BaseApi(api_client.Api):
|
|
|
348
372
|
_path_params = {}
|
|
349
373
|
for parameter in (
|
|
350
374
|
request_path_account_id,
|
|
351
|
-
|
|
375
|
+
request_path_brokerage_order_id,
|
|
352
376
|
):
|
|
353
377
|
parameter_data = path_params.get(parameter.name, schemas.unset)
|
|
354
378
|
if parameter_data is schemas.unset:
|
|
@@ -383,7 +407,7 @@ class BaseApi(api_client.Api):
|
|
|
383
407
|
resource_path=used_path,
|
|
384
408
|
method=method,
|
|
385
409
|
configuration=self.api_client.configuration,
|
|
386
|
-
path_template='/accounts/{accountId}/
|
|
410
|
+
path_template='/accounts/{accountId}/orders/{brokerageOrderId}',
|
|
387
411
|
auth_settings=_auth,
|
|
388
412
|
headers=_headers,
|
|
389
413
|
)
|
|
@@ -421,15 +445,15 @@ class BaseApi(api_client.Api):
|
|
|
421
445
|
return api_response
|
|
422
446
|
|
|
423
447
|
|
|
424
|
-
class
|
|
448
|
+
class GetUserAccountOrderDetail(BaseApi):
|
|
425
449
|
# this class is used by api classes that refer to endpoints with operationId fn names
|
|
426
450
|
|
|
427
|
-
async def
|
|
451
|
+
async def aget_user_account_order_detail(
|
|
428
452
|
self,
|
|
429
453
|
user_id: typing.Optional[str] = None,
|
|
430
454
|
user_secret: typing.Optional[str] = None,
|
|
431
455
|
account_id: typing.Optional[str] = None,
|
|
432
|
-
|
|
456
|
+
brokerage_order_id: typing.Optional[str] = None,
|
|
433
457
|
query_params: typing.Optional[dict] = {},
|
|
434
458
|
path_params: typing.Optional[dict] = {},
|
|
435
459
|
**kwargs,
|
|
@@ -438,42 +462,42 @@ class GetOptionsStrategyQuote(BaseApi):
|
|
|
438
462
|
api_client.ApiResponseWithoutDeserializationAsync,
|
|
439
463
|
AsyncGeneratorResponse,
|
|
440
464
|
]:
|
|
441
|
-
args = self.
|
|
465
|
+
args = self._get_user_account_order_detail_mapped_args(
|
|
442
466
|
query_params=query_params,
|
|
443
467
|
path_params=path_params,
|
|
444
468
|
user_id=user_id,
|
|
445
469
|
user_secret=user_secret,
|
|
446
470
|
account_id=account_id,
|
|
447
|
-
|
|
471
|
+
brokerage_order_id=brokerage_order_id,
|
|
448
472
|
)
|
|
449
|
-
return await self.
|
|
473
|
+
return await self._aget_user_account_order_detail_oapg(
|
|
450
474
|
query_params=args.query,
|
|
451
475
|
path_params=args.path,
|
|
452
476
|
**kwargs,
|
|
453
477
|
)
|
|
454
478
|
|
|
455
|
-
def
|
|
479
|
+
def get_user_account_order_detail(
|
|
456
480
|
self,
|
|
457
481
|
user_id: typing.Optional[str] = None,
|
|
458
482
|
user_secret: typing.Optional[str] = None,
|
|
459
483
|
account_id: typing.Optional[str] = None,
|
|
460
|
-
|
|
484
|
+
brokerage_order_id: typing.Optional[str] = None,
|
|
461
485
|
query_params: typing.Optional[dict] = {},
|
|
462
486
|
path_params: typing.Optional[dict] = {},
|
|
463
487
|
) -> typing.Union[
|
|
464
488
|
ApiResponseFor200,
|
|
465
489
|
api_client.ApiResponseWithoutDeserialization,
|
|
466
490
|
]:
|
|
467
|
-
""" Returns a
|
|
468
|
-
args = self.
|
|
491
|
+
""" Returns the detail of a single order in the specified account. This endpoint is always realtime and does not rely on cached data. """
|
|
492
|
+
args = self._get_user_account_order_detail_mapped_args(
|
|
469
493
|
query_params=query_params,
|
|
470
494
|
path_params=path_params,
|
|
471
495
|
user_id=user_id,
|
|
472
496
|
user_secret=user_secret,
|
|
473
497
|
account_id=account_id,
|
|
474
|
-
|
|
498
|
+
brokerage_order_id=brokerage_order_id,
|
|
475
499
|
)
|
|
476
|
-
return self.
|
|
500
|
+
return self._get_user_account_order_detail_oapg(
|
|
477
501
|
query_params=args.query,
|
|
478
502
|
path_params=args.path,
|
|
479
503
|
)
|
|
@@ -486,7 +510,7 @@ class ApiForget(BaseApi):
|
|
|
486
510
|
user_id: typing.Optional[str] = None,
|
|
487
511
|
user_secret: typing.Optional[str] = None,
|
|
488
512
|
account_id: typing.Optional[str] = None,
|
|
489
|
-
|
|
513
|
+
brokerage_order_id: typing.Optional[str] = None,
|
|
490
514
|
query_params: typing.Optional[dict] = {},
|
|
491
515
|
path_params: typing.Optional[dict] = {},
|
|
492
516
|
**kwargs,
|
|
@@ -495,15 +519,15 @@ class ApiForget(BaseApi):
|
|
|
495
519
|
api_client.ApiResponseWithoutDeserializationAsync,
|
|
496
520
|
AsyncGeneratorResponse,
|
|
497
521
|
]:
|
|
498
|
-
args = self.
|
|
522
|
+
args = self._get_user_account_order_detail_mapped_args(
|
|
499
523
|
query_params=query_params,
|
|
500
524
|
path_params=path_params,
|
|
501
525
|
user_id=user_id,
|
|
502
526
|
user_secret=user_secret,
|
|
503
527
|
account_id=account_id,
|
|
504
|
-
|
|
528
|
+
brokerage_order_id=brokerage_order_id,
|
|
505
529
|
)
|
|
506
|
-
return await self.
|
|
530
|
+
return await self._aget_user_account_order_detail_oapg(
|
|
507
531
|
query_params=args.query,
|
|
508
532
|
path_params=args.path,
|
|
509
533
|
**kwargs,
|
|
@@ -514,23 +538,23 @@ class ApiForget(BaseApi):
|
|
|
514
538
|
user_id: typing.Optional[str] = None,
|
|
515
539
|
user_secret: typing.Optional[str] = None,
|
|
516
540
|
account_id: typing.Optional[str] = None,
|
|
517
|
-
|
|
541
|
+
brokerage_order_id: typing.Optional[str] = None,
|
|
518
542
|
query_params: typing.Optional[dict] = {},
|
|
519
543
|
path_params: typing.Optional[dict] = {},
|
|
520
544
|
) -> typing.Union[
|
|
521
545
|
ApiResponseFor200,
|
|
522
546
|
api_client.ApiResponseWithoutDeserialization,
|
|
523
547
|
]:
|
|
524
|
-
""" Returns a
|
|
525
|
-
args = self.
|
|
548
|
+
""" Returns the detail of a single order in the specified account. This endpoint is always realtime and does not rely on cached data. """
|
|
549
|
+
args = self._get_user_account_order_detail_mapped_args(
|
|
526
550
|
query_params=query_params,
|
|
527
551
|
path_params=path_params,
|
|
528
552
|
user_id=user_id,
|
|
529
553
|
user_secret=user_secret,
|
|
530
554
|
account_id=account_id,
|
|
531
|
-
|
|
555
|
+
brokerage_order_id=brokerage_order_id,
|
|
532
556
|
)
|
|
533
|
-
return self.
|
|
557
|
+
return self._get_user_account_order_detail_oapg(
|
|
534
558
|
query_params=args.query,
|
|
535
559
|
path_params=args.path,
|
|
536
560
|
)
|