snaptrade-python-sdk 11.0.117__py3-none-any.whl → 11.0.119__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 (50) 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 +9 -9
  4. snaptrade_client/apis/paths/accounts_account_id_trading_crypto.py +7 -0
  5. snaptrade_client/apis/paths/accounts_account_id_trading_crypto_preview.py +7 -0
  6. snaptrade_client/apis/paths/accounts_account_id_trading_replace.py +7 -0
  7. snaptrade_client/apis/tags/trading_api_generated.py +5 -5
  8. snaptrade_client/configuration.py +1 -1
  9. snaptrade_client/model/crypto_order_form.py +249 -0
  10. snaptrade_client/model/crypto_order_form.pyi +229 -0
  11. snaptrade_client/model/{simple_order_preview.pyi → crypto_order_preview.py} +8 -8
  12. snaptrade_client/model/{simple_order_preview.py → crypto_order_preview.pyi} +8 -8
  13. snaptrade_client/model/{simple_order_preview_estimated_fee.py → crypto_order_preview_estimated_fee.py} +2 -2
  14. snaptrade_client/model/{simple_order_preview_estimated_fee.pyi → crypto_order_preview_estimated_fee.pyi} +2 -2
  15. snaptrade_client/model/crypto_trading_instrument.py +113 -0
  16. snaptrade_client/model/crypto_trading_instrument.pyi +106 -0
  17. snaptrade_client/model/manual_trade_replace_form.py +15 -3
  18. snaptrade_client/model/manual_trade_replace_form.pyi +15 -3
  19. snaptrade_client/model/simple_order_form.py +14 -15
  20. snaptrade_client/model/simple_order_form.pyi +14 -15
  21. snaptrade_client/models/__init__.py +4 -2
  22. snaptrade_client/operation_parameter_map.py +43 -43
  23. snaptrade_client/paths/__init__.py +3 -3
  24. snaptrade_client/paths/accounts_account_id_orders_cancel/post.py +6 -2
  25. snaptrade_client/paths/accounts_account_id_orders_cancel/post.pyi +6 -2
  26. snaptrade_client/paths/accounts_account_id_trading_cancel/post.py +2 -2
  27. snaptrade_client/paths/accounts_account_id_trading_cancel/post.pyi +2 -2
  28. snaptrade_client/paths/{accounts_account_id_trading_simple → accounts_account_id_trading_crypto}/__init__.py +2 -2
  29. snaptrade_client/paths/{accounts_account_id_trading_simple → accounts_account_id_trading_crypto}/post.py +34 -34
  30. snaptrade_client/paths/{accounts_account_id_trading_simple → accounts_account_id_trading_crypto}/post.pyi +34 -34
  31. snaptrade_client/paths/{accounts_account_id_trading_simple_preview → accounts_account_id_trading_crypto_preview}/__init__.py +2 -2
  32. snaptrade_client/paths/{accounts_account_id_trading_simple_preview → accounts_account_id_trading_crypto_preview}/post.py +39 -39
  33. snaptrade_client/paths/{accounts_account_id_trading_simple_preview → accounts_account_id_trading_crypto_preview}/post.pyi +39 -39
  34. snaptrade_client/paths/{accounts_account_id_trading_simple_brokerage_order_id_replace → accounts_account_id_trading_replace}/__init__.py +2 -2
  35. snaptrade_client/paths/{accounts_account_id_trading_simple_brokerage_order_id_replace/patch.py → accounts_account_id_trading_replace/post.py} +18 -28
  36. snaptrade_client/paths/{accounts_account_id_trading_simple_brokerage_order_id_replace/patch.pyi → accounts_account_id_trading_replace/post.pyi} +18 -28
  37. snaptrade_client/paths/brokerages_brokerage_id_instruments/get.py +4 -4
  38. snaptrade_client/paths/brokerages_brokerage_id_instruments/get.pyi +4 -4
  39. snaptrade_client/type/crypto_order_form.py +50 -0
  40. snaptrade_client/type/{simple_order_preview.py → crypto_order_preview.py} +5 -5
  41. snaptrade_client/type/{simple_order_preview_estimated_fee.py → crypto_order_preview_estimated_fee.py} +3 -3
  42. snaptrade_client/type/crypto_trading_instrument.py +30 -0
  43. snaptrade_client/type/manual_trade_replace_form.py +3 -0
  44. {snaptrade_python_sdk-11.0.117.dist-info → snaptrade_python_sdk-11.0.119.dist-info}/METADATA +107 -105
  45. {snaptrade_python_sdk-11.0.117.dist-info → snaptrade_python_sdk-11.0.119.dist-info}/RECORD +47 -41
  46. snaptrade_client/apis/paths/accounts_account_id_trading_simple.py +0 -7
  47. snaptrade_client/apis/paths/accounts_account_id_trading_simple_brokerage_order_id_replace.py +0 -7
  48. snaptrade_client/apis/paths/accounts_account_id_trading_simple_preview.py +0 -7
  49. {snaptrade_python_sdk-11.0.117.dist-info → snaptrade_python_sdk-11.0.119.dist-info}/LICENSE +0 -0
  50. {snaptrade_python_sdk-11.0.117.dist-info → snaptrade_python_sdk-11.0.119.dist-info}/WHEEL +0 -0
@@ -12,7 +12,7 @@
12
12
  Created by: https://snaptrade.com/
13
13
  """
14
14
 
15
- __version__ = "11.0.117"
15
+ __version__ = "11.0.119"
16
16
 
17
17
  # import ApiClient
18
18
  from snaptrade_client.api_client import ApiClient
@@ -1155,7 +1155,7 @@ class ApiClient:
1155
1155
  self.default_headers[header_name] = header_value
1156
1156
  self.cookie = cookie
1157
1157
  # Set default User-Agent.
1158
- self.user_agent = 'Konfig/11.0.117/python'
1158
+ self.user_agent = 'Konfig/11.0.119/python'
1159
1159
 
1160
1160
  def __enter__(self):
1161
1161
  return self
@@ -38,11 +38,11 @@ from snaptrade_client.apis.paths.accounts_account_id_orders_cancel import Accoun
38
38
  from snaptrade_client.apis.paths.accounts_account_id_trading_bracket import AccountsAccountIdTradingBracket
39
39
  from snaptrade_client.apis.paths.accounts_account_id_trading_options import AccountsAccountIdTradingOptions
40
40
  from snaptrade_client.apis.paths.accounts_account_id_trading_instruments_cryptocurrency_pairs import AccountsAccountIdTradingInstrumentsCryptocurrencyPairs
41
- from snaptrade_client.apis.paths.accounts_account_id_trading_simple_preview import AccountsAccountIdTradingSimplePreview
42
41
  from snaptrade_client.apis.paths.accounts_account_id_trading_instruments_cryptocurrency_pairs_instrument_symbol_quote import AccountsAccountIdTradingInstrumentsCryptocurrencyPairsInstrumentSymbolQuote
43
- from snaptrade_client.apis.paths.accounts_account_id_trading_simple import AccountsAccountIdTradingSimple
44
- from snaptrade_client.apis.paths.accounts_account_id_trading_simple_brokerage_order_id_replace import AccountsAccountIdTradingSimpleBrokerageOrderIdReplace
42
+ from snaptrade_client.apis.paths.accounts_account_id_trading_replace import AccountsAccountIdTradingReplace
45
43
  from snaptrade_client.apis.paths.accounts_account_id_trading_cancel import AccountsAccountIdTradingCancel
44
+ from snaptrade_client.apis.paths.accounts_account_id_trading_crypto import AccountsAccountIdTradingCrypto
45
+ from snaptrade_client.apis.paths.accounts_account_id_trading_crypto_preview import AccountsAccountIdTradingCryptoPreview
46
46
  from snaptrade_client.apis.paths.snap_trade_partners import SnapTradePartners
47
47
  from snaptrade_client.apis.paths.accounts_account_id_symbols import AccountsAccountIdSymbols
48
48
  from snaptrade_client.apis.paths.brokerages import Brokerages
@@ -96,11 +96,11 @@ PathToApi = typing_extensions.TypedDict(
96
96
  PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_BRACKET: AccountsAccountIdTradingBracket,
97
97
  PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_OPTIONS: AccountsAccountIdTradingOptions,
98
98
  PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_INSTRUMENTS_CRYPTOCURRENCY_PAIRS: AccountsAccountIdTradingInstrumentsCryptocurrencyPairs,
99
- PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE_PREVIEW: AccountsAccountIdTradingSimplePreview,
100
99
  PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_INSTRUMENTS_CRYPTOCURRENCY_PAIRS_INSTRUMENT_SYMBOL_QUOTE: AccountsAccountIdTradingInstrumentsCryptocurrencyPairsInstrumentSymbolQuote,
101
- PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE: AccountsAccountIdTradingSimple,
102
- PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE_BROKERAGE_ORDER_ID_REPLACE: AccountsAccountIdTradingSimpleBrokerageOrderIdReplace,
100
+ PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_REPLACE: AccountsAccountIdTradingReplace,
103
101
  PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_CANCEL: AccountsAccountIdTradingCancel,
102
+ PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_CRYPTO: AccountsAccountIdTradingCrypto,
103
+ PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_CRYPTO_PREVIEW: AccountsAccountIdTradingCryptoPreview,
104
104
  PathValues.SNAP_TRADE_PARTNERS: SnapTradePartners,
105
105
  PathValues.ACCOUNTS_ACCOUNT_ID_SYMBOLS: AccountsAccountIdSymbols,
106
106
  PathValues.BROKERAGES: Brokerages,
@@ -155,11 +155,11 @@ path_to_api = PathToApi(
155
155
  PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_BRACKET: AccountsAccountIdTradingBracket,
156
156
  PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_OPTIONS: AccountsAccountIdTradingOptions,
157
157
  PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_INSTRUMENTS_CRYPTOCURRENCY_PAIRS: AccountsAccountIdTradingInstrumentsCryptocurrencyPairs,
158
- PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE_PREVIEW: AccountsAccountIdTradingSimplePreview,
159
158
  PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_INSTRUMENTS_CRYPTOCURRENCY_PAIRS_INSTRUMENT_SYMBOL_QUOTE: AccountsAccountIdTradingInstrumentsCryptocurrencyPairsInstrumentSymbolQuote,
160
- PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE: AccountsAccountIdTradingSimple,
161
- PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE_BROKERAGE_ORDER_ID_REPLACE: AccountsAccountIdTradingSimpleBrokerageOrderIdReplace,
159
+ PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_REPLACE: AccountsAccountIdTradingReplace,
162
160
  PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_CANCEL: AccountsAccountIdTradingCancel,
161
+ PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_CRYPTO: AccountsAccountIdTradingCrypto,
162
+ PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_CRYPTO_PREVIEW: AccountsAccountIdTradingCryptoPreview,
163
163
  PathValues.SNAP_TRADE_PARTNERS: SnapTradePartners,
164
164
  PathValues.ACCOUNTS_ACCOUNT_ID_SYMBOLS: AccountsAccountIdSymbols,
165
165
  PathValues.BROKERAGES: Brokerages,
@@ -0,0 +1,7 @@
1
+ from snaptrade_client.paths.accounts_account_id_trading_crypto.post import ApiForpost
2
+
3
+
4
+ class AccountsAccountIdTradingCrypto(
5
+ ApiForpost,
6
+ ):
7
+ pass
@@ -0,0 +1,7 @@
1
+ from snaptrade_client.paths.accounts_account_id_trading_crypto_preview.post import ApiForpost
2
+
3
+
4
+ class AccountsAccountIdTradingCryptoPreview(
5
+ ApiForpost,
6
+ ):
7
+ pass
@@ -0,0 +1,7 @@
1
+ from snaptrade_client.paths.accounts_account_id_trading_replace.post import ApiForpost
2
+
3
+
4
+ class AccountsAccountIdTradingReplace(
5
+ ApiForpost,
6
+ ):
7
+ pass
@@ -15,12 +15,12 @@ from snaptrade_client.paths.accounts_account_id_trading_instruments_cryptocurren
15
15
  from snaptrade_client.paths.trade_impact.post import GetOrderImpact
16
16
  from snaptrade_client.paths.accounts_account_id_quotes.get import GetUserAccountQuotes
17
17
  from snaptrade_client.paths.accounts_account_id_trading_bracket.post import PlaceBracketOrder
18
+ from snaptrade_client.paths.accounts_account_id_trading_crypto.post import PlaceCryptoOrder
18
19
  from snaptrade_client.paths.trade_place.post import PlaceForceOrder
19
20
  from snaptrade_client.paths.accounts_account_id_trading_options.post import PlaceMlegOrder
20
21
  from snaptrade_client.paths.trade_trade_id.post import PlaceOrder
21
- from snaptrade_client.paths.accounts_account_id_trading_simple.post import PlaceSimpleOrder
22
- from snaptrade_client.paths.accounts_account_id_trading_simple_preview.post import PreviewSimpleOrder
23
- from snaptrade_client.paths.accounts_account_id_trading_simple_brokerage_order_id_replace.patch import ReplaceOrder
22
+ from snaptrade_client.paths.accounts_account_id_trading_crypto_preview.post import PreviewCryptoOrder
23
+ from snaptrade_client.paths.accounts_account_id_trading_replace.post import ReplaceOrder
24
24
  from snaptrade_client.paths.accounts_account_id_trading_instruments_cryptocurrency_pairs.get import SearchCryptocurrencyPairInstruments
25
25
 
26
26
 
@@ -31,11 +31,11 @@ class TradingApiGenerated(
31
31
  GetOrderImpact,
32
32
  GetUserAccountQuotes,
33
33
  PlaceBracketOrder,
34
+ PlaceCryptoOrder,
34
35
  PlaceForceOrder,
35
36
  PlaceMlegOrder,
36
37
  PlaceOrder,
37
- PlaceSimpleOrder,
38
- PreviewSimpleOrder,
38
+ PreviewCryptoOrder,
39
39
  ReplaceOrder,
40
40
  SearchCryptocurrencyPairInstruments,
41
41
  ):
@@ -438,7 +438,7 @@ conf = snaptrade_client.Configuration(
438
438
  "OS: {env}\n"\
439
439
  "Python Version: {pyversion}\n"\
440
440
  "Version of the API: 1.0.0\n"\
441
- "SDK Package Version: 11.0.117".\
441
+ "SDK Package Version: 11.0.119".\
442
442
  format(env=sys.platform, pyversion=sys.version)
443
443
 
444
444
  def get_host_settings(self):
@@ -0,0 +1,249 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ SnapTrade
5
+
6
+ Connect brokerage accounts to your app for live positions and trading
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 CryptoOrderForm(
28
+ schemas.DictSchema
29
+ ):
30
+ """
31
+ This class is auto generated by Konfig (https://konfigthis.com)
32
+ """
33
+
34
+
35
+ class MetaOapg:
36
+ required = {
37
+ "amount",
38
+ "side",
39
+ "time_in_force",
40
+ "instrument",
41
+ "type",
42
+ }
43
+
44
+ class properties:
45
+
46
+ @staticmethod
47
+ def instrument() -> typing.Type['CryptoTradingInstrument']:
48
+ return CryptoTradingInstrument
49
+
50
+ @staticmethod
51
+ def side() -> typing.Type['ActionStrict']:
52
+ return ActionStrict
53
+
54
+
55
+ class type(
56
+ schemas.EnumBase,
57
+ schemas.StrSchema
58
+ ):
59
+
60
+
61
+ class MetaOapg:
62
+ enum_value_to_name = {
63
+ "MARKET": "MARKET",
64
+ "LIMIT": "LIMIT",
65
+ "STOP_LOSS_MARKET": "STOP_LOSS_MARKET",
66
+ "STOP_LOSS_LIMIT": "STOP_LOSS_LIMIT",
67
+ "TAKE_PROFIT_MARKET": "TAKE_PROFIT_MARKET",
68
+ "TAKE_PROFIT_LIMIT": "TAKE_PROFIT_LIMIT",
69
+ }
70
+
71
+ @schemas.classproperty
72
+ def MARKET(cls):
73
+ return cls("MARKET")
74
+
75
+ @schemas.classproperty
76
+ def LIMIT(cls):
77
+ return cls("LIMIT")
78
+
79
+ @schemas.classproperty
80
+ def STOP_LOSS_MARKET(cls):
81
+ return cls("STOP_LOSS_MARKET")
82
+
83
+ @schemas.classproperty
84
+ def STOP_LOSS_LIMIT(cls):
85
+ return cls("STOP_LOSS_LIMIT")
86
+
87
+ @schemas.classproperty
88
+ def TAKE_PROFIT_MARKET(cls):
89
+ return cls("TAKE_PROFIT_MARKET")
90
+
91
+ @schemas.classproperty
92
+ def TAKE_PROFIT_LIMIT(cls):
93
+ return cls("TAKE_PROFIT_LIMIT")
94
+
95
+
96
+ class time_in_force(
97
+ schemas.EnumBase,
98
+ schemas.StrSchema
99
+ ):
100
+
101
+
102
+ class MetaOapg:
103
+ enum_value_to_name = {
104
+ "GTC": "GTC",
105
+ "FOK": "FOK",
106
+ "IOC": "IOC",
107
+ "GTD": "GTD",
108
+ }
109
+
110
+ @schemas.classproperty
111
+ def GTC(cls):
112
+ return cls("GTC")
113
+
114
+ @schemas.classproperty
115
+ def FOK(cls):
116
+ return cls("FOK")
117
+
118
+ @schemas.classproperty
119
+ def IOC(cls):
120
+ return cls("IOC")
121
+
122
+ @schemas.classproperty
123
+ def GTD(cls):
124
+ return cls("GTD")
125
+ amount = schemas.StrSchema
126
+ limit_price = schemas.StrSchema
127
+ stop_price = schemas.StrSchema
128
+ post_only = schemas.BoolSchema
129
+ expiration_date = schemas.DateTimeSchema
130
+ __annotations__ = {
131
+ "instrument": instrument,
132
+ "side": side,
133
+ "type": type,
134
+ "time_in_force": time_in_force,
135
+ "amount": amount,
136
+ "limit_price": limit_price,
137
+ "stop_price": stop_price,
138
+ "post_only": post_only,
139
+ "expiration_date": expiration_date,
140
+ }
141
+
142
+ amount: MetaOapg.properties.amount
143
+ side: 'ActionStrict'
144
+ time_in_force: MetaOapg.properties.time_in_force
145
+ instrument: 'CryptoTradingInstrument'
146
+ type: MetaOapg.properties.type
147
+
148
+ @typing.overload
149
+ def __getitem__(self, name: typing_extensions.Literal["instrument"]) -> 'CryptoTradingInstrument': ...
150
+
151
+ @typing.overload
152
+ def __getitem__(self, name: typing_extensions.Literal["side"]) -> 'ActionStrict': ...
153
+
154
+ @typing.overload
155
+ def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ...
156
+
157
+ @typing.overload
158
+ def __getitem__(self, name: typing_extensions.Literal["time_in_force"]) -> MetaOapg.properties.time_in_force: ...
159
+
160
+ @typing.overload
161
+ def __getitem__(self, name: typing_extensions.Literal["amount"]) -> MetaOapg.properties.amount: ...
162
+
163
+ @typing.overload
164
+ def __getitem__(self, name: typing_extensions.Literal["limit_price"]) -> MetaOapg.properties.limit_price: ...
165
+
166
+ @typing.overload
167
+ def __getitem__(self, name: typing_extensions.Literal["stop_price"]) -> MetaOapg.properties.stop_price: ...
168
+
169
+ @typing.overload
170
+ def __getitem__(self, name: typing_extensions.Literal["post_only"]) -> MetaOapg.properties.post_only: ...
171
+
172
+ @typing.overload
173
+ def __getitem__(self, name: typing_extensions.Literal["expiration_date"]) -> MetaOapg.properties.expiration_date: ...
174
+
175
+ @typing.overload
176
+ def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
177
+
178
+ def __getitem__(self, name: typing.Union[typing_extensions.Literal["instrument", "side", "type", "time_in_force", "amount", "limit_price", "stop_price", "post_only", "expiration_date", ], str]):
179
+ # dict_instance[name] accessor
180
+ return super().__getitem__(name)
181
+
182
+
183
+ @typing.overload
184
+ def get_item_oapg(self, name: typing_extensions.Literal["instrument"]) -> 'CryptoTradingInstrument': ...
185
+
186
+ @typing.overload
187
+ def get_item_oapg(self, name: typing_extensions.Literal["side"]) -> 'ActionStrict': ...
188
+
189
+ @typing.overload
190
+ def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ...
191
+
192
+ @typing.overload
193
+ def get_item_oapg(self, name: typing_extensions.Literal["time_in_force"]) -> MetaOapg.properties.time_in_force: ...
194
+
195
+ @typing.overload
196
+ def get_item_oapg(self, name: typing_extensions.Literal["amount"]) -> MetaOapg.properties.amount: ...
197
+
198
+ @typing.overload
199
+ def get_item_oapg(self, name: typing_extensions.Literal["limit_price"]) -> typing.Union[MetaOapg.properties.limit_price, schemas.Unset]: ...
200
+
201
+ @typing.overload
202
+ def get_item_oapg(self, name: typing_extensions.Literal["stop_price"]) -> typing.Union[MetaOapg.properties.stop_price, schemas.Unset]: ...
203
+
204
+ @typing.overload
205
+ def get_item_oapg(self, name: typing_extensions.Literal["post_only"]) -> typing.Union[MetaOapg.properties.post_only, schemas.Unset]: ...
206
+
207
+ @typing.overload
208
+ def get_item_oapg(self, name: typing_extensions.Literal["expiration_date"]) -> typing.Union[MetaOapg.properties.expiration_date, schemas.Unset]: ...
209
+
210
+ @typing.overload
211
+ def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
212
+
213
+ def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["instrument", "side", "type", "time_in_force", "amount", "limit_price", "stop_price", "post_only", "expiration_date", ], str]):
214
+ return super().get_item_oapg(name)
215
+
216
+
217
+ def __new__(
218
+ cls,
219
+ *args: typing.Union[dict, frozendict.frozendict, ],
220
+ amount: typing.Union[MetaOapg.properties.amount, str, ],
221
+ side: 'ActionStrict',
222
+ time_in_force: typing.Union[MetaOapg.properties.time_in_force, str, ],
223
+ instrument: 'CryptoTradingInstrument',
224
+ type: typing.Union[MetaOapg.properties.type, str, ],
225
+ limit_price: typing.Union[MetaOapg.properties.limit_price, str, schemas.Unset] = schemas.unset,
226
+ stop_price: typing.Union[MetaOapg.properties.stop_price, str, schemas.Unset] = schemas.unset,
227
+ post_only: typing.Union[MetaOapg.properties.post_only, bool, schemas.Unset] = schemas.unset,
228
+ expiration_date: typing.Union[MetaOapg.properties.expiration_date, str, datetime, schemas.Unset] = schemas.unset,
229
+ _configuration: typing.Optional[schemas.Configuration] = None,
230
+ **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes],
231
+ ) -> 'CryptoOrderForm':
232
+ return super().__new__(
233
+ cls,
234
+ *args,
235
+ amount=amount,
236
+ side=side,
237
+ time_in_force=time_in_force,
238
+ instrument=instrument,
239
+ type=type,
240
+ limit_price=limit_price,
241
+ stop_price=stop_price,
242
+ post_only=post_only,
243
+ expiration_date=expiration_date,
244
+ _configuration=_configuration,
245
+ **kwargs,
246
+ )
247
+
248
+ from snaptrade_client.model.action_strict import ActionStrict
249
+ from snaptrade_client.model.crypto_trading_instrument import CryptoTradingInstrument
@@ -0,0 +1,229 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ SnapTrade
5
+
6
+ Connect brokerage accounts to your app for live positions and trading
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 CryptoOrderForm(
28
+ schemas.DictSchema
29
+ ):
30
+ """
31
+ This class is auto generated by Konfig (https://konfigthis.com)
32
+ """
33
+
34
+
35
+ class MetaOapg:
36
+ required = {
37
+ "amount",
38
+ "side",
39
+ "time_in_force",
40
+ "instrument",
41
+ "type",
42
+ }
43
+
44
+ class properties:
45
+
46
+ @staticmethod
47
+ def instrument() -> typing.Type['CryptoTradingInstrument']:
48
+ return CryptoTradingInstrument
49
+
50
+ @staticmethod
51
+ def side() -> typing.Type['ActionStrict']:
52
+ return ActionStrict
53
+
54
+
55
+ class type(
56
+ schemas.EnumBase,
57
+ schemas.StrSchema
58
+ ):
59
+
60
+ @schemas.classproperty
61
+ def MARKET(cls):
62
+ return cls("MARKET")
63
+
64
+ @schemas.classproperty
65
+ def LIMIT(cls):
66
+ return cls("LIMIT")
67
+
68
+ @schemas.classproperty
69
+ def STOP_LOSS_MARKET(cls):
70
+ return cls("STOP_LOSS_MARKET")
71
+
72
+ @schemas.classproperty
73
+ def STOP_LOSS_LIMIT(cls):
74
+ return cls("STOP_LOSS_LIMIT")
75
+
76
+ @schemas.classproperty
77
+ def TAKE_PROFIT_MARKET(cls):
78
+ return cls("TAKE_PROFIT_MARKET")
79
+
80
+ @schemas.classproperty
81
+ def TAKE_PROFIT_LIMIT(cls):
82
+ return cls("TAKE_PROFIT_LIMIT")
83
+
84
+
85
+ class time_in_force(
86
+ schemas.EnumBase,
87
+ schemas.StrSchema
88
+ ):
89
+
90
+ @schemas.classproperty
91
+ def GTC(cls):
92
+ return cls("GTC")
93
+
94
+ @schemas.classproperty
95
+ def FOK(cls):
96
+ return cls("FOK")
97
+
98
+ @schemas.classproperty
99
+ def IOC(cls):
100
+ return cls("IOC")
101
+
102
+ @schemas.classproperty
103
+ def GTD(cls):
104
+ return cls("GTD")
105
+ amount = schemas.StrSchema
106
+ limit_price = schemas.StrSchema
107
+ stop_price = schemas.StrSchema
108
+ post_only = schemas.BoolSchema
109
+ expiration_date = schemas.DateTimeSchema
110
+ __annotations__ = {
111
+ "instrument": instrument,
112
+ "side": side,
113
+ "type": type,
114
+ "time_in_force": time_in_force,
115
+ "amount": amount,
116
+ "limit_price": limit_price,
117
+ "stop_price": stop_price,
118
+ "post_only": post_only,
119
+ "expiration_date": expiration_date,
120
+ }
121
+
122
+ amount: MetaOapg.properties.amount
123
+ side: 'ActionStrict'
124
+ time_in_force: MetaOapg.properties.time_in_force
125
+ instrument: 'CryptoTradingInstrument'
126
+ type: MetaOapg.properties.type
127
+
128
+ @typing.overload
129
+ def __getitem__(self, name: typing_extensions.Literal["instrument"]) -> 'CryptoTradingInstrument': ...
130
+
131
+ @typing.overload
132
+ def __getitem__(self, name: typing_extensions.Literal["side"]) -> 'ActionStrict': ...
133
+
134
+ @typing.overload
135
+ def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ...
136
+
137
+ @typing.overload
138
+ def __getitem__(self, name: typing_extensions.Literal["time_in_force"]) -> MetaOapg.properties.time_in_force: ...
139
+
140
+ @typing.overload
141
+ def __getitem__(self, name: typing_extensions.Literal["amount"]) -> MetaOapg.properties.amount: ...
142
+
143
+ @typing.overload
144
+ def __getitem__(self, name: typing_extensions.Literal["limit_price"]) -> MetaOapg.properties.limit_price: ...
145
+
146
+ @typing.overload
147
+ def __getitem__(self, name: typing_extensions.Literal["stop_price"]) -> MetaOapg.properties.stop_price: ...
148
+
149
+ @typing.overload
150
+ def __getitem__(self, name: typing_extensions.Literal["post_only"]) -> MetaOapg.properties.post_only: ...
151
+
152
+ @typing.overload
153
+ def __getitem__(self, name: typing_extensions.Literal["expiration_date"]) -> MetaOapg.properties.expiration_date: ...
154
+
155
+ @typing.overload
156
+ def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
157
+
158
+ def __getitem__(self, name: typing.Union[typing_extensions.Literal["instrument", "side", "type", "time_in_force", "amount", "limit_price", "stop_price", "post_only", "expiration_date", ], str]):
159
+ # dict_instance[name] accessor
160
+ return super().__getitem__(name)
161
+
162
+
163
+ @typing.overload
164
+ def get_item_oapg(self, name: typing_extensions.Literal["instrument"]) -> 'CryptoTradingInstrument': ...
165
+
166
+ @typing.overload
167
+ def get_item_oapg(self, name: typing_extensions.Literal["side"]) -> 'ActionStrict': ...
168
+
169
+ @typing.overload
170
+ def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ...
171
+
172
+ @typing.overload
173
+ def get_item_oapg(self, name: typing_extensions.Literal["time_in_force"]) -> MetaOapg.properties.time_in_force: ...
174
+
175
+ @typing.overload
176
+ def get_item_oapg(self, name: typing_extensions.Literal["amount"]) -> MetaOapg.properties.amount: ...
177
+
178
+ @typing.overload
179
+ def get_item_oapg(self, name: typing_extensions.Literal["limit_price"]) -> typing.Union[MetaOapg.properties.limit_price, schemas.Unset]: ...
180
+
181
+ @typing.overload
182
+ def get_item_oapg(self, name: typing_extensions.Literal["stop_price"]) -> typing.Union[MetaOapg.properties.stop_price, schemas.Unset]: ...
183
+
184
+ @typing.overload
185
+ def get_item_oapg(self, name: typing_extensions.Literal["post_only"]) -> typing.Union[MetaOapg.properties.post_only, schemas.Unset]: ...
186
+
187
+ @typing.overload
188
+ def get_item_oapg(self, name: typing_extensions.Literal["expiration_date"]) -> typing.Union[MetaOapg.properties.expiration_date, schemas.Unset]: ...
189
+
190
+ @typing.overload
191
+ def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
192
+
193
+ def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["instrument", "side", "type", "time_in_force", "amount", "limit_price", "stop_price", "post_only", "expiration_date", ], str]):
194
+ return super().get_item_oapg(name)
195
+
196
+
197
+ def __new__(
198
+ cls,
199
+ *args: typing.Union[dict, frozendict.frozendict, ],
200
+ amount: typing.Union[MetaOapg.properties.amount, str, ],
201
+ side: 'ActionStrict',
202
+ time_in_force: typing.Union[MetaOapg.properties.time_in_force, str, ],
203
+ instrument: 'CryptoTradingInstrument',
204
+ type: typing.Union[MetaOapg.properties.type, str, ],
205
+ limit_price: typing.Union[MetaOapg.properties.limit_price, str, schemas.Unset] = schemas.unset,
206
+ stop_price: typing.Union[MetaOapg.properties.stop_price, str, schemas.Unset] = schemas.unset,
207
+ post_only: typing.Union[MetaOapg.properties.post_only, bool, schemas.Unset] = schemas.unset,
208
+ expiration_date: typing.Union[MetaOapg.properties.expiration_date, str, datetime, schemas.Unset] = schemas.unset,
209
+ _configuration: typing.Optional[schemas.Configuration] = None,
210
+ **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes],
211
+ ) -> 'CryptoOrderForm':
212
+ return super().__new__(
213
+ cls,
214
+ *args,
215
+ amount=amount,
216
+ side=side,
217
+ time_in_force=time_in_force,
218
+ instrument=instrument,
219
+ type=type,
220
+ limit_price=limit_price,
221
+ stop_price=stop_price,
222
+ post_only=post_only,
223
+ expiration_date=expiration_date,
224
+ _configuration=_configuration,
225
+ **kwargs,
226
+ )
227
+
228
+ from snaptrade_client.model.action_strict import ActionStrict
229
+ from snaptrade_client.model.crypto_trading_instrument import CryptoTradingInstrument
@@ -24,7 +24,7 @@ import frozendict # noqa: F401
24
24
  from snaptrade_client import schemas # noqa: F401
25
25
 
26
26
 
27
- class SimpleOrderPreview(
27
+ class CryptoOrderPreview(
28
28
  schemas.DictSchema
29
29
  ):
30
30
  """
@@ -39,15 +39,15 @@ class SimpleOrderPreview(
39
39
  class properties:
40
40
 
41
41
  @staticmethod
42
- def estimated_fee() -> typing.Type['SimpleOrderPreviewEstimatedFee']:
43
- return SimpleOrderPreviewEstimatedFee
42
+ def estimated_fee() -> typing.Type['CryptoOrderPreviewEstimatedFee']:
43
+ return CryptoOrderPreviewEstimatedFee
44
44
  __annotations__ = {
45
45
  "estimated_fee": estimated_fee,
46
46
  }
47
47
  additional_properties = schemas.AnyTypeSchema
48
48
 
49
49
  @typing.overload
50
- def __getitem__(self, name: typing_extensions.Literal["estimated_fee"]) -> 'SimpleOrderPreviewEstimatedFee': ...
50
+ def __getitem__(self, name: typing_extensions.Literal["estimated_fee"]) -> 'CryptoOrderPreviewEstimatedFee': ...
51
51
 
52
52
  @typing.overload
53
53
  def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
@@ -57,7 +57,7 @@ class SimpleOrderPreview(
57
57
  return super().__getitem__(name)
58
58
 
59
59
  @typing.overload
60
- def get_item_oapg(self, name: typing_extensions.Literal["estimated_fee"]) -> typing.Union['SimpleOrderPreviewEstimatedFee', schemas.Unset]: ...
60
+ def get_item_oapg(self, name: typing_extensions.Literal["estimated_fee"]) -> typing.Union['CryptoOrderPreviewEstimatedFee', schemas.Unset]: ...
61
61
 
62
62
  @typing.overload
63
63
  def get_item_oapg(self, name: str) -> typing.Union[MetaOapg.additional_properties, schemas.Unset]: ...
@@ -68,10 +68,10 @@ class SimpleOrderPreview(
68
68
  def __new__(
69
69
  cls,
70
70
  *args: typing.Union[dict, frozendict.frozendict, ],
71
- estimated_fee: typing.Union['SimpleOrderPreviewEstimatedFee', schemas.Unset] = schemas.unset,
71
+ estimated_fee: typing.Union['CryptoOrderPreviewEstimatedFee', schemas.Unset] = schemas.unset,
72
72
  _configuration: typing.Optional[schemas.Configuration] = None,
73
73
  **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, ],
74
- ) -> 'SimpleOrderPreview':
74
+ ) -> 'CryptoOrderPreview':
75
75
  return super().__new__(
76
76
  cls,
77
77
  *args,
@@ -80,4 +80,4 @@ class SimpleOrderPreview(
80
80
  **kwargs,
81
81
  )
82
82
 
83
- from snaptrade_client.model.simple_order_preview_estimated_fee import SimpleOrderPreviewEstimatedFee
83
+ from snaptrade_client.model.crypto_order_preview_estimated_fee import CryptoOrderPreviewEstimatedFee