snaptrade 2.0.38 → 2.0.40

Sign up to get free protection for your applications and to get access to all the features.
@@ -28,12 +28,12 @@ describe 'TradingApi' do
28
28
  end
29
29
 
30
30
  # unit tests for cancel_user_account_order
31
- # Cancel open order in account
32
- # Sends a signal to the brokerage to cancel the specified order. This will only work if the order has not yet been executed.
31
+ # Cancel order
32
+ # Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
33
33
  # @param user_id
34
34
  # @param user_secret
35
- # @param account_id The ID of the account to cancel the order in.
36
- # @param trading_cancel_user_account_order_request The Order ID to be canceled
35
+ # @param account_id
36
+ # @param trading_cancel_user_account_order_request
37
37
  # @param [Hash] opts the optional parameters
38
38
  # @return [AccountOrderRecord]
39
39
  describe 'cancel_user_account_order test' do
@@ -43,8 +43,8 @@ describe 'TradingApi' do
43
43
  end
44
44
 
45
45
  # unit tests for get_order_impact
46
- # Check the impact of a trade on an account
47
- # Return the trade object and it's impact on the account for the specified order.
46
+ # Check order impact
47
+ # Simulates an order and its impact on the account. This endpoint does not place the order with the brokerage. If successful, it returns a `Trade` object and the ID of the object can be used to place the order with the brokerage using the [place checked order endpoint](/reference/Trading/Trading_placeOrder). Please note that the `Trade` object returned expires after 5 minutes. Any order placed using an expired `Trade` will be rejected.
48
48
  # @param user_id
49
49
  # @param user_secret
50
50
  # @param manual_trade_form
@@ -58,13 +58,13 @@ describe 'TradingApi' do
58
58
 
59
59
  # unit tests for get_user_account_quotes
60
60
  # Get symbol quotes
61
- # Returns quote(s) from the brokerage for the specified symbol(s).
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_id or tickers to get quotes for.
65
- # @param account_id The ID of the account to get quotes.
64
+ # @param symbols List of Universal Symbol IDs or tickers to get quotes for.
65
+ # @param account_id
66
66
  # @param [Hash] opts the optional parameters
67
- # @option opts [Boolean] :use_ticker Should be set to True if providing tickers.
67
+ # @option opts [Boolean] :use_ticker Should be set to `True` if `symbols` are comprised of tickers. Defaults to `False` if not provided.
68
68
  # @return [Array<SymbolsQuotesInner>]
69
69
  describe 'get_user_account_quotes test' do
70
70
  it 'should work' do
@@ -73,8 +73,8 @@ describe 'TradingApi' do
73
73
  end
74
74
 
75
75
  # unit tests for place_force_order
76
- # Place a trade with NO validation.
77
- # Places a specified trade in the specified account.
76
+ # Place order
77
+ # Places a brokerage order in the specified account. The order could be rejected by the brokerage if it is invalid or if the account does not have sufficient funds. This endpoint does not compute the impact to the account balance from the order and any potential commissions before submitting the order to the brokerage. If that is desired, you can use the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). It&#39;s recommended to trigger a manual refresh of the account after placing an order to ensure the account is up to date. You can use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint for this.
78
78
  # @param user_id
79
79
  # @param user_secret
80
80
  # @param manual_trade_form
@@ -87,9 +87,9 @@ describe 'TradingApi' do
87
87
  end
88
88
 
89
89
  # unit tests for place_order
90
- # Place order
91
- # Places the specified trade object. This places the order in the account and returns the status of the order from the brokerage.
92
- # @param trade_id The ID of trade object obtained from trade/impact endpoint
90
+ # Place checked order
91
+ # Places the previously checked order with the brokerage. The &#x60;tradeId&#x60; is obtained from the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). If you prefer to place the order without checking for impact first, you can use the [place order endpoint](/reference/Trading/Trading_placeForceOrder). It&#39;s recommended to trigger a manual refresh of the account after placing an order to ensure the account is up to date. You can use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint for this.
92
+ # @param trade_id Obtained from calling the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact)
93
93
  # @param user_id
94
94
  # @param user_secret
95
95
  # @param [Hash] opts the optional parameters
@@ -32,37 +32,37 @@ describe SnapTrade::ManualTradeForm do
32
32
  end
33
33
  end
34
34
 
35
- describe 'test attribute "order_type"' do
35
+ describe 'test attribute "universal_symbol_id"' do
36
36
  it 'should work' do
37
37
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
38
  end
39
39
  end
40
40
 
41
- describe 'test attribute "price"' do
41
+ describe 'test attribute "order_type"' do
42
42
  it 'should work' do
43
43
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
44
  end
45
45
  end
46
46
 
47
- describe 'test attribute "stop"' do
47
+ describe 'test attribute "time_in_force"' do
48
48
  it 'should work' do
49
49
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
50
  end
51
51
  end
52
52
 
53
- describe 'test attribute "time_in_force"' do
53
+ describe 'test attribute "price"' do
54
54
  it 'should work' do
55
55
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
56
  end
57
57
  end
58
58
 
59
- describe 'test attribute "units"' do
59
+ describe 'test attribute "stop"' do
60
60
  it 'should work' do
61
61
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
62
  end
63
63
  end
64
64
 
65
- describe 'test attribute "universal_symbol_id"' do
65
+ describe 'test attribute "units"' do
66
66
  it 'should work' do
67
67
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
68
  end
@@ -0,0 +1,53 @@
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::ManualTradeImpact
15
+ describe SnapTrade::ManualTradeImpact do
16
+ let(:instance) { SnapTrade::ManualTradeImpact.new }
17
+
18
+ describe 'test an instance of ManualTradeImpact' do
19
+ it 'should create an instance of ManualTradeImpact' do
20
+ expect(instance).to be_instance_of(SnapTrade::ManualTradeImpact)
21
+ end
22
+ end
23
+ describe 'test attribute "account"' do
24
+ it 'should work' do
25
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
26
+ end
27
+ end
28
+
29
+ describe 'test attribute "currency"' do
30
+ it 'should work' do
31
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
+ end
33
+ end
34
+
35
+ describe 'test attribute "remaining_cash"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "estimated_commission"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "forex_fees"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ end
@@ -26,19 +26,19 @@ describe SnapTrade::SymbolsQuotesInner do
26
26
  end
27
27
  end
28
28
 
29
- describe 'test attribute "bid_price"' do
29
+ describe 'test attribute "last_trade_price"' do
30
30
  it 'should work' do
31
31
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
32
  end
33
33
  end
34
34
 
35
- describe 'test attribute "ask_price"' do
35
+ describe 'test attribute "bid_price"' do
36
36
  it 'should work' do
37
37
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
38
  end
39
39
  end
40
40
 
41
- describe 'test attribute "last_trade_price"' do
41
+ describe 'test attribute "ask_price"' do
42
42
  it 'should work' do
43
43
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
44
  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.38
4
+ version: 2.0.40
5
5
  platform: ruby
6
6
  authors:
7
7
  - SnapTrade
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-21 00:00:00.000000000 Z
11
+ date: 2024-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -136,6 +136,7 @@ files:
136
136
  - lib/snaptrade/models/manual_trade_balance.rb
137
137
  - lib/snaptrade/models/manual_trade_form.rb
138
138
  - lib/snaptrade/models/manual_trade_form_notional_value.rb
139
+ - lib/snaptrade/models/manual_trade_impact.rb
139
140
  - lib/snaptrade/models/manual_trade_symbol.rb
140
141
  - lib/snaptrade/models/model400_failed_request_response.rb
141
142
  - lib/snaptrade/models/model401_failed_request_response.rb
@@ -257,6 +258,7 @@ files:
257
258
  - spec/models/manual_trade_balance_spec.rb
258
259
  - spec/models/manual_trade_form_notional_value_spec.rb
259
260
  - spec/models/manual_trade_form_spec.rb
261
+ - spec/models/manual_trade_impact_spec.rb
260
262
  - spec/models/manual_trade_spec.rb
261
263
  - spec/models/manual_trade_symbol_spec.rb
262
264
  - spec/models/model400_failed_request_response_spec.rb
@@ -425,6 +427,7 @@ test_files:
425
427
  - spec/models/brokerage_authorization_refresh_confirmation_spec.rb
426
428
  - spec/models/options_symbol_spec.rb
427
429
  - spec/models/exchange_rate_pairs_spec.rb
430
+ - spec/models/manual_trade_impact_spec.rb
428
431
  - spec/models/manual_trade_and_impact_spec.rb
429
432
  - spec/models/auth_type_spec.rb
430
433
  - spec/models/model500_unexpected_exception_response_spec.rb