snaptrade-python-sdk 13.4.0__py3-none-any.whl → 13.4.2__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 -0
  4. snaptrade_client/apis/paths/accounts_account_id_transactions.py +7 -0
  5. snaptrade_client/apis/tags/account_information_api_generated.py +2 -0
  6. snaptrade_client/configuration.py +1 -1
  7. snaptrade_client/model/account_transactions_response.py +126 -0
  8. snaptrade_client/model/account_transactions_response.pyi +126 -0
  9. snaptrade_client/model/activity.py +277 -0
  10. snaptrade_client/model/activity.pyi +277 -0
  11. snaptrade_client/model/instrument_nullable.py +129 -0
  12. snaptrade_client/model/instrument_nullable.pyi +129 -0
  13. snaptrade_client/models/__init__.py +3 -0
  14. snaptrade_client/operation_parameter_map.py +22 -0
  15. snaptrade_client/paths/__init__.py +1 -0
  16. snaptrade_client/paths/accounts_account_id_orders_recent/get.py +2 -2
  17. snaptrade_client/paths/accounts_account_id_recent_orders_v2/get.py +2 -2
  18. snaptrade_client/paths/accounts_account_id_transactions/__init__.py +7 -0
  19. snaptrade_client/paths/accounts_account_id_transactions/get.py +820 -0
  20. snaptrade_client/paths/accounts_account_id_transactions/get.pyi +99 -0
  21. snaptrade_client/type/account_transactions_response.py +31 -0
  22. snaptrade_client/type/activity.py +57 -0
  23. snaptrade_client/type/instrument_nullable.py +33 -0
  24. {snaptrade_python_sdk-13.4.0.dist-info → snaptrade_python_sdk-13.4.2.dist-info}/METADATA +90 -6
  25. {snaptrade_python_sdk-13.4.0.dist-info → snaptrade_python_sdk-13.4.2.dist-info}/RECORD +27 -14
  26. {snaptrade_python_sdk-13.4.0.dist-info → snaptrade_python_sdk-13.4.2.dist-info}/LICENSE +0 -0
  27. {snaptrade_python_sdk-13.4.0.dist-info → snaptrade_python_sdk-13.4.2.dist-info}/WHEEL +0 -0
@@ -12,7 +12,7 @@
12
12
  Created by: https://snaptrade.com/
13
13
  """
14
14
 
15
- __version__ = "13.4.0"
15
+ __version__ = "13.4.2"
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.4.0/python'
1178
+ self.user_agent = 'Konfig/13.4.2/python'
1179
1179
 
1180
1180
  def __enter__(self):
1181
1181
  return self
@@ -31,6 +31,7 @@ from snaptrade_client.apis.paths.accounts_account_id_recent_orders import Accoun
31
31
  from snaptrade_client.apis.paths.accounts_account_id_orders_recent import AccountsAccountIdOrdersRecent
32
32
  from snaptrade_client.apis.paths.accounts_account_id_return_rates import AccountsAccountIdReturnRates
33
33
  from snaptrade_client.apis.paths.accounts_account_id_activities import AccountsAccountIdActivities
34
+ from snaptrade_client.apis.paths.accounts_account_id_transactions import AccountsAccountIdTransactions
34
35
  from snaptrade_client.apis.paths.accounts_account_id_orders_details import AccountsAccountIdOrdersDetails
35
36
  from snaptrade_client.apis.paths.accounts_account_id_orders_brokerage_order_id import AccountsAccountIdOrdersBrokerageOrderId
36
37
  from snaptrade_client.apis.paths.accounts_account_id_quotes import AccountsAccountIdQuotes
@@ -98,6 +99,7 @@ PathToApi = typing_extensions.TypedDict(
98
99
  PathValues.ACCOUNTS_ACCOUNT_ID_ORDERS_RECENT: AccountsAccountIdOrdersRecent,
99
100
  PathValues.ACCOUNTS_ACCOUNT_ID_RETURN_RATES: AccountsAccountIdReturnRates,
100
101
  PathValues.ACCOUNTS_ACCOUNT_ID_ACTIVITIES: AccountsAccountIdActivities,
102
+ PathValues.ACCOUNTS_ACCOUNT_ID_TRANSACTIONS: AccountsAccountIdTransactions,
101
103
  PathValues.ACCOUNTS_ACCOUNT_ID_ORDERS_DETAILS: AccountsAccountIdOrdersDetails,
102
104
  PathValues.ACCOUNTS_ACCOUNT_ID_ORDERS_BROKERAGE_ORDER_ID: AccountsAccountIdOrdersBrokerageOrderId,
103
105
  PathValues.ACCOUNTS_ACCOUNT_ID_QUOTES: AccountsAccountIdQuotes,
@@ -166,6 +168,7 @@ path_to_api = PathToApi(
166
168
  PathValues.ACCOUNTS_ACCOUNT_ID_ORDERS_RECENT: AccountsAccountIdOrdersRecent,
167
169
  PathValues.ACCOUNTS_ACCOUNT_ID_RETURN_RATES: AccountsAccountIdReturnRates,
168
170
  PathValues.ACCOUNTS_ACCOUNT_ID_ACTIVITIES: AccountsAccountIdActivities,
171
+ PathValues.ACCOUNTS_ACCOUNT_ID_TRANSACTIONS: AccountsAccountIdTransactions,
169
172
  PathValues.ACCOUNTS_ACCOUNT_ID_ORDERS_DETAILS: AccountsAccountIdOrdersDetails,
170
173
  PathValues.ACCOUNTS_ACCOUNT_ID_ORDERS_BROKERAGE_ORDER_ID: AccountsAccountIdOrdersBrokerageOrderId,
171
174
  PathValues.ACCOUNTS_ACCOUNT_ID_QUOTES: AccountsAccountIdQuotes,
@@ -0,0 +1,7 @@
1
+ from snaptrade_client.paths.accounts_account_id_transactions.get import ApiForget
2
+
3
+
4
+ class AccountsAccountIdTransactions(
5
+ ApiForget,
6
+ ):
7
+ pass
@@ -14,6 +14,7 @@ from snaptrade_client.paths.accounts_account_id_balance_history.get import GetAc
14
14
  from snaptrade_client.paths.accounts_account_id_balances_v2.get import GetAccountBalancesV2
15
15
  from snaptrade_client.paths.accounts_account_id_details.get import GetAccountDetails
16
16
  from snaptrade_client.paths.accounts_account_id_orders_brokerage_order_id.get import GetAccountOrder
17
+ from snaptrade_client.paths.accounts_account_id_transactions.get import GetAccountTransactions
17
18
  from snaptrade_client.paths.accounts_account_id_orders_all.get import GetAllAccountOrders
18
19
  from snaptrade_client.paths.accounts_account_id_positions_all.get import GetAllAccountPositions
19
20
  from snaptrade_client.paths.accounts_account_id_orders_recent.get import GetAllAccountRecentOrders
@@ -39,6 +40,7 @@ class AccountInformationApiGenerated(
39
40
  GetAccountBalancesV2[TAuth],
40
41
  GetAccountDetails[TAuth],
41
42
  GetAccountOrder[TAuth],
43
+ GetAccountTransactions[TAuth],
42
44
  GetAllAccountOrders[TAuth],
43
45
  GetAllAccountPositions[TAuth],
44
46
  GetAllAccountRecentOrders[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.0".\
540
+ "SDK Package Version: 13.4.2".\
541
541
  format(env=sys.platform, pyversion=sys.version)
542
542
 
543
543
  def get_host_settings(self):
@@ -0,0 +1,126 @@
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 AccountTransactionsResponse(
28
+ schemas.DictSchema
29
+ ):
30
+ """
31
+ This class is auto generated by Konfig (https://konfigthis.com)
32
+
33
+ A page of account transactions.
34
+ """
35
+
36
+
37
+ class MetaOapg:
38
+ required = {
39
+ "pagination",
40
+ "data",
41
+ }
42
+
43
+ class properties:
44
+
45
+
46
+ class data(
47
+ schemas.ListSchema
48
+ ):
49
+
50
+
51
+ class MetaOapg:
52
+
53
+ @staticmethod
54
+ def items() -> typing.Type['Activity']:
55
+ return Activity
56
+
57
+ def __new__(
58
+ cls,
59
+ arg: typing.Union[typing.Tuple['Activity'], typing.List['Activity']],
60
+ _configuration: typing.Optional[schemas.Configuration] = None,
61
+ ) -> 'data':
62
+ return super().__new__(
63
+ cls,
64
+ arg,
65
+ _configuration=_configuration,
66
+ )
67
+
68
+ def __getitem__(self, i: int) -> 'Activity':
69
+ return super().__getitem__(i)
70
+
71
+ @staticmethod
72
+ def pagination() -> typing.Type['PaginationDetails']:
73
+ return PaginationDetails
74
+ __annotations__ = {
75
+ "data": data,
76
+ "pagination": pagination,
77
+ }
78
+ additional_properties = schemas.AnyTypeSchema
79
+
80
+ pagination: 'PaginationDetails'
81
+ data: MetaOapg.properties.data
82
+
83
+ @typing.overload
84
+ def __getitem__(self, name: typing_extensions.Literal["pagination"]) -> 'PaginationDetails': ...
85
+
86
+ @typing.overload
87
+ def __getitem__(self, name: typing_extensions.Literal["data"]) -> MetaOapg.properties.data: ...
88
+
89
+ @typing.overload
90
+ def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
91
+
92
+ def __getitem__(self, name: typing.Union[typing_extensions.Literal["pagination"], typing_extensions.Literal["data"], str, ]):
93
+ # dict_instance[name] accessor
94
+ return super().__getitem__(name)
95
+
96
+ @typing.overload
97
+ def get_item_oapg(self, name: typing_extensions.Literal["pagination"]) -> 'PaginationDetails': ...
98
+
99
+ @typing.overload
100
+ def get_item_oapg(self, name: typing_extensions.Literal["data"]) -> MetaOapg.properties.data: ...
101
+
102
+ @typing.overload
103
+ def get_item_oapg(self, name: str) -> typing.Union[MetaOapg.additional_properties, schemas.Unset]: ...
104
+
105
+ def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pagination"], typing_extensions.Literal["data"], str, ]):
106
+ return super().get_item_oapg(name)
107
+
108
+ def __new__(
109
+ cls,
110
+ *args: typing.Union[dict, frozendict.frozendict, ],
111
+ pagination: 'PaginationDetails',
112
+ data: typing.Union[MetaOapg.properties.data, list, tuple, ],
113
+ _configuration: typing.Optional[schemas.Configuration] = None,
114
+ **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, ],
115
+ ) -> 'AccountTransactionsResponse':
116
+ return super().__new__(
117
+ cls,
118
+ *args,
119
+ pagination=pagination,
120
+ data=data,
121
+ _configuration=_configuration,
122
+ **kwargs,
123
+ )
124
+
125
+ from snaptrade_client.model.activity import Activity
126
+ from snaptrade_client.model.pagination_details import PaginationDetails
@@ -0,0 +1,126 @@
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 AccountTransactionsResponse(
28
+ schemas.DictSchema
29
+ ):
30
+ """
31
+ This class is auto generated by Konfig (https://konfigthis.com)
32
+
33
+ A page of account transactions.
34
+ """
35
+
36
+
37
+ class MetaOapg:
38
+ required = {
39
+ "pagination",
40
+ "data",
41
+ }
42
+
43
+ class properties:
44
+
45
+
46
+ class data(
47
+ schemas.ListSchema
48
+ ):
49
+
50
+
51
+ class MetaOapg:
52
+
53
+ @staticmethod
54
+ def items() -> typing.Type['Activity']:
55
+ return Activity
56
+
57
+ def __new__(
58
+ cls,
59
+ arg: typing.Union[typing.Tuple['Activity'], typing.List['Activity']],
60
+ _configuration: typing.Optional[schemas.Configuration] = None,
61
+ ) -> 'data':
62
+ return super().__new__(
63
+ cls,
64
+ arg,
65
+ _configuration=_configuration,
66
+ )
67
+
68
+ def __getitem__(self, i: int) -> 'Activity':
69
+ return super().__getitem__(i)
70
+
71
+ @staticmethod
72
+ def pagination() -> typing.Type['PaginationDetails']:
73
+ return PaginationDetails
74
+ __annotations__ = {
75
+ "data": data,
76
+ "pagination": pagination,
77
+ }
78
+ additional_properties = schemas.AnyTypeSchema
79
+
80
+ pagination: 'PaginationDetails'
81
+ data: MetaOapg.properties.data
82
+
83
+ @typing.overload
84
+ def __getitem__(self, name: typing_extensions.Literal["pagination"]) -> 'PaginationDetails': ...
85
+
86
+ @typing.overload
87
+ def __getitem__(self, name: typing_extensions.Literal["data"]) -> MetaOapg.properties.data: ...
88
+
89
+ @typing.overload
90
+ def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
91
+
92
+ def __getitem__(self, name: typing.Union[typing_extensions.Literal["pagination"], typing_extensions.Literal["data"], str, ]):
93
+ # dict_instance[name] accessor
94
+ return super().__getitem__(name)
95
+
96
+ @typing.overload
97
+ def get_item_oapg(self, name: typing_extensions.Literal["pagination"]) -> 'PaginationDetails': ...
98
+
99
+ @typing.overload
100
+ def get_item_oapg(self, name: typing_extensions.Literal["data"]) -> MetaOapg.properties.data: ...
101
+
102
+ @typing.overload
103
+ def get_item_oapg(self, name: str) -> typing.Union[MetaOapg.additional_properties, schemas.Unset]: ...
104
+
105
+ def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pagination"], typing_extensions.Literal["data"], str, ]):
106
+ return super().get_item_oapg(name)
107
+
108
+ def __new__(
109
+ cls,
110
+ *args: typing.Union[dict, frozendict.frozendict, ],
111
+ pagination: 'PaginationDetails',
112
+ data: typing.Union[MetaOapg.properties.data, list, tuple, ],
113
+ _configuration: typing.Optional[schemas.Configuration] = None,
114
+ **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, ],
115
+ ) -> 'AccountTransactionsResponse':
116
+ return super().__new__(
117
+ cls,
118
+ *args,
119
+ pagination=pagination,
120
+ data=data,
121
+ _configuration=_configuration,
122
+ **kwargs,
123
+ )
124
+
125
+ from snaptrade_client.model.activity import Activity
126
+ from snaptrade_client.model.pagination_details import PaginationDetails
@@ -0,0 +1,277 @@
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 Activity(
28
+ schemas.DictSchema
29
+ ):
30
+ """
31
+ This class is auto generated by Konfig (https://konfigthis.com)
32
+
33
+ A recorded transaction in a brokerage account.
34
+ """
35
+
36
+
37
+ class MetaOapg:
38
+ required = {
39
+ "date",
40
+ "transaction_id",
41
+ "amount",
42
+ "price",
43
+ "fee",
44
+ "description",
45
+ "instrument",
46
+ "priced_in",
47
+ "units",
48
+ "fx_rate",
49
+ "type",
50
+ }
51
+
52
+ class properties:
53
+
54
+
55
+ class transaction_id(
56
+ schemas.StrBase,
57
+ schemas.NoneBase,
58
+ schemas.Schema,
59
+ schemas.NoneStrMixin
60
+ ):
61
+
62
+
63
+ def __new__(
64
+ cls,
65
+ *args: typing.Union[None, str, ],
66
+ _configuration: typing.Optional[schemas.Configuration] = None,
67
+ ) -> 'transaction_id':
68
+ return super().__new__(
69
+ cls,
70
+ *args,
71
+ _configuration=_configuration,
72
+ )
73
+ type = schemas.StrSchema
74
+ date = schemas.DateTimeSchema
75
+ description = schemas.StrSchema
76
+
77
+ @staticmethod
78
+ def instrument() -> typing.Type['InstrumentNullable']:
79
+ return InstrumentNullable
80
+
81
+ @staticmethod
82
+ def priced_in() -> typing.Type['PricedInInstrumentNullable']:
83
+ return PricedInInstrumentNullable
84
+ amount = schemas.StrSchema
85
+
86
+
87
+ class price(
88
+ schemas.StrBase,
89
+ schemas.NoneBase,
90
+ schemas.Schema,
91
+ schemas.NoneStrMixin
92
+ ):
93
+
94
+
95
+ class MetaOapg:
96
+ format = 'decimal'
97
+
98
+
99
+ def __new__(
100
+ cls,
101
+ *args: typing.Union[None, str, ],
102
+ _configuration: typing.Optional[schemas.Configuration] = None,
103
+ ) -> 'price':
104
+ return super().__new__(
105
+ cls,
106
+ *args,
107
+ _configuration=_configuration,
108
+ )
109
+ units = schemas.StrSchema
110
+ fee = schemas.StrSchema
111
+
112
+
113
+ class fx_rate(
114
+ schemas.StrBase,
115
+ schemas.NoneBase,
116
+ schemas.Schema,
117
+ schemas.NoneStrMixin
118
+ ):
119
+
120
+
121
+ class MetaOapg:
122
+ format = 'decimal'
123
+
124
+
125
+ def __new__(
126
+ cls,
127
+ *args: typing.Union[None, str, ],
128
+ _configuration: typing.Optional[schemas.Configuration] = None,
129
+ ) -> 'fx_rate':
130
+ return super().__new__(
131
+ cls,
132
+ *args,
133
+ _configuration=_configuration,
134
+ )
135
+ __annotations__ = {
136
+ "transaction_id": transaction_id,
137
+ "type": type,
138
+ "date": date,
139
+ "description": description,
140
+ "instrument": instrument,
141
+ "priced_in": priced_in,
142
+ "amount": amount,
143
+ "price": price,
144
+ "units": units,
145
+ "fee": fee,
146
+ "fx_rate": fx_rate,
147
+ }
148
+ additional_properties = schemas.AnyTypeSchema
149
+
150
+ date: MetaOapg.properties.date
151
+ transaction_id: MetaOapg.properties.transaction_id
152
+ amount: MetaOapg.properties.amount
153
+ price: MetaOapg.properties.price
154
+ fee: MetaOapg.properties.fee
155
+ description: MetaOapg.properties.description
156
+ instrument: 'InstrumentNullable'
157
+ priced_in: 'PricedInInstrumentNullable'
158
+ units: MetaOapg.properties.units
159
+ fx_rate: MetaOapg.properties.fx_rate
160
+ type: MetaOapg.properties.type
161
+
162
+ @typing.overload
163
+ def __getitem__(self, name: typing_extensions.Literal["date"]) -> MetaOapg.properties.date: ...
164
+
165
+ @typing.overload
166
+ def __getitem__(self, name: typing_extensions.Literal["transaction_id"]) -> MetaOapg.properties.transaction_id: ...
167
+
168
+ @typing.overload
169
+ def __getitem__(self, name: typing_extensions.Literal["amount"]) -> MetaOapg.properties.amount: ...
170
+
171
+ @typing.overload
172
+ def __getitem__(self, name: typing_extensions.Literal["price"]) -> MetaOapg.properties.price: ...
173
+
174
+ @typing.overload
175
+ def __getitem__(self, name: typing_extensions.Literal["fee"]) -> MetaOapg.properties.fee: ...
176
+
177
+ @typing.overload
178
+ def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ...
179
+
180
+ @typing.overload
181
+ def __getitem__(self, name: typing_extensions.Literal["instrument"]) -> 'InstrumentNullable': ...
182
+
183
+ @typing.overload
184
+ def __getitem__(self, name: typing_extensions.Literal["priced_in"]) -> 'PricedInInstrumentNullable': ...
185
+
186
+ @typing.overload
187
+ def __getitem__(self, name: typing_extensions.Literal["units"]) -> MetaOapg.properties.units: ...
188
+
189
+ @typing.overload
190
+ def __getitem__(self, name: typing_extensions.Literal["fx_rate"]) -> MetaOapg.properties.fx_rate: ...
191
+
192
+ @typing.overload
193
+ def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ...
194
+
195
+ @typing.overload
196
+ def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
197
+
198
+ def __getitem__(self, name: typing.Union[typing_extensions.Literal["date"], typing_extensions.Literal["transaction_id"], typing_extensions.Literal["amount"], typing_extensions.Literal["price"], typing_extensions.Literal["fee"], typing_extensions.Literal["description"], typing_extensions.Literal["instrument"], typing_extensions.Literal["priced_in"], typing_extensions.Literal["units"], typing_extensions.Literal["fx_rate"], typing_extensions.Literal["type"], str, ]):
199
+ # dict_instance[name] accessor
200
+ return super().__getitem__(name)
201
+
202
+ @typing.overload
203
+ def get_item_oapg(self, name: typing_extensions.Literal["date"]) -> MetaOapg.properties.date: ...
204
+
205
+ @typing.overload
206
+ def get_item_oapg(self, name: typing_extensions.Literal["transaction_id"]) -> MetaOapg.properties.transaction_id: ...
207
+
208
+ @typing.overload
209
+ def get_item_oapg(self, name: typing_extensions.Literal["amount"]) -> MetaOapg.properties.amount: ...
210
+
211
+ @typing.overload
212
+ def get_item_oapg(self, name: typing_extensions.Literal["price"]) -> MetaOapg.properties.price: ...
213
+
214
+ @typing.overload
215
+ def get_item_oapg(self, name: typing_extensions.Literal["fee"]) -> MetaOapg.properties.fee: ...
216
+
217
+ @typing.overload
218
+ def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ...
219
+
220
+ @typing.overload
221
+ def get_item_oapg(self, name: typing_extensions.Literal["instrument"]) -> 'InstrumentNullable': ...
222
+
223
+ @typing.overload
224
+ def get_item_oapg(self, name: typing_extensions.Literal["priced_in"]) -> 'PricedInInstrumentNullable': ...
225
+
226
+ @typing.overload
227
+ def get_item_oapg(self, name: typing_extensions.Literal["units"]) -> MetaOapg.properties.units: ...
228
+
229
+ @typing.overload
230
+ def get_item_oapg(self, name: typing_extensions.Literal["fx_rate"]) -> MetaOapg.properties.fx_rate: ...
231
+
232
+ @typing.overload
233
+ def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ...
234
+
235
+ @typing.overload
236
+ def get_item_oapg(self, name: str) -> typing.Union[MetaOapg.additional_properties, schemas.Unset]: ...
237
+
238
+ def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["date"], typing_extensions.Literal["transaction_id"], typing_extensions.Literal["amount"], typing_extensions.Literal["price"], typing_extensions.Literal["fee"], typing_extensions.Literal["description"], typing_extensions.Literal["instrument"], typing_extensions.Literal["priced_in"], typing_extensions.Literal["units"], typing_extensions.Literal["fx_rate"], typing_extensions.Literal["type"], str, ]):
239
+ return super().get_item_oapg(name)
240
+
241
+ def __new__(
242
+ cls,
243
+ *args: typing.Union[dict, frozendict.frozendict, ],
244
+ date: typing.Union[MetaOapg.properties.date, str, datetime, ],
245
+ transaction_id: typing.Union[MetaOapg.properties.transaction_id, None, str, ],
246
+ amount: typing.Union[MetaOapg.properties.amount, str, ],
247
+ price: typing.Union[MetaOapg.properties.price, None, str, ],
248
+ fee: typing.Union[MetaOapg.properties.fee, str, ],
249
+ description: typing.Union[MetaOapg.properties.description, str, ],
250
+ instrument: 'InstrumentNullable',
251
+ priced_in: 'PricedInInstrumentNullable',
252
+ units: typing.Union[MetaOapg.properties.units, str, ],
253
+ fx_rate: typing.Union[MetaOapg.properties.fx_rate, None, str, ],
254
+ type: typing.Union[MetaOapg.properties.type, str, ],
255
+ _configuration: typing.Optional[schemas.Configuration] = None,
256
+ **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, ],
257
+ ) -> 'Activity':
258
+ return super().__new__(
259
+ cls,
260
+ *args,
261
+ date=date,
262
+ transaction_id=transaction_id,
263
+ amount=amount,
264
+ price=price,
265
+ fee=fee,
266
+ description=description,
267
+ instrument=instrument,
268
+ priced_in=priced_in,
269
+ units=units,
270
+ fx_rate=fx_rate,
271
+ type=type,
272
+ _configuration=_configuration,
273
+ **kwargs,
274
+ )
275
+
276
+ from snaptrade_client.model.instrument_nullable import InstrumentNullable
277
+ from snaptrade_client.model.priced_in_instrument_nullable import PricedInInstrumentNullable