snaptrade-python-sdk 11.0.106__py3-none-any.whl → 11.0.108__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- snaptrade_client/__init__.py +1 -1
- snaptrade_client/api_client.py +1 -1
- snaptrade_client/apis/path_to_api.py +9 -9
- snaptrade_client/apis/tag_to_api.py +0 -3
- snaptrade_client/apis/tags/__init__.py +0 -1
- snaptrade_client/apis/tags/trading_api_generated.py +6 -0
- snaptrade_client/client.py +0 -2
- snaptrade_client/client.pyi +0 -2
- snaptrade_client/configuration.py +1 -1
- snaptrade_client/operation_parameter_map.py +75 -75
- snaptrade_client/paths/__init__.py +3 -3
- {snaptrade_python_sdk-11.0.106.dist-info → snaptrade_python_sdk-11.0.108.dist-info}/METADATA +169 -169
- {snaptrade_python_sdk-11.0.106.dist-info → snaptrade_python_sdk-11.0.108.dist-info}/RECORD +15 -17
- snaptrade_client/apis/tags/crypto_trading_api.py +0 -6
- snaptrade_client/apis/tags/crypto_trading_api_generated.py +0 -25
- {snaptrade_python_sdk-11.0.106.dist-info → snaptrade_python_sdk-11.0.108.dist-info}/LICENSE +0 -0
- {snaptrade_python_sdk-11.0.106.dist-info → snaptrade_python_sdk-11.0.108.dist-info}/WHEEL +0 -0
snaptrade_client/__init__.py
CHANGED
snaptrade_client/api_client.py
CHANGED
|
@@ -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.
|
|
1158
|
+
self.user_agent = 'Konfig/11.0.108/python'
|
|
1159
1159
|
|
|
1160
1160
|
def __enter__(self):
|
|
1161
1161
|
return self
|
|
@@ -37,8 +37,11 @@ from snaptrade_client.apis.paths.trade_place import TradePlace
|
|
|
37
37
|
from snaptrade_client.apis.paths.accounts_account_id_orders_cancel import AccountsAccountIdOrdersCancel
|
|
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_simple_brokerage_order_id_replace import AccountsAccountIdTradingSimpleBrokerageOrderIdReplace
|
|
40
|
+
from snaptrade_client.apis.paths.accounts_account_id_trading_simple import AccountsAccountIdTradingSimple
|
|
40
41
|
from snaptrade_client.apis.paths.accounts_account_id_trading_simple_brokerage_order_id_cancel import AccountsAccountIdTradingSimpleBrokerageOrderIdCancel
|
|
41
42
|
from snaptrade_client.apis.paths.accounts_account_id_trading_simple_preview import AccountsAccountIdTradingSimplePreview
|
|
43
|
+
from snaptrade_client.apis.paths.accounts_account_id_trading_instruments_cryptocurrency_pairs import AccountsAccountIdTradingInstrumentsCryptocurrencyPairs
|
|
44
|
+
from snaptrade_client.apis.paths.accounts_account_id_trading_instruments_cryptocurrency_pairs_instrument_symbol_quote import AccountsAccountIdTradingInstrumentsCryptocurrencyPairsInstrumentSymbolQuote
|
|
42
45
|
from snaptrade_client.apis.paths.accounts_account_id_trading_options import AccountsAccountIdTradingOptions
|
|
43
46
|
from snaptrade_client.apis.paths.snap_trade_partners import SnapTradePartners
|
|
44
47
|
from snaptrade_client.apis.paths.accounts_account_id_symbols import AccountsAccountIdSymbols
|
|
@@ -51,9 +54,6 @@ from snaptrade_client.apis.paths.exchanges import Exchanges
|
|
|
51
54
|
from snaptrade_client.apis.paths.security_types import SecurityTypes
|
|
52
55
|
from snaptrade_client.apis.paths.symbols import Symbols
|
|
53
56
|
from snaptrade_client.apis.paths.symbols_query import SymbolsQuery
|
|
54
|
-
from snaptrade_client.apis.paths.accounts_account_id_trading_simple import AccountsAccountIdTradingSimple
|
|
55
|
-
from snaptrade_client.apis.paths.accounts_account_id_trading_instruments_cryptocurrency_pairs import AccountsAccountIdTradingInstrumentsCryptocurrencyPairs
|
|
56
|
-
from snaptrade_client.apis.paths.accounts_account_id_trading_instruments_cryptocurrency_pairs_instrument_symbol_quote import AccountsAccountIdTradingInstrumentsCryptocurrencyPairsInstrumentSymbolQuote
|
|
57
57
|
|
|
58
58
|
PathToApi = typing_extensions.TypedDict(
|
|
59
59
|
'PathToApi',
|
|
@@ -94,8 +94,11 @@ PathToApi = typing_extensions.TypedDict(
|
|
|
94
94
|
PathValues.ACCOUNTS_ACCOUNT_ID_ORDERS_CANCEL: AccountsAccountIdOrdersCancel,
|
|
95
95
|
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_BRACKET: AccountsAccountIdTradingBracket,
|
|
96
96
|
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE_BROKERAGE_ORDER_ID_REPLACE: AccountsAccountIdTradingSimpleBrokerageOrderIdReplace,
|
|
97
|
+
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE: AccountsAccountIdTradingSimple,
|
|
97
98
|
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE_BROKERAGE_ORDER_ID_CANCEL: AccountsAccountIdTradingSimpleBrokerageOrderIdCancel,
|
|
98
99
|
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE_PREVIEW: AccountsAccountIdTradingSimplePreview,
|
|
100
|
+
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_INSTRUMENTS_CRYPTOCURRENCY_PAIRS: AccountsAccountIdTradingInstrumentsCryptocurrencyPairs,
|
|
101
|
+
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_INSTRUMENTS_CRYPTOCURRENCY_PAIRS_INSTRUMENT_SYMBOL_QUOTE: AccountsAccountIdTradingInstrumentsCryptocurrencyPairsInstrumentSymbolQuote,
|
|
99
102
|
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_OPTIONS: AccountsAccountIdTradingOptions,
|
|
100
103
|
PathValues.SNAP_TRADE_PARTNERS: SnapTradePartners,
|
|
101
104
|
PathValues.ACCOUNTS_ACCOUNT_ID_SYMBOLS: AccountsAccountIdSymbols,
|
|
@@ -108,9 +111,6 @@ PathToApi = typing_extensions.TypedDict(
|
|
|
108
111
|
PathValues.SECURITY_TYPES: SecurityTypes,
|
|
109
112
|
PathValues.SYMBOLS: Symbols,
|
|
110
113
|
PathValues.SYMBOLS_QUERY: SymbolsQuery,
|
|
111
|
-
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE: AccountsAccountIdTradingSimple,
|
|
112
|
-
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_INSTRUMENTS_CRYPTOCURRENCY_PAIRS: AccountsAccountIdTradingInstrumentsCryptocurrencyPairs,
|
|
113
|
-
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_INSTRUMENTS_CRYPTOCURRENCY_PAIRS_INSTRUMENT_SYMBOL_QUOTE: AccountsAccountIdTradingInstrumentsCryptocurrencyPairsInstrumentSymbolQuote,
|
|
114
114
|
}
|
|
115
115
|
)
|
|
116
116
|
|
|
@@ -152,8 +152,11 @@ path_to_api = PathToApi(
|
|
|
152
152
|
PathValues.ACCOUNTS_ACCOUNT_ID_ORDERS_CANCEL: AccountsAccountIdOrdersCancel,
|
|
153
153
|
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_BRACKET: AccountsAccountIdTradingBracket,
|
|
154
154
|
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE_BROKERAGE_ORDER_ID_REPLACE: AccountsAccountIdTradingSimpleBrokerageOrderIdReplace,
|
|
155
|
+
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE: AccountsAccountIdTradingSimple,
|
|
155
156
|
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE_BROKERAGE_ORDER_ID_CANCEL: AccountsAccountIdTradingSimpleBrokerageOrderIdCancel,
|
|
156
157
|
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE_PREVIEW: AccountsAccountIdTradingSimplePreview,
|
|
158
|
+
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_INSTRUMENTS_CRYPTOCURRENCY_PAIRS: AccountsAccountIdTradingInstrumentsCryptocurrencyPairs,
|
|
159
|
+
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_INSTRUMENTS_CRYPTOCURRENCY_PAIRS_INSTRUMENT_SYMBOL_QUOTE: AccountsAccountIdTradingInstrumentsCryptocurrencyPairsInstrumentSymbolQuote,
|
|
157
160
|
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_OPTIONS: AccountsAccountIdTradingOptions,
|
|
158
161
|
PathValues.SNAP_TRADE_PARTNERS: SnapTradePartners,
|
|
159
162
|
PathValues.ACCOUNTS_ACCOUNT_ID_SYMBOLS: AccountsAccountIdSymbols,
|
|
@@ -166,8 +169,5 @@ path_to_api = PathToApi(
|
|
|
166
169
|
PathValues.SECURITY_TYPES: SecurityTypes,
|
|
167
170
|
PathValues.SYMBOLS: Symbols,
|
|
168
171
|
PathValues.SYMBOLS_QUERY: SymbolsQuery,
|
|
169
|
-
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE: AccountsAccountIdTradingSimple,
|
|
170
|
-
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_INSTRUMENTS_CRYPTOCURRENCY_PAIRS: AccountsAccountIdTradingInstrumentsCryptocurrencyPairs,
|
|
171
|
-
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_INSTRUMENTS_CRYPTOCURRENCY_PAIRS_INSTRUMENT_SYMBOL_QUOTE: AccountsAccountIdTradingInstrumentsCryptocurrencyPairsInstrumentSymbolQuote,
|
|
172
172
|
}
|
|
173
173
|
)
|
|
@@ -8,7 +8,6 @@ from snaptrade_client.apis.tags.account_information_api import AccountInformatio
|
|
|
8
8
|
from snaptrade_client.apis.tags.options_api import OptionsApi
|
|
9
9
|
from snaptrade_client.apis.tags.transactions_and_reporting_api import TransactionsAndReportingApi
|
|
10
10
|
from snaptrade_client.apis.tags.trading_api import TradingApi
|
|
11
|
-
from snaptrade_client.apis.tags.crypto_trading_api import CryptoTradingApi
|
|
12
11
|
from snaptrade_client.apis.tags.reference_data_api import ReferenceDataApi
|
|
13
12
|
|
|
14
13
|
TagToApi = typing_extensions.TypedDict(
|
|
@@ -21,7 +20,6 @@ TagToApi = typing_extensions.TypedDict(
|
|
|
21
20
|
TagValues.OPTIONS: OptionsApi,
|
|
22
21
|
TagValues.TRANSACTIONS_AND_REPORTING: TransactionsAndReportingApi,
|
|
23
22
|
TagValues.TRADING: TradingApi,
|
|
24
|
-
TagValues.CRYPTO_TRADING: CryptoTradingApi,
|
|
25
23
|
TagValues.REFERENCE_DATA: ReferenceDataApi,
|
|
26
24
|
}
|
|
27
25
|
)
|
|
@@ -35,7 +33,6 @@ tag_to_api = TagToApi(
|
|
|
35
33
|
TagValues.OPTIONS: OptionsApi,
|
|
36
34
|
TagValues.TRANSACTIONS_AND_REPORTING: TransactionsAndReportingApi,
|
|
37
35
|
TagValues.TRADING: TradingApi,
|
|
38
|
-
TagValues.CRYPTO_TRADING: CryptoTradingApi,
|
|
39
36
|
TagValues.REFERENCE_DATA: ReferenceDataApi,
|
|
40
37
|
}
|
|
41
38
|
)
|
|
@@ -11,27 +11,33 @@
|
|
|
11
11
|
|
|
12
12
|
from snaptrade_client.paths.accounts_account_id_trading_simple_brokerage_order_id_cancel.post import CancelOrder
|
|
13
13
|
from snaptrade_client.paths.accounts_account_id_orders_cancel.post import CancelUserAccountOrder
|
|
14
|
+
from snaptrade_client.paths.accounts_account_id_trading_instruments_cryptocurrency_pairs_instrument_symbol_quote.get import GetCryptocurrencyPairQuote
|
|
14
15
|
from snaptrade_client.paths.trade_impact.post import GetOrderImpact
|
|
15
16
|
from snaptrade_client.paths.accounts_account_id_quotes.get import GetUserAccountQuotes
|
|
16
17
|
from snaptrade_client.paths.accounts_account_id_trading_bracket.post import PlaceBracketOrder
|
|
17
18
|
from snaptrade_client.paths.trade_place.post import PlaceForceOrder
|
|
18
19
|
from snaptrade_client.paths.accounts_account_id_trading_options.post import PlaceMlegOrder
|
|
19
20
|
from snaptrade_client.paths.trade_trade_id.post import PlaceOrder
|
|
21
|
+
from snaptrade_client.paths.accounts_account_id_trading_simple.post import PlaceSimpleOrder
|
|
20
22
|
from snaptrade_client.paths.accounts_account_id_trading_simple_preview.post import PreviewSimpleOrder
|
|
21
23
|
from snaptrade_client.paths.accounts_account_id_trading_simple_brokerage_order_id_replace.patch import ReplaceOrder
|
|
24
|
+
from snaptrade_client.paths.accounts_account_id_trading_instruments_cryptocurrency_pairs.get import SearchCryptocurrencyPairInstruments
|
|
22
25
|
|
|
23
26
|
|
|
24
27
|
class TradingApiGenerated(
|
|
25
28
|
CancelOrder,
|
|
26
29
|
CancelUserAccountOrder,
|
|
30
|
+
GetCryptocurrencyPairQuote,
|
|
27
31
|
GetOrderImpact,
|
|
28
32
|
GetUserAccountQuotes,
|
|
29
33
|
PlaceBracketOrder,
|
|
30
34
|
PlaceForceOrder,
|
|
31
35
|
PlaceMlegOrder,
|
|
32
36
|
PlaceOrder,
|
|
37
|
+
PlaceSimpleOrder,
|
|
33
38
|
PreviewSimpleOrder,
|
|
34
39
|
ReplaceOrder,
|
|
40
|
+
SearchCryptocurrencyPairInstruments,
|
|
35
41
|
):
|
|
36
42
|
"""NOTE:
|
|
37
43
|
This class is auto generated by Konfig (https://konfigthis.com)
|
snaptrade_client/client.py
CHANGED
|
@@ -20,7 +20,6 @@ from snaptrade_client.apis.tags.account_information_api import AccountInformatio
|
|
|
20
20
|
from snaptrade_client.apis.tags.api_status_api import APIStatusApi
|
|
21
21
|
from snaptrade_client.apis.tags.authentication_api import AuthenticationApi
|
|
22
22
|
from snaptrade_client.apis.tags.connections_api import ConnectionsApi
|
|
23
|
-
from snaptrade_client.apis.tags.crypto_trading_api import CryptoTradingApi
|
|
24
23
|
from snaptrade_client.apis.tags.options_api import OptionsApi
|
|
25
24
|
from snaptrade_client.apis.tags.reference_data_api import ReferenceDataApi
|
|
26
25
|
from snaptrade_client.apis.tags.trading_api import TradingApi
|
|
@@ -41,7 +40,6 @@ class SnapTrade(ClientCustom):
|
|
|
41
40
|
self.api_status: APIStatusApi = APIStatusApi(api_client)
|
|
42
41
|
self.authentication: AuthenticationApi = AuthenticationApi(api_client)
|
|
43
42
|
self.connections: ConnectionsApi = ConnectionsApi(api_client)
|
|
44
|
-
self.crypto_trading: CryptoTradingApi = CryptoTradingApi(api_client)
|
|
45
43
|
self.options: OptionsApi = OptionsApi(api_client)
|
|
46
44
|
self.reference_data: ReferenceDataApi = ReferenceDataApi(api_client)
|
|
47
45
|
self.trading: TradingApi = TradingApi(api_client)
|
snaptrade_client/client.pyi
CHANGED
|
@@ -20,7 +20,6 @@ from snaptrade_client.apis.tags.account_information_api import AccountInformatio
|
|
|
20
20
|
from snaptrade_client.apis.tags.api_status_api import APIStatusApi
|
|
21
21
|
from snaptrade_client.apis.tags.authentication_api import AuthenticationApi
|
|
22
22
|
from snaptrade_client.apis.tags.connections_api import ConnectionsApi
|
|
23
|
-
from snaptrade_client.apis.tags.crypto_trading_api import CryptoTradingApi
|
|
24
23
|
from snaptrade_client.apis.tags.options_api import OptionsApi
|
|
25
24
|
from snaptrade_client.apis.tags.reference_data_api import ReferenceDataApi
|
|
26
25
|
from snaptrade_client.apis.tags.trading_api import TradingApi
|
|
@@ -41,7 +40,6 @@ class SnapTrade(ClientCustom):
|
|
|
41
40
|
self.api_status: APIStatusApi = APIStatusApi(api_client)
|
|
42
41
|
self.authentication: AuthenticationApi = AuthenticationApi(api_client)
|
|
43
42
|
self.connections: ConnectionsApi = ConnectionsApi(api_client)
|
|
44
|
-
self.crypto_trading: CryptoTradingApi = CryptoTradingApi(api_client)
|
|
45
43
|
self.options: OptionsApi = OptionsApi(api_client)
|
|
46
44
|
self.reference_data: ReferenceDataApi = ReferenceDataApi(api_client)
|
|
47
45
|
self.trading: TradingApi = TradingApi(api_client)
|
|
@@ -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.
|
|
441
|
+
"SDK Package Version: 11.0.108".\
|
|
442
442
|
format(env=sys.platform, pyversion=sys.version)
|
|
443
443
|
|
|
444
444
|
def get_host_settings(self):
|
|
@@ -311,81 +311,6 @@ operation_parameter_map = {
|
|
|
311
311
|
},
|
|
312
312
|
]
|
|
313
313
|
},
|
|
314
|
-
'/accounts/{accountId}/trading/instruments/cryptocurrencyPairs/{instrumentSymbol}/quote-GET': {
|
|
315
|
-
'parameters': [
|
|
316
|
-
{
|
|
317
|
-
'name': 'userId'
|
|
318
|
-
},
|
|
319
|
-
{
|
|
320
|
-
'name': 'userSecret'
|
|
321
|
-
},
|
|
322
|
-
{
|
|
323
|
-
'name': 'accountId'
|
|
324
|
-
},
|
|
325
|
-
{
|
|
326
|
-
'name': 'instrumentSymbol'
|
|
327
|
-
},
|
|
328
|
-
]
|
|
329
|
-
},
|
|
330
|
-
'/accounts/{accountId}/trading/simple-POST': {
|
|
331
|
-
'parameters': [
|
|
332
|
-
{
|
|
333
|
-
'name': 'instrument'
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
'name': 'side'
|
|
337
|
-
},
|
|
338
|
-
{
|
|
339
|
-
'name': 'type'
|
|
340
|
-
},
|
|
341
|
-
{
|
|
342
|
-
'name': 'time_in_force'
|
|
343
|
-
},
|
|
344
|
-
{
|
|
345
|
-
'name': 'amount'
|
|
346
|
-
},
|
|
347
|
-
{
|
|
348
|
-
'name': 'userId'
|
|
349
|
-
},
|
|
350
|
-
{
|
|
351
|
-
'name': 'userSecret'
|
|
352
|
-
},
|
|
353
|
-
{
|
|
354
|
-
'name': 'accountId'
|
|
355
|
-
},
|
|
356
|
-
{
|
|
357
|
-
'name': 'limit_price'
|
|
358
|
-
},
|
|
359
|
-
{
|
|
360
|
-
'name': 'stop_price'
|
|
361
|
-
},
|
|
362
|
-
{
|
|
363
|
-
'name': 'post_only'
|
|
364
|
-
},
|
|
365
|
-
{
|
|
366
|
-
'name': 'expiration_date'
|
|
367
|
-
},
|
|
368
|
-
]
|
|
369
|
-
},
|
|
370
|
-
'/accounts/{accountId}/trading/instruments/cryptocurrencyPairs-GET': {
|
|
371
|
-
'parameters': [
|
|
372
|
-
{
|
|
373
|
-
'name': 'userId'
|
|
374
|
-
},
|
|
375
|
-
{
|
|
376
|
-
'name': 'userSecret'
|
|
377
|
-
},
|
|
378
|
-
{
|
|
379
|
-
'name': 'accountId'
|
|
380
|
-
},
|
|
381
|
-
{
|
|
382
|
-
'name': 'base'
|
|
383
|
-
},
|
|
384
|
-
{
|
|
385
|
-
'name': 'quote'
|
|
386
|
-
},
|
|
387
|
-
]
|
|
388
|
-
},
|
|
389
314
|
'/accounts/{accountId}/optionStrategy-POST': {
|
|
390
315
|
'parameters': [
|
|
391
316
|
{
|
|
@@ -578,6 +503,22 @@ operation_parameter_map = {
|
|
|
578
503
|
},
|
|
579
504
|
]
|
|
580
505
|
},
|
|
506
|
+
'/accounts/{accountId}/trading/instruments/cryptocurrencyPairs/{instrumentSymbol}/quote-GET': {
|
|
507
|
+
'parameters': [
|
|
508
|
+
{
|
|
509
|
+
'name': 'userId'
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
'name': 'userSecret'
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
'name': 'accountId'
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
'name': 'instrumentSymbol'
|
|
519
|
+
},
|
|
520
|
+
]
|
|
521
|
+
},
|
|
581
522
|
'/trade/impact-POST': {
|
|
582
523
|
'parameters': [
|
|
583
524
|
{
|
|
@@ -764,6 +705,46 @@ operation_parameter_map = {
|
|
|
764
705
|
},
|
|
765
706
|
]
|
|
766
707
|
},
|
|
708
|
+
'/accounts/{accountId}/trading/simple-POST': {
|
|
709
|
+
'parameters': [
|
|
710
|
+
{
|
|
711
|
+
'name': 'instrument'
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
'name': 'side'
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
'name': 'type'
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
'name': 'time_in_force'
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
'name': 'amount'
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
'name': 'userId'
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
'name': 'userSecret'
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
'name': 'accountId'
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
'name': 'limit_price'
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
'name': 'stop_price'
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
'name': 'post_only'
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
'name': 'expiration_date'
|
|
745
|
+
},
|
|
746
|
+
]
|
|
747
|
+
},
|
|
767
748
|
'/accounts/{accountId}/trading/simple/preview-POST': {
|
|
768
749
|
'parameters': [
|
|
769
750
|
{
|
|
@@ -841,6 +822,25 @@ operation_parameter_map = {
|
|
|
841
822
|
},
|
|
842
823
|
]
|
|
843
824
|
},
|
|
825
|
+
'/accounts/{accountId}/trading/instruments/cryptocurrencyPairs-GET': {
|
|
826
|
+
'parameters': [
|
|
827
|
+
{
|
|
828
|
+
'name': 'userId'
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
'name': 'userSecret'
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
'name': 'accountId'
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
'name': 'base'
|
|
838
|
+
},
|
|
839
|
+
{
|
|
840
|
+
'name': 'quote'
|
|
841
|
+
},
|
|
842
|
+
]
|
|
843
|
+
},
|
|
844
844
|
'/activities-GET': {
|
|
845
845
|
'parameters': [
|
|
846
846
|
{
|
|
@@ -42,8 +42,11 @@ class PathValues(str, enum.Enum):
|
|
|
42
42
|
ACCOUNTS_ACCOUNT_ID_ORDERS_CANCEL = "/accounts/{accountId}/orders/cancel"
|
|
43
43
|
ACCOUNTS_ACCOUNT_ID_TRADING_BRACKET = "/accounts/{accountId}/trading/bracket"
|
|
44
44
|
ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE_BROKERAGE_ORDER_ID_REPLACE = "/accounts/{accountId}/trading/simple/{brokerageOrderId}/replace"
|
|
45
|
+
ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE = "/accounts/{accountId}/trading/simple"
|
|
45
46
|
ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE_BROKERAGE_ORDER_ID_CANCEL = "/accounts/{accountId}/trading/simple/{brokerageOrderId}/cancel"
|
|
46
47
|
ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE_PREVIEW = "/accounts/{accountId}/trading/simple/preview"
|
|
48
|
+
ACCOUNTS_ACCOUNT_ID_TRADING_INSTRUMENTS_CRYPTOCURRENCY_PAIRS = "/accounts/{accountId}/trading/instruments/cryptocurrencyPairs"
|
|
49
|
+
ACCOUNTS_ACCOUNT_ID_TRADING_INSTRUMENTS_CRYPTOCURRENCY_PAIRS_INSTRUMENT_SYMBOL_QUOTE = "/accounts/{accountId}/trading/instruments/cryptocurrencyPairs/{instrumentSymbol}/quote"
|
|
47
50
|
ACCOUNTS_ACCOUNT_ID_TRADING_OPTIONS = "/accounts/{accountId}/trading/options"
|
|
48
51
|
SNAP_TRADE_PARTNERS = "/snapTrade/partners"
|
|
49
52
|
ACCOUNTS_ACCOUNT_ID_SYMBOLS = "/accounts/{accountId}/symbols"
|
|
@@ -56,6 +59,3 @@ class PathValues(str, enum.Enum):
|
|
|
56
59
|
SECURITY_TYPES = "/securityTypes"
|
|
57
60
|
SYMBOLS = "/symbols"
|
|
58
61
|
SYMBOLS_QUERY = "/symbols/{query}"
|
|
59
|
-
ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE = "/accounts/{accountId}/trading/simple"
|
|
60
|
-
ACCOUNTS_ACCOUNT_ID_TRADING_INSTRUMENTS_CRYPTOCURRENCY_PAIRS = "/accounts/{accountId}/trading/instruments/cryptocurrencyPairs"
|
|
61
|
-
ACCOUNTS_ACCOUNT_ID_TRADING_INSTRUMENTS_CRYPTOCURRENCY_PAIRS_INSTRUMENT_SYMBOL_QUOTE = "/accounts/{accountId}/trading/instruments/cryptocurrencyPairs/{instrumentSymbol}/quote"
|
{snaptrade_python_sdk-11.0.106.dist-info → snaptrade_python_sdk-11.0.108.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: snaptrade-python-sdk
|
|
3
|
-
Version: 11.0.
|
|
3
|
+
Version: 11.0.108
|
|
4
4
|
Summary: Client for SnapTrade
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: SnapTrade
|
|
@@ -30,7 +30,7 @@ Description-Content-Type: text/markdown
|
|
|
30
30
|
Connect brokerage accounts to your app for live positions and trading
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
[](https://pypi.org/project/snaptrade-python-sdk/11.0.108)
|
|
34
34
|
[](https://github.com/passiv/snaptrade-sdks/tree/master/sdks/python#readme)
|
|
35
35
|
[](https://snaptrade.com/)
|
|
36
36
|
|
|
@@ -69,9 +69,6 @@ Connect brokerage accounts to your app for live positions and trading
|
|
|
69
69
|
* [`snaptrade.connections.remove_brokerage_authorization`](#snaptradeconnectionsremove_brokerage_authorization)
|
|
70
70
|
* [`snaptrade.connections.return_rates`](#snaptradeconnectionsreturn_rates)
|
|
71
71
|
* [`snaptrade.connections.session_events`](#snaptradeconnectionssession_events)
|
|
72
|
-
* [`snaptrade.crypto_trading.get_cryptocurrency_pair_quote`](#snaptradecrypto_tradingget_cryptocurrency_pair_quote)
|
|
73
|
-
* [`snaptrade.crypto_trading.place_simple_order`](#snaptradecrypto_tradingplace_simple_order)
|
|
74
|
-
* [`snaptrade.crypto_trading.search_cryptocurrency_pair_instruments`](#snaptradecrypto_tradingsearch_cryptocurrency_pair_instruments)
|
|
75
72
|
* [`snaptrade.options.get_option_strategy`](#snaptradeoptionsget_option_strategy)
|
|
76
73
|
* [`snaptrade.options.get_options_chain`](#snaptradeoptionsget_options_chain)
|
|
77
74
|
* [`snaptrade.options.get_options_strategy_quote`](#snaptradeoptionsget_options_strategy_quote)
|
|
@@ -90,14 +87,17 @@ Connect brokerage accounts to your app for live positions and trading
|
|
|
90
87
|
* [`snaptrade.reference_data.symbol_search_user_account`](#snaptradereference_datasymbol_search_user_account)
|
|
91
88
|
* [`snaptrade.trading.cancel_order`](#snaptradetradingcancel_order)
|
|
92
89
|
* [`snaptrade.trading.cancel_user_account_order`](#snaptradetradingcancel_user_account_order)
|
|
90
|
+
* [`snaptrade.trading.get_cryptocurrency_pair_quote`](#snaptradetradingget_cryptocurrency_pair_quote)
|
|
93
91
|
* [`snaptrade.trading.get_order_impact`](#snaptradetradingget_order_impact)
|
|
94
92
|
* [`snaptrade.trading.get_user_account_quotes`](#snaptradetradingget_user_account_quotes)
|
|
95
93
|
* [`snaptrade.trading.place_bracket_order`](#snaptradetradingplace_bracket_order)
|
|
96
94
|
* [`snaptrade.trading.place_force_order`](#snaptradetradingplace_force_order)
|
|
97
95
|
* [`snaptrade.trading.place_mleg_order`](#snaptradetradingplace_mleg_order)
|
|
98
96
|
* [`snaptrade.trading.place_order`](#snaptradetradingplace_order)
|
|
97
|
+
* [`snaptrade.trading.place_simple_order`](#snaptradetradingplace_simple_order)
|
|
99
98
|
* [`snaptrade.trading.preview_simple_order`](#snaptradetradingpreview_simple_order)
|
|
100
99
|
* [`snaptrade.trading.replace_order`](#snaptradetradingreplace_order)
|
|
100
|
+
* [`snaptrade.trading.search_cryptocurrency_pair_instruments`](#snaptradetradingsearch_cryptocurrency_pair_instruments)
|
|
101
101
|
* [`snaptrade.transactions_and_reporting.get_activities`](#snaptradetransactions_and_reportingget_activities)
|
|
102
102
|
* [`snaptrade.transactions_and_reporting.get_reporting_custom_range`](#snaptradetransactions_and_reportingget_reporting_custom_range)
|
|
103
103
|
|
|
@@ -110,7 +110,7 @@ Python >=3.8
|
|
|
110
110
|
## Installation<a id="installation"></a>
|
|
111
111
|
|
|
112
112
|
```sh
|
|
113
|
-
pip install snaptrade-python-sdk==11.0.
|
|
113
|
+
pip install snaptrade-python-sdk==11.0.108
|
|
114
114
|
```
|
|
115
115
|
|
|
116
116
|
## Getting Started<a id="getting-started"></a>
|
|
@@ -1142,169 +1142,6 @@ Optional comma separated list of session IDs used to filter the request on speci
|
|
|
1142
1142
|
|
|
1143
1143
|
---
|
|
1144
1144
|
|
|
1145
|
-
### `snaptrade.crypto_trading.get_cryptocurrency_pair_quote`<a id="snaptradecrypto_tradingget_cryptocurrency_pair_quote"></a>
|
|
1146
|
-
|
|
1147
|
-
Gets a quote for the specified account.
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
1151
|
-
|
|
1152
|
-
```python
|
|
1153
|
-
get_cryptocurrency_pair_quote_response = (
|
|
1154
|
-
snaptrade.crypto_trading.get_cryptocurrency_pair_quote(
|
|
1155
|
-
user_id="snaptrade-user-123",
|
|
1156
|
-
user_secret="adf2aa34-8219-40f7-a6b3-60156985cc61",
|
|
1157
|
-
account_id="917c8734-8470-4a3e-a18f-57c3f2ee6631",
|
|
1158
|
-
instrument_symbol="BTC-USD",
|
|
1159
|
-
)
|
|
1160
|
-
)
|
|
1161
|
-
```
|
|
1162
|
-
|
|
1163
|
-
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
1164
|
-
|
|
1165
|
-
##### user_id: `str`<a id="user_id-str"></a>
|
|
1166
|
-
|
|
1167
|
-
##### user_secret: `str`<a id="user_secret-str"></a>
|
|
1168
|
-
|
|
1169
|
-
##### account_id: `str`<a id="account_id-str"></a>
|
|
1170
|
-
|
|
1171
|
-
##### instrument_symbol: `str`<a id="instrument_symbol-str"></a>
|
|
1172
|
-
|
|
1173
|
-
#### 🔄 Return<a id="🔄-return"></a>
|
|
1174
|
-
|
|
1175
|
-
[`CryptocurrencyPairQuote`](./snaptrade_client/type/cryptocurrency_pair_quote.py)
|
|
1176
|
-
|
|
1177
|
-
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
1178
|
-
|
|
1179
|
-
`/accounts/{accountId}/trading/instruments/cryptocurrencyPairs/{instrumentSymbol}/quote` `get`
|
|
1180
|
-
|
|
1181
|
-
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1182
|
-
|
|
1183
|
-
---
|
|
1184
|
-
|
|
1185
|
-
### `snaptrade.crypto_trading.place_simple_order`<a id="snaptradecrypto_tradingplace_simple_order"></a>
|
|
1186
|
-
|
|
1187
|
-
Places an order in the specified account.
|
|
1188
|
-
This endpoint does not compute the impact to the account balance from the order before submitting the order.
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
1192
|
-
|
|
1193
|
-
```python
|
|
1194
|
-
place_simple_order_response = snaptrade.crypto_trading.place_simple_order(
|
|
1195
|
-
instrument={
|
|
1196
|
-
"symbol": "AAPL",
|
|
1197
|
-
"type": "EQUITY",
|
|
1198
|
-
},
|
|
1199
|
-
side="BUY",
|
|
1200
|
-
type="MARKET",
|
|
1201
|
-
time_in_force="GTC",
|
|
1202
|
-
amount="123.45",
|
|
1203
|
-
user_id="snaptrade-user-123",
|
|
1204
|
-
user_secret="adf2aa34-8219-40f7-a6b3-60156985cc61",
|
|
1205
|
-
account_id="917c8734-8470-4a3e-a18f-57c3f2ee6631",
|
|
1206
|
-
limit_price="123.45",
|
|
1207
|
-
stop_price="123.45",
|
|
1208
|
-
post_only=False,
|
|
1209
|
-
expiration_date="2024-01-01T00:00:00Z",
|
|
1210
|
-
)
|
|
1211
|
-
```
|
|
1212
|
-
|
|
1213
|
-
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
1214
|
-
|
|
1215
|
-
##### instrument: [`TradingInstrument`](./snaptrade_client/type/trading_instrument.py)<a id="instrument-tradinginstrumentsnaptrade_clienttypetrading_instrumentpy"></a>
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
##### side: [`ActionStrict`](./snaptrade_client/type/action_strict.py)<a id="side-actionstrictsnaptrade_clienttypeaction_strictpy"></a>
|
|
1219
|
-
|
|
1220
|
-
##### type: `str`<a id="type-str"></a>
|
|
1221
|
-
|
|
1222
|
-
The type of order to place.
|
|
1223
|
-
|
|
1224
|
-
##### time_in_force: `str`<a id="time_in_force-str"></a>
|
|
1225
|
-
|
|
1226
|
-
The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled. - `GTD` - Good Til Date. The order is valid until the specified date.
|
|
1227
|
-
|
|
1228
|
-
##### amount: `str`<a id="amount-str"></a>
|
|
1229
|
-
|
|
1230
|
-
The amount of the base currency to buy or sell.
|
|
1231
|
-
|
|
1232
|
-
##### user_id: `str`<a id="user_id-str"></a>
|
|
1233
|
-
|
|
1234
|
-
##### user_secret: `str`<a id="user_secret-str"></a>
|
|
1235
|
-
|
|
1236
|
-
##### account_id: `str`<a id="account_id-str"></a>
|
|
1237
|
-
|
|
1238
|
-
##### limit_price: `str`<a id="limit_price-str"></a>
|
|
1239
|
-
|
|
1240
|
-
The limit price. Required if the order type is LIMIT, STOP_LOSS_LIMIT or TAKE_PROFIT_LIMIT.
|
|
1241
|
-
|
|
1242
|
-
##### stop_price: `str`<a id="stop_price-str"></a>
|
|
1243
|
-
|
|
1244
|
-
The stop price. Required if the order type is STOP_LOSS_MARKET, STOP_LOSS_LIMIT, TAKE_PROFIT_MARKET or TAKE_PROFIT_LIMIT.
|
|
1245
|
-
|
|
1246
|
-
##### post_only: `bool`<a id="post_only-bool"></a>
|
|
1247
|
-
|
|
1248
|
-
Valid and required only for order type LIMIT. If true orders that would be filled immediately are rejected to avoid incurring TAKER fees.
|
|
1249
|
-
|
|
1250
|
-
##### expiration_date: `datetime`<a id="expiration_date-datetime"></a>
|
|
1251
|
-
|
|
1252
|
-
The expiration date of the order. Required if the time_in_force is GTD.
|
|
1253
|
-
|
|
1254
|
-
#### ⚙️ Request Body<a id="⚙️-request-body"></a>
|
|
1255
|
-
|
|
1256
|
-
[`SimpleOrderForm`](./snaptrade_client/type/simple_order_form.py)
|
|
1257
|
-
#### 🔄 Return<a id="🔄-return"></a>
|
|
1258
|
-
|
|
1259
|
-
[`OrderUpdatedResponse`](./snaptrade_client/type/order_updated_response.py)
|
|
1260
|
-
|
|
1261
|
-
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
1262
|
-
|
|
1263
|
-
`/accounts/{accountId}/trading/simple` `post`
|
|
1264
|
-
|
|
1265
|
-
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1266
|
-
|
|
1267
|
-
---
|
|
1268
|
-
|
|
1269
|
-
### `snaptrade.crypto_trading.search_cryptocurrency_pair_instruments`<a id="snaptradecrypto_tradingsearch_cryptocurrency_pair_instruments"></a>
|
|
1270
|
-
|
|
1271
|
-
Searches cryptocurrency pairs instruments accessible to the specified account.
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
1275
|
-
|
|
1276
|
-
```python
|
|
1277
|
-
search_cryptocurrency_pair_instruments_response = (
|
|
1278
|
-
snaptrade.crypto_trading.search_cryptocurrency_pair_instruments(
|
|
1279
|
-
user_id="snaptrade-user-123",
|
|
1280
|
-
user_secret="adf2aa34-8219-40f7-a6b3-60156985cc61",
|
|
1281
|
-
account_id="917c8734-8470-4a3e-a18f-57c3f2ee6631",
|
|
1282
|
-
base="BTC",
|
|
1283
|
-
quote="USD",
|
|
1284
|
-
)
|
|
1285
|
-
)
|
|
1286
|
-
```
|
|
1287
|
-
|
|
1288
|
-
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
1289
|
-
|
|
1290
|
-
##### user_id: `str`<a id="user_id-str"></a>
|
|
1291
|
-
|
|
1292
|
-
##### user_secret: `str`<a id="user_secret-str"></a>
|
|
1293
|
-
|
|
1294
|
-
##### account_id: `str`<a id="account_id-str"></a>
|
|
1295
|
-
|
|
1296
|
-
##### base: `str`<a id="base-str"></a>
|
|
1297
|
-
|
|
1298
|
-
##### quote: `str`<a id="quote-str"></a>
|
|
1299
|
-
|
|
1300
|
-
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
1301
|
-
|
|
1302
|
-
`/accounts/{accountId}/trading/instruments/cryptocurrencyPairs` `get`
|
|
1303
|
-
|
|
1304
|
-
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1305
|
-
|
|
1306
|
-
---
|
|
1307
|
-
|
|
1308
1145
|
### `snaptrade.options.get_option_strategy`<a id="snaptradeoptionsget_option_strategy"></a>
|
|
1309
1146
|
|
|
1310
1147
|
Creates an option strategy object that will be used to place an option strategy order.
|
|
@@ -1924,6 +1761,46 @@ Order ID returned by brokerage. This is the unique identifier for the order in t
|
|
|
1924
1761
|
|
|
1925
1762
|
---
|
|
1926
1763
|
|
|
1764
|
+
### `snaptrade.trading.get_cryptocurrency_pair_quote`<a id="snaptradetradingget_cryptocurrency_pair_quote"></a>
|
|
1765
|
+
|
|
1766
|
+
Gets a quote for the specified account.
|
|
1767
|
+
|
|
1768
|
+
|
|
1769
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
1770
|
+
|
|
1771
|
+
```python
|
|
1772
|
+
get_cryptocurrency_pair_quote_response = (
|
|
1773
|
+
snaptrade.trading.get_cryptocurrency_pair_quote(
|
|
1774
|
+
user_id="snaptrade-user-123",
|
|
1775
|
+
user_secret="adf2aa34-8219-40f7-a6b3-60156985cc61",
|
|
1776
|
+
account_id="917c8734-8470-4a3e-a18f-57c3f2ee6631",
|
|
1777
|
+
instrument_symbol="BTC-USD",
|
|
1778
|
+
)
|
|
1779
|
+
)
|
|
1780
|
+
```
|
|
1781
|
+
|
|
1782
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
1783
|
+
|
|
1784
|
+
##### user_id: `str`<a id="user_id-str"></a>
|
|
1785
|
+
|
|
1786
|
+
##### user_secret: `str`<a id="user_secret-str"></a>
|
|
1787
|
+
|
|
1788
|
+
##### account_id: `str`<a id="account_id-str"></a>
|
|
1789
|
+
|
|
1790
|
+
##### instrument_symbol: `str`<a id="instrument_symbol-str"></a>
|
|
1791
|
+
|
|
1792
|
+
#### 🔄 Return<a id="🔄-return"></a>
|
|
1793
|
+
|
|
1794
|
+
[`CryptocurrencyPairQuote`](./snaptrade_client/type/cryptocurrency_pair_quote.py)
|
|
1795
|
+
|
|
1796
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
1797
|
+
|
|
1798
|
+
`/accounts/{accountId}/trading/instruments/cryptocurrencyPairs/{instrumentSymbol}/quote` `get`
|
|
1799
|
+
|
|
1800
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1801
|
+
|
|
1802
|
+
---
|
|
1803
|
+
|
|
1927
1804
|
### `snaptrade.trading.get_order_impact`<a id="snaptradetradingget_order_impact"></a>
|
|
1928
1805
|
|
|
1929
1806
|
Simulates an order and its impact on the account. This endpoint does not place the order with the brokerage. If successful, it returns a `Trade` object and the ID of the object can be used to place the order with the brokerage using the [place checked order endpoint](/reference/Trading/Trading_placeOrder). Please note that the `Trade` object returned expires after 5 minutes. Any order placed using an expired `Trade` will be rejected.
|
|
@@ -2324,6 +2201,90 @@ Optional, defaults to true. Determines if a wait is performed to check on order
|
|
|
2324
2201
|
|
|
2325
2202
|
---
|
|
2326
2203
|
|
|
2204
|
+
### `snaptrade.trading.place_simple_order`<a id="snaptradetradingplace_simple_order"></a>
|
|
2205
|
+
|
|
2206
|
+
Places an order in the specified account.
|
|
2207
|
+
This endpoint does not compute the impact to the account balance from the order before submitting the order.
|
|
2208
|
+
|
|
2209
|
+
|
|
2210
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
2211
|
+
|
|
2212
|
+
```python
|
|
2213
|
+
place_simple_order_response = snaptrade.trading.place_simple_order(
|
|
2214
|
+
instrument={
|
|
2215
|
+
"symbol": "AAPL",
|
|
2216
|
+
"type": "EQUITY",
|
|
2217
|
+
},
|
|
2218
|
+
side="BUY",
|
|
2219
|
+
type="MARKET",
|
|
2220
|
+
time_in_force="GTC",
|
|
2221
|
+
amount="123.45",
|
|
2222
|
+
user_id="snaptrade-user-123",
|
|
2223
|
+
user_secret="adf2aa34-8219-40f7-a6b3-60156985cc61",
|
|
2224
|
+
account_id="917c8734-8470-4a3e-a18f-57c3f2ee6631",
|
|
2225
|
+
limit_price="123.45",
|
|
2226
|
+
stop_price="123.45",
|
|
2227
|
+
post_only=False,
|
|
2228
|
+
expiration_date="2024-01-01T00:00:00Z",
|
|
2229
|
+
)
|
|
2230
|
+
```
|
|
2231
|
+
|
|
2232
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
2233
|
+
|
|
2234
|
+
##### instrument: [`TradingInstrument`](./snaptrade_client/type/trading_instrument.py)<a id="instrument-tradinginstrumentsnaptrade_clienttypetrading_instrumentpy"></a>
|
|
2235
|
+
|
|
2236
|
+
|
|
2237
|
+
##### side: [`ActionStrict`](./snaptrade_client/type/action_strict.py)<a id="side-actionstrictsnaptrade_clienttypeaction_strictpy"></a>
|
|
2238
|
+
|
|
2239
|
+
##### type: `str`<a id="type-str"></a>
|
|
2240
|
+
|
|
2241
|
+
The type of order to place.
|
|
2242
|
+
|
|
2243
|
+
##### time_in_force: `str`<a id="time_in_force-str"></a>
|
|
2244
|
+
|
|
2245
|
+
The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled. - `GTD` - Good Til Date. The order is valid until the specified date.
|
|
2246
|
+
|
|
2247
|
+
##### amount: `str`<a id="amount-str"></a>
|
|
2248
|
+
|
|
2249
|
+
The amount of the base currency to buy or sell.
|
|
2250
|
+
|
|
2251
|
+
##### user_id: `str`<a id="user_id-str"></a>
|
|
2252
|
+
|
|
2253
|
+
##### user_secret: `str`<a id="user_secret-str"></a>
|
|
2254
|
+
|
|
2255
|
+
##### account_id: `str`<a id="account_id-str"></a>
|
|
2256
|
+
|
|
2257
|
+
##### limit_price: `str`<a id="limit_price-str"></a>
|
|
2258
|
+
|
|
2259
|
+
The limit price. Required if the order type is LIMIT, STOP_LOSS_LIMIT or TAKE_PROFIT_LIMIT.
|
|
2260
|
+
|
|
2261
|
+
##### stop_price: `str`<a id="stop_price-str"></a>
|
|
2262
|
+
|
|
2263
|
+
The stop price. Required if the order type is STOP_LOSS_MARKET, STOP_LOSS_LIMIT, TAKE_PROFIT_MARKET or TAKE_PROFIT_LIMIT.
|
|
2264
|
+
|
|
2265
|
+
##### post_only: `bool`<a id="post_only-bool"></a>
|
|
2266
|
+
|
|
2267
|
+
Valid and required only for order type LIMIT. If true orders that would be filled immediately are rejected to avoid incurring TAKER fees.
|
|
2268
|
+
|
|
2269
|
+
##### expiration_date: `datetime`<a id="expiration_date-datetime"></a>
|
|
2270
|
+
|
|
2271
|
+
The expiration date of the order. Required if the time_in_force is GTD.
|
|
2272
|
+
|
|
2273
|
+
#### ⚙️ Request Body<a id="⚙️-request-body"></a>
|
|
2274
|
+
|
|
2275
|
+
[`SimpleOrderForm`](./snaptrade_client/type/simple_order_form.py)
|
|
2276
|
+
#### 🔄 Return<a id="🔄-return"></a>
|
|
2277
|
+
|
|
2278
|
+
[`OrderUpdatedResponse`](./snaptrade_client/type/order_updated_response.py)
|
|
2279
|
+
|
|
2280
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
2281
|
+
|
|
2282
|
+
`/accounts/{accountId}/trading/simple` `post`
|
|
2283
|
+
|
|
2284
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
2285
|
+
|
|
2286
|
+
---
|
|
2287
|
+
|
|
2327
2288
|
### `snaptrade.trading.preview_simple_order`<a id="snaptradetradingpreview_simple_order"></a>
|
|
2328
2289
|
|
|
2329
2290
|
Previews an order using the specified account.
|
|
@@ -2481,6 +2442,45 @@ The price at which a stop order is triggered for `Stop` and `StopLimit` orders.
|
|
|
2481
2442
|
|
|
2482
2443
|
---
|
|
2483
2444
|
|
|
2445
|
+
### `snaptrade.trading.search_cryptocurrency_pair_instruments`<a id="snaptradetradingsearch_cryptocurrency_pair_instruments"></a>
|
|
2446
|
+
|
|
2447
|
+
Searches cryptocurrency pairs instruments accessible to the specified account.
|
|
2448
|
+
|
|
2449
|
+
|
|
2450
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
2451
|
+
|
|
2452
|
+
```python
|
|
2453
|
+
search_cryptocurrency_pair_instruments_response = (
|
|
2454
|
+
snaptrade.trading.search_cryptocurrency_pair_instruments(
|
|
2455
|
+
user_id="snaptrade-user-123",
|
|
2456
|
+
user_secret="adf2aa34-8219-40f7-a6b3-60156985cc61",
|
|
2457
|
+
account_id="917c8734-8470-4a3e-a18f-57c3f2ee6631",
|
|
2458
|
+
base="BTC",
|
|
2459
|
+
quote="USD",
|
|
2460
|
+
)
|
|
2461
|
+
)
|
|
2462
|
+
```
|
|
2463
|
+
|
|
2464
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
2465
|
+
|
|
2466
|
+
##### user_id: `str`<a id="user_id-str"></a>
|
|
2467
|
+
|
|
2468
|
+
##### user_secret: `str`<a id="user_secret-str"></a>
|
|
2469
|
+
|
|
2470
|
+
##### account_id: `str`<a id="account_id-str"></a>
|
|
2471
|
+
|
|
2472
|
+
##### base: `str`<a id="base-str"></a>
|
|
2473
|
+
|
|
2474
|
+
##### quote: `str`<a id="quote-str"></a>
|
|
2475
|
+
|
|
2476
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
2477
|
+
|
|
2478
|
+
`/accounts/{accountId}/trading/instruments/cryptocurrencyPairs` `get`
|
|
2479
|
+
|
|
2480
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
2481
|
+
|
|
2482
|
+
---
|
|
2483
|
+
|
|
2484
2484
|
### `snaptrade.transactions_and_reporting.get_activities`<a id="snaptradetransactions_and_reportingget_activities"></a>
|
|
2485
2485
|

|
|
2486
2486
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
snaptrade_client/__init__.py,sha256=
|
|
2
|
-
snaptrade_client/api_client.py,sha256=
|
|
1
|
+
snaptrade_client/__init__.py,sha256=yrKLLSQvn79owYu1thxts0nIE3g6k55asdeXnbW2zFI,820
|
|
2
|
+
snaptrade_client/api_client.py,sha256=VAIo0H-7KYYNF_k60s2cM4un-ETvn5_D6wfsvUfKDt0,73975
|
|
3
3
|
snaptrade_client/api_response.py,sha256=mZn18p_TNr6OY0HXTZW5InL9iXfqsJWstYGeGD-euPA,663
|
|
4
4
|
snaptrade_client/apis/__init__.py,sha256=RTosXhMn41tMsKPUjIy-VK-_efOWzhkKiuGggJ3A6E0,214
|
|
5
|
-
snaptrade_client/apis/path_to_api.py,sha256=
|
|
5
|
+
snaptrade_client/apis/path_to_api.py,sha256=fDtFd8AqFO8oDYvdEAFTO9PrVL_qMSjlch1YRVeidlk,13189
|
|
6
6
|
snaptrade_client/apis/paths/__init__.py,sha256=oIb-tz_ei5m0RWOOB0qXTkBKu61nYtwOUlWvQbD5gFE,243
|
|
7
7
|
snaptrade_client/apis/paths/accounts.py,sha256=aHSwrwNqPSa2ikmR-WP0dg2LbRBSNBB3n3_2OTCcxs4,103
|
|
8
8
|
snaptrade_client/apis/paths/accounts_account_id.py,sha256=Xv0hHwov50tVcdtqCS-Np0BmqMhUwrvjIQLaa9yPF3U,207
|
|
@@ -57,8 +57,8 @@ snaptrade_client/apis/paths/symbols_query.py,sha256=A8docGGmlT-C-DqhATL5eXMP2WEQ
|
|
|
57
57
|
snaptrade_client/apis/paths/trade_impact.py,sha256=IPndLeDc_GS9wJmB5jTpnRZhJAdbbNiCf58CyLzDN-k,113
|
|
58
58
|
snaptrade_client/apis/paths/trade_place.py,sha256=ejaerOFMV2hpLsWk7f5-jq_xNN8v2ekuwpGKeZ7yDbE,111
|
|
59
59
|
snaptrade_client/apis/paths/trade_trade_id.py,sha256=obGSPVLZRpWmozwuCrxnDL2NQzNNUMJ_QppjrljIjKo,116
|
|
60
|
-
snaptrade_client/apis/tag_to_api.py,sha256=
|
|
61
|
-
snaptrade_client/apis/tags/__init__.py,sha256=
|
|
60
|
+
snaptrade_client/apis/tag_to_api.py,sha256=4kBzm9kk13yI5s3At61eiaZ-B6suxtPv9Oq1z--nBks,1601
|
|
61
|
+
snaptrade_client/apis/tags/__init__.py,sha256=0gw9bF8gMwlrWqLRqYHijltHnho9T8l83Pobtm194pw,585
|
|
62
62
|
snaptrade_client/apis/tags/account_information_api.py,sha256=lbGNEG6xu9Y7xjiQnNKxafMIMwx2NA-kJraqymyd-j4,192
|
|
63
63
|
snaptrade_client/apis/tags/account_information_api_generated.py,sha256=V6d-xrAxstKYhHDvw-qtUDMUNhYTl96lC7PMy-EFjrM,1594
|
|
64
64
|
snaptrade_client/apis/tags/api_status_api.py,sha256=N4rdI4EmxVg5mxhu-Q2UVkIKgDKrZWhRmO7R_T1IkZw,156
|
|
@@ -67,20 +67,18 @@ snaptrade_client/apis/tags/authentication_api.py,sha256=9QKQmKP326PcQusLJaW5XDaC
|
|
|
67
67
|
snaptrade_client/apis/tags/authentication_api_generated.py,sha256=Gt6muDG-vWm-Z8tkCPG3Ae2Dh0C-LhuTMG33czSpl9I,921
|
|
68
68
|
snaptrade_client/apis/tags/connections_api.py,sha256=pNGuSjvX2Fg2IJymMvM3DcoUllKUmUQQpTtLVbY2Yi8,163
|
|
69
69
|
snaptrade_client/apis/tags/connections_api_generated.py,sha256=inWc0qR9q4SFyTWsfw_iI8foMNGaQ6oeZ1LaQy_qnjQ,1242
|
|
70
|
-
snaptrade_client/apis/tags/crypto_trading_api.py,sha256=fUyKom0ogKuy8bLpsFoGExyzrW0P89B4QgxAlWY656E,172
|
|
71
|
-
snaptrade_client/apis/tags/crypto_trading_api_generated.py,sha256=gYDRUhcg5fEDJgfj2n9TsHqzmZPO_heiPyYjf1OGCE8,842
|
|
72
70
|
snaptrade_client/apis/tags/options_api.py,sha256=tl2HI1JChvEGrE5mcSLN85Ah5AHtjVa4n8Hx7GY-ZNA,147
|
|
73
71
|
snaptrade_client/apis/tags/options_api_generated.py,sha256=NehERRdEJhPpg2Q2XaHZc4bVMX7LOlguLQr-4feIH6o,994
|
|
74
72
|
snaptrade_client/apis/tags/reference_data_api.py,sha256=DdmRsoiG7nLk8EgXWT1KvurcQnPYAlr1Dz0kdpdWGRQ,172
|
|
75
73
|
snaptrade_client/apis/tags/reference_data_api_generated.py,sha256=0QKGp2TcqDmuYsuPuXL0Wf14aIihWLYXpnHTFT9oKwY,1499
|
|
76
74
|
snaptrade_client/apis/tags/trading_api.py,sha256=J0L9w7V4uoH3_fkvmJhpVQTIUQCACBgrb_QQ7VTILqI,147
|
|
77
|
-
snaptrade_client/apis/tags/trading_api_generated.py,sha256=
|
|
75
|
+
snaptrade_client/apis/tags/trading_api_generated.py,sha256=YMq2FI3cyZIY_mEPRmESMua-Ps1kgyxfsVsDGsTMYjw,1951
|
|
78
76
|
snaptrade_client/apis/tags/transactions_and_reporting_api.py,sha256=4qC3MPU73Cj2ePSxD_GIjrvvxLbjEEsan2VcDqVZXd4,217
|
|
79
77
|
snaptrade_client/apis/tags/transactions_and_reporting_api_generated.py,sha256=Tw43o6-dzwGDnD5hPtc5Vz2f7EdM-yFw8FQkLI5suak,573
|
|
80
|
-
snaptrade_client/client.py,sha256=
|
|
81
|
-
snaptrade_client/client.pyi,sha256=
|
|
78
|
+
snaptrade_client/client.py,sha256=goDwWRv9909OPXDnGGYst_mr53bg6RUs4PwIvnrl_kE,2116
|
|
79
|
+
snaptrade_client/client.pyi,sha256=goDwWRv9909OPXDnGGYst_mr53bg6RUs4PwIvnrl_kE,2116
|
|
82
80
|
snaptrade_client/client_custom.py,sha256=Jx9ulCzelMFlESjzVFQSjBlYcH4dWxSJJWZDMPLyetM,745
|
|
83
|
-
snaptrade_client/configuration.py,sha256=
|
|
81
|
+
snaptrade_client/configuration.py,sha256=xWx-qpLVUJWbe4ZCWKhi3uJXVu71l9dOeMOjTm8OaaE,19262
|
|
84
82
|
snaptrade_client/exceptions.py,sha256=X0apI_sgQpGpa-qIqPUClReCdHAxeSuA6GW0YH_RsWg,7771
|
|
85
83
|
snaptrade_client/exceptions_base.py,sha256=LAQkaC5C61-SdBLfyMjb0K7AYJkWVuLmg2uCvHa71FM,2274
|
|
86
84
|
snaptrade_client/model/__init__.py,sha256=ayi2MIzcf0eAIsY13ToiNplV9tW-pMBFrC0I9yckGM8,350
|
|
@@ -411,8 +409,8 @@ snaptrade_client/model/user_secret.pyi,sha256=7xf__S566WtTq7VthmdVtrCBIfgpnYWYqE
|
|
|
411
409
|
snaptrade_client/model/validated_trade_body.py,sha256=NkTel1ulgSjBd6K7vur6puEbfrg3u1vdmtUKArOu8ws,3085
|
|
412
410
|
snaptrade_client/model/validated_trade_body.pyi,sha256=NkTel1ulgSjBd6K7vur6puEbfrg3u1vdmtUKArOu8ws,3085
|
|
413
411
|
snaptrade_client/models/__init__.py,sha256=I1pwuDZgpx0vWGPJmEqsldM5F9Pd101iA31xsd9S7Oo,12749
|
|
414
|
-
snaptrade_client/operation_parameter_map.py,sha256=
|
|
415
|
-
snaptrade_client/paths/__init__.py,sha256=
|
|
412
|
+
snaptrade_client/operation_parameter_map.py,sha256=O_ANBpVX1Bn3WgFNggL1sVZr4VuPbVJiF4YBwK_uleM,19229
|
|
413
|
+
snaptrade_client/paths/__init__.py,sha256=K056tD_Vj-bOiQnxSdL8DBksTpYdcSykFS7dUclcdR4,3811
|
|
416
414
|
snaptrade_client/paths/accounts/__init__.py,sha256=_Bqi6B13A-kgd0AOpqmcE1vTxJDfoz-r3Hwf-AmwW6A,307
|
|
417
415
|
snaptrade_client/paths/accounts/get.py,sha256=MDE_4VCylBroYDkMQe9II1qCGf6gTTDGCShFyGLXf00,16463
|
|
418
416
|
snaptrade_client/paths/accounts/get.pyi,sha256=gna7qIU-95WqOFl6qTsP18ZY7SKi9CYEBAbARPAPPF4,16261
|
|
@@ -748,7 +746,7 @@ snaptrade_client/type/user_secret.py,sha256=pKCVhqf1rROHwa6tvoyA5OAKXCBAmNDvIQCf
|
|
|
748
746
|
snaptrade_client/type/validated_trade_body.py,sha256=ZIPBQWii_a-9zHaBCJ6bQtmL1_I7AG0zwuvkY-ZQ6R4,890
|
|
749
747
|
snaptrade_client/type_util.py,sha256=JIrMYgJzd4IJ8Ne2vqcahlPA9dVmphL9sn8gwccCB4Y,563
|
|
750
748
|
snaptrade_client/validation_metadata.py,sha256=VTN5y-NudHXok1X468J4PnGze_tGEAcs1v3gsXmcrb0,3172
|
|
751
|
-
snaptrade_python_sdk-11.0.
|
|
752
|
-
snaptrade_python_sdk-11.0.
|
|
753
|
-
snaptrade_python_sdk-11.0.
|
|
754
|
-
snaptrade_python_sdk-11.0.
|
|
749
|
+
snaptrade_python_sdk-11.0.108.dist-info/LICENSE,sha256=W_1kcxEzOnZXIYJ1GVUipbmUu6dNLt-Pc-OI55h3k-A,1081
|
|
750
|
+
snaptrade_python_sdk-11.0.108.dist-info/METADATA,sha256=tq4RPrMvWTh01S29MJwmBoLWoR_WA0rYUdpL_d8nOX8,94702
|
|
751
|
+
snaptrade_python_sdk-11.0.108.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
752
|
+
snaptrade_python_sdk-11.0.108.dist-info/RECORD,,
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
"""
|
|
3
|
-
SnapTrade
|
|
4
|
-
|
|
5
|
-
Connect brokerage accounts to your app for live positions and trading
|
|
6
|
-
|
|
7
|
-
The version of the OpenAPI document: 1.0.0
|
|
8
|
-
Contact: api@snaptrade.com
|
|
9
|
-
Created by: https://snaptrade.com/
|
|
10
|
-
"""
|
|
11
|
-
|
|
12
|
-
from snaptrade_client.paths.accounts_account_id_trading_instruments_cryptocurrency_pairs_instrument_symbol_quote.get import GetCryptocurrencyPairQuote
|
|
13
|
-
from snaptrade_client.paths.accounts_account_id_trading_simple.post import PlaceSimpleOrder
|
|
14
|
-
from snaptrade_client.paths.accounts_account_id_trading_instruments_cryptocurrency_pairs.get import SearchCryptocurrencyPairInstruments
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class CryptoTradingApiGenerated(
|
|
18
|
-
GetCryptocurrencyPairQuote,
|
|
19
|
-
PlaceSimpleOrder,
|
|
20
|
-
SearchCryptocurrencyPairInstruments,
|
|
21
|
-
):
|
|
22
|
-
"""NOTE:
|
|
23
|
-
This class is auto generated by Konfig (https://konfigthis.com)
|
|
24
|
-
"""
|
|
25
|
-
pass
|
|
File without changes
|
|
File without changes
|