snaptrade 2.0.134 → 2.0.136

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1d24eb0658e7e1dba7e7a0add10823bdd03880e0479de8d58b0e8b95a296835a
4
- data.tar.gz: 457d6dafe117a2db5af4f86d7e0fae6d5167c5b05368d03f24a979f0ead7899c
3
+ metadata.gz: 02264ba319051c243dd0a579a6795a8d1fd13eb77371336f6bf06740841d373e
4
+ data.tar.gz: fc3353a5588c0ac6a951d92e259e208526036f63ec28dd70e5049f7b3efbc16f
5
5
  SHA512:
6
- metadata.gz: 0c5b82abd3ea4839a93e8d9520a7e8883ea36af676b22455b904646392630a55f2ab93e285f354109bc730027ff0a48d2d57e74a66114baa3535a6847927be74
7
- data.tar.gz: 699d0f66f670f7e297368fa303e655e9e74d8f713087f86766df212ca4ebe542c6c6a6e29483472ecd7a2d5b442a5475e95f77db3b1fffbd0eb1c7b04b5f2b2c
6
+ metadata.gz: add4d4016fc4eb1f31732f9aef1c2249a00ace06dc33c31e78d4ba91812d69387f89a1d0a9ab596a292dca6c374b3806eaab00dfe9b7a8ab952b21f9de2477f4
7
+ data.tar.gz: 07a7566f68c2b751d0eabd35becbeaacbd83a1056e8425acd145094efd6debb8dae2f31da9b2e3009222db6ddbe9628db65fbbd0c2c24943f8e1cbd16bc25c10
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- snaptrade (2.0.134)
4
+ snaptrade (2.0.136)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart (~> 1.0, >= 1.0.4)
7
7
 
@@ -58,7 +58,7 @@ GEM
58
58
  rspec-mocks (3.13.5)
59
59
  diff-lcs (>= 1.2.0, < 2.0)
60
60
  rspec-support (~> 3.13.0)
61
- rspec-support (3.13.5)
61
+ rspec-support (3.13.6)
62
62
  rubocop (1.12.1)
63
63
  parallel (~> 1.10)
64
64
  parser (>= 3.0.0.0)
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.134-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.134)
9
+ [![npm](https://img.shields.io/badge/gem-v2.0.136-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.136)
10
10
  [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
11
11
 
12
12
  </div>
@@ -81,7 +81,7 @@ Connect brokerage accounts to your app for live positions and trading
81
81
  Add to Gemfile:
82
82
 
83
83
  ```ruby
84
- gem 'snaptrade', '~> 2.0.134'
84
+ gem 'snaptrade', '~> 2.0.136'
85
85
  ```
86
86
 
87
87
  ## Getting Started<a id="getting-started"></a>
@@ -2289,7 +2289,7 @@ The price at which a stop order is triggered for `Stop` and `StopLimit` orders.
2289
2289
 
2290
2290
  ### `snaptrade.trading.search_cryptocurrency_pair_instruments`<a id="snaptradetradingsearch_cryptocurrency_pair_instruments"></a>
2291
2291
 
2292
- Searches cryptocurrency pairs instruments accessible to the specified account.
2292
+ Searches cryptocurrency pairs instruments accessible to the specified account. Both `base` and `quote` are optional. Omit both for a full list of cryptocurrency pairs.
2293
2293
 
2294
2294
 
2295
2295
  #### 🛠️ Usage<a id="🛠️-usage"></a>
@@ -1715,7 +1715,7 @@ module SnapTrade
1715
1715
 
1716
1716
  # Get crypto pairs
1717
1717
  #
1718
- # Searches cryptocurrency pairs instruments accessible to the specified account.
1718
+ # Searches cryptocurrency pairs instruments accessible to the specified account. Both `base` and `quote` are optional. Omit both for a full list of cryptocurrency pairs.
1719
1719
  #
1720
1720
  # @param user_id [String]
1721
1721
  # @param user_secret [String]
@@ -1732,7 +1732,7 @@ module SnapTrade
1732
1732
 
1733
1733
  # Get crypto pairs
1734
1734
  #
1735
- # Searches cryptocurrency pairs instruments accessible to the specified account.
1735
+ # Searches cryptocurrency pairs instruments accessible to the specified account. Both `base` and `quote` are optional. Omit both for a full list of cryptocurrency pairs.
1736
1736
  #
1737
1737
  # @param user_id [String]
1738
1738
  # @param user_secret [String]
@@ -1747,7 +1747,7 @@ module SnapTrade
1747
1747
  end
1748
1748
 
1749
1749
  # Get crypto pairs
1750
- # Searches cryptocurrency pairs instruments accessible to the specified account.
1750
+ # Searches cryptocurrency pairs instruments accessible to the specified account. Both `base` and `quote` are optional. Omit both for a full list of cryptocurrency pairs.
1751
1751
  # @param user_id [String]
1752
1752
  # @param user_secret [String]
1753
1753
  # @param account_id [String]
@@ -1761,7 +1761,7 @@ module SnapTrade
1761
1761
  end
1762
1762
 
1763
1763
  # Get crypto pairs
1764
- # Searches cryptocurrency pairs instruments accessible to the specified account.
1764
+ # Searches cryptocurrency pairs instruments accessible to the specified account. Both &#x60;base&#x60; and &#x60;quote&#x60; are optional. Omit both for a full list of cryptocurrency pairs.
1765
1765
  # @param user_id [String]
1766
1766
  # @param user_secret [String]
1767
1767
  # @param account_id [String]
@@ -32,6 +32,9 @@ module SnapTrade
32
32
 
33
33
  attr_accessor :currency
34
34
 
35
+ # If the position is a cash equivalent (usually a money market fund) that is also counted in account cash balance and buying power
36
+ attr_accessor :cash_equivalent
37
+
35
38
  # Attribute mapping from ruby-style variable name to JSON key.
36
39
  def self.attribute_map
37
40
  {
@@ -41,7 +44,8 @@ module SnapTrade
41
44
  :'open_pnl' => :'open_pnl',
42
45
  :'average_purchase_price' => :'average_purchase_price',
43
46
  :'fractional_units' => :'fractional_units',
44
- :'currency' => :'currency'
47
+ :'currency' => :'currency',
48
+ :'cash_equivalent' => :'cash_equivalent'
45
49
  }
46
50
  end
47
51
 
@@ -59,7 +63,8 @@ module SnapTrade
59
63
  :'open_pnl' => :'Float',
60
64
  :'average_purchase_price' => :'Float',
61
65
  :'fractional_units' => :'Float',
62
- :'currency' => :'PositionCurrency'
66
+ :'currency' => :'PositionCurrency',
67
+ :'cash_equivalent' => :'Boolean'
63
68
  }
64
69
  end
65
70
 
@@ -71,6 +76,7 @@ module SnapTrade
71
76
  :'open_pnl',
72
77
  :'average_purchase_price',
73
78
  :'fractional_units',
79
+ :'cash_equivalent'
74
80
  ])
75
81
  end
76
82
 
@@ -116,6 +122,10 @@ module SnapTrade
116
122
  if attributes.key?(:'currency')
117
123
  self.currency = attributes[:'currency']
118
124
  end
125
+
126
+ if attributes.key?(:'cash_equivalent')
127
+ self.cash_equivalent = attributes[:'cash_equivalent']
128
+ end
119
129
  end
120
130
 
121
131
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -142,7 +152,8 @@ module SnapTrade
142
152
  open_pnl == o.open_pnl &&
143
153
  average_purchase_price == o.average_purchase_price &&
144
154
  fractional_units == o.fractional_units &&
145
- currency == o.currency
155
+ currency == o.currency &&
156
+ cash_equivalent == o.cash_equivalent
146
157
  end
147
158
 
148
159
  # @see the `==` method
@@ -154,7 +165,7 @@ module SnapTrade
154
165
  # Calculates hash code according to all attributes.
155
166
  # @return [Integer] Hash code
156
167
  def hash
157
- [symbol, units, price, open_pnl, average_purchase_price, fractional_units, currency].hash
168
+ [symbol, units, price, open_pnl, average_purchase_price, fractional_units, currency, cash_equivalent].hash
158
169
  end
159
170
 
160
171
  # Builds the object from hash
@@ -8,5 +8,5 @@ Contact: api@snaptrade.com
8
8
  =end
9
9
 
10
10
  module SnapTrade
11
- VERSION = '2.0.134'
11
+ VERSION = '2.0.136'
12
12
  end
@@ -208,7 +208,7 @@ describe 'TradingApi' do
208
208
 
209
209
  # unit tests for search_cryptocurrency_pair_instruments
210
210
  # Get crypto pairs
211
- # Searches cryptocurrency pairs instruments accessible to the specified account.
211
+ # Searches cryptocurrency pairs instruments accessible to the specified account. Both &#x60;base&#x60; and &#x60;quote&#x60; are optional. Omit both for a full list of cryptocurrency pairs.
212
212
  # @param user_id
213
213
  # @param user_secret
214
214
  # @param account_id
@@ -62,4 +62,10 @@ describe SnapTrade::Position do
62
62
  end
63
63
  end
64
64
 
65
+ describe 'test attribute "cash_equivalent"' do
66
+ it 'should work' do
67
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
+ end
69
+ end
70
+
65
71
  end
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.134
4
+ version: 2.0.136
5
5
  platform: ruby
6
6
  authors:
7
7
  - SnapTrade
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-09-16 00:00:00.000000000 Z
11
+ date: 2025-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday