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.
Files changed (27) hide show
  1. snaptrade_client/__init__.py +1 -1
  2. snaptrade_client/api_client.py +1 -1
  3. snaptrade_client/apis/path_to_api.py +3 -9
  4. snaptrade_client/apis/paths/accounts_account_id_orders_brokerage_order_id.py +7 -0
  5. snaptrade_client/apis/tags/account_information_api_generated.py +2 -0
  6. snaptrade_client/apis/tags/options_api_generated.py +0 -6
  7. snaptrade_client/configuration.py +1 -1
  8. snaptrade_client/model/account.py +5 -0
  9. snaptrade_client/model/account.pyi +5 -0
  10. snaptrade_client/operation_parameter_map.py +16 -63
  11. snaptrade_client/paths/__init__.py +1 -3
  12. snaptrade_client/paths/{accounts_account_id_option_strategy → accounts_account_id_orders_brokerage_order_id}/__init__.py +2 -2
  13. snaptrade_client/paths/{accounts_account_id_option_strategy_option_strategy_id → accounts_account_id_orders_brokerage_order_id}/get.py +67 -43
  14. snaptrade_client/paths/{accounts_account_id_option_strategy_option_strategy_id → accounts_account_id_orders_brokerage_order_id}/get.pyi +66 -43
  15. {snaptrade_python_sdk-11.0.122.dist-info → snaptrade_python_sdk-11.0.124.dist-info}/METADATA +44 -156
  16. {snaptrade_python_sdk-11.0.122.dist-info → snaptrade_python_sdk-11.0.124.dist-info}/RECORD +18 -26
  17. snaptrade_client/apis/paths/accounts_account_id_option_strategy.py +0 -7
  18. snaptrade_client/apis/paths/accounts_account_id_option_strategy_option_strategy_id.py +0 -7
  19. snaptrade_client/apis/paths/accounts_account_id_option_strategy_option_strategy_id_execute.py +0 -7
  20. snaptrade_client/paths/accounts_account_id_option_strategy/post.py +0 -731
  21. snaptrade_client/paths/accounts_account_id_option_strategy/post.pyi +0 -714
  22. snaptrade_client/paths/accounts_account_id_option_strategy_option_strategy_id/__init__.py +0 -7
  23. snaptrade_client/paths/accounts_account_id_option_strategy_option_strategy_id_execute/__init__.py +0 -7
  24. snaptrade_client/paths/accounts_account_id_option_strategy_option_strategy_id_execute/post.py +0 -723
  25. snaptrade_client/paths/accounts_account_id_option_strategy_option_strategy_id_execute/post.pyi +0 -712
  26. {snaptrade_python_sdk-11.0.122.dist-info → snaptrade_python_sdk-11.0.124.dist-info}/LICENSE +0 -0
  27. {snaptrade_python_sdk-11.0.122.dist-info → snaptrade_python_sdk-11.0.124.dist-info}/WHEEL +0 -0
@@ -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.strategy_quotes import StrategyQuotes as StrategyQuotesSchema
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
  # Query params
42
44
  UserIdSchema = schemas.StrSchema
@@ -76,12 +78,12 @@ request_query_user_secret = api_client.QueryParameter(
76
78
  )
77
79
  # Path params
78
80
  AccountIdSchema = schemas.UUIDSchema
79
- OptionStrategyIdSchema = schemas.UUIDSchema
81
+ BrokerageOrderIdSchema = schemas.StrSchema
80
82
  RequestRequiredPathParams = typing_extensions.TypedDict(
81
83
  'RequestRequiredPathParams',
82
84
  {
83
85
  'accountId': typing.Union[AccountIdSchema, str, uuid.UUID, ],
84
- 'optionStrategyId': typing.Union[OptionStrategyIdSchema, str, uuid.UUID, ],
86
+ 'brokerageOrderId': typing.Union[BrokerageOrderIdSchema, str, ],
85
87
  }
86
88
  )
87
89
  RequestOptionalPathParams = typing_extensions.TypedDict(
@@ -102,23 +104,23 @@ request_path_account_id = api_client.PathParameter(
102
104
  schema=AccountIdSchema,
103
105
  required=True,
104
106
  )
105
- request_path_option_strategy_id = api_client.PathParameter(
106
- name="optionStrategyId",
107
+ request_path_brokerage_order_id = api_client.PathParameter(
108
+ name="brokerageOrderId",
107
109
  style=api_client.ParameterStyle.SIMPLE,
108
- schema=OptionStrategyIdSchema,
110
+ schema=BrokerageOrderIdSchema,
109
111
  required=True,
110
112
  )
111
- SchemaFor200ResponseBodyApplicationJson = StrategyQuotesSchema
113
+ SchemaFor200ResponseBodyApplicationJson = AccountOrderRecordSchema
112
114
 
113
115
 
114
116
  @dataclass
115
117
  class ApiResponseFor200(api_client.ApiResponse):
116
- body: StrategyQuotes
118
+ body: AccountOrderRecord
117
119
 
118
120
 
119
121
  @dataclass
120
122
  class ApiResponseFor200Async(api_client.AsyncApiResponse):
121
- body: StrategyQuotes
123
+ body: AccountOrderRecord
122
124
 
123
125
 
124
126
  _response_for_200 = api_client.OpenApiResponse(
@@ -129,6 +131,27 @@ _response_for_200 = api_client.OpenApiResponse(
129
131
  schema=SchemaFor200ResponseBodyApplicationJson),
130
132
  },
131
133
  )
134
+ SchemaFor404ResponseBodyApplicationJson = Model404FailedRequestResponseSchema
135
+
136
+
137
+ @dataclass
138
+ class ApiResponseFor404(api_client.ApiResponse):
139
+ body: Model404FailedRequestResponse
140
+
141
+
142
+ @dataclass
143
+ class ApiResponseFor404Async(api_client.AsyncApiResponse):
144
+ body: Model404FailedRequestResponse
145
+
146
+
147
+ _response_for_404 = api_client.OpenApiResponse(
148
+ response_cls=ApiResponseFor404,
149
+ response_cls_async=ApiResponseFor404Async,
150
+ content={
151
+ 'application/json': api_client.MediaType(
152
+ schema=SchemaFor404ResponseBodyApplicationJson),
153
+ },
154
+ )
132
155
  SchemaFor500ResponseBodyApplicationJson = Model500UnexpectedExceptionResponseSchema
133
156
 
134
157
 
@@ -157,12 +180,12 @@ _all_accept_content_types = (
157
180
 
158
181
  class BaseApi(api_client.Api):
159
182
 
160
- def _get_options_strategy_quote_mapped_args(
183
+ def _get_user_account_order_detail_mapped_args(
161
184
  self,
162
185
  user_id: typing.Optional[str] = None,
163
186
  user_secret: typing.Optional[str] = None,
164
187
  account_id: typing.Optional[str] = None,
165
- option_strategy_id: typing.Optional[str] = None,
188
+ brokerage_order_id: typing.Optional[str] = None,
166
189
  query_params: typing.Optional[dict] = {},
167
190
  path_params: typing.Optional[dict] = {},
168
191
  ) -> api_client.MappedArgs:
@@ -175,13 +198,13 @@ class BaseApi(api_client.Api):
175
198
  _query_params["userSecret"] = user_secret
176
199
  if account_id is not None:
177
200
  _path_params["accountId"] = account_id
178
- if option_strategy_id is not None:
179
- _path_params["optionStrategyId"] = option_strategy_id
201
+ if brokerage_order_id is not None:
202
+ _path_params["brokerageOrderId"] = brokerage_order_id
180
203
  args.query = query_params if query_params else _query_params
181
204
  args.path = path_params if path_params else _path_params
182
205
  return args
183
206
 
184
- async def _aget_options_strategy_quote_oapg(
207
+ async def _aget_user_account_order_detail_oapg(
185
208
  self,
186
209
  query_params: typing.Optional[dict] = {},
187
210
  path_params: typing.Optional[dict] = {},
@@ -196,7 +219,7 @@ class BaseApi(api_client.Api):
196
219
  AsyncGeneratorResponse,
197
220
  ]:
198
221
  """
199
- Get options strategy quotes
222
+ Get account order detail
200
223
  :param skip_deserialization: If true then api_response.response will be set but
201
224
  api_response.body and api_response.headers will not be deserialized into schema
202
225
  class instances
@@ -208,7 +231,7 @@ class BaseApi(api_client.Api):
208
231
  _path_params = {}
209
232
  for parameter in (
210
233
  request_path_account_id,
211
- request_path_option_strategy_id,
234
+ request_path_brokerage_order_id,
212
235
  ):
213
236
  parameter_data = path_params.get(parameter.name, schemas.unset)
214
237
  if parameter_data is schemas.unset:
@@ -243,7 +266,7 @@ class BaseApi(api_client.Api):
243
266
  resource_path=used_path,
244
267
  method=method,
245
268
  configuration=self.api_client.configuration,
246
- path_template='/accounts/{accountId}/optionStrategy/{optionStrategyId}',
269
+ path_template='/accounts/{accountId}/orders/{brokerageOrderId}',
247
270
  auth_settings=_auth,
248
271
  headers=_headers,
249
272
  )
@@ -312,7 +335,7 @@ class BaseApi(api_client.Api):
312
335
  return api_response
313
336
 
314
337
 
315
- def _get_options_strategy_quote_oapg(
338
+ def _get_user_account_order_detail_oapg(
316
339
  self,
317
340
  query_params: typing.Optional[dict] = {},
318
341
  path_params: typing.Optional[dict] = {},
@@ -325,7 +348,7 @@ class BaseApi(api_client.Api):
325
348
  api_client.ApiResponseWithoutDeserialization,
326
349
  ]:
327
350
  """
328
- Get options strategy quotes
351
+ Get account order detail
329
352
  :param skip_deserialization: If true then api_response.response will be set but
330
353
  api_response.body and api_response.headers will not be deserialized into schema
331
354
  class instances
@@ -337,7 +360,7 @@ class BaseApi(api_client.Api):
337
360
  _path_params = {}
338
361
  for parameter in (
339
362
  request_path_account_id,
340
- request_path_option_strategy_id,
363
+ request_path_brokerage_order_id,
341
364
  ):
342
365
  parameter_data = path_params.get(parameter.name, schemas.unset)
343
366
  if parameter_data is schemas.unset:
@@ -372,7 +395,7 @@ class BaseApi(api_client.Api):
372
395
  resource_path=used_path,
373
396
  method=method,
374
397
  configuration=self.api_client.configuration,
375
- path_template='/accounts/{accountId}/optionStrategy/{optionStrategyId}',
398
+ path_template='/accounts/{accountId}/orders/{brokerageOrderId}',
376
399
  auth_settings=_auth,
377
400
  headers=_headers,
378
401
  )
@@ -410,15 +433,15 @@ class BaseApi(api_client.Api):
410
433
  return api_response
411
434
 
412
435
 
413
- class GetOptionsStrategyQuote(BaseApi):
436
+ class GetUserAccountOrderDetail(BaseApi):
414
437
  # this class is used by api classes that refer to endpoints with operationId fn names
415
438
 
416
- async def aget_options_strategy_quote(
439
+ async def aget_user_account_order_detail(
417
440
  self,
418
441
  user_id: typing.Optional[str] = None,
419
442
  user_secret: typing.Optional[str] = None,
420
443
  account_id: typing.Optional[str] = None,
421
- option_strategy_id: typing.Optional[str] = None,
444
+ brokerage_order_id: typing.Optional[str] = None,
422
445
  query_params: typing.Optional[dict] = {},
423
446
  path_params: typing.Optional[dict] = {},
424
447
  **kwargs,
@@ -427,42 +450,42 @@ class GetOptionsStrategyQuote(BaseApi):
427
450
  api_client.ApiResponseWithoutDeserializationAsync,
428
451
  AsyncGeneratorResponse,
429
452
  ]:
430
- args = self._get_options_strategy_quote_mapped_args(
453
+ args = self._get_user_account_order_detail_mapped_args(
431
454
  query_params=query_params,
432
455
  path_params=path_params,
433
456
  user_id=user_id,
434
457
  user_secret=user_secret,
435
458
  account_id=account_id,
436
- option_strategy_id=option_strategy_id,
459
+ brokerage_order_id=brokerage_order_id,
437
460
  )
438
- return await self._aget_options_strategy_quote_oapg(
461
+ return await self._aget_user_account_order_detail_oapg(
439
462
  query_params=args.query,
440
463
  path_params=args.path,
441
464
  **kwargs,
442
465
  )
443
466
 
444
- def get_options_strategy_quote(
467
+ def get_user_account_order_detail(
445
468
  self,
446
469
  user_id: typing.Optional[str] = None,
447
470
  user_secret: typing.Optional[str] = None,
448
471
  account_id: typing.Optional[str] = None,
449
- option_strategy_id: typing.Optional[str] = None,
472
+ brokerage_order_id: typing.Optional[str] = None,
450
473
  query_params: typing.Optional[dict] = {},
451
474
  path_params: typing.Optional[dict] = {},
452
475
  ) -> typing.Union[
453
476
  ApiResponseFor200,
454
477
  api_client.ApiResponseWithoutDeserialization,
455
478
  ]:
456
- """ Returns a Strategy Quotes object which has latest market data of the specified option strategy. """
457
- args = self._get_options_strategy_quote_mapped_args(
479
+ """ Returns the detail of a single order in the specified account. This endpoint is always realtime and does not rely on cached data. """
480
+ args = self._get_user_account_order_detail_mapped_args(
458
481
  query_params=query_params,
459
482
  path_params=path_params,
460
483
  user_id=user_id,
461
484
  user_secret=user_secret,
462
485
  account_id=account_id,
463
- option_strategy_id=option_strategy_id,
486
+ brokerage_order_id=brokerage_order_id,
464
487
  )
465
- return self._get_options_strategy_quote_oapg(
488
+ return self._get_user_account_order_detail_oapg(
466
489
  query_params=args.query,
467
490
  path_params=args.path,
468
491
  )
@@ -475,7 +498,7 @@ class ApiForget(BaseApi):
475
498
  user_id: typing.Optional[str] = None,
476
499
  user_secret: typing.Optional[str] = None,
477
500
  account_id: typing.Optional[str] = None,
478
- option_strategy_id: typing.Optional[str] = None,
501
+ brokerage_order_id: typing.Optional[str] = None,
479
502
  query_params: typing.Optional[dict] = {},
480
503
  path_params: typing.Optional[dict] = {},
481
504
  **kwargs,
@@ -484,15 +507,15 @@ class ApiForget(BaseApi):
484
507
  api_client.ApiResponseWithoutDeserializationAsync,
485
508
  AsyncGeneratorResponse,
486
509
  ]:
487
- args = self._get_options_strategy_quote_mapped_args(
510
+ args = self._get_user_account_order_detail_mapped_args(
488
511
  query_params=query_params,
489
512
  path_params=path_params,
490
513
  user_id=user_id,
491
514
  user_secret=user_secret,
492
515
  account_id=account_id,
493
- option_strategy_id=option_strategy_id,
516
+ brokerage_order_id=brokerage_order_id,
494
517
  )
495
- return await self._aget_options_strategy_quote_oapg(
518
+ return await self._aget_user_account_order_detail_oapg(
496
519
  query_params=args.query,
497
520
  path_params=args.path,
498
521
  **kwargs,
@@ -503,23 +526,23 @@ class ApiForget(BaseApi):
503
526
  user_id: typing.Optional[str] = None,
504
527
  user_secret: typing.Optional[str] = None,
505
528
  account_id: typing.Optional[str] = None,
506
- option_strategy_id: typing.Optional[str] = None,
529
+ brokerage_order_id: typing.Optional[str] = None,
507
530
  query_params: typing.Optional[dict] = {},
508
531
  path_params: typing.Optional[dict] = {},
509
532
  ) -> typing.Union[
510
533
  ApiResponseFor200,
511
534
  api_client.ApiResponseWithoutDeserialization,
512
535
  ]:
513
- """ Returns a Strategy Quotes object which has latest market data of the specified option strategy. """
514
- args = self._get_options_strategy_quote_mapped_args(
536
+ """ Returns the detail of a single order in the specified account. This endpoint is always realtime and does not rely on cached data. """
537
+ args = self._get_user_account_order_detail_mapped_args(
515
538
  query_params=query_params,
516
539
  path_params=path_params,
517
540
  user_id=user_id,
518
541
  user_secret=user_secret,
519
542
  account_id=account_id,
520
- option_strategy_id=option_strategy_id,
543
+ brokerage_order_id=brokerage_order_id,
521
544
  )
522
- return self._get_options_strategy_quote_oapg(
545
+ return self._get_user_account_order_detail_oapg(
523
546
  query_params=args.query,
524
547
  path_params=args.path,
525
548
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: snaptrade-python-sdk
3
- Version: 11.0.122
3
+ Version: 11.0.124
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
- [![PyPI](https://img.shields.io/badge/PyPI-v11.0.122-blue)](https://pypi.org/project/snaptrade-python-sdk/11.0.122)
33
+ [![PyPI](https://img.shields.io/badge/PyPI-v11.0.124-blue)](https://pypi.org/project/snaptrade-python-sdk/11.0.124)
34
34
  [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/passiv/snaptrade-sdks/tree/master/sdks/python#readme)
35
35
  [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
36
36
 
@@ -49,6 +49,7 @@ Connect brokerage accounts to your app for live positions and trading
49
49
  * [`snaptrade.account_information.get_all_user_holdings`](#snaptradeaccount_informationget_all_user_holdings)
50
50
  * [`snaptrade.account_information.get_user_account_balance`](#snaptradeaccount_informationget_user_account_balance)
51
51
  * [`snaptrade.account_information.get_user_account_details`](#snaptradeaccount_informationget_user_account_details)
52
+ * [`snaptrade.account_information.get_user_account_order_detail`](#snaptradeaccount_informationget_user_account_order_detail)
52
53
  * [`snaptrade.account_information.get_user_account_orders`](#snaptradeaccount_informationget_user_account_orders)
53
54
  * [`snaptrade.account_information.get_user_account_positions`](#snaptradeaccount_informationget_user_account_positions)
54
55
  * [`snaptrade.account_information.get_user_account_recent_orders`](#snaptradeaccount_informationget_user_account_recent_orders)
@@ -69,11 +70,8 @@ Connect brokerage accounts to your app for live positions and trading
69
70
  * [`snaptrade.connections.remove_brokerage_authorization`](#snaptradeconnectionsremove_brokerage_authorization)
70
71
  * [`snaptrade.connections.return_rates`](#snaptradeconnectionsreturn_rates)
71
72
  * [`snaptrade.connections.session_events`](#snaptradeconnectionssession_events)
72
- * [`snaptrade.options.get_option_strategy`](#snaptradeoptionsget_option_strategy)
73
73
  * [`snaptrade.options.get_options_chain`](#snaptradeoptionsget_options_chain)
74
- * [`snaptrade.options.get_options_strategy_quote`](#snaptradeoptionsget_options_strategy_quote)
75
74
  * [`snaptrade.options.list_option_holdings`](#snaptradeoptionslist_option_holdings)
76
- * [`snaptrade.options.place_option_strategy`](#snaptradeoptionsplace_option_strategy)
77
75
  * [`snaptrade.reference_data.get_currency_exchange_rate_pair`](#snaptradereference_dataget_currency_exchange_rate_pair)
78
76
  * [`snaptrade.reference_data.get_partner_info`](#snaptradereference_dataget_partner_info)
79
77
  * [`snaptrade.reference_data.get_security_types`](#snaptradereference_dataget_security_types)
@@ -111,7 +109,7 @@ Python >=3.8
111
109
  ## Installation<a id="installation"></a>
112
110
 
113
111
  ```sh
114
- pip install snaptrade-python-sdk==11.0.122
112
+ pip install snaptrade-python-sdk==11.0.124
115
113
  ```
116
114
 
117
115
  ## Getting Started<a id="getting-started"></a>
@@ -401,6 +399,46 @@ get_user_account_details_response = (
401
399
 
402
400
  ---
403
401
 
402
+ ### `snaptrade.account_information.get_user_account_order_detail`<a id="snaptradeaccount_informationget_user_account_order_detail"></a>
403
+
404
+ Returns the detail of a single order in the specified account. This endpoint is always realtime and does not rely on cached data.
405
+
406
+
407
+ #### 🛠️ Usage<a id="🛠️-usage"></a>
408
+
409
+ ```python
410
+ get_user_account_order_detail_response = (
411
+ snaptrade.account_information.get_user_account_order_detail(
412
+ user_id="snaptrade-user-123",
413
+ user_secret="adf2aa34-8219-40f7-a6b3-60156985cc61",
414
+ account_id="917c8734-8470-4a3e-a18f-57c3f2ee6631",
415
+ brokerage_order_id="66a033fa-da74-4fcf-b527-feefdec9257e",
416
+ )
417
+ )
418
+ ```
419
+
420
+ #### ⚙️ Parameters<a id="⚙️-parameters"></a>
421
+
422
+ ##### user_id: `str`<a id="user_id-str"></a>
423
+
424
+ ##### user_secret: `str`<a id="user_secret-str"></a>
425
+
426
+ ##### account_id: `str`<a id="account_id-str"></a>
427
+
428
+ ##### brokerage_order_id: `str`<a id="brokerage_order_id-str"></a>
429
+
430
+ #### 🔄 Return<a id="🔄-return"></a>
431
+
432
+ [`AccountOrderRecord`](./snaptrade_client/type/account_order_record.py)
433
+
434
+ #### 🌐 Endpoint<a id="🌐-endpoint"></a>
435
+
436
+ `/accounts/{accountId}/orders/{brokerageOrderId}` `get`
437
+
438
+ [🔙 **Back to Table of Contents**](#table-of-contents)
439
+
440
+ ---
441
+
404
442
  ### `snaptrade.account_information.get_user_account_orders`<a id="snaptradeaccount_informationget_user_account_orders"></a>
405
443
 
406
444
  Returns a list of recent orders in the specified account.
@@ -1143,61 +1181,6 @@ Optional comma separated list of session IDs used to filter the request on speci
1143
1181
 
1144
1182
  ---
1145
1183
 
1146
- ### `snaptrade.options.get_option_strategy`<a id="snaptradeoptionsget_option_strategy"></a>
1147
-
1148
- Creates an option strategy object that will be used to place an option strategy order.
1149
-
1150
-
1151
- #### 🛠️ Usage<a id="🛠️-usage"></a>
1152
-
1153
- ```python
1154
- get_option_strategy_response = snaptrade.options.get_option_strategy(
1155
- underlying_symbol_id="2bcd7cc3-e922-4976-bce1-9858296801c3",
1156
- legs=[
1157
- {
1158
- "action": "BUY_TO_OPEN",
1159
- "option_symbol_id": "SPY220819P00200000",
1160
- "quantity": 1,
1161
- }
1162
- ],
1163
- strategy_type="CUSTOM",
1164
- user_id="snaptrade-user-123",
1165
- user_secret="adf2aa34-8219-40f7-a6b3-60156985cc61",
1166
- account_id="accountId_example",
1167
- )
1168
- ```
1169
-
1170
- #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1171
-
1172
- ##### underlying_symbol_id: `str`<a id="underlying_symbol_id-str"></a>
1173
-
1174
- ##### legs: List[`OptionLeg`]<a id="legs-listoptionleg"></a>
1175
-
1176
- ##### strategy_type: `str`<a id="strategy_type-str"></a>
1177
-
1178
- ##### user_id: `str`<a id="user_id-str"></a>
1179
-
1180
- ##### user_secret: `str`<a id="user_secret-str"></a>
1181
-
1182
- ##### account_id: `str`<a id="account_id-str"></a>
1183
-
1184
- The ID of the account to create the option strategy object in.
1185
-
1186
- #### ⚙️ Request Body<a id="⚙️-request-body"></a>
1187
-
1188
- [`Any`](./snaptrade_client/type/typing_any.py)
1189
- #### 🔄 Return<a id="🔄-return"></a>
1190
-
1191
- [`StrategyQuotes`](./snaptrade_client/type/strategy_quotes.py)
1192
-
1193
- #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1194
-
1195
- `/accounts/{accountId}/optionStrategy` `post`
1196
-
1197
- [🔙 **Back to Table of Contents**](#table-of-contents)
1198
-
1199
- ---
1200
-
1201
1184
  ### `snaptrade.options.get_options_chain`<a id="snaptradeoptionsget_options_chain"></a>
1202
1185
 
1203
1186
  Returns the option chain for the specified symbol in the specified account.
@@ -1239,48 +1222,6 @@ Universal symbol ID if symbol
1239
1222
 
1240
1223
  ---
1241
1224
 
1242
- ### `snaptrade.options.get_options_strategy_quote`<a id="snaptradeoptionsget_options_strategy_quote"></a>
1243
-
1244
- Returns a Strategy Quotes object which has latest market data of the specified option strategy.
1245
-
1246
-
1247
- #### 🛠️ Usage<a id="🛠️-usage"></a>
1248
-
1249
- ```python
1250
- get_options_strategy_quote_response = snaptrade.options.get_options_strategy_quote(
1251
- user_id="snaptrade-user-123",
1252
- user_secret="adf2aa34-8219-40f7-a6b3-60156985cc61",
1253
- account_id="accountId_example",
1254
- option_strategy_id="2bcd7cc3-e922-4976-bce1-9858296801c3",
1255
- )
1256
- ```
1257
-
1258
- #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1259
-
1260
- ##### user_id: `str`<a id="user_id-str"></a>
1261
-
1262
- ##### user_secret: `str`<a id="user_secret-str"></a>
1263
-
1264
- ##### account_id: `str`<a id="account_id-str"></a>
1265
-
1266
- The ID of the account the strategy will be placed in.
1267
-
1268
- ##### option_strategy_id: `str`<a id="option_strategy_id-str"></a>
1269
-
1270
- Option strategy id obtained from response when creating option strategy object
1271
-
1272
- #### 🔄 Return<a id="🔄-return"></a>
1273
-
1274
- [`StrategyQuotes`](./snaptrade_client/type/strategy_quotes.py)
1275
-
1276
- #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1277
-
1278
- `/accounts/{accountId}/optionStrategy/{optionStrategyId}` `get`
1279
-
1280
- [🔙 **Back to Table of Contents**](#table-of-contents)
1281
-
1282
- ---
1283
-
1284
1225
  ### `snaptrade.options.list_option_holdings`<a id="snaptradeoptionslist_option_holdings"></a>
1285
1226
 
1286
1227
  Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions).
@@ -1318,59 +1259,6 @@ list_option_holdings_response = snaptrade.options.list_option_holdings(
1318
1259
 
1319
1260
  ---
1320
1261
 
1321
- ### `snaptrade.options.place_option_strategy`<a id="snaptradeoptionsplace_option_strategy"></a>
1322
-
1323
- Places the option strategy order and returns the order record received from the brokerage.
1324
-
1325
- #### 🛠️ Usage<a id="🛠️-usage"></a>
1326
-
1327
- ```python
1328
- place_option_strategy_response = snaptrade.options.place_option_strategy(
1329
- order_type="Market",
1330
- time_in_force="Day",
1331
- user_id="snaptrade-user-123",
1332
- user_secret="adf2aa34-8219-40f7-a6b3-60156985cc61",
1333
- account_id="2bcd7cc3-e922-4976-bce1-9858296801c3",
1334
- option_strategy_id="2bcd7cc3-e922-4976-bce1-9858296801c3",
1335
- price=31.33,
1336
- )
1337
- ```
1338
-
1339
- #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1340
-
1341
- ##### order_type: [`OrderTypeStrict`](./snaptrade_client/type/order_type_strict.py)<a id="order_type-ordertypestrictsnaptrade_clienttypeorder_type_strictpy"></a>
1342
-
1343
- ##### time_in_force: [`TimeInForceStrict`](./snaptrade_client/type/time_in_force_strict.py)<a id="time_in_force-timeinforcestrictsnaptrade_clienttypetime_in_force_strictpy"></a>
1344
-
1345
- ##### user_id: `str`<a id="user_id-str"></a>
1346
-
1347
- ##### user_secret: `str`<a id="user_secret-str"></a>
1348
-
1349
- ##### account_id: `str`<a id="account_id-str"></a>
1350
-
1351
- The ID of the account to execute the strategy in.
1352
-
1353
- ##### option_strategy_id: `str`<a id="option_strategy_id-str"></a>
1354
-
1355
- Option strategy id obtained from response when creating option strategy object
1356
-
1357
- ##### price: [`Price`](./snaptrade_client/type/price.py)<a id="price-pricesnaptrade_clienttypepricepy"></a>
1358
-
1359
- #### ⚙️ Request Body<a id="⚙️-request-body"></a>
1360
-
1361
- [`Any`](./snaptrade_client/type/typing_any.py)
1362
- #### 🔄 Return<a id="🔄-return"></a>
1363
-
1364
- [`StrategyOrderRecord`](./snaptrade_client/type/strategy_order_record.py)
1365
-
1366
- #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1367
-
1368
- `/accounts/{accountId}/optionStrategy/{optionStrategyId}/execute` `post`
1369
-
1370
- [🔙 **Back to Table of Contents**](#table-of-contents)
1371
-
1372
- ---
1373
-
1374
1262
  ### `snaptrade.reference_data.get_currency_exchange_rate_pair`<a id="snaptradereference_dataget_currency_exchange_rate_pair"></a>
1375
1263
 
1376
1264
  Returns an Exchange Rate Pair object for the specified Currency Pair.