snaptrade 2.0.167 → 2.0.169
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +11 -51
- data/lib/snaptrade/api/account_information_api.rb +16 -16
- data/lib/snaptrade/api/authentication_api.rb +2 -2
- data/lib/snaptrade/api/options_api.rb +4 -116
- data/lib/snaptrade/api/trading_api.rb +8 -8
- data/lib/snaptrade/models/account.rb +1 -1
- data/lib/snaptrade/models/account_order_record_quote_universal_symbol.rb +1 -1
- data/lib/snaptrade/models/account_order_record_universal_symbol.rb +1 -1
- data/lib/snaptrade/models/account_universal_activity.rb +1 -1
- data/lib/snaptrade/models/notional_value.rb +1 -1
- data/lib/snaptrade/models/position_symbol.rb +3 -3
- data/lib/snaptrade/models/security_type.rb +1 -1
- data/lib/snaptrade/models/snap_trade_login_user_request_body.rb +1 -1
- data/lib/snaptrade/models/transactions_status.rb +1 -1
- data/lib/snaptrade/models/underlying_symbol.rb +1 -1
- data/lib/snaptrade/models/underlying_symbol_type.rb +1 -1
- data/lib/snaptrade/models/universal_activity.rb +1 -1
- data/lib/snaptrade/models/universal_symbol.rb +1 -1
- data/lib/snaptrade/version.rb +1 -1
- data/spec/api/account_information_api_spec.rb +4 -4
- data/spec/api/options_api_spec.rb +1 -16
- data/spec/api/trading_api_spec.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 33929c4087a970521fd6adb8f82040f71eb532bcc70751fdf4bcd303eaccf2ac
|
|
4
|
+
data.tar.gz: 557c3746dc1ed4bbf09071f7266aa97e409706915107cf394c44504ec2ca0eff
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a9f79a985b83dd4f6a23bd484a4a7bd5a5f0a50babb27d6d59517e5d062ba5f7e8b6809a3627c832199cc9cbd2adf22c43d1a998059f9e6383151cf909a19c11
|
|
7
|
+
data.tar.gz: c1b9a555fa7b3c738ad81ac6146ab7d1cb37de1734099bc1b241e691b59dde636e0cb5dcc08ab9cd685989a989b8e8e282ff845d9650576f9592eed2d9b6fdb9
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Connect brokerage accounts to your app for live positions and trading
|
|
8
8
|
|
|
9
|
-
[](https://rubygems.org/gems/snaptrade/versions/2.0.169)
|
|
10
10
|
[](https://snaptrade.com/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
@@ -50,7 +50,6 @@ Connect brokerage accounts to your app for live positions and trading
|
|
|
50
50
|
* [`snaptrade.experimental_endpoints.get_user_account_orders_v2`](#snaptradeexperimental_endpointsget_user_account_orders_v2)
|
|
51
51
|
* [`snaptrade.experimental_endpoints.get_user_account_recent_orders_v2`](#snaptradeexperimental_endpointsget_user_account_recent_orders_v2)
|
|
52
52
|
* [`snaptrade.options.get_option_quote`](#snaptradeoptionsget_option_quote)
|
|
53
|
-
* [`snaptrade.options.get_options_chain`](#snaptradeoptionsget_options_chain)
|
|
54
53
|
* [`snaptrade.options.list_option_holdings`](#snaptradeoptionslist_option_holdings)
|
|
55
54
|
* [`snaptrade.reference_data.get_currency_exchange_rate_pair`](#snaptradereference_dataget_currency_exchange_rate_pair)
|
|
56
55
|
* [`snaptrade.reference_data.get_partner_info`](#snaptradereference_dataget_partner_info)
|
|
@@ -88,7 +87,7 @@ Connect brokerage accounts to your app for live positions and trading
|
|
|
88
87
|
Add to Gemfile:
|
|
89
88
|
|
|
90
89
|
```ruby
|
|
91
|
-
gem 'snaptrade', '~> 2.0.
|
|
90
|
+
gem 'snaptrade', '~> 2.0.169'
|
|
92
91
|
```
|
|
93
92
|
|
|
94
93
|
## Getting Started<a id="getting-started"></a>
|
|
@@ -262,7 +261,7 @@ Returns a list of balances for the account. Each element of the list has a disti
|
|
|
262
261
|
|
|
263
262
|
Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
|
|
264
263
|
- If you do, this endpoint returns real-time data.
|
|
265
|
-
- If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
264
|
+
- If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
|
|
266
265
|
|
|
267
266
|
If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
268
267
|
|
|
@@ -387,7 +386,7 @@ Returns a list of recent orders in the specified account.
|
|
|
387
386
|
|
|
388
387
|
Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
|
|
389
388
|
- If you do, this endpoint returns real-time data.
|
|
390
|
-
- If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
389
|
+
- If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
|
|
391
390
|
|
|
392
391
|
If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
393
392
|
|
|
@@ -436,7 +435,7 @@ Returns a list of stock/ETF/crypto/mutual fund positions in the specified accoun
|
|
|
436
435
|
|
|
437
436
|
Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
|
|
438
437
|
- If you do, this endpoint returns real-time data.
|
|
439
|
-
- If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
438
|
+
- If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
|
|
440
439
|
|
|
441
440
|
If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
442
441
|
|
|
@@ -552,7 +551,7 @@ Returns a list of balances, positions, and recent orders for the specified accou
|
|
|
552
551
|
|
|
553
552
|
Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
|
|
554
553
|
- If you do, this endpoint returns real-time data.
|
|
555
|
-
- If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
554
|
+
- If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
|
|
556
555
|
|
|
557
556
|
If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
558
557
|
|
|
@@ -763,8 +762,8 @@ p result
|
|
|
763
762
|
##### user_secret: `String`<a id="user_secret-string"></a>
|
|
764
763
|
##### broker: `String`<a id="broker-string"></a>
|
|
765
764
|
Slug of the brokerage to connect the user to. See [the integrations
|
|
766
|
-
page](https://snaptrade.
|
|
767
|
-
|
|
765
|
+
page](https://support.snaptrade.com/brokerages) for a list of supported
|
|
766
|
+
brokerages and their slugs.
|
|
768
767
|
|
|
769
768
|
##### immediateRedirect: `Boolean`<a id="immediateredirect-boolean"></a>
|
|
770
769
|
When set to `true`, user will be redirected back to the partner's site instead
|
|
@@ -1373,52 +1372,13 @@ The OCC-formatted option symbol.
|
|
|
1373
1372
|
---
|
|
1374
1373
|
|
|
1375
1374
|
|
|
1376
|
-
### `snaptrade.options.get_options_chain`<a id="snaptradeoptionsget_options_chain"></a>
|
|
1377
|
-
|
|
1378
|
-
Returns the option chain for the specified symbol in the specified account.
|
|
1379
|
-
|
|
1380
|
-
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
1381
|
-
|
|
1382
|
-
```ruby
|
|
1383
|
-
result = snaptrade.options.get_options_chain(
|
|
1384
|
-
user_id: "snaptrade-user-123",
|
|
1385
|
-
user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
|
|
1386
|
-
account_id: "accountId_example",
|
|
1387
|
-
symbol: "symbol_example",
|
|
1388
|
-
)
|
|
1389
|
-
p result
|
|
1390
|
-
```
|
|
1391
|
-
|
|
1392
|
-
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
1393
|
-
|
|
1394
|
-
##### user_id: `String`<a id="user_id-string"></a>
|
|
1395
|
-
##### user_secret: `String`<a id="user_secret-string"></a>
|
|
1396
|
-
##### account_id: `String`<a id="account_id-string"></a>
|
|
1397
|
-
The ID of the account to get the options chain from.
|
|
1398
|
-
|
|
1399
|
-
##### symbol: `String`<a id="symbol-string"></a>
|
|
1400
|
-
Universal symbol ID if symbol
|
|
1401
|
-
|
|
1402
|
-
#### 🔄 Return<a id="🔄-return"></a>
|
|
1403
|
-
|
|
1404
|
-
[OptionChainInner](./lib/snaptrade/models/option_chain_inner.rb)
|
|
1405
|
-
|
|
1406
|
-
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
1407
|
-
|
|
1408
|
-
`/accounts/{accountId}/optionsChain` `GET`
|
|
1409
|
-
|
|
1410
|
-
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1411
|
-
|
|
1412
|
-
---
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
1375
|
### `snaptrade.options.list_option_holdings`<a id="snaptradeoptionslist_option_holdings"></a>
|
|
1416
1376
|
|
|
1417
1377
|
Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions).
|
|
1418
1378
|
|
|
1419
1379
|
Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
|
|
1420
1380
|
- If you do, this endpoint returns real-time data.
|
|
1421
|
-
- If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
1381
|
+
- If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
|
|
1422
1382
|
|
|
1423
1383
|
|
|
1424
1384
|
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
@@ -1911,7 +1871,7 @@ p result
|
|
|
1911
1871
|
### `snaptrade.trading.get_option_impact`<a id="snaptradetradingget_option_impact"></a>
|
|
1912
1872
|
|
|
1913
1873
|
Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it.
|
|
1914
|
-
Only supported for certain brokerages. Please refer to https://snaptrade.
|
|
1874
|
+
Only supported for certain brokerages. Please refer to https://support.snaptrade.com/brokerages for more information on brokerage trading support.
|
|
1915
1875
|
|
|
1916
1876
|
|
|
1917
1877
|
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
@@ -2375,7 +2335,7 @@ contracts to buy or sell. (e.g., 1 contract = 100 shares).
|
|
|
2375
2335
|
|
|
2376
2336
|
### `snaptrade.trading.place_mleg_order`<a id="snaptradetradingplace_mleg_order"></a>
|
|
2377
2337
|
|
|
2378
|
-
Places a multi-leg option order. Only supported on certain option trading brokerages. https://snaptrade.
|
|
2338
|
+
Places a multi-leg option order. Only supported on certain option trading brokerages. https://support.snaptrade.com/brokerages has information on brokerage trading support
|
|
2379
2339
|
|
|
2380
2340
|
|
|
2381
2341
|
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
@@ -293,7 +293,7 @@ module SnapTrade
|
|
|
293
293
|
#
|
|
294
294
|
# Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
|
|
295
295
|
# - If you do, this endpoint returns real-time data.
|
|
296
|
-
# - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
296
|
+
# - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
|
|
297
297
|
#
|
|
298
298
|
# If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
299
299
|
#
|
|
@@ -312,7 +312,7 @@ module SnapTrade
|
|
|
312
312
|
#
|
|
313
313
|
# Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
|
|
314
314
|
# - If you do, this endpoint returns real-time data.
|
|
315
|
-
# - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
315
|
+
# - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
|
|
316
316
|
#
|
|
317
317
|
# If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
318
318
|
#
|
|
@@ -325,7 +325,7 @@ module SnapTrade
|
|
|
325
325
|
end
|
|
326
326
|
|
|
327
327
|
# List account balances
|
|
328
|
-
# Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
328
|
+
# Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
329
329
|
# @param user_id [String]
|
|
330
330
|
# @param user_secret [String]
|
|
331
331
|
# @param account_id [String]
|
|
@@ -337,7 +337,7 @@ module SnapTrade
|
|
|
337
337
|
end
|
|
338
338
|
|
|
339
339
|
# List account balances
|
|
340
|
-
# Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
340
|
+
# Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
341
341
|
# @param user_id [String]
|
|
342
342
|
# @param user_secret [String]
|
|
343
343
|
# @param account_id [String]
|
|
@@ -659,7 +659,7 @@ module SnapTrade
|
|
|
659
659
|
#
|
|
660
660
|
# Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
|
|
661
661
|
# - If you do, this endpoint returns real-time data.
|
|
662
|
-
# - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
662
|
+
# - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
|
|
663
663
|
#
|
|
664
664
|
# If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
665
665
|
#
|
|
@@ -682,7 +682,7 @@ module SnapTrade
|
|
|
682
682
|
#
|
|
683
683
|
# Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
|
|
684
684
|
# - If you do, this endpoint returns real-time data.
|
|
685
|
-
# - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
685
|
+
# - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
|
|
686
686
|
#
|
|
687
687
|
# If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
688
688
|
#
|
|
@@ -699,7 +699,7 @@ module SnapTrade
|
|
|
699
699
|
end
|
|
700
700
|
|
|
701
701
|
# List account orders
|
|
702
|
-
# Returns a list of recent orders in the specified account. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
702
|
+
# Returns a list of recent orders in the specified account. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
703
703
|
# @param user_id [String]
|
|
704
704
|
# @param user_secret [String]
|
|
705
705
|
# @param account_id [String]
|
|
@@ -713,7 +713,7 @@ module SnapTrade
|
|
|
713
713
|
end
|
|
714
714
|
|
|
715
715
|
# List account orders
|
|
716
|
-
# Returns a list of recent orders in the specified account. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
716
|
+
# Returns a list of recent orders in the specified account. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
717
717
|
# @param user_id [String]
|
|
718
718
|
# @param user_secret [String]
|
|
719
719
|
# @param account_id [String]
|
|
@@ -796,7 +796,7 @@ module SnapTrade
|
|
|
796
796
|
#
|
|
797
797
|
# Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
|
|
798
798
|
# - If you do, this endpoint returns real-time data.
|
|
799
|
-
# - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
799
|
+
# - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
|
|
800
800
|
#
|
|
801
801
|
# If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
802
802
|
#
|
|
@@ -815,7 +815,7 @@ module SnapTrade
|
|
|
815
815
|
#
|
|
816
816
|
# Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
|
|
817
817
|
# - If you do, this endpoint returns real-time data.
|
|
818
|
-
# - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
818
|
+
# - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
|
|
819
819
|
#
|
|
820
820
|
# If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
821
821
|
#
|
|
@@ -828,7 +828,7 @@ module SnapTrade
|
|
|
828
828
|
end
|
|
829
829
|
|
|
830
830
|
# List account positions
|
|
831
|
-
# Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
831
|
+
# Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
832
832
|
# @param user_id [String]
|
|
833
833
|
# @param user_secret [String]
|
|
834
834
|
# @param account_id [String]
|
|
@@ -840,7 +840,7 @@ module SnapTrade
|
|
|
840
840
|
end
|
|
841
841
|
|
|
842
842
|
# List account positions
|
|
843
|
-
# Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
843
|
+
# Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
844
844
|
# @param user_id [String]
|
|
845
845
|
# @param user_secret [String]
|
|
846
846
|
# @param account_id [String]
|
|
@@ -1130,7 +1130,7 @@ module SnapTrade
|
|
|
1130
1130
|
#
|
|
1131
1131
|
# Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
|
|
1132
1132
|
# - If you do, this endpoint returns real-time data.
|
|
1133
|
-
# - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
1133
|
+
# - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
|
|
1134
1134
|
#
|
|
1135
1135
|
# If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
1136
1136
|
#
|
|
@@ -1149,7 +1149,7 @@ module SnapTrade
|
|
|
1149
1149
|
#
|
|
1150
1150
|
# Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
|
|
1151
1151
|
# - If you do, this endpoint returns real-time data.
|
|
1152
|
-
# - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
1152
|
+
# - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
|
|
1153
1153
|
#
|
|
1154
1154
|
# If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
1155
1155
|
#
|
|
@@ -1162,7 +1162,7 @@ module SnapTrade
|
|
|
1162
1162
|
end
|
|
1163
1163
|
|
|
1164
1164
|
# List account holdings
|
|
1165
|
-
# Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__ Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
1165
|
+
# Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__ Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
1166
1166
|
# @param account_id [String]
|
|
1167
1167
|
# @param user_id [String]
|
|
1168
1168
|
# @param user_secret [String]
|
|
@@ -1174,7 +1174,7 @@ module SnapTrade
|
|
|
1174
1174
|
end
|
|
1175
1175
|
|
|
1176
1176
|
# List account holdings
|
|
1177
|
-
# Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__ Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
1177
|
+
# Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__ Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
1178
1178
|
# @param account_id [String]
|
|
1179
1179
|
# @param user_id [String]
|
|
1180
1180
|
# @param user_secret [String]
|
|
@@ -188,7 +188,7 @@ module SnapTrade
|
|
|
188
188
|
#
|
|
189
189
|
# @param user_id [String]
|
|
190
190
|
# @param user_secret [String]
|
|
191
|
-
# @param broker [String] Slug of the brokerage to connect the user to. See [the integrations page](https://snaptrade.
|
|
191
|
+
# @param broker [String] Slug of the brokerage to connect the user to. See [the integrations page](https://support.snaptrade.com/brokerages) for a list of supported brokerages and their slugs.
|
|
192
192
|
# @param immediate_redirect [Boolean] When set to `true`, user will be redirected back to the partner's site instead of the connection portal. This parameter is ignored if the connection portal is loaded inside an iframe. See the [guide on ways to integrate the connection portal](/docs/implement-connection-portal) for more information.
|
|
193
193
|
# @param custom_redirect [String] URL to redirect the user to after the user connects their brokerage account. This parameter is ignored if the connection portal is loaded inside an iframe. See the [guide on ways to integrate the connection portal](/docs/implement-connection-portal) for more information.
|
|
194
194
|
# @param reconnect [String] The UUID of the brokerage connection to be reconnected. This parameter should be left empty unless you are reconnecting a disabled connection. See the [guide on fixing broken connections](/docs/fix-broken-connections) for more information.
|
|
@@ -221,7 +221,7 @@ module SnapTrade
|
|
|
221
221
|
#
|
|
222
222
|
# @param user_id [String]
|
|
223
223
|
# @param user_secret [String]
|
|
224
|
-
# @param broker [String] Slug of the brokerage to connect the user to. See [the integrations page](https://snaptrade.
|
|
224
|
+
# @param broker [String] Slug of the brokerage to connect the user to. See [the integrations page](https://support.snaptrade.com/brokerages) for a list of supported brokerages and their slugs.
|
|
225
225
|
# @param immediate_redirect [Boolean] When set to `true`, user will be redirected back to the partner's site instead of the connection portal. This parameter is ignored if the connection portal is loaded inside an iframe. See the [guide on ways to integrate the connection portal](/docs/implement-connection-portal) for more information.
|
|
226
226
|
# @param custom_redirect [String] URL to redirect the user to after the user connects their brokerage account. This parameter is ignored if the connection portal is loaded inside an iframe. See the [guide on ways to integrate the connection portal](/docs/implement-connection-portal) for more information.
|
|
227
227
|
# @param reconnect [String] The UUID of the brokerage connection to be reconnected. This parameter should be left empty unless you are reconnecting a disabled connection. See the [guide on fixing broken connections](/docs/fix-broken-connections) for more information.
|
|
@@ -125,125 +125,13 @@ module SnapTrade
|
|
|
125
125
|
end
|
|
126
126
|
|
|
127
127
|
|
|
128
|
-
# Get the options chain for a symbol
|
|
129
|
-
#
|
|
130
|
-
# Returns the option chain for the specified symbol in the specified account.
|
|
131
|
-
#
|
|
132
|
-
# @param user_id [String]
|
|
133
|
-
# @param user_secret [String]
|
|
134
|
-
# @param account_id [String] The ID of the account to get the options chain from.
|
|
135
|
-
# @param symbol [String] Universal symbol ID if symbol
|
|
136
|
-
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
137
|
-
def get_options_chain(user_id:, user_secret:, account_id:, symbol:, extra: {})
|
|
138
|
-
data, _status_code, _headers = get_options_chain_with_http_info_impl(user_id, user_secret, account_id, symbol, extra)
|
|
139
|
-
data
|
|
140
|
-
end
|
|
141
|
-
|
|
142
|
-
# Get the options chain for a symbol
|
|
143
|
-
#
|
|
144
|
-
# Returns the option chain for the specified symbol in the specified account.
|
|
145
|
-
#
|
|
146
|
-
# @param user_id [String]
|
|
147
|
-
# @param user_secret [String]
|
|
148
|
-
# @param account_id [String] The ID of the account to get the options chain from.
|
|
149
|
-
# @param symbol [String] Universal symbol ID if symbol
|
|
150
|
-
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
151
|
-
def get_options_chain_with_http_info(user_id:, user_secret:, account_id:, symbol:, extra: {})
|
|
152
|
-
get_options_chain_with_http_info_impl(user_id, user_secret, account_id, symbol, extra)
|
|
153
|
-
end
|
|
154
|
-
|
|
155
|
-
# Get the options chain for a symbol
|
|
156
|
-
# Returns the option chain for the specified symbol in the specified account.
|
|
157
|
-
# @param user_id [String]
|
|
158
|
-
# @param user_secret [String]
|
|
159
|
-
# @param account_id [String] The ID of the account to get the options chain from.
|
|
160
|
-
# @param symbol [String] Universal symbol ID if symbol
|
|
161
|
-
# @param [Hash] opts the optional parameters
|
|
162
|
-
# @return [Array<OptionChainInner>]
|
|
163
|
-
private def get_options_chain_impl(user_id, user_secret, account_id, symbol, opts = {})
|
|
164
|
-
data, _status_code, _headers = get_options_chain_with_http_info(user_id, user_secret, account_id, symbol, opts)
|
|
165
|
-
data
|
|
166
|
-
end
|
|
167
|
-
|
|
168
|
-
# Get the options chain for a symbol
|
|
169
|
-
# Returns the option chain for the specified symbol in the specified account.
|
|
170
|
-
# @param user_id [String]
|
|
171
|
-
# @param user_secret [String]
|
|
172
|
-
# @param account_id [String] The ID of the account to get the options chain from.
|
|
173
|
-
# @param symbol [String] Universal symbol ID if symbol
|
|
174
|
-
# @param [Hash] opts the optional parameters
|
|
175
|
-
# @return [Array<(Array<OptionChainInner>, Integer, Hash)>] Array<OptionChainInner> data, response status code and response headers
|
|
176
|
-
private def get_options_chain_with_http_info_impl(user_id, user_secret, account_id, symbol, opts = {})
|
|
177
|
-
if @api_client.config.debugging
|
|
178
|
-
@api_client.config.logger.debug 'Calling API: OptionsApi.get_options_chain ...'
|
|
179
|
-
end
|
|
180
|
-
# verify the required parameter 'user_id' is set
|
|
181
|
-
if @api_client.config.client_side_validation && user_id.nil?
|
|
182
|
-
fail ArgumentError, "Missing the required parameter 'user_id' when calling OptionsApi.get_options_chain"
|
|
183
|
-
end
|
|
184
|
-
# verify the required parameter 'user_secret' is set
|
|
185
|
-
if @api_client.config.client_side_validation && user_secret.nil?
|
|
186
|
-
fail ArgumentError, "Missing the required parameter 'user_secret' when calling OptionsApi.get_options_chain"
|
|
187
|
-
end
|
|
188
|
-
# verify the required parameter 'account_id' is set
|
|
189
|
-
if @api_client.config.client_side_validation && account_id.nil?
|
|
190
|
-
fail ArgumentError, "Missing the required parameter 'account_id' when calling OptionsApi.get_options_chain"
|
|
191
|
-
end
|
|
192
|
-
# verify the required parameter 'symbol' is set
|
|
193
|
-
if @api_client.config.client_side_validation && symbol.nil?
|
|
194
|
-
fail ArgumentError, "Missing the required parameter 'symbol' when calling OptionsApi.get_options_chain"
|
|
195
|
-
end
|
|
196
|
-
# resource path
|
|
197
|
-
local_var_path = '/accounts/{accountId}/optionsChain'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
198
|
-
|
|
199
|
-
# query parameters
|
|
200
|
-
query_params = opts[:query_params] || {}
|
|
201
|
-
query_params[:'userId'] = user_id
|
|
202
|
-
query_params[:'userSecret'] = user_secret
|
|
203
|
-
query_params[:'symbol'] = symbol
|
|
204
|
-
|
|
205
|
-
# header parameters
|
|
206
|
-
header_params = opts[:header_params] || {}
|
|
207
|
-
# HTTP header 'Accept' (if needed)
|
|
208
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
209
|
-
|
|
210
|
-
# form parameters
|
|
211
|
-
form_params = opts[:form_params] || {}
|
|
212
|
-
|
|
213
|
-
# http body (model)
|
|
214
|
-
post_body = opts[:debug_body]
|
|
215
|
-
|
|
216
|
-
# return_type
|
|
217
|
-
return_type = opts[:debug_return_type] || 'Array<OptionChainInner>'
|
|
218
|
-
|
|
219
|
-
# auth_names
|
|
220
|
-
auth_names = opts[:debug_auth_names] || ['PartnerClientId', 'PartnerSignature', 'PartnerTimestamp']
|
|
221
|
-
|
|
222
|
-
new_options = opts.merge(
|
|
223
|
-
:operation => :"OptionsApi.get_options_chain",
|
|
224
|
-
:header_params => header_params,
|
|
225
|
-
:query_params => query_params,
|
|
226
|
-
:form_params => form_params,
|
|
227
|
-
:body => post_body,
|
|
228
|
-
:auth_names => auth_names,
|
|
229
|
-
:return_type => return_type
|
|
230
|
-
)
|
|
231
|
-
|
|
232
|
-
data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
|
|
233
|
-
if @api_client.config.debugging
|
|
234
|
-
@api_client.config.logger.debug "API called: OptionsApi#get_options_chain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
235
|
-
end
|
|
236
|
-
return data, status_code, headers, response
|
|
237
|
-
end
|
|
238
|
-
|
|
239
|
-
|
|
240
128
|
# List account option positions
|
|
241
129
|
#
|
|
242
130
|
# Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions).
|
|
243
131
|
#
|
|
244
132
|
# Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
|
|
245
133
|
# - If you do, this endpoint returns real-time data.
|
|
246
|
-
# - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
134
|
+
# - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
|
|
247
135
|
#
|
|
248
136
|
# @param user_id [String]
|
|
249
137
|
# @param user_secret [String]
|
|
@@ -260,7 +148,7 @@ module SnapTrade
|
|
|
260
148
|
#
|
|
261
149
|
# Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
|
|
262
150
|
# - If you do, this endpoint returns real-time data.
|
|
263
|
-
# - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
151
|
+
# - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
|
|
264
152
|
#
|
|
265
153
|
# @param user_id [String]
|
|
266
154
|
# @param user_secret [String]
|
|
@@ -271,7 +159,7 @@ module SnapTrade
|
|
|
271
159
|
end
|
|
272
160
|
|
|
273
161
|
# List account option positions
|
|
274
|
-
# Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
162
|
+
# Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
|
|
275
163
|
# @param user_id [String]
|
|
276
164
|
# @param user_secret [String]
|
|
277
165
|
# @param account_id [String]
|
|
@@ -283,7 +171,7 @@ module SnapTrade
|
|
|
283
171
|
end
|
|
284
172
|
|
|
285
173
|
# List account option positions
|
|
286
|
-
# Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
174
|
+
# Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
|
|
287
175
|
# @param user_id [String]
|
|
288
176
|
# @param user_secret [String]
|
|
289
177
|
# @param account_id [String]
|
|
@@ -381,7 +381,7 @@ module SnapTrade
|
|
|
381
381
|
# Get option order impact
|
|
382
382
|
#
|
|
383
383
|
# Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it.
|
|
384
|
-
# Only supported for certain brokerages. Please refer to https://snaptrade.
|
|
384
|
+
# Only supported for certain brokerages. Please refer to https://support.snaptrade.com/brokerages for more information on brokerage trading support.
|
|
385
385
|
#
|
|
386
386
|
# @param order_type [MlegOrderTypeStrict] The type of order to place.
|
|
387
387
|
# @param time_in_force [TimeInForceStrict] The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. Here are the supported values: - `Day` - Day. The order is valid only for the trading day on which it is placed. - `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.
|
|
@@ -410,7 +410,7 @@ module SnapTrade
|
|
|
410
410
|
# Get option order impact
|
|
411
411
|
#
|
|
412
412
|
# Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it.
|
|
413
|
-
# Only supported for certain brokerages. Please refer to https://snaptrade.
|
|
413
|
+
# Only supported for certain brokerages. Please refer to https://support.snaptrade.com/brokerages for more information on brokerage trading support.
|
|
414
414
|
#
|
|
415
415
|
# @param order_type [MlegOrderTypeStrict] The type of order to place.
|
|
416
416
|
# @param time_in_force [TimeInForceStrict] The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. Here are the supported values: - `Day` - Day. The order is valid only for the trading day on which it is placed. - `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.
|
|
@@ -436,7 +436,7 @@ module SnapTrade
|
|
|
436
436
|
end
|
|
437
437
|
|
|
438
438
|
# Get option order impact
|
|
439
|
-
# Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain brokerages. Please refer to https://snaptrade.
|
|
439
|
+
# Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain brokerages. Please refer to https://support.snaptrade.com/brokerages for more information on brokerage trading support.
|
|
440
440
|
# @param user_id [String]
|
|
441
441
|
# @param user_secret [String]
|
|
442
442
|
# @param account_id [String]
|
|
@@ -449,7 +449,7 @@ module SnapTrade
|
|
|
449
449
|
end
|
|
450
450
|
|
|
451
451
|
# Get option order impact
|
|
452
|
-
# Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain brokerages. Please refer to https://snaptrade.
|
|
452
|
+
# Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain brokerages. Please refer to https://support.snaptrade.com/brokerages for more information on brokerage trading support.
|
|
453
453
|
# @param user_id [String]
|
|
454
454
|
# @param user_secret [String]
|
|
455
455
|
# @param account_id [String]
|
|
@@ -1289,7 +1289,7 @@ module SnapTrade
|
|
|
1289
1289
|
|
|
1290
1290
|
# Place option order
|
|
1291
1291
|
#
|
|
1292
|
-
# Places a multi-leg option order. Only supported on certain option trading brokerages. https://snaptrade.
|
|
1292
|
+
# Places a multi-leg option order. Only supported on certain option trading brokerages. https://support.snaptrade.com/brokerages has information on brokerage trading support
|
|
1293
1293
|
#
|
|
1294
1294
|
# @param order_type [MlegOrderTypeStrict] The type of order to place.
|
|
1295
1295
|
# @param time_in_force [TimeInForceStrict] The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. Here are the supported values: - `Day` - Day. The order is valid only for the trading day on which it is placed. - `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.
|
|
@@ -1317,7 +1317,7 @@ module SnapTrade
|
|
|
1317
1317
|
|
|
1318
1318
|
# Place option order
|
|
1319
1319
|
#
|
|
1320
|
-
# Places a multi-leg option order. Only supported on certain option trading brokerages. https://snaptrade.
|
|
1320
|
+
# Places a multi-leg option order. Only supported on certain option trading brokerages. https://support.snaptrade.com/brokerages has information on brokerage trading support
|
|
1321
1321
|
#
|
|
1322
1322
|
# @param order_type [MlegOrderTypeStrict] The type of order to place.
|
|
1323
1323
|
# @param time_in_force [TimeInForceStrict] The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. Here are the supported values: - `Day` - Day. The order is valid only for the trading day on which it is placed. - `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.
|
|
@@ -1343,7 +1343,7 @@ module SnapTrade
|
|
|
1343
1343
|
end
|
|
1344
1344
|
|
|
1345
1345
|
# Place option order
|
|
1346
|
-
# Places a multi-leg option order. Only supported on certain option trading brokerages. https://snaptrade.
|
|
1346
|
+
# Places a multi-leg option order. Only supported on certain option trading brokerages. https://support.snaptrade.com/brokerages has information on brokerage trading support
|
|
1347
1347
|
# @param user_id [String]
|
|
1348
1348
|
# @param user_secret [String]
|
|
1349
1349
|
# @param account_id [String]
|
|
@@ -1356,7 +1356,7 @@ module SnapTrade
|
|
|
1356
1356
|
end
|
|
1357
1357
|
|
|
1358
1358
|
# Place option order
|
|
1359
|
-
# Places a multi-leg option order. Only supported on certain option trading brokerages. https://snaptrade.
|
|
1359
|
+
# Places a multi-leg option order. Only supported on certain option trading brokerages. https://support.snaptrade.com/brokerages has information on brokerage trading support
|
|
1360
1360
|
# @param user_id [String]
|
|
1361
1361
|
# @param user_secret [String]
|
|
1362
1362
|
# @param account_id [String]
|
|
@@ -53,7 +53,7 @@ module SnapTrade
|
|
|
53
53
|
# Additional information about the account, such as account type, status, etc. This information is specific to the brokerage and there's no standard format for this data. This field is deprecated and subject to removal in a future version.
|
|
54
54
|
attr_accessor :meta
|
|
55
55
|
|
|
56
|
-
# Portfolio Group ID. Portfolio Groups have been deprecated. Please contact support if you have a
|
|
56
|
+
# Portfolio Group ID. Portfolio Groups have been deprecated. Please contact support if you have a use case for it.
|
|
57
57
|
attr_accessor :portfolio_group
|
|
58
58
|
|
|
59
59
|
# This field is deprecated.
|
|
@@ -36,7 +36,7 @@ module SnapTrade
|
|
|
36
36
|
|
|
37
37
|
attr_accessor :figi_instrument
|
|
38
38
|
|
|
39
|
-
# This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid
|
|
39
|
+
# This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid use case for this.
|
|
40
40
|
attr_accessor :currencies
|
|
41
41
|
|
|
42
42
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -36,7 +36,7 @@ module SnapTrade
|
|
|
36
36
|
|
|
37
37
|
attr_accessor :figi_instrument
|
|
38
38
|
|
|
39
|
-
# This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid
|
|
39
|
+
# This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid use case for this.
|
|
40
40
|
attr_accessor :currencies
|
|
41
41
|
|
|
42
42
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -40,7 +40,7 @@ module SnapTrade
|
|
|
40
40
|
# A human-readable description of the transaction. This is usually the brokerage's description of the transaction.
|
|
41
41
|
attr_accessor :description
|
|
42
42
|
|
|
43
|
-
# The recorded time for the transaction. The granularity of this timestamp depends on the brokerage. Some brokerages provide the exact time of the transaction, while others provide only the date. Please check the [integrations page](https://snaptrade.
|
|
43
|
+
# The recorded time for the transaction. The granularity of this timestamp depends on the brokerage. Some brokerages provide the exact time of the transaction, while others provide only the date. Please check the [integrations page](https://support.snaptrade.com/brokerages-table?v=6fab8012ade6441fa0c6d9af9c55ce3a) for the specific brokerage to see the granularity of the timestamps. Note that even though the field is named `trade_date`, it can represent any type of transaction, not just trades.
|
|
44
44
|
attr_accessor :trade_date
|
|
45
45
|
|
|
46
46
|
# The date on which the transaction is settled.
|
|
@@ -11,7 +11,7 @@ require 'date'
|
|
|
11
11
|
require 'time'
|
|
12
12
|
|
|
13
13
|
module SnapTrade
|
|
14
|
-
# Total notional amount for the order. Must be `null` if `units` is provided. Can only work with `Market` for `order_type` and `Day` for `time_in_force`. This is only available for certain brokerages. Please check the [integrations doc](https://snaptrade.
|
|
14
|
+
# Total notional amount for the order. Must be `null` if `units` is provided. Can only work with `Market` for `order_type` and `Day` for `time_in_force`. This is only available for certain brokerages. Please check the [integrations doc](https://support.snaptrade.com/brokerages-table?v=e7bbcbf9f272441593f93decde660687) for more information.
|
|
15
15
|
module NotionalValue
|
|
16
16
|
class << self
|
|
17
17
|
# List of class defined in oneOf (OpenAPI v3)
|
|
@@ -21,13 +21,13 @@ module SnapTrade
|
|
|
21
21
|
# This field is deprecated and the caller should use the `symbol` child property's `description` instead.
|
|
22
22
|
attr_accessor :description
|
|
23
23
|
|
|
24
|
-
# This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid
|
|
24
|
+
# This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid use case for this.
|
|
25
25
|
attr_accessor :local_id
|
|
26
26
|
|
|
27
|
-
# This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid
|
|
27
|
+
# This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid use case for this.
|
|
28
28
|
attr_accessor :is_quotable
|
|
29
29
|
|
|
30
|
-
# This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid
|
|
30
|
+
# This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid use case for this.
|
|
31
31
|
attr_accessor :is_tradable
|
|
32
32
|
|
|
33
33
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -22,7 +22,7 @@ module SnapTrade
|
|
|
22
22
|
# A human-readable description of the security type. For example, \"Common Stock\" or \"ETF\".
|
|
23
23
|
attr_accessor :description
|
|
24
24
|
|
|
25
|
-
# This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid
|
|
25
|
+
# This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid use case for this.
|
|
26
26
|
attr_accessor :is_supported
|
|
27
27
|
|
|
28
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -13,7 +13,7 @@ require 'time'
|
|
|
13
13
|
module SnapTrade
|
|
14
14
|
# Data to login a user via SnapTrade Partner
|
|
15
15
|
class SnapTradeLoginUserRequestBody
|
|
16
|
-
# Slug of the brokerage to connect the user to. See [the integrations page](https://snaptrade.
|
|
16
|
+
# Slug of the brokerage to connect the user to. See [the integrations page](https://support.snaptrade.com/brokerages) for a list of supported brokerages and their slugs.
|
|
17
17
|
attr_accessor :broker
|
|
18
18
|
|
|
19
19
|
# When set to `true`, user will be redirected back to the partner's site instead of the connection portal. This parameter is ignored if the connection portal is loaded inside an iframe. See the [guide on ways to integrate the connection portal](/docs/implement-connection-portal) for more information.
|
|
@@ -11,7 +11,7 @@ require 'date'
|
|
|
11
11
|
require 'time'
|
|
12
12
|
|
|
13
13
|
module SnapTrade
|
|
14
|
-
# Status of account transaction sync. SnapTrade syncs transactions from the brokerage under the following conditions: 1. Initial connection - SnapTrade syncs all transactions from the brokerage account as far back as the brokerage allows. Check [our integrations doc](https://snaptrade.
|
|
14
|
+
# Status of account transaction sync. SnapTrade syncs transactions from the brokerage under the following conditions: 1. Initial connection - SnapTrade syncs all transactions from the brokerage account as far back as the brokerage allows. Check [our integrations doc](https://support.snaptrade.com/brokerages-table?v=6fab8012ade6441fa0c6d9af9c55ce3a) for details on how far back we sync for each brokerage. 2. Daily sync - Once a day SnapTrade syncs new transactions from the brokerage. 3. Manual sync - You can retrigger an incremental sync of transactions with the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
|
|
15
15
|
class TransactionsStatus
|
|
16
16
|
# Indicates if the initial sync of transactions has been completed. For accounts with a large number of transactions, the initial sync may take a while to complete.
|
|
17
17
|
attr_accessor :initial_sync_completed
|
|
@@ -36,7 +36,7 @@ module SnapTrade
|
|
|
36
36
|
|
|
37
37
|
attr_accessor :figi_instrument
|
|
38
38
|
|
|
39
|
-
# This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid
|
|
39
|
+
# This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid use case for this.
|
|
40
40
|
attr_accessor :currencies
|
|
41
41
|
|
|
42
42
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -22,7 +22,7 @@ module SnapTrade
|
|
|
22
22
|
# A human-readable description of the security type. For example, \"Common Stock\" or \"ETF\".
|
|
23
23
|
attr_accessor :description
|
|
24
24
|
|
|
25
|
-
# This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid
|
|
25
|
+
# This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid use case for this.
|
|
26
26
|
attr_accessor :is_supported
|
|
27
27
|
|
|
28
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -42,7 +42,7 @@ module SnapTrade
|
|
|
42
42
|
# A human-readable description of the transaction. This is usually the brokerage's description of the transaction.
|
|
43
43
|
attr_accessor :description
|
|
44
44
|
|
|
45
|
-
# The recorded time for the transaction. The granularity of this timestamp depends on the brokerage. Some brokerages provide the exact time of the transaction, while others provide only the date. Please check the [integrations page](https://snaptrade.
|
|
45
|
+
# The recorded time for the transaction. The granularity of this timestamp depends on the brokerage. Some brokerages provide the exact time of the transaction, while others provide only the date. Please check the [integrations page](https://support.snaptrade.com/brokerages-table?v=6fab8012ade6441fa0c6d9af9c55ce3a) for the specific brokerage to see the granularity of the timestamps. Note that even though the field is named `trade_date`, it can represent any type of transaction, not just trades.
|
|
46
46
|
attr_accessor :trade_date
|
|
47
47
|
|
|
48
48
|
# The date on which the transaction is settled.
|
|
@@ -36,7 +36,7 @@ module SnapTrade
|
|
|
36
36
|
|
|
37
37
|
attr_accessor :figi_instrument
|
|
38
38
|
|
|
39
|
-
# This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid
|
|
39
|
+
# This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid use case for this.
|
|
40
40
|
attr_accessor :currencies
|
|
41
41
|
|
|
42
42
|
# Attribute mapping from ruby-style variable name to JSON key.
|
data/lib/snaptrade/version.rb
CHANGED
|
@@ -62,7 +62,7 @@ describe 'AccountInformationApi' do
|
|
|
62
62
|
|
|
63
63
|
# unit tests for get_user_account_balance
|
|
64
64
|
# List account balances
|
|
65
|
-
# Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
65
|
+
# Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
66
66
|
# @param user_id
|
|
67
67
|
# @param user_secret
|
|
68
68
|
# @param account_id
|
|
@@ -105,7 +105,7 @@ describe 'AccountInformationApi' do
|
|
|
105
105
|
|
|
106
106
|
# unit tests for get_user_account_orders
|
|
107
107
|
# List account orders
|
|
108
|
-
# Returns a list of recent orders in the specified account. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
108
|
+
# Returns a list of recent orders in the specified account. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
109
109
|
# @param user_id
|
|
110
110
|
# @param user_secret
|
|
111
111
|
# @param account_id
|
|
@@ -121,7 +121,7 @@ describe 'AccountInformationApi' do
|
|
|
121
121
|
|
|
122
122
|
# unit tests for get_user_account_positions
|
|
123
123
|
# List account positions
|
|
124
|
-
# Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
124
|
+
# Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
125
125
|
# @param user_id
|
|
126
126
|
# @param user_secret
|
|
127
127
|
# @param account_id
|
|
@@ -164,7 +164,7 @@ describe 'AccountInformationApi' do
|
|
|
164
164
|
|
|
165
165
|
# unit tests for get_user_holdings
|
|
166
166
|
# List account holdings
|
|
167
|
-
# Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__ Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
167
|
+
# Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__ Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
168
168
|
# @param account_id
|
|
169
169
|
# @param user_id
|
|
170
170
|
# @param user_secret
|
|
@@ -41,24 +41,9 @@ describe 'OptionsApi' do
|
|
|
41
41
|
end
|
|
42
42
|
end
|
|
43
43
|
|
|
44
|
-
# unit tests for get_options_chain
|
|
45
|
-
# Get the options chain for a symbol
|
|
46
|
-
# Returns the option chain for the specified symbol in the specified account.
|
|
47
|
-
# @param user_id
|
|
48
|
-
# @param user_secret
|
|
49
|
-
# @param account_id The ID of the account to get the options chain from.
|
|
50
|
-
# @param symbol Universal symbol ID if symbol
|
|
51
|
-
# @param [Hash] opts the optional parameters
|
|
52
|
-
# @return [Array<OptionChainInner>]
|
|
53
|
-
describe 'get_options_chain test' do
|
|
54
|
-
it 'should work' do
|
|
55
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
|
|
59
44
|
# unit tests for list_option_holdings
|
|
60
45
|
# List account option positions
|
|
61
|
-
# Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.
|
|
46
|
+
# Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
|
|
62
47
|
# @param user_id
|
|
63
48
|
# @param user_secret
|
|
64
49
|
# @param account_id
|
|
@@ -74,7 +74,7 @@ describe 'TradingApi' do
|
|
|
74
74
|
|
|
75
75
|
# unit tests for get_option_impact
|
|
76
76
|
# Get option order impact
|
|
77
|
-
# Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain brokerages. Please refer to https://snaptrade.
|
|
77
|
+
# Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain brokerages. Please refer to https://support.snaptrade.com/brokerages for more information on brokerage trading support.
|
|
78
78
|
# @param user_id
|
|
79
79
|
# @param user_secret
|
|
80
80
|
# @param account_id
|
|
@@ -163,7 +163,7 @@ describe 'TradingApi' do
|
|
|
163
163
|
|
|
164
164
|
# unit tests for place_mleg_order
|
|
165
165
|
# Place option order
|
|
166
|
-
# Places a multi-leg option order. Only supported on certain option trading brokerages. https://snaptrade.
|
|
166
|
+
# Places a multi-leg option order. Only supported on certain option trading brokerages. https://support.snaptrade.com/brokerages has information on brokerage trading support
|
|
167
167
|
# @param user_id
|
|
168
168
|
# @param user_secret
|
|
169
169
|
# @param account_id
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: snaptrade
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.169
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- SnapTrade
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-03-
|
|
11
|
+
date: 2026-03-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|