snaptrade 2.0.160 → 2.0.161

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: 39abef0a80a05056e6158a4188f33e2fdaff4fba0e1d2df65e8a0ac813547676
4
- data.tar.gz: c972f3c93167a4380b19db8012a459afb4d2b04d007f7db1b7753dd8a2549d9f
3
+ metadata.gz: cff757123d9aa13d82660e1f9a83796b057c847966a741d7379bfd15853cdb83
4
+ data.tar.gz: c695a68f78e095c6a3914a9ee8d1fd966f5ebe74893ab046be3be0585d2824a7
5
5
  SHA512:
6
- metadata.gz: cba00b1bdbf83f0eab2124b8694ac57387937a9e71a2e611b96bd4b3d16d2ef512338982371ac54ba4e016b59cd08a03cf723d591c2f2f3c8d8e7637436f4902
7
- data.tar.gz: 8157df2d2e6eef61236ad1d2105cda161064ad4661828648992dba12c524f4a092f531a54a7876eabcc7aae35b4024eb4a1dee5e27a58b816cb4ef33a251b99e
6
+ metadata.gz: 5a1f93f3f4c0d2ce32547538fab648f1e004780f06311c1a24182a3b31d08aeb27f030f737a26799153d364d9c31a854983641fc9b406ff1a504edc55ca8316a
7
+ data.tar.gz: af48d20033afb2dde33ca48c7ca46e74d5c652125bd91d23f78b54ff6723c9b00f7bec88e364f8bb057ac3dfdcf1e54fe52ad4acfd7d25efc19910ecbc604eee
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- snaptrade (2.0.160)
4
+ snaptrade (2.0.161)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart (~> 1.0, >= 1.0.4)
7
7
 
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.160-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.160)
9
+ [![npm](https://img.shields.io/badge/gem-v2.0.161-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.161)
10
10
  [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
11
11
 
12
12
  </div>
@@ -84,7 +84,7 @@ Connect brokerage accounts to your app for live positions and trading
84
84
  Add to Gemfile:
85
85
 
86
86
  ```ruby
87
- gem 'snaptrade', '~> 2.0.160'
87
+ gem 'snaptrade', '~> 2.0.161'
88
88
  ```
89
89
 
90
90
  ## Getting Started<a id="getting-started"></a>
@@ -1131,7 +1131,7 @@ specific users
1131
1131
 
1132
1132
  ### `snaptrade.experimental_endpoints.get_user_account_order_detail_v2`<a id="snaptradeexperimental_endpointsget_user_account_order_detail_v2"></a>
1133
1133
 
1134
- Returns the detail of a single order using the external order ID provided in the request body.
1134
+ Returns the detail of a single order using the brokerage order ID provided as a path parameter.
1135
1135
 
1136
1136
  The V2 order response format includes all legs of the order in the `legs` list field.
1137
1137
  If the order is single legged, `legs` will be a list of one leg.
@@ -1145,8 +1145,8 @@ This endpoint only returns orders placed through SnapTrade. In other words, orde
1145
1145
 
1146
1146
  ```ruby
1147
1147
  result = snaptrade.experimental_endpoints.get_user_account_order_detail_v2(
1148
- brokerage_order_id: "66a033fa-da74-4fcf-b527-feefdec9257e",
1149
1148
  account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
1149
+ brokerage_order_id: "66a033fa-da74-4fcf-b527-feefdec9257e",
1150
1150
  user_id: "snaptrade-user-123",
1151
1151
  user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
1152
1152
  )
@@ -1155,11 +1155,8 @@ p result
1155
1155
 
1156
1156
  #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1157
1157
 
1158
- ##### brokerage_order_id: `String`<a id="brokerage_order_id-string"></a>
1159
- Order ID returned by brokerage. This is the unique identifier for the order in
1160
- the brokerage system.
1161
-
1162
1158
  ##### account_id: `String`<a id="account_id-string"></a>
1159
+ ##### brokerage_order_id: `String`<a id="brokerage_order_id-string"></a>
1163
1160
  ##### user_id: `String`<a id="user_id-string"></a>
1164
1161
  ##### user_secret: `String`<a id="user_secret-string"></a>
1165
1162
  #### 🔄 Return<a id="🔄-return"></a>
@@ -1168,7 +1165,7 @@ the brokerage system.
1168
1165
 
1169
1166
  #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1170
1167
 
1171
- `/accounts/{accountId}/orders/details/v2` `POST`
1168
+ `/accounts/{accountId}/orders/details/v2/{brokerageOrderId}` `GET`
1172
1169
 
1173
1170
  [🔙 **Back to Table of Contents**](#table-of-contents)
1174
1171
 
@@ -19,7 +19,7 @@ module SnapTrade
19
19
 
20
20
  # Get account order detail (V2)
21
21
  #
22
- # Returns the detail of a single order using the external order ID provided in the request body.
22
+ # Returns the detail of a single order using the brokerage order ID provided as a path parameter.
23
23
  #
24
24
  # The V2 order response format includes all legs of the order in the `legs` list field.
25
25
  # If the order is single legged, `legs` will be a list of one leg.
@@ -28,23 +28,19 @@ module SnapTrade
28
28
  #
29
29
  # This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
30
30
  #
31
- # @param brokerage_order_id [String] Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.
32
31
  # @param account_id [String]
32
+ # @param brokerage_order_id [String]
33
33
  # @param user_id [String]
34
34
  # @param user_secret [String]
35
- # @param body [AccountInformationGetUserAccountOrderDetailRequest]
36
35
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
37
- def get_user_account_order_detail_v2(brokerage_order_id:, account_id:, user_id:, user_secret:, extra: {})
38
- _body = {}
39
- _body[:brokerage_order_id] = brokerage_order_id if brokerage_order_id != SENTINEL
40
- account_information_get_user_account_order_detail_request = _body
41
- data, _status_code, _headers = get_user_account_order_detail_v2_with_http_info_impl(account_id, user_id, user_secret, account_information_get_user_account_order_detail_request, extra)
36
+ def get_user_account_order_detail_v2(account_id:, brokerage_order_id:, user_id:, user_secret:, extra: {})
37
+ data, _status_code, _headers = get_user_account_order_detail_v2_with_http_info_impl(account_id, brokerage_order_id, user_id, user_secret, extra)
42
38
  data
43
39
  end
44
40
 
45
41
  # Get account order detail (V2)
46
42
  #
47
- # Returns the detail of a single order using the external order ID provided in the request body.
43
+ # Returns the detail of a single order using the brokerage order ID provided as a path parameter.
48
44
  #
49
45
  # The V2 order response format includes all legs of the order in the `legs` list field.
50
46
  # If the order is single legged, `legs` will be a list of one leg.
@@ -53,41 +49,37 @@ module SnapTrade
53
49
  #
54
50
  # This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
55
51
  #
56
- # @param brokerage_order_id [String] Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.
57
52
  # @param account_id [String]
53
+ # @param brokerage_order_id [String]
58
54
  # @param user_id [String]
59
55
  # @param user_secret [String]
60
- # @param body [AccountInformationGetUserAccountOrderDetailRequest]
61
56
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
62
- def get_user_account_order_detail_v2_with_http_info(brokerage_order_id:, account_id:, user_id:, user_secret:, extra: {})
63
- _body = {}
64
- _body[:brokerage_order_id] = brokerage_order_id if brokerage_order_id != SENTINEL
65
- account_information_get_user_account_order_detail_request = _body
66
- get_user_account_order_detail_v2_with_http_info_impl(account_id, user_id, user_secret, account_information_get_user_account_order_detail_request, extra)
57
+ def get_user_account_order_detail_v2_with_http_info(account_id:, brokerage_order_id:, user_id:, user_secret:, extra: {})
58
+ get_user_account_order_detail_v2_with_http_info_impl(account_id, brokerage_order_id, user_id, user_secret, extra)
67
59
  end
68
60
 
69
61
  # Get account order detail (V2)
70
- # Returns the detail of a single order using the external order ID provided in the request body. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
62
+ # Returns the detail of a single order using the brokerage order ID provided as a path parameter. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
71
63
  # @param account_id [String]
64
+ # @param brokerage_order_id [String]
72
65
  # @param user_id [String]
73
66
  # @param user_secret [String]
74
- # @param account_information_get_user_account_order_detail_request [AccountInformationGetUserAccountOrderDetailRequest]
75
67
  # @param [Hash] opts the optional parameters
76
68
  # @return [AccountOrderRecordV2]
77
- private def get_user_account_order_detail_v2_impl(account_id, user_id, user_secret, account_information_get_user_account_order_detail_request, opts = {})
78
- data, _status_code, _headers = get_user_account_order_detail_v2_with_http_info(account_id, user_id, user_secret, account_information_get_user_account_order_detail_request, opts)
69
+ private def get_user_account_order_detail_v2_impl(account_id, brokerage_order_id, user_id, user_secret, opts = {})
70
+ data, _status_code, _headers = get_user_account_order_detail_v2_with_http_info(account_id, brokerage_order_id, user_id, user_secret, opts)
79
71
  data
80
72
  end
81
73
 
82
74
  # Get account order detail (V2)
83
- # Returns the detail of a single order using the external order ID provided in the request body. The V2 order response format includes all legs of the order in the &#x60;legs&#x60; list field. If the order is single legged, &#x60;legs&#x60; will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
75
+ # Returns the detail of a single order using the brokerage order ID provided as a path parameter. The V2 order response format includes all legs of the order in the &#x60;legs&#x60; list field. If the order is single legged, &#x60;legs&#x60; will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
84
76
  # @param account_id [String]
77
+ # @param brokerage_order_id [String]
85
78
  # @param user_id [String]
86
79
  # @param user_secret [String]
87
- # @param account_information_get_user_account_order_detail_request [AccountInformationGetUserAccountOrderDetailRequest]
88
80
  # @param [Hash] opts the optional parameters
89
81
  # @return [Array<(AccountOrderRecordV2, Integer, Hash)>] AccountOrderRecordV2 data, response status code and response headers
90
- private def get_user_account_order_detail_v2_with_http_info_impl(account_id, user_id, user_secret, account_information_get_user_account_order_detail_request, opts = {})
82
+ private def get_user_account_order_detail_v2_with_http_info_impl(account_id, brokerage_order_id, user_id, user_secret, opts = {})
91
83
  if @api_client.config.debugging
92
84
  @api_client.config.logger.debug 'Calling API: ExperimentalEndpointsApi.get_user_account_order_detail_v2 ...'
93
85
  end
@@ -95,6 +87,10 @@ module SnapTrade
95
87
  if @api_client.config.client_side_validation && account_id.nil?
96
88
  fail ArgumentError, "Missing the required parameter 'account_id' when calling ExperimentalEndpointsApi.get_user_account_order_detail_v2"
97
89
  end
90
+ # verify the required parameter 'brokerage_order_id' is set
91
+ if @api_client.config.client_side_validation && brokerage_order_id.nil?
92
+ fail ArgumentError, "Missing the required parameter 'brokerage_order_id' when calling ExperimentalEndpointsApi.get_user_account_order_detail_v2"
93
+ end
98
94
  # verify the required parameter 'user_id' is set
99
95
  if @api_client.config.client_side_validation && user_id.nil?
100
96
  fail ArgumentError, "Missing the required parameter 'user_id' when calling ExperimentalEndpointsApi.get_user_account_order_detail_v2"
@@ -103,12 +99,8 @@ module SnapTrade
103
99
  if @api_client.config.client_side_validation && user_secret.nil?
104
100
  fail ArgumentError, "Missing the required parameter 'user_secret' when calling ExperimentalEndpointsApi.get_user_account_order_detail_v2"
105
101
  end
106
- # verify the required parameter 'account_information_get_user_account_order_detail_request' is set
107
- if @api_client.config.client_side_validation && account_information_get_user_account_order_detail_request.nil?
108
- fail ArgumentError, "Missing the required parameter 'account_information_get_user_account_order_detail_request' when calling ExperimentalEndpointsApi.get_user_account_order_detail_v2"
109
- end
110
102
  # resource path
111
- local_var_path = '/accounts/{accountId}/orders/details/v2'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
103
+ local_var_path = '/accounts/{accountId}/orders/details/v2/{brokerageOrderId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'brokerageOrderId' + '}', CGI.escape(brokerage_order_id.to_s))
112
104
 
113
105
  # query parameters
114
106
  query_params = opts[:query_params] || {}
@@ -119,17 +111,12 @@ module SnapTrade
119
111
  header_params = opts[:header_params] || {}
120
112
  # HTTP header 'Accept' (if needed)
121
113
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
122
- # HTTP header 'Content-Type'
123
- content_type = @api_client.select_header_content_type(['application/json'])
124
- if !content_type.nil?
125
- header_params['Content-Type'] = content_type
126
- end
127
114
 
128
115
  # form parameters
129
116
  form_params = opts[:form_params] || {}
130
117
 
131
118
  # http body (model)
132
- post_body = opts[:debug_body] || @api_client.object_to_http_body(account_information_get_user_account_order_detail_request)
119
+ post_body = opts[:debug_body]
133
120
 
134
121
  # return_type
135
122
  return_type = opts[:debug_return_type] || 'AccountOrderRecordV2'
@@ -147,7 +134,7 @@ module SnapTrade
147
134
  :return_type => return_type
148
135
  )
149
136
 
150
- data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
137
+ data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
151
138
  if @api_client.config.debugging
152
139
  @api_client.config.logger.debug "API called: ExperimentalEndpointsApi#get_user_account_order_detail_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
153
140
  end
@@ -8,5 +8,5 @@ Contact: api@snaptrade.com
8
8
  =end
9
9
 
10
10
  module SnapTrade
11
- VERSION = '2.0.160'
11
+ VERSION = '2.0.161'
12
12
  end
@@ -29,11 +29,11 @@ describe 'ExperimentalEndpointsApi' do
29
29
 
30
30
  # unit tests for get_user_account_order_detail_v2
31
31
  # Get account order detail (V2)
32
- # Returns the detail of a single order using the external order ID provided in the request body. The V2 order response format includes all legs of the order in the &#x60;legs&#x60; list field. If the order is single legged, &#x60;legs&#x60; will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
32
+ # Returns the detail of a single order using the brokerage order ID provided as a path parameter. The V2 order response format includes all legs of the order in the &#x60;legs&#x60; list field. If the order is single legged, &#x60;legs&#x60; will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
33
33
  # @param account_id
34
+ # @param brokerage_order_id
34
35
  # @param user_id
35
36
  # @param user_secret
36
- # @param account_information_get_user_account_order_detail_request
37
37
  # @param [Hash] opts the optional parameters
38
38
  # @return [AccountOrderRecordV2]
39
39
  describe 'get_user_account_order_detail_v2 test' do
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.160
4
+ version: 2.0.161
5
5
  platform: ruby
6
6
  authors:
7
7
  - SnapTrade
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-02-05 00:00:00.000000000 Z
11
+ date: 2026-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday