snaptrade 2.0.115 → 2.0.116
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 +3 -3
- data/README.md +3 -3
- data/lib/snaptrade/api/trading_api.rb +2 -2
- data/lib/snaptrade/models/mleg_price_effect_strict.rb +38 -0
- data/lib/snaptrade/models/mleg_trade_form.rb +1 -1
- data/lib/snaptrade/version.rb +1 -1
- data/lib/snaptrade.rb +1 -0
- data/spec/models/mleg_price_effect_strict_spec.rb +23 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 286bc72cce7d1cedbfdbb66011245dfdca9ad4d1639aeb1fccd7321bfbc991a3
|
4
|
+
data.tar.gz: 3f3cd48fa580c1045df50c4a9cfef7375d023bcdc6dbf1da7d5d0886c58ed03b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f64fb103fde2f463dce48793529c00452040b1f4b5d204c27e6687b0823a12b998a4b0fc4896d9506036b99a7e02fc58b4ad5095a6c540194a679aa901ff5e86
|
7
|
+
data.tar.gz: e171eb9563c35a6006e90d1579e2b10c51c520957151ab524aa8b19b6d2230406849f73a60730ea5db35b717233e3ce040b969b8f746fa9a3d9842713306093c
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
snaptrade (2.0.
|
4
|
+
snaptrade (2.0.116)
|
5
5
|
faraday (>= 1.0.1, < 3.0)
|
6
6
|
faraday-multipart (~> 1.0, >= 1.0.4)
|
7
7
|
|
@@ -43,7 +43,7 @@ GEM
|
|
43
43
|
rainbow (3.1.1)
|
44
44
|
rake (13.0.6)
|
45
45
|
regexp_parser (2.10.0)
|
46
|
-
reline (0.6.
|
46
|
+
reline (0.6.2)
|
47
47
|
io-console (~> 0.5)
|
48
48
|
rexml (3.4.1)
|
49
49
|
rspec (3.13.1)
|
@@ -68,7 +68,7 @@ GEM
|
|
68
68
|
rubocop-ast (>= 1.2.0, < 2.0)
|
69
69
|
ruby-progressbar (~> 1.7)
|
70
70
|
unicode-display_width (>= 1.4.0, < 3.0)
|
71
|
-
rubocop-ast (1.
|
71
|
+
rubocop-ast (1.46.0)
|
72
72
|
parser (>= 3.3.7.2)
|
73
73
|
prism (~> 1.4)
|
74
74
|
ruby-progressbar (1.13.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
|
-
[](https://rubygems.org/gems/snaptrade/versions/2.0.116)
|
10
10
|
[](https://snaptrade.com/)
|
11
11
|
|
12
12
|
</div>
|
@@ -82,7 +82,7 @@ Connect brokerage accounts to your app for live positions and trading
|
|
82
82
|
Add to Gemfile:
|
83
83
|
|
84
84
|
```ruby
|
85
|
-
gem 'snaptrade', '~> 2.0.
|
85
|
+
gem 'snaptrade', '~> 2.0.116'
|
86
86
|
```
|
87
87
|
|
88
88
|
## Getting Started<a id="getting-started"></a>
|
@@ -2051,7 +2051,7 @@ The limit price. Required if the order type is LIMIT, STOP_LOSS_LIMIT.
|
|
2051
2051
|
##### stop_price: `Float`<a id="stop_price-float"></a>
|
2052
2052
|
The stop price. Required if the order type is STOP_LOSS_MARKET, STOP_LOSS_LIMIT.
|
2053
2053
|
|
2054
|
-
##### price_effect: [`
|
2054
|
+
##### price_effect: [`MlegPriceEffectStrict`](./lib/snaptrade/models/mleg_price_effect_strict.rb)<a id="price_effect-mlegpriceeffectstrictlibsnaptrademodelsmleg_price_effect_strictrb"></a>
|
2055
2055
|
#### 🔄 Return<a id="🔄-return"></a>
|
2056
2056
|
|
2057
2057
|
[MlegOrderResponse](./lib/snaptrade/models/mleg_order_response.rb)
|
@@ -964,7 +964,7 @@ module SnapTrade
|
|
964
964
|
# @param account_id [String]
|
965
965
|
# @param limit_price [Float] The limit price. Required if the order type is LIMIT, STOP_LOSS_LIMIT.
|
966
966
|
# @param stop_price [Float] The stop price. Required if the order type is STOP_LOSS_MARKET, STOP_LOSS_LIMIT.
|
967
|
-
# @param price_effect [
|
967
|
+
# @param price_effect [MlegPriceEffectStrict]
|
968
968
|
# @param body [MlegTradeForm]
|
969
969
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
970
970
|
def place_mleg_order(order_type:, time_in_force:, legs:, user_id:, user_secret:, account_id:, limit_price: SENTINEL, stop_price: SENTINEL, price_effect: SENTINEL, extra: {})
|
@@ -992,7 +992,7 @@ module SnapTrade
|
|
992
992
|
# @param account_id [String]
|
993
993
|
# @param limit_price [Float] The limit price. Required if the order type is LIMIT, STOP_LOSS_LIMIT.
|
994
994
|
# @param stop_price [Float] The stop price. Required if the order type is STOP_LOSS_MARKET, STOP_LOSS_LIMIT.
|
995
|
-
# @param price_effect [
|
995
|
+
# @param price_effect [MlegPriceEffectStrict]
|
996
996
|
# @param body [MlegTradeForm]
|
997
997
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
998
998
|
def place_mleg_order_with_http_info(order_type:, time_in_force:, legs:, user_id:, user_secret:, account_id:, limit_price: SENTINEL, stop_price: SENTINEL, price_effect: SENTINEL, extra: {})
|
@@ -0,0 +1,38 @@
|
|
1
|
+
=begin
|
2
|
+
#SnapTrade
|
3
|
+
|
4
|
+
#Connect brokerage accounts to your app for live positions and trading
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
Contact: api@snaptrade.com
|
8
|
+
=end
|
9
|
+
|
10
|
+
require 'date'
|
11
|
+
require 'time'
|
12
|
+
|
13
|
+
module SnapTrade
|
14
|
+
class MlegPriceEffectStrict
|
15
|
+
CREDIT = "CREDIT".freeze
|
16
|
+
DEBIT = "DEBIT".freeze
|
17
|
+
EVEN = "EVEN".freeze
|
18
|
+
|
19
|
+
def self.all_vars
|
20
|
+
@all_vars ||= [CREDIT, DEBIT, EVEN].freeze
|
21
|
+
end
|
22
|
+
|
23
|
+
# Builds the enum from string
|
24
|
+
# @param [String] The enum value in the form of the string
|
25
|
+
# @return [String] The enum value
|
26
|
+
def self.build_from_hash(value)
|
27
|
+
new.build_from_hash(value)
|
28
|
+
end
|
29
|
+
|
30
|
+
# Builds the enum from string
|
31
|
+
# @param [String] The enum value in the form of the string
|
32
|
+
# @return [String] The enum value
|
33
|
+
def build_from_hash(value)
|
34
|
+
return value if MlegPriceEffectStrict.all_vars.include?(value)
|
35
|
+
raise "Invalid ENUM value #{value} for class #MlegPriceEffectStrict"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
data/lib/snaptrade/version.rb
CHANGED
data/lib/snaptrade.rb
CHANGED
@@ -79,6 +79,7 @@ require 'snaptrade/models/mleg_instrument_type'
|
|
79
79
|
require 'snaptrade/models/mleg_leg'
|
80
80
|
require 'snaptrade/models/mleg_order_response'
|
81
81
|
require 'snaptrade/models/mleg_order_type_strict'
|
82
|
+
require 'snaptrade/models/mleg_price_effect_strict'
|
82
83
|
require 'snaptrade/models/mleg_trade_form'
|
83
84
|
require 'snaptrade/models/mleg_trading_instrument'
|
84
85
|
require 'snaptrade/models/model400_failed_request_response'
|
@@ -0,0 +1,23 @@
|
|
1
|
+
=begin
|
2
|
+
#SnapTrade
|
3
|
+
|
4
|
+
#Connect brokerage accounts to your app for live positions and trading
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
Contact: api@snaptrade.com
|
8
|
+
=end
|
9
|
+
|
10
|
+
require 'spec_helper'
|
11
|
+
require 'json'
|
12
|
+
require 'date'
|
13
|
+
|
14
|
+
# Unit tests for SnapTrade::MlegPriceEffectStrict
|
15
|
+
describe SnapTrade::MlegPriceEffectStrict do
|
16
|
+
let(:instance) { SnapTrade::MlegPriceEffectStrict.new }
|
17
|
+
|
18
|
+
describe 'test an instance of MlegPriceEffectStrict' do
|
19
|
+
it 'should create an instance of MlegPriceEffectStrict' do
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::MlegPriceEffectStrict)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
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.
|
4
|
+
version: 2.0.116
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SnapTrade
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-07-
|
11
|
+
date: 2025-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -158,6 +158,7 @@ files:
|
|
158
158
|
- lib/snaptrade/models/mleg_leg.rb
|
159
159
|
- lib/snaptrade/models/mleg_order_response.rb
|
160
160
|
- lib/snaptrade/models/mleg_order_type_strict.rb
|
161
|
+
- lib/snaptrade/models/mleg_price_effect_strict.rb
|
161
162
|
- lib/snaptrade/models/mleg_trade_form.rb
|
162
163
|
- lib/snaptrade/models/mleg_trading_instrument.rb
|
163
164
|
- lib/snaptrade/models/model400_failed_request_response.rb
|
@@ -318,6 +319,7 @@ files:
|
|
318
319
|
- spec/models/mleg_leg_spec.rb
|
319
320
|
- spec/models/mleg_order_response_spec.rb
|
320
321
|
- spec/models/mleg_order_type_strict_spec.rb
|
322
|
+
- spec/models/mleg_price_effect_strict_spec.rb
|
321
323
|
- spec/models/mleg_trade_form_spec.rb
|
322
324
|
- spec/models/mleg_trading_instrument_spec.rb
|
323
325
|
- spec/models/model400_failed_request_response_spec.rb
|
@@ -516,6 +518,7 @@ test_files:
|
|
516
518
|
- spec/models/universal_activity_spec.rb
|
517
519
|
- spec/models/account_sync_status_spec.rb
|
518
520
|
- spec/models/mleg_trade_form_spec.rb
|
521
|
+
- spec/models/mleg_price_effect_strict_spec.rb
|
519
522
|
- spec/models/options_position_spec.rb
|
520
523
|
- spec/models/manual_trade_spec.rb
|
521
524
|
- spec/models/time_in_force_strict_spec.rb
|