snaptrade-python-sdk 11.0.105__py3-none-any.whl → 11.0.106__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 +3 -0
- snaptrade_client/apis/tags/__init__.py +1 -0
- snaptrade_client/apis/tags/crypto_trading_api.py +6 -0
- snaptrade_client/apis/tags/crypto_trading_api_generated.py +25 -0
- snaptrade_client/apis/tags/trading_api_generated.py +0 -6
- snaptrade_client/client.py +2 -0
- snaptrade_client/client.pyi +2 -0
- 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.105.dist-info → snaptrade_python_sdk-11.0.106.dist-info}/METADATA +169 -169
- {snaptrade_python_sdk-11.0.105.dist-info → snaptrade_python_sdk-11.0.106.dist-info}/RECORD +17 -15
- {snaptrade_python_sdk-11.0.105.dist-info → snaptrade_python_sdk-11.0.106.dist-info}/LICENSE +0 -0
- {snaptrade_python_sdk-11.0.105.dist-info → snaptrade_python_sdk-11.0.106.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.106/python'
|
|
1159
1159
|
|
|
1160
1160
|
def __enter__(self):
|
|
1161
1161
|
return self
|
|
@@ -37,11 +37,8 @@ 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
|
|
41
40
|
from snaptrade_client.apis.paths.accounts_account_id_trading_simple_brokerage_order_id_cancel import AccountsAccountIdTradingSimpleBrokerageOrderIdCancel
|
|
42
41
|
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
|
|
45
42
|
from snaptrade_client.apis.paths.accounts_account_id_trading_options import AccountsAccountIdTradingOptions
|
|
46
43
|
from snaptrade_client.apis.paths.snap_trade_partners import SnapTradePartners
|
|
47
44
|
from snaptrade_client.apis.paths.accounts_account_id_symbols import AccountsAccountIdSymbols
|
|
@@ -54,6 +51,9 @@ from snaptrade_client.apis.paths.exchanges import Exchanges
|
|
|
54
51
|
from snaptrade_client.apis.paths.security_types import SecurityTypes
|
|
55
52
|
from snaptrade_client.apis.paths.symbols import Symbols
|
|
56
53
|
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,11 +94,8 @@ 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,
|
|
98
97
|
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE_BROKERAGE_ORDER_ID_CANCEL: AccountsAccountIdTradingSimpleBrokerageOrderIdCancel,
|
|
99
98
|
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,
|
|
102
99
|
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_OPTIONS: AccountsAccountIdTradingOptions,
|
|
103
100
|
PathValues.SNAP_TRADE_PARTNERS: SnapTradePartners,
|
|
104
101
|
PathValues.ACCOUNTS_ACCOUNT_ID_SYMBOLS: AccountsAccountIdSymbols,
|
|
@@ -111,6 +108,9 @@ PathToApi = typing_extensions.TypedDict(
|
|
|
111
108
|
PathValues.SECURITY_TYPES: SecurityTypes,
|
|
112
109
|
PathValues.SYMBOLS: Symbols,
|
|
113
110
|
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,11 +152,8 @@ 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,
|
|
156
155
|
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE_BROKERAGE_ORDER_ID_CANCEL: AccountsAccountIdTradingSimpleBrokerageOrderIdCancel,
|
|
157
156
|
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,
|
|
160
157
|
PathValues.ACCOUNTS_ACCOUNT_ID_TRADING_OPTIONS: AccountsAccountIdTradingOptions,
|
|
161
158
|
PathValues.SNAP_TRADE_PARTNERS: SnapTradePartners,
|
|
162
159
|
PathValues.ACCOUNTS_ACCOUNT_ID_SYMBOLS: AccountsAccountIdSymbols,
|
|
@@ -169,5 +166,8 @@ path_to_api = PathToApi(
|
|
|
169
166
|
PathValues.SECURITY_TYPES: SecurityTypes,
|
|
170
167
|
PathValues.SYMBOLS: Symbols,
|
|
171
168
|
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,6 +8,7 @@ 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
|
|
11
12
|
from snaptrade_client.apis.tags.reference_data_api import ReferenceDataApi
|
|
12
13
|
|
|
13
14
|
TagToApi = typing_extensions.TypedDict(
|
|
@@ -20,6 +21,7 @@ TagToApi = typing_extensions.TypedDict(
|
|
|
20
21
|
TagValues.OPTIONS: OptionsApi,
|
|
21
22
|
TagValues.TRANSACTIONS_AND_REPORTING: TransactionsAndReportingApi,
|
|
22
23
|
TagValues.TRADING: TradingApi,
|
|
24
|
+
TagValues.CRYPTO_TRADING: CryptoTradingApi,
|
|
23
25
|
TagValues.REFERENCE_DATA: ReferenceDataApi,
|
|
24
26
|
}
|
|
25
27
|
)
|
|
@@ -33,6 +35,7 @@ tag_to_api = TagToApi(
|
|
|
33
35
|
TagValues.OPTIONS: OptionsApi,
|
|
34
36
|
TagValues.TRANSACTIONS_AND_REPORTING: TransactionsAndReportingApi,
|
|
35
37
|
TagValues.TRADING: TradingApi,
|
|
38
|
+
TagValues.CRYPTO_TRADING: CryptoTradingApi,
|
|
36
39
|
TagValues.REFERENCE_DATA: ReferenceDataApi,
|
|
37
40
|
}
|
|
38
41
|
)
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
|
@@ -11,33 +11,27 @@
|
|
|
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
|
|
15
14
|
from snaptrade_client.paths.trade_impact.post import GetOrderImpact
|
|
16
15
|
from snaptrade_client.paths.accounts_account_id_quotes.get import GetUserAccountQuotes
|
|
17
16
|
from snaptrade_client.paths.accounts_account_id_trading_bracket.post import PlaceBracketOrder
|
|
18
17
|
from snaptrade_client.paths.trade_place.post import PlaceForceOrder
|
|
19
18
|
from snaptrade_client.paths.accounts_account_id_trading_options.post import PlaceMlegOrder
|
|
20
19
|
from snaptrade_client.paths.trade_trade_id.post import PlaceOrder
|
|
21
|
-
from snaptrade_client.paths.accounts_account_id_trading_simple.post import PlaceSimpleOrder
|
|
22
20
|
from snaptrade_client.paths.accounts_account_id_trading_simple_preview.post import PreviewSimpleOrder
|
|
23
21
|
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
|
|
25
22
|
|
|
26
23
|
|
|
27
24
|
class TradingApiGenerated(
|
|
28
25
|
CancelOrder,
|
|
29
26
|
CancelUserAccountOrder,
|
|
30
|
-
GetCryptocurrencyPairQuote,
|
|
31
27
|
GetOrderImpact,
|
|
32
28
|
GetUserAccountQuotes,
|
|
33
29
|
PlaceBracketOrder,
|
|
34
30
|
PlaceForceOrder,
|
|
35
31
|
PlaceMlegOrder,
|
|
36
32
|
PlaceOrder,
|
|
37
|
-
PlaceSimpleOrder,
|
|
38
33
|
PreviewSimpleOrder,
|
|
39
34
|
ReplaceOrder,
|
|
40
|
-
SearchCryptocurrencyPairInstruments,
|
|
41
35
|
):
|
|
42
36
|
"""NOTE:
|
|
43
37
|
This class is auto generated by Konfig (https://konfigthis.com)
|
snaptrade_client/client.py
CHANGED
|
@@ -20,6 +20,7 @@ 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
|
|
23
24
|
from snaptrade_client.apis.tags.options_api import OptionsApi
|
|
24
25
|
from snaptrade_client.apis.tags.reference_data_api import ReferenceDataApi
|
|
25
26
|
from snaptrade_client.apis.tags.trading_api import TradingApi
|
|
@@ -40,6 +41,7 @@ class SnapTrade(ClientCustom):
|
|
|
40
41
|
self.api_status: APIStatusApi = APIStatusApi(api_client)
|
|
41
42
|
self.authentication: AuthenticationApi = AuthenticationApi(api_client)
|
|
42
43
|
self.connections: ConnectionsApi = ConnectionsApi(api_client)
|
|
44
|
+
self.crypto_trading: CryptoTradingApi = CryptoTradingApi(api_client)
|
|
43
45
|
self.options: OptionsApi = OptionsApi(api_client)
|
|
44
46
|
self.reference_data: ReferenceDataApi = ReferenceDataApi(api_client)
|
|
45
47
|
self.trading: TradingApi = TradingApi(api_client)
|
snaptrade_client/client.pyi
CHANGED
|
@@ -20,6 +20,7 @@ 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
|
|
23
24
|
from snaptrade_client.apis.tags.options_api import OptionsApi
|
|
24
25
|
from snaptrade_client.apis.tags.reference_data_api import ReferenceDataApi
|
|
25
26
|
from snaptrade_client.apis.tags.trading_api import TradingApi
|
|
@@ -40,6 +41,7 @@ class SnapTrade(ClientCustom):
|
|
|
40
41
|
self.api_status: APIStatusApi = APIStatusApi(api_client)
|
|
41
42
|
self.authentication: AuthenticationApi = AuthenticationApi(api_client)
|
|
42
43
|
self.connections: ConnectionsApi = ConnectionsApi(api_client)
|
|
44
|
+
self.crypto_trading: CryptoTradingApi = CryptoTradingApi(api_client)
|
|
43
45
|
self.options: OptionsApi = OptionsApi(api_client)
|
|
44
46
|
self.reference_data: ReferenceDataApi = ReferenceDataApi(api_client)
|
|
45
47
|
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.106".\
|
|
442
442
|
format(env=sys.platform, pyversion=sys.version)
|
|
443
443
|
|
|
444
444
|
def get_host_settings(self):
|
|
@@ -311,6 +311,81 @@ 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
|
+
},
|
|
314
389
|
'/accounts/{accountId}/optionStrategy-POST': {
|
|
315
390
|
'parameters': [
|
|
316
391
|
{
|
|
@@ -503,22 +578,6 @@ operation_parameter_map = {
|
|
|
503
578
|
},
|
|
504
579
|
]
|
|
505
580
|
},
|
|
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
|
-
},
|
|
522
581
|
'/trade/impact-POST': {
|
|
523
582
|
'parameters': [
|
|
524
583
|
{
|
|
@@ -705,46 +764,6 @@ operation_parameter_map = {
|
|
|
705
764
|
},
|
|
706
765
|
]
|
|
707
766
|
},
|
|
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
|
-
},
|
|
748
767
|
'/accounts/{accountId}/trading/simple/preview-POST': {
|
|
749
768
|
'parameters': [
|
|
750
769
|
{
|
|
@@ -822,25 +841,6 @@ operation_parameter_map = {
|
|
|
822
841
|
},
|
|
823
842
|
]
|
|
824
843
|
},
|
|
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,11 +42,8 @@ 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"
|
|
46
45
|
ACCOUNTS_ACCOUNT_ID_TRADING_SIMPLE_BROKERAGE_ORDER_ID_CANCEL = "/accounts/{accountId}/trading/simple/{brokerageOrderId}/cancel"
|
|
47
46
|
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"
|
|
50
47
|
ACCOUNTS_ACCOUNT_ID_TRADING_OPTIONS = "/accounts/{accountId}/trading/options"
|
|
51
48
|
SNAP_TRADE_PARTNERS = "/snapTrade/partners"
|
|
52
49
|
ACCOUNTS_ACCOUNT_ID_SYMBOLS = "/accounts/{accountId}/symbols"
|
|
@@ -59,3 +56,6 @@ class PathValues(str, enum.Enum):
|
|
|
59
56
|
SECURITY_TYPES = "/securityTypes"
|
|
60
57
|
SYMBOLS = "/symbols"
|
|
61
58
|
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.105.dist-info → snaptrade_python_sdk-11.0.106.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.106
|
|
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.106)
|
|
34
34
|
[](https://github.com/passiv/snaptrade-sdks/tree/master/sdks/python#readme)
|
|
35
35
|
[](https://snaptrade.com/)
|
|
36
36
|
|
|
@@ -69,6 +69,9 @@ 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)
|
|
72
75
|
* [`snaptrade.options.get_option_strategy`](#snaptradeoptionsget_option_strategy)
|
|
73
76
|
* [`snaptrade.options.get_options_chain`](#snaptradeoptionsget_options_chain)
|
|
74
77
|
* [`snaptrade.options.get_options_strategy_quote`](#snaptradeoptionsget_options_strategy_quote)
|
|
@@ -87,17 +90,14 @@ Connect brokerage accounts to your app for live positions and trading
|
|
|
87
90
|
* [`snaptrade.reference_data.symbol_search_user_account`](#snaptradereference_datasymbol_search_user_account)
|
|
88
91
|
* [`snaptrade.trading.cancel_order`](#snaptradetradingcancel_order)
|
|
89
92
|
* [`snaptrade.trading.cancel_user_account_order`](#snaptradetradingcancel_user_account_order)
|
|
90
|
-
* [`snaptrade.trading.get_cryptocurrency_pair_quote`](#snaptradetradingget_cryptocurrency_pair_quote)
|
|
91
93
|
* [`snaptrade.trading.get_order_impact`](#snaptradetradingget_order_impact)
|
|
92
94
|
* [`snaptrade.trading.get_user_account_quotes`](#snaptradetradingget_user_account_quotes)
|
|
93
95
|
* [`snaptrade.trading.place_bracket_order`](#snaptradetradingplace_bracket_order)
|
|
94
96
|
* [`snaptrade.trading.place_force_order`](#snaptradetradingplace_force_order)
|
|
95
97
|
* [`snaptrade.trading.place_mleg_order`](#snaptradetradingplace_mleg_order)
|
|
96
98
|
* [`snaptrade.trading.place_order`](#snaptradetradingplace_order)
|
|
97
|
-
* [`snaptrade.trading.place_simple_order`](#snaptradetradingplace_simple_order)
|
|
98
99
|
* [`snaptrade.trading.preview_simple_order`](#snaptradetradingpreview_simple_order)
|
|
99
100
|
* [`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.106
|
|
114
114
|
```
|
|
115
115
|
|
|
116
116
|
## Getting Started<a id="getting-started"></a>
|
|
@@ -1142,6 +1142,169 @@ 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
|
+
|
|
1145
1308
|
### `snaptrade.options.get_option_strategy`<a id="snaptradeoptionsget_option_strategy"></a>
|
|
1146
1309
|
|
|
1147
1310
|
Creates an option strategy object that will be used to place an option strategy order.
|
|
@@ -1761,46 +1924,6 @@ Order ID returned by brokerage. This is the unique identifier for the order in t
|
|
|
1761
1924
|
|
|
1762
1925
|
---
|
|
1763
1926
|
|
|
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
|
-
|
|
1804
1927
|
### `snaptrade.trading.get_order_impact`<a id="snaptradetradingget_order_impact"></a>
|
|
1805
1928
|
|
|
1806
1929
|
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.
|
|
@@ -2201,90 +2324,6 @@ Optional, defaults to true. Determines if a wait is performed to check on order
|
|
|
2201
2324
|
|
|
2202
2325
|
---
|
|
2203
2326
|
|
|
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
|
-
|
|
2288
2327
|
### `snaptrade.trading.preview_simple_order`<a id="snaptradetradingpreview_simple_order"></a>
|
|
2289
2328
|
|
|
2290
2329
|
Previews an order using the specified account.
|
|
@@ -2442,45 +2481,6 @@ The price at which a stop order is triggered for `Stop` and `StopLimit` orders.
|
|
|
2442
2481
|
|
|
2443
2482
|
---
|
|
2444
2483
|
|
|
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=tXzKUqksDfg1XdDc7uLelt9C5ivmbmhP_AGellcYxnU,820
|
|
2
|
+
snaptrade_client/api_client.py,sha256=FrH1g_VX7dXD7VmTIS7VAfSCkmW8PFYS3UYlOrWzIW4,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=5RrwLE9dXpYO9cFUDiThuqq_pLXE4uekjORePxid4Xw,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=XNujjY0lOEEIRKhwxQZGcKl89yw8r8pzMVphyrsz2ZA,1780
|
|
61
|
+
snaptrade_client/apis/tags/__init__.py,sha256=sAfoG_-vWoBzOD8ZvrnbakQgEk-fJn4URrvjWXzC3OU,623
|
|
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,18 +67,20 @@ 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
|
|
70
72
|
snaptrade_client/apis/tags/options_api.py,sha256=tl2HI1JChvEGrE5mcSLN85Ah5AHtjVa4n8Hx7GY-ZNA,147
|
|
71
73
|
snaptrade_client/apis/tags/options_api_generated.py,sha256=NehERRdEJhPpg2Q2XaHZc4bVMX7LOlguLQr-4feIH6o,994
|
|
72
74
|
snaptrade_client/apis/tags/reference_data_api.py,sha256=DdmRsoiG7nLk8EgXWT1KvurcQnPYAlr1Dz0kdpdWGRQ,172
|
|
73
75
|
snaptrade_client/apis/tags/reference_data_api_generated.py,sha256=0QKGp2TcqDmuYsuPuXL0Wf14aIihWLYXpnHTFT9oKwY,1499
|
|
74
76
|
snaptrade_client/apis/tags/trading_api.py,sha256=J0L9w7V4uoH3_fkvmJhpVQTIUQCACBgrb_QQ7VTILqI,147
|
|
75
|
-
snaptrade_client/apis/tags/trading_api_generated.py,sha256=
|
|
77
|
+
snaptrade_client/apis/tags/trading_api_generated.py,sha256=71xvoiU0uUvdJhZCJp36nNFe91JnQNoV9PKRh5Gkzx0,1477
|
|
76
78
|
snaptrade_client/apis/tags/transactions_and_reporting_api.py,sha256=4qC3MPU73Cj2ePSxD_GIjrvvxLbjEEsan2VcDqVZXd4,217
|
|
77
79
|
snaptrade_client/apis/tags/transactions_and_reporting_api_generated.py,sha256=Tw43o6-dzwGDnD5hPtc5Vz2f7EdM-yFw8FQkLI5suak,573
|
|
78
|
-
snaptrade_client/client.py,sha256=
|
|
79
|
-
snaptrade_client/client.pyi,sha256=
|
|
80
|
+
snaptrade_client/client.py,sha256=2h-c4LP4Uzoa3vjdb9rhwaviFad8agKZjQ0xQ62x96c,2268
|
|
81
|
+
snaptrade_client/client.pyi,sha256=2h-c4LP4Uzoa3vjdb9rhwaviFad8agKZjQ0xQ62x96c,2268
|
|
80
82
|
snaptrade_client/client_custom.py,sha256=Jx9ulCzelMFlESjzVFQSjBlYcH4dWxSJJWZDMPLyetM,745
|
|
81
|
-
snaptrade_client/configuration.py,sha256
|
|
83
|
+
snaptrade_client/configuration.py,sha256=8X23VzPQ7TGsk35lf_SF3hzf8TXPBOxepADOXHaifDQ,19262
|
|
82
84
|
snaptrade_client/exceptions.py,sha256=X0apI_sgQpGpa-qIqPUClReCdHAxeSuA6GW0YH_RsWg,7771
|
|
83
85
|
snaptrade_client/exceptions_base.py,sha256=LAQkaC5C61-SdBLfyMjb0K7AYJkWVuLmg2uCvHa71FM,2274
|
|
84
86
|
snaptrade_client/model/__init__.py,sha256=ayi2MIzcf0eAIsY13ToiNplV9tW-pMBFrC0I9yckGM8,350
|
|
@@ -409,8 +411,8 @@ snaptrade_client/model/user_secret.pyi,sha256=7xf__S566WtTq7VthmdVtrCBIfgpnYWYqE
|
|
|
409
411
|
snaptrade_client/model/validated_trade_body.py,sha256=NkTel1ulgSjBd6K7vur6puEbfrg3u1vdmtUKArOu8ws,3085
|
|
410
412
|
snaptrade_client/model/validated_trade_body.pyi,sha256=NkTel1ulgSjBd6K7vur6puEbfrg3u1vdmtUKArOu8ws,3085
|
|
411
413
|
snaptrade_client/models/__init__.py,sha256=I1pwuDZgpx0vWGPJmEqsldM5F9Pd101iA31xsd9S7Oo,12749
|
|
412
|
-
snaptrade_client/operation_parameter_map.py,sha256=
|
|
413
|
-
snaptrade_client/paths/__init__.py,sha256=
|
|
414
|
+
snaptrade_client/operation_parameter_map.py,sha256=6TwgiwPJr_QM7dzAMt4rOtKCpCNkb7OvZ_IbuC1rgCY,19229
|
|
415
|
+
snaptrade_client/paths/__init__.py,sha256=j8_odiNs2eeTeU_FQDJtyGvEqy-mkGBcUEZd4xHkkG4,3811
|
|
414
416
|
snaptrade_client/paths/accounts/__init__.py,sha256=_Bqi6B13A-kgd0AOpqmcE1vTxJDfoz-r3Hwf-AmwW6A,307
|
|
415
417
|
snaptrade_client/paths/accounts/get.py,sha256=MDE_4VCylBroYDkMQe9II1qCGf6gTTDGCShFyGLXf00,16463
|
|
416
418
|
snaptrade_client/paths/accounts/get.pyi,sha256=gna7qIU-95WqOFl6qTsP18ZY7SKi9CYEBAbARPAPPF4,16261
|
|
@@ -746,7 +748,7 @@ snaptrade_client/type/user_secret.py,sha256=pKCVhqf1rROHwa6tvoyA5OAKXCBAmNDvIQCf
|
|
|
746
748
|
snaptrade_client/type/validated_trade_body.py,sha256=ZIPBQWii_a-9zHaBCJ6bQtmL1_I7AG0zwuvkY-ZQ6R4,890
|
|
747
749
|
snaptrade_client/type_util.py,sha256=JIrMYgJzd4IJ8Ne2vqcahlPA9dVmphL9sn8gwccCB4Y,563
|
|
748
750
|
snaptrade_client/validation_metadata.py,sha256=VTN5y-NudHXok1X468J4PnGze_tGEAcs1v3gsXmcrb0,3172
|
|
749
|
-
snaptrade_python_sdk-11.0.
|
|
750
|
-
snaptrade_python_sdk-11.0.
|
|
751
|
-
snaptrade_python_sdk-11.0.
|
|
752
|
-
snaptrade_python_sdk-11.0.
|
|
751
|
+
snaptrade_python_sdk-11.0.106.dist-info/LICENSE,sha256=W_1kcxEzOnZXIYJ1GVUipbmUu6dNLt-Pc-OI55h3k-A,1081
|
|
752
|
+
snaptrade_python_sdk-11.0.106.dist-info/METADATA,sha256=sw7XLjq8LmYIsrpV2dBUpKzFo9Xp5UTAIxAPD__XVsQ,94807
|
|
753
|
+
snaptrade_python_sdk-11.0.106.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
754
|
+
snaptrade_python_sdk-11.0.106.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|