snaptrade-python-sdk 13.4.6__py3-none-any.whl → 13.4.8__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/tags/experimental_endpoints_api_generated.py +0 -2
- snaptrade_client/apis/tags/trading_api_generated.py +2 -0
- snaptrade_client/configuration.py +1 -1
- snaptrade_client/model/client_order_id.py +5 -5
- snaptrade_client/model/client_order_id.pyi +5 -5
- snaptrade_client/model/client_order_id_nullable.py +5 -5
- snaptrade_client/model/client_order_id_nullable.pyi +5 -5
- snaptrade_client/model/mleg_trade_form.py +12 -2
- snaptrade_client/model/mleg_trade_form.pyi +12 -2
- snaptrade_client/operation_parameter_map.py +43 -37
- snaptrade_client/paths/__init__.py +1 -1
- snaptrade_client/paths/accounts_account_id_trading_options/post.py +103 -2
- snaptrade_client/paths/accounts_account_id_trading_options/post.pyi +6 -0
- snaptrade_client/paths/accounts_account_id_trading_options_impact/post.py +11 -0
- snaptrade_client/paths/accounts_account_id_trading_options_impact/post.pyi +6 -0
- snaptrade_client/paths/accounts_account_id_trading_simple/post.py +2 -2
- snaptrade_client/type/account_universal_activity.py +1 -1
- snaptrade_client/type/activity.py +4 -4
- snaptrade_client/type/mleg_trade_form.py +3 -0
- snaptrade_client/type/simple_trade_form.py +1 -1
- snaptrade_client/type/universal_activity.py +1 -1
- {snaptrade_python_sdk-13.4.6.dist-info → snaptrade_python_sdk-13.4.8.dist-info}/METADATA +197 -185
- {snaptrade_python_sdk-13.4.6.dist-info → snaptrade_python_sdk-13.4.8.dist-info}/RECORD +28 -28
- {snaptrade_python_sdk-13.4.6.dist-info → snaptrade_python_sdk-13.4.8.dist-info}/LICENSE +0 -0
- {snaptrade_python_sdk-13.4.6.dist-info → snaptrade_python_sdk-13.4.8.dist-info}/WHEEL +0 -0
snaptrade_client/__init__.py
CHANGED
snaptrade_client/api_client.py
CHANGED
|
@@ -1175,7 +1175,7 @@ class ApiClient(typing.Generic[TAuth]):
|
|
|
1175
1175
|
self.default_headers[header_name] = header_value
|
|
1176
1176
|
self.cookie = cookie
|
|
1177
1177
|
# Set default User-Agent.
|
|
1178
|
-
self.user_agent = 'Konfig/13.4.
|
|
1178
|
+
self.user_agent = 'Konfig/13.4.8/python'
|
|
1179
1179
|
|
|
1180
1180
|
def __enter__(self):
|
|
1181
1181
|
return self
|
|
@@ -47,6 +47,7 @@ from snaptrade_client.apis.paths.accounts_account_id_trading_crypto_preview impo
|
|
|
47
47
|
from snaptrade_client.apis.paths.accounts_account_id_trading_crypto import AccountsAccountIdTradingCrypto
|
|
48
48
|
from snaptrade_client.apis.paths.accounts_account_id_trading_cancel import AccountsAccountIdTradingCancel
|
|
49
49
|
from snaptrade_client.apis.paths.accounts_account_id_trading_replace import AccountsAccountIdTradingReplace
|
|
50
|
+
from snaptrade_client.apis.paths.accounts_account_id_trading_simple import AccountsAccountIdTradingSimple
|
|
50
51
|
from snaptrade_client.apis.paths.accounts_account_id_trading_complex import AccountsAccountIdTradingComplex
|
|
51
52
|
from snaptrade_client.apis.paths.snap_trade_partners import SnapTradePartners
|
|
52
53
|
from snaptrade_client.apis.paths.snap_trade_trade_detection_subscriptions import SnapTradeTradeDetectionSubscriptions
|
|
@@ -63,7 +64,6 @@ from snaptrade_client.apis.paths.brokerage_authorization_types import BrokerageA
|
|
|
63
64
|
from snaptrade_client.apis.paths.exchanges import Exchanges
|
|
64
65
|
from snaptrade_client.apis.paths.symbols import Symbols
|
|
65
66
|
from snaptrade_client.apis.paths.symbols_query import SymbolsQuery
|
|
66
|
-
from snaptrade_client.apis.paths.accounts_account_id_trading_simple import AccountsAccountIdTradingSimple
|
|
67
67
|
from snaptrade_client.apis.paths.accounts_account_id_orders_details_v2_brokerage_order_id import AccountsAccountIdOrdersDetailsV2BrokerageOrderId
|
|
68
68
|
|
|
69
69
|
PathToApi = typing_extensions.TypedDict(
|
|
@@ -115,6 +115,7 @@ PathToApi = typing_extensions.TypedDict(
|
|
|
115
115
|
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_CRYPTO: AccountsAccountIdTradingCrypto,
|
|
116
116
|
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_CANCEL: AccountsAccountIdTradingCancel,
|
|
117
117
|
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_REPLACE: AccountsAccountIdTradingReplace,
|
|
118
|
+
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE: AccountsAccountIdTradingSimple,
|
|
118
119
|
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_COMPLEX: AccountsAccountIdTradingComplex,
|
|
119
120
|
PathValues.SNAP_TRADE_PARTNERS: SnapTradePartners,
|
|
120
121
|
PathValues.SNAP_TRADE_TRADE_DETECTION_SUBSCRIPTIONS: SnapTradeTradeDetectionSubscriptions,
|
|
@@ -131,7 +132,6 @@ PathToApi = typing_extensions.TypedDict(
|
|
|
131
132
|
PathValues.EXCHANGES: Exchanges,
|
|
132
133
|
PathValues.SYMBOLS: Symbols,
|
|
133
134
|
PathValues.SYMBOLS_QUERY: SymbolsQuery,
|
|
134
|
-
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE: AccountsAccountIdTradingSimple,
|
|
135
135
|
PathValues.ACCOUNTS_ACCOUNT_ID_ORDERS_DETAILS_V2_BROKERAGE_ORDER_ID: AccountsAccountIdOrdersDetailsV2BrokerageOrderId,
|
|
136
136
|
}
|
|
137
137
|
)
|
|
@@ -184,6 +184,7 @@ path_to_api = PathToApi(
|
|
|
184
184
|
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_CRYPTO: AccountsAccountIdTradingCrypto,
|
|
185
185
|
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_CANCEL: AccountsAccountIdTradingCancel,
|
|
186
186
|
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_REPLACE: AccountsAccountIdTradingReplace,
|
|
187
|
+
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE: AccountsAccountIdTradingSimple,
|
|
187
188
|
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_COMPLEX: AccountsAccountIdTradingComplex,
|
|
188
189
|
PathValues.SNAP_TRADE_PARTNERS: SnapTradePartners,
|
|
189
190
|
PathValues.SNAP_TRADE_TRADE_DETECTION_SUBSCRIPTIONS: SnapTradeTradeDetectionSubscriptions,
|
|
@@ -200,7 +201,6 @@ path_to_api = PathToApi(
|
|
|
200
201
|
PathValues.EXCHANGES: Exchanges,
|
|
201
202
|
PathValues.SYMBOLS: Symbols,
|
|
202
203
|
PathValues.SYMBOLS_QUERY: SymbolsQuery,
|
|
203
|
-
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE: AccountsAccountIdTradingSimple,
|
|
204
204
|
PathValues.ACCOUNTS_ACCOUNT_ID_ORDERS_DETAILS_V2_BROKERAGE_ORDER_ID: AccountsAccountIdOrdersDetailsV2BrokerageOrderId,
|
|
205
205
|
}
|
|
206
206
|
)
|
|
@@ -15,7 +15,6 @@ from snaptrade_client.paths.accounts_account_id_orders_details_v2_brokerage_orde
|
|
|
15
15
|
from snaptrade_client.paths.accounts_account_id_orders_v2.get import GetUserAccountOrdersV2
|
|
16
16
|
from snaptrade_client.paths.accounts_account_id_recent_orders_v2.get import GetUserAccountRecentOrdersV2
|
|
17
17
|
from snaptrade_client.paths.snap_trade_trade_detection_subscriptions.get import ListSubscriptions
|
|
18
|
-
from snaptrade_client.paths.accounts_account_id_trading_simple.post import PlaceSimpleOrder
|
|
19
18
|
import typing
|
|
20
19
|
from snaptrade_client.auth import AuthMode
|
|
21
20
|
|
|
@@ -29,7 +28,6 @@ class ExperimentalEndpointsApiGenerated(
|
|
|
29
28
|
GetUserAccountOrdersV2[TAuth],
|
|
30
29
|
GetUserAccountRecentOrdersV2[TAuth],
|
|
31
30
|
ListSubscriptions[TAuth],
|
|
32
|
-
PlaceSimpleOrder[TAuth],
|
|
33
31
|
):
|
|
34
32
|
"""NOTE:
|
|
35
33
|
This class is auto generated by Konfig (https://konfigthis.com)
|
|
@@ -20,6 +20,7 @@ from snaptrade_client.paths.accounts_account_id_trading_crypto.post import Place
|
|
|
20
20
|
from snaptrade_client.paths.trade_place.post import PlaceForceOrder
|
|
21
21
|
from snaptrade_client.paths.accounts_account_id_trading_options.post import PlaceMlegOrder
|
|
22
22
|
from snaptrade_client.paths.trade_trade_id.post import PlaceOrder
|
|
23
|
+
from snaptrade_client.paths.accounts_account_id_trading_simple.post import PlaceSimpleOrder
|
|
23
24
|
from snaptrade_client.paths.accounts_account_id_trading_crypto_preview.post import PreviewCryptoOrder
|
|
24
25
|
from snaptrade_client.paths.accounts_account_id_trading_replace.post import ReplaceOrder
|
|
25
26
|
from snaptrade_client.paths.accounts_account_id_trading_instruments_cryptocurrency_pairs.get import SearchCryptocurrencyPairInstruments
|
|
@@ -41,6 +42,7 @@ class TradingApiGenerated(
|
|
|
41
42
|
PlaceForceOrder[TAuth],
|
|
42
43
|
PlaceMlegOrder[TAuth],
|
|
43
44
|
PlaceOrder[TAuth],
|
|
45
|
+
PlaceSimpleOrder[TAuth],
|
|
44
46
|
PreviewCryptoOrder[TAuth],
|
|
45
47
|
ReplaceOrder[TAuth],
|
|
46
48
|
SearchCryptocurrencyPairInstruments[TAuth],
|
|
@@ -537,7 +537,7 @@ conf = snaptrade_client.Configuration(
|
|
|
537
537
|
"OS: {env}\n"\
|
|
538
538
|
"Python Version: {pyversion}\n"\
|
|
539
539
|
"Version of the API: 1.0.0\n"\
|
|
540
|
-
"SDK Package Version: 13.4.
|
|
540
|
+
"SDK Package Version: 13.4.8".\
|
|
541
541
|
format(env=sys.platform, pyversion=sys.version)
|
|
542
542
|
|
|
543
543
|
def get_host_settings(self):
|
|
@@ -34,11 +34,11 @@ class ClientOrderID(
|
|
|
34
34
|
"""
|
|
35
35
|
This class is auto generated by Konfig (https://konfigthis.com)
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
documentation for behavior on duplicate submission.
|
|
37
|
+
Caller-supplied canonical 36-character UUID. Required for Wealthsimple multi-leg
|
|
38
|
+
placement and optional for other orders. SnapTrade rejects reuse by the same user
|
|
39
|
+
for Wealthsimple multi-leg placement and OAuth requests. Otherwise, forwarding
|
|
40
|
+
and duplicate prevention depend on the endpoint and brokerage. Refer to the
|
|
41
|
+
request schema and per-brokerage documentation for behavior on duplicate submission.
|
|
42
42
|
|
|
43
43
|
"""
|
|
44
44
|
|
|
@@ -34,11 +34,11 @@ class ClientOrderID(
|
|
|
34
34
|
"""
|
|
35
35
|
This class is auto generated by Konfig (https://konfigthis.com)
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
documentation for behavior on duplicate submission.
|
|
37
|
+
Caller-supplied canonical 36-character UUID. Required for Wealthsimple multi-leg
|
|
38
|
+
placement and optional for other orders. SnapTrade rejects reuse by the same user
|
|
39
|
+
for Wealthsimple multi-leg placement and OAuth requests. Otherwise, forwarding
|
|
40
|
+
and duplicate prevention depend on the endpoint and brokerage. Refer to the
|
|
41
|
+
request schema and per-brokerage documentation for behavior on duplicate submission.
|
|
42
42
|
|
|
43
43
|
"""
|
|
44
44
|
|
|
@@ -34,11 +34,11 @@ class ClientOrderIDNullable(
|
|
|
34
34
|
"""
|
|
35
35
|
This class is auto generated by Konfig (https://konfigthis.com)
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
documentation for behavior on duplicate submission.
|
|
37
|
+
Caller-supplied canonical 36-character UUID. Required for Wealthsimple multi-leg
|
|
38
|
+
placement and optional for other orders. SnapTrade rejects reuse by the same user
|
|
39
|
+
for Wealthsimple multi-leg placement and OAuth requests. Otherwise, forwarding
|
|
40
|
+
and duplicate prevention depend on the endpoint and brokerage. Refer to the
|
|
41
|
+
request schema and per-brokerage documentation for behavior on duplicate submission.
|
|
42
42
|
|
|
43
43
|
"""
|
|
44
44
|
|
|
@@ -34,11 +34,11 @@ class ClientOrderIDNullable(
|
|
|
34
34
|
"""
|
|
35
35
|
This class is auto generated by Konfig (https://konfigthis.com)
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
documentation for behavior on duplicate submission.
|
|
37
|
+
Caller-supplied canonical 36-character UUID. Required for Wealthsimple multi-leg
|
|
38
|
+
placement and optional for other orders. SnapTrade rejects reuse by the same user
|
|
39
|
+
for Wealthsimple multi-leg placement and OAuth requests. Otherwise, forwarding
|
|
40
|
+
and duplicate prevention depend on the endpoint and brokerage. Refer to the
|
|
41
|
+
request schema and per-brokerage documentation for behavior on duplicate submission.
|
|
42
42
|
|
|
43
43
|
"""
|
|
44
44
|
|
|
@@ -76,6 +76,7 @@ class MlegTradeForm(
|
|
|
76
76
|
|
|
77
77
|
def __getitem__(self, i: int) -> 'MlegLeg':
|
|
78
78
|
return super().__getitem__(i)
|
|
79
|
+
client_order_id = schemas.UUIDSchema
|
|
79
80
|
|
|
80
81
|
|
|
81
82
|
class limit_price(
|
|
@@ -132,6 +133,7 @@ class MlegTradeForm(
|
|
|
132
133
|
"order_type": order_type,
|
|
133
134
|
"time_in_force": time_in_force,
|
|
134
135
|
"legs": legs,
|
|
136
|
+
"client_order_id": client_order_id,
|
|
135
137
|
"limit_price": limit_price,
|
|
136
138
|
"stop_price": stop_price,
|
|
137
139
|
"price_effect": price_effect,
|
|
@@ -150,6 +152,9 @@ class MlegTradeForm(
|
|
|
150
152
|
@typing.overload
|
|
151
153
|
def __getitem__(self, name: typing_extensions.Literal["legs"]) -> MetaOapg.properties.legs: ...
|
|
152
154
|
|
|
155
|
+
@typing.overload
|
|
156
|
+
def __getitem__(self, name: typing_extensions.Literal["client_order_id"]) -> MetaOapg.properties.client_order_id: ...
|
|
157
|
+
|
|
153
158
|
@typing.overload
|
|
154
159
|
def __getitem__(self, name: typing_extensions.Literal["limit_price"]) -> MetaOapg.properties.limit_price: ...
|
|
155
160
|
|
|
@@ -162,7 +167,7 @@ class MlegTradeForm(
|
|
|
162
167
|
@typing.overload
|
|
163
168
|
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
|
164
169
|
|
|
165
|
-
def __getitem__(self, name: typing.Union[typing_extensions.Literal["order_type", "time_in_force", "legs", "limit_price", "stop_price", "price_effect", ], str]):
|
|
170
|
+
def __getitem__(self, name: typing.Union[typing_extensions.Literal["order_type", "time_in_force", "legs", "client_order_id", "limit_price", "stop_price", "price_effect", ], str]):
|
|
166
171
|
# dict_instance[name] accessor
|
|
167
172
|
return super().__getitem__(name)
|
|
168
173
|
|
|
@@ -176,6 +181,9 @@ class MlegTradeForm(
|
|
|
176
181
|
@typing.overload
|
|
177
182
|
def get_item_oapg(self, name: typing_extensions.Literal["legs"]) -> MetaOapg.properties.legs: ...
|
|
178
183
|
|
|
184
|
+
@typing.overload
|
|
185
|
+
def get_item_oapg(self, name: typing_extensions.Literal["client_order_id"]) -> typing.Union[MetaOapg.properties.client_order_id, schemas.Unset]: ...
|
|
186
|
+
|
|
179
187
|
@typing.overload
|
|
180
188
|
def get_item_oapg(self, name: typing_extensions.Literal["limit_price"]) -> typing.Union[MetaOapg.properties.limit_price, schemas.Unset]: ...
|
|
181
189
|
|
|
@@ -188,7 +196,7 @@ class MlegTradeForm(
|
|
|
188
196
|
@typing.overload
|
|
189
197
|
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
|
190
198
|
|
|
191
|
-
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["order_type", "time_in_force", "legs", "limit_price", "stop_price", "price_effect", ], str]):
|
|
199
|
+
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["order_type", "time_in_force", "legs", "client_order_id", "limit_price", "stop_price", "price_effect", ], str]):
|
|
192
200
|
return super().get_item_oapg(name)
|
|
193
201
|
|
|
194
202
|
|
|
@@ -198,6 +206,7 @@ class MlegTradeForm(
|
|
|
198
206
|
time_in_force: 'TimeInForceStrict',
|
|
199
207
|
legs: typing.Union[MetaOapg.properties.legs, list, tuple, ],
|
|
200
208
|
order_type: 'MlegOrderTypeStrict',
|
|
209
|
+
client_order_id: typing.Union[MetaOapg.properties.client_order_id, str, uuid.UUID, schemas.Unset] = schemas.unset,
|
|
201
210
|
limit_price: typing.Union[MetaOapg.properties.limit_price, None, str, schemas.Unset] = schemas.unset,
|
|
202
211
|
stop_price: typing.Union[MetaOapg.properties.stop_price, None, str, schemas.Unset] = schemas.unset,
|
|
203
212
|
price_effect: typing.Union['MlegPriceEffectStrictNullable', schemas.Unset] = schemas.unset,
|
|
@@ -210,6 +219,7 @@ class MlegTradeForm(
|
|
|
210
219
|
time_in_force=time_in_force,
|
|
211
220
|
legs=legs,
|
|
212
221
|
order_type=order_type,
|
|
222
|
+
client_order_id=client_order_id,
|
|
213
223
|
limit_price=limit_price,
|
|
214
224
|
stop_price=stop_price,
|
|
215
225
|
price_effect=price_effect,
|
|
@@ -76,6 +76,7 @@ class MlegTradeForm(
|
|
|
76
76
|
|
|
77
77
|
def __getitem__(self, i: int) -> 'MlegLeg':
|
|
78
78
|
return super().__getitem__(i)
|
|
79
|
+
client_order_id = schemas.UUIDSchema
|
|
79
80
|
|
|
80
81
|
|
|
81
82
|
class limit_price(
|
|
@@ -132,6 +133,7 @@ class MlegTradeForm(
|
|
|
132
133
|
"order_type": order_type,
|
|
133
134
|
"time_in_force": time_in_force,
|
|
134
135
|
"legs": legs,
|
|
136
|
+
"client_order_id": client_order_id,
|
|
135
137
|
"limit_price": limit_price,
|
|
136
138
|
"stop_price": stop_price,
|
|
137
139
|
"price_effect": price_effect,
|
|
@@ -150,6 +152,9 @@ class MlegTradeForm(
|
|
|
150
152
|
@typing.overload
|
|
151
153
|
def __getitem__(self, name: typing_extensions.Literal["legs"]) -> MetaOapg.properties.legs: ...
|
|
152
154
|
|
|
155
|
+
@typing.overload
|
|
156
|
+
def __getitem__(self, name: typing_extensions.Literal["client_order_id"]) -> MetaOapg.properties.client_order_id: ...
|
|
157
|
+
|
|
153
158
|
@typing.overload
|
|
154
159
|
def __getitem__(self, name: typing_extensions.Literal["limit_price"]) -> MetaOapg.properties.limit_price: ...
|
|
155
160
|
|
|
@@ -162,7 +167,7 @@ class MlegTradeForm(
|
|
|
162
167
|
@typing.overload
|
|
163
168
|
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
|
164
169
|
|
|
165
|
-
def __getitem__(self, name: typing.Union[typing_extensions.Literal["order_type", "time_in_force", "legs", "limit_price", "stop_price", "price_effect", ], str]):
|
|
170
|
+
def __getitem__(self, name: typing.Union[typing_extensions.Literal["order_type", "time_in_force", "legs", "client_order_id", "limit_price", "stop_price", "price_effect", ], str]):
|
|
166
171
|
# dict_instance[name] accessor
|
|
167
172
|
return super().__getitem__(name)
|
|
168
173
|
|
|
@@ -176,6 +181,9 @@ class MlegTradeForm(
|
|
|
176
181
|
@typing.overload
|
|
177
182
|
def get_item_oapg(self, name: typing_extensions.Literal["legs"]) -> MetaOapg.properties.legs: ...
|
|
178
183
|
|
|
184
|
+
@typing.overload
|
|
185
|
+
def get_item_oapg(self, name: typing_extensions.Literal["client_order_id"]) -> typing.Union[MetaOapg.properties.client_order_id, schemas.Unset]: ...
|
|
186
|
+
|
|
179
187
|
@typing.overload
|
|
180
188
|
def get_item_oapg(self, name: typing_extensions.Literal["limit_price"]) -> typing.Union[MetaOapg.properties.limit_price, schemas.Unset]: ...
|
|
181
189
|
|
|
@@ -188,7 +196,7 @@ class MlegTradeForm(
|
|
|
188
196
|
@typing.overload
|
|
189
197
|
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
|
190
198
|
|
|
191
|
-
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["order_type", "time_in_force", "legs", "limit_price", "stop_price", "price_effect", ], str]):
|
|
199
|
+
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["order_type", "time_in_force", "legs", "client_order_id", "limit_price", "stop_price", "price_effect", ], str]):
|
|
192
200
|
return super().get_item_oapg(name)
|
|
193
201
|
|
|
194
202
|
|
|
@@ -198,6 +206,7 @@ class MlegTradeForm(
|
|
|
198
206
|
time_in_force: 'TimeInForceStrict',
|
|
199
207
|
legs: typing.Union[MetaOapg.properties.legs, list, tuple, ],
|
|
200
208
|
order_type: 'MlegOrderTypeStrict',
|
|
209
|
+
client_order_id: typing.Union[MetaOapg.properties.client_order_id, str, uuid.UUID, schemas.Unset] = schemas.unset,
|
|
201
210
|
limit_price: typing.Union[MetaOapg.properties.limit_price, None, str, schemas.Unset] = schemas.unset,
|
|
202
211
|
stop_price: typing.Union[MetaOapg.properties.stop_price, None, str, schemas.Unset] = schemas.unset,
|
|
203
212
|
price_effect: typing.Union['MlegPriceEffectStrictNullable', schemas.Unset] = schemas.unset,
|
|
@@ -210,6 +219,7 @@ class MlegTradeForm(
|
|
|
210
219
|
time_in_force=time_in_force,
|
|
211
220
|
legs=legs,
|
|
212
221
|
order_type=order_type,
|
|
222
|
+
client_order_id=client_order_id,
|
|
213
223
|
limit_price=limit_price,
|
|
214
224
|
stop_price=stop_price,
|
|
215
225
|
price_effect=price_effect,
|
|
@@ -360,43 +360,6 @@ operation_parameter_map = {
|
|
|
360
360
|
'parameters': [
|
|
361
361
|
]
|
|
362
362
|
},
|
|
363
|
-
'/accounts/{accountId}/trading/simple-POST': {
|
|
364
|
-
'parameters': [
|
|
365
|
-
{
|
|
366
|
-
'name': 'order_type'
|
|
367
|
-
},
|
|
368
|
-
{
|
|
369
|
-
'name': 'time_in_force'
|
|
370
|
-
},
|
|
371
|
-
{
|
|
372
|
-
'name': 'legs'
|
|
373
|
-
},
|
|
374
|
-
{
|
|
375
|
-
'name': 'accountId'
|
|
376
|
-
},
|
|
377
|
-
{
|
|
378
|
-
'name': 'limit_price'
|
|
379
|
-
},
|
|
380
|
-
{
|
|
381
|
-
'name': 'stop_price'
|
|
382
|
-
},
|
|
383
|
-
{
|
|
384
|
-
'name': 'price_effect'
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
'name': 'client_order_id'
|
|
388
|
-
},
|
|
389
|
-
{
|
|
390
|
-
'name': 'expiry_date'
|
|
391
|
-
},
|
|
392
|
-
{
|
|
393
|
-
'name': 'notional_value'
|
|
394
|
-
},
|
|
395
|
-
{
|
|
396
|
-
'name': 'trading_session'
|
|
397
|
-
},
|
|
398
|
-
]
|
|
399
|
-
},
|
|
400
363
|
'/management/stats-GET': {
|
|
401
364
|
'parameters': [
|
|
402
365
|
{
|
|
@@ -499,6 +462,9 @@ operation_parameter_map = {
|
|
|
499
462
|
{
|
|
500
463
|
'name': 'accountId'
|
|
501
464
|
},
|
|
465
|
+
{
|
|
466
|
+
'name': 'client_order_id'
|
|
467
|
+
},
|
|
502
468
|
{
|
|
503
469
|
'name': 'limit_price'
|
|
504
470
|
},
|
|
@@ -671,6 +637,9 @@ operation_parameter_map = {
|
|
|
671
637
|
{
|
|
672
638
|
'name': 'accountId'
|
|
673
639
|
},
|
|
640
|
+
{
|
|
641
|
+
'name': 'client_order_id'
|
|
642
|
+
},
|
|
674
643
|
{
|
|
675
644
|
'name': 'limit_price'
|
|
676
645
|
},
|
|
@@ -692,6 +661,43 @@ operation_parameter_map = {
|
|
|
692
661
|
},
|
|
693
662
|
]
|
|
694
663
|
},
|
|
664
|
+
'/accounts/{accountId}/trading/simple-POST': {
|
|
665
|
+
'parameters': [
|
|
666
|
+
{
|
|
667
|
+
'name': 'order_type'
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
'name': 'time_in_force'
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
'name': 'legs'
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
'name': 'accountId'
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
'name': 'limit_price'
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
'name': 'stop_price'
|
|
683
|
+
},
|
|
684
|
+
{
|
|
685
|
+
'name': 'price_effect'
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
'name': 'client_order_id'
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
'name': 'expiry_date'
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
'name': 'notional_value'
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
'name': 'trading_session'
|
|
698
|
+
},
|
|
699
|
+
]
|
|
700
|
+
},
|
|
695
701
|
'/accounts/{accountId}/trading/crypto/preview-POST': {
|
|
696
702
|
'parameters': [
|
|
697
703
|
{
|
|
@@ -52,6 +52,7 @@ class PathValues(str, enum.Enum):
|
|
|
52
52
|
ACCOUNTS_ACCOUNT_ID_TRADING_CRYPTO = "/accounts/{accountId}/trading/crypto"
|
|
53
53
|
ACCOUNTS_ACCOUNT_ID_TRADING_CANCEL = "/accounts/{accountId}/trading/cancel"
|
|
54
54
|
ACCOUNTS_ACCOUNT_ID_TRADING_REPLACE = "/accounts/{accountId}/trading/replace"
|
|
55
|
+
ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE = "/accounts/{accountId}/trading/simple"
|
|
55
56
|
ACCOUNTS_ACCOUNT_ID_TRADING_COMPLEX = "/accounts/{accountId}/trading/complex"
|
|
56
57
|
SNAP_TRADE_PARTNERS = "/snapTrade/partners"
|
|
57
58
|
SNAP_TRADE_TRADE_DETECTION_SUBSCRIPTIONS = "/snapTrade/tradeDetection/subscriptions"
|
|
@@ -68,5 +69,4 @@ class PathValues(str, enum.Enum):
|
|
|
68
69
|
EXCHANGES = "/exchanges"
|
|
69
70
|
SYMBOLS = "/symbols"
|
|
70
71
|
SYMBOLS_QUERY = "/symbols/{query}"
|
|
71
|
-
ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE = "/accounts/{accountId}/trading/simple"
|
|
72
72
|
ACCOUNTS_ACCOUNT_ID_ORDERS_DETAILS_V2_BROKERAGE_ORDER_ID = "/accounts/{accountId}/orders/details/v2/{brokerageOrderId}"
|
|
@@ -185,6 +185,95 @@ _response_for_400 = api_client.OpenApiResponse(
|
|
|
185
185
|
)
|
|
186
186
|
|
|
187
187
|
|
|
188
|
+
class SchemaFor409ResponseBodyApplicationJson(
|
|
189
|
+
schemas.DictSchema
|
|
190
|
+
):
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
class MetaOapg:
|
|
194
|
+
|
|
195
|
+
class properties:
|
|
196
|
+
detail = schemas.StrSchema
|
|
197
|
+
status_code = schemas.IntSchema
|
|
198
|
+
code = schemas.StrSchema
|
|
199
|
+
__annotations__ = {
|
|
200
|
+
"detail": detail,
|
|
201
|
+
"status_code": status_code,
|
|
202
|
+
"code": code,
|
|
203
|
+
}
|
|
204
|
+
additional_properties = schemas.AnyTypeSchema
|
|
205
|
+
|
|
206
|
+
@typing.overload
|
|
207
|
+
def __getitem__(self, name: typing_extensions.Literal["detail"]) -> MetaOapg.properties.detail: ...
|
|
208
|
+
|
|
209
|
+
@typing.overload
|
|
210
|
+
def __getitem__(self, name: typing_extensions.Literal["status_code"]) -> MetaOapg.properties.status_code: ...
|
|
211
|
+
|
|
212
|
+
@typing.overload
|
|
213
|
+
def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ...
|
|
214
|
+
|
|
215
|
+
@typing.overload
|
|
216
|
+
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
|
|
217
|
+
|
|
218
|
+
def __getitem__(self, name: typing.Union[typing_extensions.Literal["detail"], typing_extensions.Literal["status_code"], typing_extensions.Literal["code"], str, ]):
|
|
219
|
+
# dict_instance[name] accessor
|
|
220
|
+
return super().__getitem__(name)
|
|
221
|
+
|
|
222
|
+
@typing.overload
|
|
223
|
+
def get_item_oapg(self, name: typing_extensions.Literal["detail"]) -> typing.Union[MetaOapg.properties.detail, schemas.Unset]: ...
|
|
224
|
+
|
|
225
|
+
@typing.overload
|
|
226
|
+
def get_item_oapg(self, name: typing_extensions.Literal["status_code"]) -> typing.Union[MetaOapg.properties.status_code, schemas.Unset]: ...
|
|
227
|
+
|
|
228
|
+
@typing.overload
|
|
229
|
+
def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> typing.Union[MetaOapg.properties.code, schemas.Unset]: ...
|
|
230
|
+
|
|
231
|
+
@typing.overload
|
|
232
|
+
def get_item_oapg(self, name: str) -> typing.Union[MetaOapg.additional_properties, schemas.Unset]: ...
|
|
233
|
+
|
|
234
|
+
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["detail"], typing_extensions.Literal["status_code"], typing_extensions.Literal["code"], str, ]):
|
|
235
|
+
return super().get_item_oapg(name)
|
|
236
|
+
|
|
237
|
+
def __new__(
|
|
238
|
+
cls,
|
|
239
|
+
*args: typing.Union[dict, frozendict.frozendict, ],
|
|
240
|
+
detail: typing.Union[MetaOapg.properties.detail, str, schemas.Unset] = schemas.unset,
|
|
241
|
+
status_code: typing.Union[MetaOapg.properties.status_code, decimal.Decimal, int, schemas.Unset] = schemas.unset,
|
|
242
|
+
code: typing.Union[MetaOapg.properties.code, str, schemas.Unset] = schemas.unset,
|
|
243
|
+
_configuration: typing.Optional[schemas.Configuration] = None,
|
|
244
|
+
**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, ],
|
|
245
|
+
) -> 'SchemaFor409ResponseBodyApplicationJson':
|
|
246
|
+
return super().__new__(
|
|
247
|
+
cls,
|
|
248
|
+
*args,
|
|
249
|
+
detail=detail,
|
|
250
|
+
status_code=status_code,
|
|
251
|
+
code=code,
|
|
252
|
+
_configuration=_configuration,
|
|
253
|
+
**kwargs,
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
@dataclass
|
|
258
|
+
class ApiResponseFor409(api_client.ApiResponse):
|
|
259
|
+
body: typing.Dict[str, typing.Union[bool, date, datetime, dict, float, int, list, str, None]]
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
@dataclass
|
|
263
|
+
class ApiResponseFor409Async(api_client.AsyncApiResponse):
|
|
264
|
+
body: typing.Dict[str, typing.Union[bool, date, datetime, dict, float, int, list, str, None]]
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
_response_for_409 = api_client.OpenApiResponse(
|
|
268
|
+
response_cls=ApiResponseFor409,
|
|
269
|
+
response_cls_async=ApiResponseFor409Async,
|
|
270
|
+
content={
|
|
271
|
+
'application/json': api_client.MediaType(
|
|
272
|
+
schema=SchemaFor409ResponseBodyApplicationJson),
|
|
273
|
+
},
|
|
274
|
+
)
|
|
275
|
+
|
|
276
|
+
|
|
188
277
|
@dataclass
|
|
189
278
|
class ApiResponseFor500(api_client.ApiResponse):
|
|
190
279
|
body: schemas.Unset = schemas.unset
|
|
@@ -202,6 +291,7 @@ _response_for_500 = api_client.OpenApiResponse(
|
|
|
202
291
|
_status_code_to_response = {
|
|
203
292
|
'200': _response_for_200,
|
|
204
293
|
'400': _response_for_400,
|
|
294
|
+
'409': _response_for_409,
|
|
205
295
|
'500': _response_for_500,
|
|
206
296
|
}
|
|
207
297
|
_all_accept_content_types = (
|
|
@@ -218,6 +308,7 @@ class BaseApi(api_client.Api):
|
|
|
218
308
|
time_in_force: typing.Optional[TimeInForceStrict] = None,
|
|
219
309
|
legs: typing.Optional[typing.List[MlegLeg]] = None,
|
|
220
310
|
account_id: typing.Optional[str] = None,
|
|
311
|
+
client_order_id: typing.Optional[str] = None,
|
|
221
312
|
limit_price: typing.Optional[typing.Optional[str]] = None,
|
|
222
313
|
stop_price: typing.Optional[typing.Optional[str]] = None,
|
|
223
314
|
price_effect: typing.Optional[MlegPriceEffectStrictNullable] = None,
|
|
@@ -232,6 +323,8 @@ class BaseApi(api_client.Api):
|
|
|
232
323
|
_header_params = {}
|
|
233
324
|
_path_params = {}
|
|
234
325
|
_body = {}
|
|
326
|
+
if client_order_id is not None:
|
|
327
|
+
_body["client_order_id"] = client_order_id
|
|
235
328
|
if order_type is not None:
|
|
236
329
|
_body["order_type"] = order_type
|
|
237
330
|
if time_in_force is not None:
|
|
@@ -547,6 +640,7 @@ class PlaceMlegOrder(BaseApi, typing.Generic[TAuth]):
|
|
|
547
640
|
time_in_force: typing.Optional[TimeInForceStrict] = None,
|
|
548
641
|
legs: typing.Optional[typing.List[MlegLeg]] = None,
|
|
549
642
|
account_id: typing.Optional[str] = None,
|
|
643
|
+
client_order_id: typing.Optional[str] = None,
|
|
550
644
|
limit_price: typing.Optional[typing.Optional[str]] = None,
|
|
551
645
|
stop_price: typing.Optional[typing.Optional[str]] = None,
|
|
552
646
|
price_effect: typing.Optional[MlegPriceEffectStrictNullable] = None,
|
|
@@ -568,6 +662,7 @@ class PlaceMlegOrder(BaseApi, typing.Generic[TAuth]):
|
|
|
568
662
|
time_in_force=time_in_force,
|
|
569
663
|
legs=legs,
|
|
570
664
|
account_id=account_id,
|
|
665
|
+
client_order_id=client_order_id,
|
|
571
666
|
limit_price=limit_price,
|
|
572
667
|
stop_price=stop_price,
|
|
573
668
|
price_effect=price_effect,
|
|
@@ -589,6 +684,7 @@ class PlaceMlegOrder(BaseApi, typing.Generic[TAuth]):
|
|
|
589
684
|
time_in_force: typing.Optional[TimeInForceStrict] = None,
|
|
590
685
|
legs: typing.Optional[typing.List[MlegLeg]] = None,
|
|
591
686
|
account_id: typing.Optional[str] = None,
|
|
687
|
+
client_order_id: typing.Optional[str] = None,
|
|
592
688
|
limit_price: typing.Optional[typing.Optional[str]] = None,
|
|
593
689
|
stop_price: typing.Optional[typing.Optional[str]] = None,
|
|
594
690
|
price_effect: typing.Optional[MlegPriceEffectStrictNullable] = None,
|
|
@@ -602,7 +698,7 @@ class PlaceMlegOrder(BaseApi, typing.Generic[TAuth]):
|
|
|
602
698
|
ApiResponseFor200,
|
|
603
699
|
api_client.ApiResponseWithoutDeserialization,
|
|
604
700
|
]:
|
|
605
|
-
""" Places a multi-leg option order. Only supported on certain option trading brokerages. https://support.snaptrade.com/brokerages has information on brokerage trading support """
|
|
701
|
+
""" Places a multi-leg option order. Only supported on certain option trading brokerages. https://support.snaptrade.com/brokerages has information on brokerage trading support Wealthsimple placement with two or more legs requires a canonical UUID `client_order_id`. Reuse it for retries of the same attempt. SnapTrade returns 409 for an ID already used by that user, including across accounts and after a lost placement response. Reconcile the original attempt before submitting a genuinely new order with a new ID. """
|
|
606
702
|
args = self._place_mleg_order_mapped_args(
|
|
607
703
|
body=body,
|
|
608
704
|
path_params=path_params,
|
|
@@ -610,6 +706,7 @@ class PlaceMlegOrder(BaseApi, typing.Generic[TAuth]):
|
|
|
610
706
|
time_in_force=time_in_force,
|
|
611
707
|
legs=legs,
|
|
612
708
|
account_id=account_id,
|
|
709
|
+
client_order_id=client_order_id,
|
|
613
710
|
limit_price=limit_price,
|
|
614
711
|
stop_price=stop_price,
|
|
615
712
|
price_effect=price_effect,
|
|
@@ -634,6 +731,7 @@ class ApiForpost(BaseApi, typing.Generic[TAuth]):
|
|
|
634
731
|
time_in_force: typing.Optional[TimeInForceStrict] = None,
|
|
635
732
|
legs: typing.Optional[typing.List[MlegLeg]] = None,
|
|
636
733
|
account_id: typing.Optional[str] = None,
|
|
734
|
+
client_order_id: typing.Optional[str] = None,
|
|
637
735
|
limit_price: typing.Optional[typing.Optional[str]] = None,
|
|
638
736
|
stop_price: typing.Optional[typing.Optional[str]] = None,
|
|
639
737
|
price_effect: typing.Optional[MlegPriceEffectStrictNullable] = None,
|
|
@@ -655,6 +753,7 @@ class ApiForpost(BaseApi, typing.Generic[TAuth]):
|
|
|
655
753
|
time_in_force=time_in_force,
|
|
656
754
|
legs=legs,
|
|
657
755
|
account_id=account_id,
|
|
756
|
+
client_order_id=client_order_id,
|
|
658
757
|
limit_price=limit_price,
|
|
659
758
|
stop_price=stop_price,
|
|
660
759
|
price_effect=price_effect,
|
|
@@ -676,6 +775,7 @@ class ApiForpost(BaseApi, typing.Generic[TAuth]):
|
|
|
676
775
|
time_in_force: typing.Optional[TimeInForceStrict] = None,
|
|
677
776
|
legs: typing.Optional[typing.List[MlegLeg]] = None,
|
|
678
777
|
account_id: typing.Optional[str] = None,
|
|
778
|
+
client_order_id: typing.Optional[str] = None,
|
|
679
779
|
limit_price: typing.Optional[typing.Optional[str]] = None,
|
|
680
780
|
stop_price: typing.Optional[typing.Optional[str]] = None,
|
|
681
781
|
price_effect: typing.Optional[MlegPriceEffectStrictNullable] = None,
|
|
@@ -689,7 +789,7 @@ class ApiForpost(BaseApi, typing.Generic[TAuth]):
|
|
|
689
789
|
ApiResponseFor200,
|
|
690
790
|
api_client.ApiResponseWithoutDeserialization,
|
|
691
791
|
]:
|
|
692
|
-
""" Places a multi-leg option order. Only supported on certain option trading brokerages. https://support.snaptrade.com/brokerages has information on brokerage trading support """
|
|
792
|
+
""" Places a multi-leg option order. Only supported on certain option trading brokerages. https://support.snaptrade.com/brokerages has information on brokerage trading support Wealthsimple placement with two or more legs requires a canonical UUID `client_order_id`. Reuse it for retries of the same attempt. SnapTrade returns 409 for an ID already used by that user, including across accounts and after a lost placement response. Reconcile the original attempt before submitting a genuinely new order with a new ID. """
|
|
693
793
|
args = self._place_mleg_order_mapped_args(
|
|
694
794
|
body=body,
|
|
695
795
|
path_params=path_params,
|
|
@@ -697,6 +797,7 @@ class ApiForpost(BaseApi, typing.Generic[TAuth]):
|
|
|
697
797
|
time_in_force=time_in_force,
|
|
698
798
|
legs=legs,
|
|
699
799
|
account_id=account_id,
|
|
800
|
+
client_order_id=client_order_id,
|
|
700
801
|
limit_price=limit_price,
|
|
701
802
|
stop_price=stop_price,
|
|
702
803
|
price_effect=price_effect,
|