snaptrade-python-sdk 13.1.2__py3-none-any.whl → 13.1.4__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 (31) 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 +6 -0
  4. snaptrade_client/apis/paths/accounts_account_id_orders_brokerage_order_id.py +7 -0
  5. snaptrade_client/apis/paths/accounts_account_id_orders_recent.py +7 -0
  6. snaptrade_client/apis/tags/experimental_endpoints_api_generated.py +4 -0
  7. snaptrade_client/configuration.py +1 -1
  8. snaptrade_client/model/account_order.py +9 -35
  9. snaptrade_client/model/account_order.pyi +9 -26
  10. snaptrade_client/model/account_order_price_effect.py +60 -0
  11. snaptrade_client/model/account_order_price_effect.pyi +51 -0
  12. snaptrade_client/model/account_order_price_effect_nullable.py +75 -0
  13. snaptrade_client/model/account_order_price_effect_nullable.pyi +75 -0
  14. snaptrade_client/model/all_account_orders_response.py +1 -1
  15. snaptrade_client/model/all_account_orders_response.pyi +1 -1
  16. snaptrade_client/models/__init__.py +2 -0
  17. snaptrade_client/operation_parameter_map.py +20 -0
  18. snaptrade_client/paths/__init__.py +2 -0
  19. snaptrade_client/paths/accounts_account_id_orders_brokerage_order_id/__init__.py +7 -0
  20. snaptrade_client/paths/accounts_account_id_orders_brokerage_order_id/get.py +757 -0
  21. snaptrade_client/paths/accounts_account_id_orders_brokerage_order_id/get.pyi +83 -0
  22. snaptrade_client/paths/accounts_account_id_orders_recent/__init__.py +7 -0
  23. snaptrade_client/paths/accounts_account_id_orders_recent/get.py +781 -0
  24. snaptrade_client/paths/accounts_account_id_orders_recent/get.pyi +83 -0
  25. snaptrade_client/type/account_order.py +2 -2
  26. snaptrade_client/type/account_order_price_effect.py +19 -0
  27. snaptrade_client/type/account_order_price_effect_nullable.py +19 -0
  28. {snaptrade_python_sdk-13.1.2.dist-info → snaptrade_python_sdk-13.1.4.dist-info}/METADATA +140 -3
  29. {snaptrade_python_sdk-13.1.2.dist-info → snaptrade_python_sdk-13.1.4.dist-info}/RECORD +31 -17
  30. {snaptrade_python_sdk-13.1.2.dist-info → snaptrade_python_sdk-13.1.4.dist-info}/LICENSE +0 -0
  31. {snaptrade_python_sdk-13.1.2.dist-info → snaptrade_python_sdk-13.1.4.dist-info}/WHEEL +0 -0
@@ -12,7 +12,7 @@
12
12
  Created by: https://snaptrade.com/
13
13
  """
14
14
 
15
- __version__ = "13.1.2"
15
+ __version__ = "13.1.4"
16
16
 
17
17
  # import ApiClient
18
18
  from snaptrade_client.api_client import ApiClient
@@ -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.1.2/python'
1178
+ self.user_agent = 'Konfig/13.1.4/python'
1179
1179
 
1180
1180
  def __enter__(self):
1181
1181
  return self
@@ -52,6 +52,7 @@ from snaptrade_client.apis.paths.snap_trade_stats import SnapTradeStats
52
52
  from snaptrade_client.apis.paths.accounts_account_id_orders_v2 import AccountsAccountIdOrdersV2
53
53
  from snaptrade_client.apis.paths.accounts_account_id_orders_all import AccountsAccountIdOrdersAll
54
54
  from snaptrade_client.apis.paths.accounts_account_id_recent_orders_v2 import AccountsAccountIdRecentOrdersV2
55
+ from snaptrade_client.apis.paths.accounts_account_id_orders_recent import AccountsAccountIdOrdersRecent
55
56
  from snaptrade_client.apis.paths.accounts_account_id_symbols import AccountsAccountIdSymbols
56
57
  from snaptrade_client.apis.paths.brokerages import Brokerages
57
58
  from snaptrade_client.apis.paths.institutions import Institutions
@@ -62,6 +63,7 @@ from snaptrade_client.apis.paths.symbols import Symbols
62
63
  from snaptrade_client.apis.paths.symbols_query import SymbolsQuery
63
64
  from snaptrade_client.apis.paths.accounts_account_id_trading_simple import AccountsAccountIdTradingSimple
64
65
  from snaptrade_client.apis.paths.accounts_account_id_orders_details_v2_brokerage_order_id import AccountsAccountIdOrdersDetailsV2BrokerageOrderId
66
+ from snaptrade_client.apis.paths.accounts_account_id_orders_brokerage_order_id import AccountsAccountIdOrdersBrokerageOrderId
65
67
 
66
68
  PathToApi = typing_extensions.TypedDict(
67
69
  'PathToApi',
@@ -117,6 +119,7 @@ PathToApi = typing_extensions.TypedDict(
117
119
  PathValues.ACCOUNTS_ACCOUNT_ID_ORDERS_V2: AccountsAccountIdOrdersV2,
118
120
  PathValues.ACCOUNTS_ACCOUNT_ID_ORDERS_ALL: AccountsAccountIdOrdersAll,
119
121
  PathValues.ACCOUNTS_ACCOUNT_ID_RECENT_ORDERS_V2: AccountsAccountIdRecentOrdersV2,
122
+ PathValues.ACCOUNTS_ACCOUNT_ID_ORDERS_RECENT: AccountsAccountIdOrdersRecent,
120
123
  PathValues.ACCOUNTS_ACCOUNT_ID_SYMBOLS: AccountsAccountIdSymbols,
121
124
  PathValues.BROKERAGES: Brokerages,
122
125
  PathValues.INSTITUTIONS: Institutions,
@@ -127,6 +130,7 @@ PathToApi = typing_extensions.TypedDict(
127
130
  PathValues.SYMBOLS_QUERY: SymbolsQuery,
128
131
  PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE: AccountsAccountIdTradingSimple,
129
132
  PathValues.ACCOUNTS_ACCOUNT_ID_ORDERS_DETAILS_V2_BROKERAGE_ORDER_ID: AccountsAccountIdOrdersDetailsV2BrokerageOrderId,
133
+ PathValues.ACCOUNTS_ACCOUNT_ID_ORDERS_BROKERAGE_ORDER_ID: AccountsAccountIdOrdersBrokerageOrderId,
130
134
  }
131
135
  )
132
136
 
@@ -183,6 +187,7 @@ path_to_api = PathToApi(
183
187
  PathValues.ACCOUNTS_ACCOUNT_ID_ORDERS_V2: AccountsAccountIdOrdersV2,
184
188
  PathValues.ACCOUNTS_ACCOUNT_ID_ORDERS_ALL: AccountsAccountIdOrdersAll,
185
189
  PathValues.ACCOUNTS_ACCOUNT_ID_RECENT_ORDERS_V2: AccountsAccountIdRecentOrdersV2,
190
+ PathValues.ACCOUNTS_ACCOUNT_ID_ORDERS_RECENT: AccountsAccountIdOrdersRecent,
186
191
  PathValues.ACCOUNTS_ACCOUNT_ID_SYMBOLS: AccountsAccountIdSymbols,
187
192
  PathValues.BROKERAGES: Brokerages,
188
193
  PathValues.INSTITUTIONS: Institutions,
@@ -193,5 +198,6 @@ path_to_api = PathToApi(
193
198
  PathValues.SYMBOLS_QUERY: SymbolsQuery,
194
199
  PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE: AccountsAccountIdTradingSimple,
195
200
  PathValues.ACCOUNTS_ACCOUNT_ID_ORDERS_DETAILS_V2_BROKERAGE_ORDER_ID: AccountsAccountIdOrdersDetailsV2BrokerageOrderId,
201
+ PathValues.ACCOUNTS_ACCOUNT_ID_ORDERS_BROKERAGE_ORDER_ID: AccountsAccountIdOrdersBrokerageOrderId,
196
202
  }
197
203
  )
@@ -0,0 +1,7 @@
1
+ from snaptrade_client.paths.accounts_account_id_orders_brokerage_order_id.get import ApiForget
2
+
3
+
4
+ class AccountsAccountIdOrdersBrokerageOrderId(
5
+ ApiForget,
6
+ ):
7
+ pass
@@ -0,0 +1,7 @@
1
+ from snaptrade_client.paths.accounts_account_id_orders_recent.get import ApiForget
2
+
3
+
4
+ class AccountsAccountIdOrdersRecent(
5
+ ApiForget,
6
+ ):
7
+ pass
@@ -11,7 +11,9 @@
11
11
 
12
12
  from snaptrade_client.paths.snap_trade_trade_detection_subscriptions.post import AddSubscription
13
13
  from snaptrade_client.paths.snap_trade_trade_detection_subscriptions_cancel.post import CancelSubscription
14
+ from snaptrade_client.paths.accounts_account_id_orders_brokerage_order_id.get import GetAccountOrder
14
15
  from snaptrade_client.paths.accounts_account_id_orders_all.get import GetAllAccountOrders
16
+ from snaptrade_client.paths.accounts_account_id_orders_recent.get import GetAllAccountRecentOrders
15
17
  from snaptrade_client.paths.accounts_account_id_orders_details_v2_brokerage_order_id.get import GetUserAccountOrderDetailV2
16
18
  from snaptrade_client.paths.accounts_account_id_orders_v2.get import GetUserAccountOrdersV2
17
19
  from snaptrade_client.paths.accounts_account_id_recent_orders_v2.get import GetUserAccountRecentOrdersV2
@@ -26,7 +28,9 @@ TAuth = typing.TypeVar("TAuth", bound=AuthMode)
26
28
  class ExperimentalEndpointsApiGenerated(
27
29
  AddSubscription[TAuth],
28
30
  CancelSubscription[TAuth],
31
+ GetAccountOrder[TAuth],
29
32
  GetAllAccountOrders[TAuth],
33
+ GetAllAccountRecentOrders[TAuth],
30
34
  GetUserAccountOrderDetailV2[TAuth],
31
35
  GetUserAccountOrdersV2[TAuth],
32
36
  GetUserAccountRecentOrdersV2[TAuth],
@@ -519,7 +519,7 @@ conf = snaptrade_client.Configuration(
519
519
  "OS: {env}\n"\
520
520
  "Python Version: {pyversion}\n"\
521
521
  "Version of the API: 1.0.0\n"\
522
- "SDK Package Version: 13.1.2".\
522
+ "SDK Package Version: 13.1.4".\
523
523
  format(env=sys.platform, pyversion=sys.version)
524
524
 
525
525
  def get_host_settings(self):
@@ -110,37 +110,10 @@ class AccountOrder(
110
110
  @schemas.classproperty
111
111
  def OTHER(cls):
112
112
  return cls("OTHER")
113
-
114
-
115
- class price_effect(
116
- schemas.EnumBase,
117
- schemas.StrSchema
118
- ):
119
-
120
-
121
- class MetaOapg:
122
- enum_value_to_name = {
123
- "CREDIT": "CREDIT",
124
- "DEBIT": "DEBIT",
125
- "EVEN": "EVEN",
126
- "UNKNOWN": "UNKNOWN",
127
- }
128
-
129
- @schemas.classproperty
130
- def CREDIT(cls):
131
- return cls("CREDIT")
132
-
133
- @schemas.classproperty
134
- def DEBIT(cls):
135
- return cls("DEBIT")
136
-
137
- @schemas.classproperty
138
- def EVEN(cls):
139
- return cls("EVEN")
140
-
141
- @schemas.classproperty
142
- def UNKNOWN(cls):
143
- return cls("UNKNOWN")
113
+
114
+ @staticmethod
115
+ def price_effect() -> typing.Type['AccountOrderPriceEffectNullable']:
116
+ return AccountOrderPriceEffectNullable
144
117
 
145
118
 
146
119
  class legs(
@@ -418,7 +391,7 @@ class AccountOrder(
418
391
  additional_properties = schemas.AnyTypeSchema
419
392
 
420
393
  time_in_force: MetaOapg.properties.time_in_force
421
- price_effect: MetaOapg.properties.price_effect
394
+ price_effect: 'AccountOrderPriceEffectNullable'
422
395
  legs: MetaOapg.properties.legs
423
396
  brokerage_order_id: MetaOapg.properties.brokerage_order_id
424
397
  order_type: 'OrderTypeConfiguration'
@@ -428,7 +401,7 @@ class AccountOrder(
428
401
  def __getitem__(self, name: typing_extensions.Literal["time_in_force"]) -> MetaOapg.properties.time_in_force: ...
429
402
 
430
403
  @typing.overload
431
- def __getitem__(self, name: typing_extensions.Literal["price_effect"]) -> MetaOapg.properties.price_effect: ...
404
+ def __getitem__(self, name: typing_extensions.Literal["price_effect"]) -> 'AccountOrderPriceEffectNullable': ...
432
405
 
433
406
  @typing.overload
434
407
  def __getitem__(self, name: typing_extensions.Literal["legs"]) -> MetaOapg.properties.legs: ...
@@ -486,7 +459,7 @@ class AccountOrder(
486
459
  def get_item_oapg(self, name: typing_extensions.Literal["time_in_force"]) -> MetaOapg.properties.time_in_force: ...
487
460
 
488
461
  @typing.overload
489
- def get_item_oapg(self, name: typing_extensions.Literal["price_effect"]) -> MetaOapg.properties.price_effect: ...
462
+ def get_item_oapg(self, name: typing_extensions.Literal["price_effect"]) -> 'AccountOrderPriceEffectNullable': ...
490
463
 
491
464
  @typing.overload
492
465
  def get_item_oapg(self, name: typing_extensions.Literal["legs"]) -> MetaOapg.properties.legs: ...
@@ -543,7 +516,7 @@ class AccountOrder(
543
516
  cls,
544
517
  *args: typing.Union[dict, frozendict.frozendict, ],
545
518
  time_in_force: typing.Union[MetaOapg.properties.time_in_force, str, ],
546
- price_effect: typing.Union[MetaOapg.properties.price_effect, str, ],
519
+ price_effect: 'AccountOrderPriceEffectNullable',
547
520
  legs: typing.Union[MetaOapg.properties.legs, list, tuple, ],
548
521
  brokerage_order_id: typing.Union[MetaOapg.properties.brokerage_order_id, str, ],
549
522
  order_type: 'OrderTypeConfiguration',
@@ -588,6 +561,7 @@ class AccountOrder(
588
561
 
589
562
  from snaptrade_client.model.account_order_group_nullable import AccountOrderGroupNullable
590
563
  from snaptrade_client.model.account_order_leg import AccountOrderLeg
564
+ from snaptrade_client.model.account_order_price_effect_nullable import AccountOrderPriceEffectNullable
591
565
  from snaptrade_client.model.account_order_record_status_v2 import AccountOrderRecordStatusV2
592
566
  from snaptrade_client.model.order_type_configuration import OrderTypeConfiguration
593
567
  from snaptrade_client.model.priced_in_instrument_nullable import PricedInInstrumentNullable
@@ -96,28 +96,10 @@ class AccountOrder(
96
96
  @schemas.classproperty
97
97
  def OTHER(cls):
98
98
  return cls("OTHER")
99
-
100
-
101
- class price_effect(
102
- schemas.EnumBase,
103
- schemas.StrSchema
104
- ):
105
-
106
- @schemas.classproperty
107
- def CREDIT(cls):
108
- return cls("CREDIT")
109
-
110
- @schemas.classproperty
111
- def DEBIT(cls):
112
- return cls("DEBIT")
113
-
114
- @schemas.classproperty
115
- def EVEN(cls):
116
- return cls("EVEN")
117
-
118
- @schemas.classproperty
119
- def UNKNOWN(cls):
120
- return cls("UNKNOWN")
99
+
100
+ @staticmethod
101
+ def price_effect() -> typing.Type['AccountOrderPriceEffectNullable']:
102
+ return AccountOrderPriceEffectNullable
121
103
 
122
104
 
123
105
  class legs(
@@ -394,7 +376,7 @@ class AccountOrder(
394
376
  additional_properties = schemas.AnyTypeSchema
395
377
 
396
378
  time_in_force: MetaOapg.properties.time_in_force
397
- price_effect: MetaOapg.properties.price_effect
379
+ price_effect: 'AccountOrderPriceEffectNullable'
398
380
  legs: MetaOapg.properties.legs
399
381
  brokerage_order_id: MetaOapg.properties.brokerage_order_id
400
382
  order_type: 'OrderTypeConfiguration'
@@ -404,7 +386,7 @@ class AccountOrder(
404
386
  def __getitem__(self, name: typing_extensions.Literal["time_in_force"]) -> MetaOapg.properties.time_in_force: ...
405
387
 
406
388
  @typing.overload
407
- def __getitem__(self, name: typing_extensions.Literal["price_effect"]) -> MetaOapg.properties.price_effect: ...
389
+ def __getitem__(self, name: typing_extensions.Literal["price_effect"]) -> 'AccountOrderPriceEffectNullable': ...
408
390
 
409
391
  @typing.overload
410
392
  def __getitem__(self, name: typing_extensions.Literal["legs"]) -> MetaOapg.properties.legs: ...
@@ -462,7 +444,7 @@ class AccountOrder(
462
444
  def get_item_oapg(self, name: typing_extensions.Literal["time_in_force"]) -> MetaOapg.properties.time_in_force: ...
463
445
 
464
446
  @typing.overload
465
- def get_item_oapg(self, name: typing_extensions.Literal["price_effect"]) -> MetaOapg.properties.price_effect: ...
447
+ def get_item_oapg(self, name: typing_extensions.Literal["price_effect"]) -> 'AccountOrderPriceEffectNullable': ...
466
448
 
467
449
  @typing.overload
468
450
  def get_item_oapg(self, name: typing_extensions.Literal["legs"]) -> MetaOapg.properties.legs: ...
@@ -519,7 +501,7 @@ class AccountOrder(
519
501
  cls,
520
502
  *args: typing.Union[dict, frozendict.frozendict, ],
521
503
  time_in_force: typing.Union[MetaOapg.properties.time_in_force, str, ],
522
- price_effect: typing.Union[MetaOapg.properties.price_effect, str, ],
504
+ price_effect: 'AccountOrderPriceEffectNullable',
523
505
  legs: typing.Union[MetaOapg.properties.legs, list, tuple, ],
524
506
  brokerage_order_id: typing.Union[MetaOapg.properties.brokerage_order_id, str, ],
525
507
  order_type: 'OrderTypeConfiguration',
@@ -564,6 +546,7 @@ class AccountOrder(
564
546
 
565
547
  from snaptrade_client.model.account_order_group_nullable import AccountOrderGroupNullable
566
548
  from snaptrade_client.model.account_order_leg import AccountOrderLeg
549
+ from snaptrade_client.model.account_order_price_effect_nullable import AccountOrderPriceEffectNullable
567
550
  from snaptrade_client.model.account_order_record_status_v2 import AccountOrderRecordStatusV2
568
551
  from snaptrade_client.model.order_type_configuration import OrderTypeConfiguration
569
552
  from snaptrade_client.model.priced_in_instrument_nullable import PricedInInstrumentNullable
@@ -0,0 +1,60 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ SnapTrade
5
+
6
+ Connect brokerage accounts to your app for live positions and trading. ## Rate limiting Two limits apply to requests signed with your `clientId`. The stricter one wins, and exceeding either returns `429 Too Many Requests`. - **Customer-level** — 250 requests/minute by default, scoped to your `clientId` and applied across all endpoints. Reported in `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`. - **Account-level** — 10 requests/minute per account, scoped to (`clientId`, `accountId`). All covered operations for one account draw on the same bucket — reading balances and reading positions share it — and enforcement does not depend on the HTTP method, so updating an account consumes the same bucket as reading it. Only enforced for Personal users, and only for integrations it has been rolled out to — it is not yet in force for every Personal integration. It also does not apply on every operation that documents a 429 below. Where it applies it is reported in `X-RateLimit-Account-Limit`, `X-RateLimit-Account-Remaining` and `X-RateLimit-Account-Reset`. Do not read the absence of those headers as proof the limit is off — some configurations omit the rate limit headers while still enforcing the limit, so header absence tells you nothing about your allowance. On a 429, `X-RateLimit-Remaining: 0` means you hit the customer-level limit and `X-RateLimit-Account-Remaining: 0` means the account-level one. Wait for the corresponding `*-Reset` value (seconds) before retrying, or fall back to exponential backoff with jitter. Not every 429 is explained by those headers. A separate per-authenticated-user limit, reported in no `X-RateLimit-*` header, covers OAuth-authenticated requests and signed requests in configurations where the customer-level limit is not in effect — on the operations that use the default throttles. A few operations override those and are governed by the customer-level limit alone. The two do not stack: a signed request governed by the customer-level limit above is not additionally subject to the per-user one. If a 429 arrives with no header at zero — or with no `X-RateLimit-*` headers at all — honour `Retry-After` and back off. Treat the remaining counts as a hint, not a guarantee that the next request will succeed. Because the customer-level limit applies everywhere, any signed request can return 429. **OAuth-authenticated requests are an exception.** They are not subject to the customer-level limit and do not receive `X-RateLimit-Limit`, `X-RateLimit-Remaining` or `X-RateLimit-Reset` — do not wait on those headers or design around a customer-level allowance on this path. The account-level limit still applies to them on the account-data endpoints above, reported in the `X-RateLimit-Account-*` headers. On operations using the default throttles the per-user limit above applies to them as well, so an OAuth request can be rejected while the account headers still show capacity; on the few operations that override those throttles, OAuth callers have no per-user ceiling at all. Drive retries from `Retry-After` and exponential backoff with jitter rather than from the headers. See https://docs.snaptrade.com/docs/ratelimiting.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Contact: api@snaptrade.com
10
+ Created by: https://snaptrade.com/
11
+ """
12
+
13
+ from datetime import date, datetime # noqa: F401
14
+ import decimal # noqa: F401
15
+ import functools # noqa: F401
16
+ import io # noqa: F401
17
+ import re # noqa: F401
18
+ import typing # noqa: F401
19
+ import typing_extensions # noqa: F401
20
+ import uuid # noqa: F401
21
+
22
+ import frozendict # noqa: F401
23
+
24
+ from snaptrade_client import schemas # noqa: F401
25
+
26
+
27
+ class AccountOrderPriceEffect(
28
+ schemas.EnumBase,
29
+ schemas.StrSchema
30
+ ):
31
+ """
32
+ This class is auto generated by Konfig (https://konfigthis.com)
33
+
34
+ Direction of the net order price when applicable.
35
+ """
36
+
37
+
38
+ class MetaOapg:
39
+ enum_value_to_name = {
40
+ "CREDIT": "CREDIT",
41
+ "DEBIT": "DEBIT",
42
+ "EVEN": "EVEN",
43
+ "UNKNOWN": "UNKNOWN",
44
+ }
45
+
46
+ @schemas.classproperty
47
+ def CREDIT(cls):
48
+ return cls("CREDIT")
49
+
50
+ @schemas.classproperty
51
+ def DEBIT(cls):
52
+ return cls("DEBIT")
53
+
54
+ @schemas.classproperty
55
+ def EVEN(cls):
56
+ return cls("EVEN")
57
+
58
+ @schemas.classproperty
59
+ def UNKNOWN(cls):
60
+ return cls("UNKNOWN")
@@ -0,0 +1,51 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ SnapTrade
5
+
6
+ Connect brokerage accounts to your app for live positions and trading. ## Rate limiting Two limits apply to requests signed with your `clientId`. The stricter one wins, and exceeding either returns `429 Too Many Requests`. - **Customer-level** — 250 requests/minute by default, scoped to your `clientId` and applied across all endpoints. Reported in `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`. - **Account-level** — 10 requests/minute per account, scoped to (`clientId`, `accountId`). All covered operations for one account draw on the same bucket — reading balances and reading positions share it — and enforcement does not depend on the HTTP method, so updating an account consumes the same bucket as reading it. Only enforced for Personal users, and only for integrations it has been rolled out to — it is not yet in force for every Personal integration. It also does not apply on every operation that documents a 429 below. Where it applies it is reported in `X-RateLimit-Account-Limit`, `X-RateLimit-Account-Remaining` and `X-RateLimit-Account-Reset`. Do not read the absence of those headers as proof the limit is off — some configurations omit the rate limit headers while still enforcing the limit, so header absence tells you nothing about your allowance. On a 429, `X-RateLimit-Remaining: 0` means you hit the customer-level limit and `X-RateLimit-Account-Remaining: 0` means the account-level one. Wait for the corresponding `*-Reset` value (seconds) before retrying, or fall back to exponential backoff with jitter. Not every 429 is explained by those headers. A separate per-authenticated-user limit, reported in no `X-RateLimit-*` header, covers OAuth-authenticated requests and signed requests in configurations where the customer-level limit is not in effect — on the operations that use the default throttles. A few operations override those and are governed by the customer-level limit alone. The two do not stack: a signed request governed by the customer-level limit above is not additionally subject to the per-user one. If a 429 arrives with no header at zero — or with no `X-RateLimit-*` headers at all — honour `Retry-After` and back off. Treat the remaining counts as a hint, not a guarantee that the next request will succeed. Because the customer-level limit applies everywhere, any signed request can return 429. **OAuth-authenticated requests are an exception.** They are not subject to the customer-level limit and do not receive `X-RateLimit-Limit`, `X-RateLimit-Remaining` or `X-RateLimit-Reset` — do not wait on those headers or design around a customer-level allowance on this path. The account-level limit still applies to them on the account-data endpoints above, reported in the `X-RateLimit-Account-*` headers. On operations using the default throttles the per-user limit above applies to them as well, so an OAuth request can be rejected while the account headers still show capacity; on the few operations that override those throttles, OAuth callers have no per-user ceiling at all. Drive retries from `Retry-After` and exponential backoff with jitter rather than from the headers. See https://docs.snaptrade.com/docs/ratelimiting.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Contact: api@snaptrade.com
10
+ Created by: https://snaptrade.com/
11
+ """
12
+
13
+ from datetime import date, datetime # noqa: F401
14
+ import decimal # noqa: F401
15
+ import functools # noqa: F401
16
+ import io # noqa: F401
17
+ import re # noqa: F401
18
+ import typing # noqa: F401
19
+ import typing_extensions # noqa: F401
20
+ import uuid # noqa: F401
21
+
22
+ import frozendict # noqa: F401
23
+
24
+ from snaptrade_client import schemas # noqa: F401
25
+
26
+
27
+ class AccountOrderPriceEffect(
28
+ schemas.EnumBase,
29
+ schemas.StrSchema
30
+ ):
31
+ """
32
+ This class is auto generated by Konfig (https://konfigthis.com)
33
+
34
+ Direction of the net order price when applicable.
35
+ """
36
+
37
+ @schemas.classproperty
38
+ def CREDIT(cls):
39
+ return cls("CREDIT")
40
+
41
+ @schemas.classproperty
42
+ def DEBIT(cls):
43
+ return cls("DEBIT")
44
+
45
+ @schemas.classproperty
46
+ def EVEN(cls):
47
+ return cls("EVEN")
48
+
49
+ @schemas.classproperty
50
+ def UNKNOWN(cls):
51
+ return cls("UNKNOWN")
@@ -0,0 +1,75 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ SnapTrade
5
+
6
+ Connect brokerage accounts to your app for live positions and trading. ## Rate limiting Two limits apply to requests signed with your `clientId`. The stricter one wins, and exceeding either returns `429 Too Many Requests`. - **Customer-level** — 250 requests/minute by default, scoped to your `clientId` and applied across all endpoints. Reported in `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`. - **Account-level** — 10 requests/minute per account, scoped to (`clientId`, `accountId`). All covered operations for one account draw on the same bucket — reading balances and reading positions share it — and enforcement does not depend on the HTTP method, so updating an account consumes the same bucket as reading it. Only enforced for Personal users, and only for integrations it has been rolled out to — it is not yet in force for every Personal integration. It also does not apply on every operation that documents a 429 below. Where it applies it is reported in `X-RateLimit-Account-Limit`, `X-RateLimit-Account-Remaining` and `X-RateLimit-Account-Reset`. Do not read the absence of those headers as proof the limit is off — some configurations omit the rate limit headers while still enforcing the limit, so header absence tells you nothing about your allowance. On a 429, `X-RateLimit-Remaining: 0` means you hit the customer-level limit and `X-RateLimit-Account-Remaining: 0` means the account-level one. Wait for the corresponding `*-Reset` value (seconds) before retrying, or fall back to exponential backoff with jitter. Not every 429 is explained by those headers. A separate per-authenticated-user limit, reported in no `X-RateLimit-*` header, covers OAuth-authenticated requests and signed requests in configurations where the customer-level limit is not in effect — on the operations that use the default throttles. A few operations override those and are governed by the customer-level limit alone. The two do not stack: a signed request governed by the customer-level limit above is not additionally subject to the per-user one. If a 429 arrives with no header at zero — or with no `X-RateLimit-*` headers at all — honour `Retry-After` and back off. Treat the remaining counts as a hint, not a guarantee that the next request will succeed. Because the customer-level limit applies everywhere, any signed request can return 429. **OAuth-authenticated requests are an exception.** They are not subject to the customer-level limit and do not receive `X-RateLimit-Limit`, `X-RateLimit-Remaining` or `X-RateLimit-Reset` — do not wait on those headers or design around a customer-level allowance on this path. The account-level limit still applies to them on the account-data endpoints above, reported in the `X-RateLimit-Account-*` headers. On operations using the default throttles the per-user limit above applies to them as well, so an OAuth request can be rejected while the account headers still show capacity; on the few operations that override those throttles, OAuth callers have no per-user ceiling at all. Drive retries from `Retry-After` and exponential backoff with jitter rather than from the headers. See https://docs.snaptrade.com/docs/ratelimiting.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Contact: api@snaptrade.com
10
+ Created by: https://snaptrade.com/
11
+ """
12
+
13
+ from datetime import date, datetime # noqa: F401
14
+ import decimal # noqa: F401
15
+ import functools # noqa: F401
16
+ import io # noqa: F401
17
+ import re # noqa: F401
18
+ import typing # noqa: F401
19
+ import typing_extensions # noqa: F401
20
+ import uuid # noqa: F401
21
+
22
+ import frozendict # noqa: F401
23
+
24
+ from snaptrade_client import schemas # noqa: F401
25
+
26
+
27
+ class AccountOrderPriceEffectNullable(
28
+ schemas.EnumBase,
29
+ schemas.StrBase,
30
+ schemas.NoneBase,
31
+ schemas.Schema,
32
+ schemas.NoneStrMixin
33
+ ):
34
+ """
35
+ This class is auto generated by Konfig (https://konfigthis.com)
36
+
37
+ Direction of the net order price when applicable.
38
+ """
39
+
40
+
41
+ class MetaOapg:
42
+ enum_value_to_name = {
43
+ "CREDIT": "CREDIT",
44
+ "DEBIT": "DEBIT",
45
+ "EVEN": "EVEN",
46
+ "UNKNOWN": "UNKNOWN",
47
+ }
48
+
49
+ @schemas.classproperty
50
+ def CREDIT(cls):
51
+ return cls("CREDIT")
52
+
53
+ @schemas.classproperty
54
+ def DEBIT(cls):
55
+ return cls("DEBIT")
56
+
57
+ @schemas.classproperty
58
+ def EVEN(cls):
59
+ return cls("EVEN")
60
+
61
+ @schemas.classproperty
62
+ def UNKNOWN(cls):
63
+ return cls("UNKNOWN")
64
+
65
+
66
+ def __new__(
67
+ cls,
68
+ *args: typing.Union[None, str, ],
69
+ _configuration: typing.Optional[schemas.Configuration] = None,
70
+ ) -> 'AccountOrderPriceEffectNullable':
71
+ return super().__new__(
72
+ cls,
73
+ *args,
74
+ _configuration=_configuration,
75
+ )
@@ -0,0 +1,75 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ SnapTrade
5
+
6
+ Connect brokerage accounts to your app for live positions and trading. ## Rate limiting Two limits apply to requests signed with your `clientId`. The stricter one wins, and exceeding either returns `429 Too Many Requests`. - **Customer-level** — 250 requests/minute by default, scoped to your `clientId` and applied across all endpoints. Reported in `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`. - **Account-level** — 10 requests/minute per account, scoped to (`clientId`, `accountId`). All covered operations for one account draw on the same bucket — reading balances and reading positions share it — and enforcement does not depend on the HTTP method, so updating an account consumes the same bucket as reading it. Only enforced for Personal users, and only for integrations it has been rolled out to — it is not yet in force for every Personal integration. It also does not apply on every operation that documents a 429 below. Where it applies it is reported in `X-RateLimit-Account-Limit`, `X-RateLimit-Account-Remaining` and `X-RateLimit-Account-Reset`. Do not read the absence of those headers as proof the limit is off — some configurations omit the rate limit headers while still enforcing the limit, so header absence tells you nothing about your allowance. On a 429, `X-RateLimit-Remaining: 0` means you hit the customer-level limit and `X-RateLimit-Account-Remaining: 0` means the account-level one. Wait for the corresponding `*-Reset` value (seconds) before retrying, or fall back to exponential backoff with jitter. Not every 429 is explained by those headers. A separate per-authenticated-user limit, reported in no `X-RateLimit-*` header, covers OAuth-authenticated requests and signed requests in configurations where the customer-level limit is not in effect — on the operations that use the default throttles. A few operations override those and are governed by the customer-level limit alone. The two do not stack: a signed request governed by the customer-level limit above is not additionally subject to the per-user one. If a 429 arrives with no header at zero — or with no `X-RateLimit-*` headers at all — honour `Retry-After` and back off. Treat the remaining counts as a hint, not a guarantee that the next request will succeed. Because the customer-level limit applies everywhere, any signed request can return 429. **OAuth-authenticated requests are an exception.** They are not subject to the customer-level limit and do not receive `X-RateLimit-Limit`, `X-RateLimit-Remaining` or `X-RateLimit-Reset` — do not wait on those headers or design around a customer-level allowance on this path. The account-level limit still applies to them on the account-data endpoints above, reported in the `X-RateLimit-Account-*` headers. On operations using the default throttles the per-user limit above applies to them as well, so an OAuth request can be rejected while the account headers still show capacity; on the few operations that override those throttles, OAuth callers have no per-user ceiling at all. Drive retries from `Retry-After` and exponential backoff with jitter rather than from the headers. See https://docs.snaptrade.com/docs/ratelimiting.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Contact: api@snaptrade.com
10
+ Created by: https://snaptrade.com/
11
+ """
12
+
13
+ from datetime import date, datetime # noqa: F401
14
+ import decimal # noqa: F401
15
+ import functools # noqa: F401
16
+ import io # noqa: F401
17
+ import re # noqa: F401
18
+ import typing # noqa: F401
19
+ import typing_extensions # noqa: F401
20
+ import uuid # noqa: F401
21
+
22
+ import frozendict # noqa: F401
23
+
24
+ from snaptrade_client import schemas # noqa: F401
25
+
26
+
27
+ class AccountOrderPriceEffectNullable(
28
+ schemas.EnumBase,
29
+ schemas.StrBase,
30
+ schemas.NoneBase,
31
+ schemas.Schema,
32
+ schemas.NoneStrMixin
33
+ ):
34
+ """
35
+ This class is auto generated by Konfig (https://konfigthis.com)
36
+
37
+ Direction of the net order price when applicable.
38
+ """
39
+
40
+
41
+ class MetaOapg:
42
+ enum_value_to_name = {
43
+ "CREDIT": "CREDIT",
44
+ "DEBIT": "DEBIT",
45
+ "EVEN": "EVEN",
46
+ "UNKNOWN": "UNKNOWN",
47
+ }
48
+
49
+ @schemas.classproperty
50
+ def CREDIT(cls):
51
+ return cls("CREDIT")
52
+
53
+ @schemas.classproperty
54
+ def DEBIT(cls):
55
+ return cls("DEBIT")
56
+
57
+ @schemas.classproperty
58
+ def EVEN(cls):
59
+ return cls("EVEN")
60
+
61
+ @schemas.classproperty
62
+ def UNKNOWN(cls):
63
+ return cls("UNKNOWN")
64
+
65
+
66
+ def __new__(
67
+ cls,
68
+ *args: typing.Union[None, str, ],
69
+ _configuration: typing.Optional[schemas.Configuration] = None,
70
+ ) -> 'AccountOrderPriceEffectNullable':
71
+ return super().__new__(
72
+ cls,
73
+ *args,
74
+ _configuration=_configuration,
75
+ )
@@ -30,7 +30,7 @@ class AllAccountOrdersResponse(
30
30
  """
31
31
  This class is auto generated by Konfig (https://konfigthis.com)
32
32
 
33
- Orders in the `kind`-discriminated format returned by `/accounts/{accountId}/orders/all`.
33
+ A list of account orders together with the freshness of the returned data.
34
34
  """
35
35
 
36
36
 
@@ -30,7 +30,7 @@ class AllAccountOrdersResponse(
30
30
  """
31
31
  This class is auto generated by Konfig (https://konfigthis.com)
32
32
 
33
- Orders in the `kind`-discriminated format returned by `/accounts/{accountId}/orders/all`.
33
+ A list of account orders together with the freshness of the returned data.
34
34
  """
35
35
 
36
36
 
@@ -28,6 +28,8 @@ from snaptrade_client.model.account_order import AccountOrder
28
28
  from snaptrade_client.model.account_order_group import AccountOrderGroup
29
29
  from snaptrade_client.model.account_order_group_nullable import AccountOrderGroupNullable
30
30
  from snaptrade_client.model.account_order_leg import AccountOrderLeg
31
+ from snaptrade_client.model.account_order_price_effect import AccountOrderPriceEffect
32
+ from snaptrade_client.model.account_order_price_effect_nullable import AccountOrderPriceEffectNullable
31
33
  from snaptrade_client.model.account_order_record import AccountOrderRecord
32
34
  from snaptrade_client.model.account_order_record_leg import AccountOrderRecordLeg
33
35
  from snaptrade_client.model.account_order_record_leg_instrument import AccountOrderRecordLegInstrument
@@ -268,6 +268,16 @@ operation_parameter_map = {
268
268
  },
269
269
  ]
270
270
  },
271
+ '/accounts/{accountId}/orders/{brokerageOrderId}-GET': {
272
+ 'parameters': [
273
+ {
274
+ 'name': 'accountId'
275
+ },
276
+ {
277
+ 'name': 'brokerageOrderId'
278
+ },
279
+ ]
280
+ },
271
281
  '/accounts/{accountId}/orders/all-GET': {
272
282
  'parameters': [
273
283
  {
@@ -281,6 +291,16 @@ operation_parameter_map = {
281
291
  },
282
292
  ]
283
293
  },
294
+ '/accounts/{accountId}/orders/recent-GET': {
295
+ 'parameters': [
296
+ {
297
+ 'name': 'accountId'
298
+ },
299
+ {
300
+ 'name': 'only_executed'
301
+ },
302
+ ]
303
+ },
284
304
  '/accounts/{accountId}/orders/details/v2/{brokerageOrderId}-GET': {
285
305
  'parameters': [
286
306
  {
@@ -57,6 +57,7 @@ class PathValues(str, enum.Enum):
57
57
  ACCOUNTS_ACCOUNT_ID_ORDERS_V2 = "/accounts/{accountId}/orders/v2"
58
58
  ACCOUNTS_ACCOUNT_ID_ORDERS_ALL = "/accounts/{accountId}/orders/all"
59
59
  ACCOUNTS_ACCOUNT_ID_RECENT_ORDERS_V2 = "/accounts/{accountId}/recentOrders/v2"
60
+ ACCOUNTS_ACCOUNT_ID_ORDERS_RECENT = "/accounts/{accountId}/orders/recent"
60
61
  ACCOUNTS_ACCOUNT_ID_SYMBOLS = "/accounts/{accountId}/symbols"
61
62
  BROKERAGES = "/brokerages"
62
63
  INSTITUTIONS = "/institutions"
@@ -67,3 +68,4 @@ class PathValues(str, enum.Enum):
67
68
  SYMBOLS_QUERY = "/symbols/{query}"
68
69
  ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE = "/accounts/{accountId}/trading/simple"
69
70
  ACCOUNTS_ACCOUNT_ID_ORDERS_DETAILS_V2_BROKERAGE_ORDER_ID = "/accounts/{accountId}/orders/details/v2/{brokerageOrderId}"
71
+ ACCOUNTS_ACCOUNT_ID_ORDERS_BROKERAGE_ORDER_ID = "/accounts/{accountId}/orders/{brokerageOrderId}"
@@ -0,0 +1,7 @@
1
+ # do not import all endpoints into this module because that uses a lot of memory and stack frames
2
+ # if you need the ability to import all endpoints from this module, import them with
3
+ # from snaptrade_client.paths.accounts_account_id_orders_brokerage_order_id import Api
4
+
5
+ from snaptrade_client.paths import PathValues
6
+
7
+ path = PathValues.ACCOUNTS_ACCOUNT_ID_ORDERS_BROKERAGE_ORDER_ID