snaptrade 2.0.56 → 2.0.57
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +9 -3
- data/lib/snaptrade/api/account_information_api.rb +9 -2
- data/lib/snaptrade/api/trading_api.rb +4 -4
- data/lib/snaptrade/version.rb +1 -1
- data/spec/api/account_information_api_spec.rb +1 -0
- data/spec/api/trading_api_spec.rb +1 -1
- 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: 76c1cd624eec441a3fb89eb4382af3cf43a0efbc378884a9df5aa68351b72add
|
4
|
+
data.tar.gz: 80973f12d1aee7f1b676a45339a14e17ce4014952cdfbae9476a3e7332ad79e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 772dc621ec9d75a3e630252a26725205ff30e1fe6df202b7ff75fadac8ed4e9b2e0a86d93b421777701b617671bee9b4bec01b9477a882b69e7665fdb98f09e1
|
7
|
+
data.tar.gz: 7379dbbb8e5f1c3f54f14d42c370ed06a67871ac15a811f118f7c8173872bfc2aba856ba1044c1ab6df8e46125acf19fec3c9ab6d6fc89f8e506e96cbf212d1a
|
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
|
-
[![npm](https://img.shields.io/badge/gem-v2.0.
|
9
|
+
[![npm](https://img.shields.io/badge/gem-v2.0.57-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.57)
|
10
10
|
[![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
|
11
11
|
|
12
12
|
</div>
|
@@ -73,7 +73,7 @@ Connect brokerage accounts to your app for live positions and trading
|
|
73
73
|
Add to Gemfile:
|
74
74
|
|
75
75
|
```ruby
|
76
|
-
gem 'snaptrade', '~> 2.0.
|
76
|
+
gem 'snaptrade', '~> 2.0.57'
|
77
77
|
```
|
78
78
|
|
79
79
|
## Getting Started<a id="getting-started"></a>
|
@@ -321,6 +321,7 @@ result = snaptrade.account_information.get_user_account_recent_orders(
|
|
321
321
|
user_id: "snaptrade-user-123",
|
322
322
|
user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
|
323
323
|
account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
|
324
|
+
only_executed: true,
|
324
325
|
)
|
325
326
|
p result
|
326
327
|
```
|
@@ -330,6 +331,10 @@ p result
|
|
330
331
|
##### user_id: `String`<a id="user_id-string"></a>
|
331
332
|
##### user_secret: `String`<a id="user_secret-string"></a>
|
332
333
|
##### account_id: `String`<a id="account_id-string"></a>
|
334
|
+
##### only_executed: `Boolean`<a id="only_executed-boolean"></a>
|
335
|
+
Defaults to true. Indicates if request should fetch only executed orders. Set to
|
336
|
+
false to retrieve non executed orders as well
|
337
|
+
|
333
338
|
#### 🔄 Return<a id="🔄-return"></a>
|
334
339
|
|
335
340
|
[RecentOrdersResponse](./lib/snaptrade/models/recent_orders_response.rb)
|
@@ -1611,7 +1616,8 @@ p result
|
|
1611
1616
|
##### user_id: `String`<a id="user_id-string"></a>
|
1612
1617
|
##### user_secret: `String`<a id="user_secret-string"></a>
|
1613
1618
|
##### symbols: `String`<a id="symbols-string"></a>
|
1614
|
-
List of Universal Symbol IDs or tickers to get quotes for.
|
1619
|
+
List of Universal Symbol IDs or tickers to get quotes for. When providing
|
1620
|
+
multiple values, use a comma as separator
|
1615
1621
|
|
1616
1622
|
##### account_id: `String`<a id="account_id-string"></a>
|
1617
1623
|
##### use_ticker: `Boolean`<a id="use_ticker-boolean"></a>
|
@@ -585,8 +585,10 @@ module SnapTrade
|
|
585
585
|
# @param user_id [String]
|
586
586
|
# @param user_secret [String]
|
587
587
|
# @param account_id [String]
|
588
|
+
# @param only_executed [Boolean] Defaults to true. Indicates if request should fetch only executed orders. Set to false to retrieve non executed orders as well
|
588
589
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
589
|
-
def get_user_account_recent_orders(user_id:, user_secret:, account_id:, extra: {})
|
590
|
+
def get_user_account_recent_orders(user_id:, user_secret:, account_id:, only_executed: SENTINEL, extra: {})
|
591
|
+
extra[:only_executed] = only_executed if only_executed != SENTINEL
|
590
592
|
data, _status_code, _headers = get_user_account_recent_orders_with_http_info_impl(user_id, user_secret, account_id, extra)
|
591
593
|
data
|
592
594
|
end
|
@@ -601,8 +603,10 @@ module SnapTrade
|
|
601
603
|
# @param user_id [String]
|
602
604
|
# @param user_secret [String]
|
603
605
|
# @param account_id [String]
|
606
|
+
# @param only_executed [Boolean] Defaults to true. Indicates if request should fetch only executed orders. Set to false to retrieve non executed orders as well
|
604
607
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
605
|
-
def get_user_account_recent_orders_with_http_info(user_id:, user_secret:, account_id:, extra: {})
|
608
|
+
def get_user_account_recent_orders_with_http_info(user_id:, user_secret:, account_id:, only_executed: SENTINEL, extra: {})
|
609
|
+
extra[:only_executed] = only_executed if only_executed != SENTINEL
|
606
610
|
get_user_account_recent_orders_with_http_info_impl(user_id, user_secret, account_id, extra)
|
607
611
|
end
|
608
612
|
|
@@ -612,6 +616,7 @@ module SnapTrade
|
|
612
616
|
# @param user_secret [String]
|
613
617
|
# @param account_id [String]
|
614
618
|
# @param [Hash] opts the optional parameters
|
619
|
+
# @option opts [Boolean] :only_executed Defaults to true. Indicates if request should fetch only executed orders. Set to false to retrieve non executed orders as well
|
615
620
|
# @return [RecentOrdersResponse]
|
616
621
|
private def get_user_account_recent_orders_impl(user_id, user_secret, account_id, opts = {})
|
617
622
|
data, _status_code, _headers = get_user_account_recent_orders_with_http_info(user_id, user_secret, account_id, opts)
|
@@ -624,6 +629,7 @@ module SnapTrade
|
|
624
629
|
# @param user_secret [String]
|
625
630
|
# @param account_id [String]
|
626
631
|
# @param [Hash] opts the optional parameters
|
632
|
+
# @option opts [Boolean] :only_executed Defaults to true. Indicates if request should fetch only executed orders. Set to false to retrieve non executed orders as well
|
627
633
|
# @return [Array<(RecentOrdersResponse, Integer, Hash)>] RecentOrdersResponse data, response status code and response headers
|
628
634
|
private def get_user_account_recent_orders_with_http_info_impl(user_id, user_secret, account_id, opts = {})
|
629
635
|
if @api_client.config.debugging
|
@@ -648,6 +654,7 @@ module SnapTrade
|
|
648
654
|
query_params = opts[:query_params] || {}
|
649
655
|
query_params[:'userId'] = user_id
|
650
656
|
query_params[:'userSecret'] = user_secret
|
657
|
+
query_params[:'only_executed'] = opts[:'only_executed'] if !opts[:'only_executed'].nil?
|
651
658
|
|
652
659
|
# header parameters
|
653
660
|
header_params = opts[:header_params] || {}
|
@@ -295,7 +295,7 @@ module SnapTrade
|
|
295
295
|
#
|
296
296
|
# @param user_id [String]
|
297
297
|
# @param user_secret [String]
|
298
|
-
# @param symbols [String] List of Universal Symbol IDs or tickers to get quotes for.
|
298
|
+
# @param symbols [String] List of Universal Symbol IDs or tickers to get quotes for. When providing multiple values, use a comma as separator
|
299
299
|
# @param account_id [String]
|
300
300
|
# @param use_ticker [Boolean] Should be set to `True` if `symbols` are comprised of tickers. Defaults to `False` if not provided.
|
301
301
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -311,7 +311,7 @@ module SnapTrade
|
|
311
311
|
#
|
312
312
|
# @param user_id [String]
|
313
313
|
# @param user_secret [String]
|
314
|
-
# @param symbols [String] List of Universal Symbol IDs or tickers to get quotes for.
|
314
|
+
# @param symbols [String] List of Universal Symbol IDs or tickers to get quotes for. When providing multiple values, use a comma as separator
|
315
315
|
# @param account_id [String]
|
316
316
|
# @param use_ticker [Boolean] Should be set to `True` if `symbols` are comprised of tickers. Defaults to `False` if not provided.
|
317
317
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -324,7 +324,7 @@ module SnapTrade
|
|
324
324
|
# Returns quotes from the brokerage for the specified symbols and account. The quotes returned can be delayed depending on the brokerage the account belongs to. It is highly recommended that you use your own market data provider for real-time quotes instead of relying on this endpoint. This endpoint does not work for options quotes.
|
325
325
|
# @param user_id [String]
|
326
326
|
# @param user_secret [String]
|
327
|
-
# @param symbols [String] List of Universal Symbol IDs or tickers to get quotes for.
|
327
|
+
# @param symbols [String] List of Universal Symbol IDs or tickers to get quotes for. When providing multiple values, use a comma as separator
|
328
328
|
# @param account_id [String]
|
329
329
|
# @param [Hash] opts the optional parameters
|
330
330
|
# @option opts [Boolean] :use_ticker Should be set to `True` if `symbols` are comprised of tickers. Defaults to `False` if not provided.
|
@@ -338,7 +338,7 @@ module SnapTrade
|
|
338
338
|
# Returns quotes from the brokerage for the specified symbols and account. The quotes returned can be delayed depending on the brokerage the account belongs to. It is highly recommended that you use your own market data provider for real-time quotes instead of relying on this endpoint. This endpoint does not work for options quotes.
|
339
339
|
# @param user_id [String]
|
340
340
|
# @param user_secret [String]
|
341
|
-
# @param symbols [String] List of Universal Symbol IDs or tickers to get quotes for.
|
341
|
+
# @param symbols [String] List of Universal Symbol IDs or tickers to get quotes for. When providing multiple values, use a comma as separator
|
342
342
|
# @param account_id [String]
|
343
343
|
# @param [Hash] opts the optional parameters
|
344
344
|
# @option opts [Boolean] :use_ticker Should be set to `True` if `symbols` are comprised of tickers. Defaults to `False` if not provided.
|
data/lib/snaptrade/version.rb
CHANGED
@@ -106,6 +106,7 @@ describe 'AccountInformationApi' do
|
|
106
106
|
# @param user_secret
|
107
107
|
# @param account_id
|
108
108
|
# @param [Hash] opts the optional parameters
|
109
|
+
# @option opts [Boolean] :only_executed Defaults to true. Indicates if request should fetch only executed orders. Set to false to retrieve non executed orders as well
|
109
110
|
# @return [RecentOrdersResponse]
|
110
111
|
describe 'get_user_account_recent_orders test' do
|
111
112
|
it 'should work' do
|
@@ -61,7 +61,7 @@ describe 'TradingApi' do
|
|
61
61
|
# Returns quotes from the brokerage for the specified symbols and account. The quotes returned can be delayed depending on the brokerage the account belongs to. It is highly recommended that you use your own market data provider for real-time quotes instead of relying on this endpoint. This endpoint does not work for options quotes.
|
62
62
|
# @param user_id
|
63
63
|
# @param user_secret
|
64
|
-
# @param symbols List of Universal Symbol IDs or tickers to get quotes for.
|
64
|
+
# @param symbols List of Universal Symbol IDs or tickers to get quotes for. When providing multiple values, use a comma as separator
|
65
65
|
# @param account_id
|
66
66
|
# @param [Hash] opts the optional parameters
|
67
67
|
# @option opts [Boolean] :use_ticker Should be set to `True` if `symbols` are comprised of tickers. Defaults to `False` if not provided.
|
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.57
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SnapTrade
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|