snaptrade 2.0.106 → 2.0.107

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.
@@ -252,117 +252,6 @@ module SnapTrade
252
252
  end
253
253
 
254
254
 
255
- # Get cryptocurrency pair quote
256
- #
257
- # Gets a quote for the specified account.
258
- #
259
- # @param user_id [String]
260
- # @param user_secret [String]
261
- # @param account_id [String]
262
- # @param instrument_symbol [String]
263
- # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
264
- def get_cryptocurrency_pair_quote(user_id:, user_secret:, account_id:, instrument_symbol:, extra: {})
265
- data, _status_code, _headers = get_cryptocurrency_pair_quote_with_http_info_impl(user_id, user_secret, account_id, instrument_symbol, extra)
266
- data
267
- end
268
-
269
- # Get cryptocurrency pair quote
270
- #
271
- # Gets a quote for the specified account.
272
- #
273
- # @param user_id [String]
274
- # @param user_secret [String]
275
- # @param account_id [String]
276
- # @param instrument_symbol [String]
277
- # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
278
- def get_cryptocurrency_pair_quote_with_http_info(user_id:, user_secret:, account_id:, instrument_symbol:, extra: {})
279
- get_cryptocurrency_pair_quote_with_http_info_impl(user_id, user_secret, account_id, instrument_symbol, extra)
280
- end
281
-
282
- # Get cryptocurrency pair quote
283
- # Gets a quote for the specified account.
284
- # @param user_id [String]
285
- # @param user_secret [String]
286
- # @param account_id [String]
287
- # @param instrument_symbol [String]
288
- # @param [Hash] opts the optional parameters
289
- # @return [CryptocurrencyPairQuote]
290
- private def get_cryptocurrency_pair_quote_impl(user_id, user_secret, account_id, instrument_symbol, opts = {})
291
- data, _status_code, _headers = get_cryptocurrency_pair_quote_with_http_info(user_id, user_secret, account_id, instrument_symbol, opts)
292
- data
293
- end
294
-
295
- # Get cryptocurrency pair quote
296
- # Gets a quote for the specified account.
297
- # @param user_id [String]
298
- # @param user_secret [String]
299
- # @param account_id [String]
300
- # @param instrument_symbol [String]
301
- # @param [Hash] opts the optional parameters
302
- # @return [Array<(CryptocurrencyPairQuote, Integer, Hash)>] CryptocurrencyPairQuote data, response status code and response headers
303
- private def get_cryptocurrency_pair_quote_with_http_info_impl(user_id, user_secret, account_id, instrument_symbol, opts = {})
304
- if @api_client.config.debugging
305
- @api_client.config.logger.debug 'Calling API: TradingApi.get_cryptocurrency_pair_quote ...'
306
- end
307
- # verify the required parameter 'user_id' is set
308
- if @api_client.config.client_side_validation && user_id.nil?
309
- fail ArgumentError, "Missing the required parameter 'user_id' when calling TradingApi.get_cryptocurrency_pair_quote"
310
- end
311
- # verify the required parameter 'user_secret' is set
312
- if @api_client.config.client_side_validation && user_secret.nil?
313
- fail ArgumentError, "Missing the required parameter 'user_secret' when calling TradingApi.get_cryptocurrency_pair_quote"
314
- end
315
- # verify the required parameter 'account_id' is set
316
- if @api_client.config.client_side_validation && account_id.nil?
317
- fail ArgumentError, "Missing the required parameter 'account_id' when calling TradingApi.get_cryptocurrency_pair_quote"
318
- end
319
- # verify the required parameter 'instrument_symbol' is set
320
- if @api_client.config.client_side_validation && instrument_symbol.nil?
321
- fail ArgumentError, "Missing the required parameter 'instrument_symbol' when calling TradingApi.get_cryptocurrency_pair_quote"
322
- end
323
- # resource path
324
- local_var_path = '/accounts/{accountId}/trading/instruments/cryptocurrencyPairs/{instrumentSymbol}/quote'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'instrumentSymbol' + '}', CGI.escape(instrument_symbol.to_s))
325
-
326
- # query parameters
327
- query_params = opts[:query_params] || {}
328
- query_params[:'userId'] = user_id
329
- query_params[:'userSecret'] = user_secret
330
-
331
- # header parameters
332
- header_params = opts[:header_params] || {}
333
- # HTTP header 'Accept' (if needed)
334
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
335
-
336
- # form parameters
337
- form_params = opts[:form_params] || {}
338
-
339
- # http body (model)
340
- post_body = opts[:debug_body]
341
-
342
- # return_type
343
- return_type = opts[:debug_return_type] || 'CryptocurrencyPairQuote'
344
-
345
- # auth_names
346
- auth_names = opts[:debug_auth_names] || ['PartnerClientId', 'PartnerSignature', 'PartnerTimestamp']
347
-
348
- new_options = opts.merge(
349
- :operation => :"TradingApi.get_cryptocurrency_pair_quote",
350
- :header_params => header_params,
351
- :query_params => query_params,
352
- :form_params => form_params,
353
- :body => post_body,
354
- :auth_names => auth_names,
355
- :return_type => return_type
356
- )
357
-
358
- data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
359
- if @api_client.config.debugging
360
- @api_client.config.logger.debug "API called: TradingApi#get_cryptocurrency_pair_quote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
361
- end
362
- return data, status_code, headers, response
363
- end
364
-
365
-
366
255
  # Check order impact
367
256
  #
368
257
  # 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.
@@ -1220,164 +1109,6 @@ module SnapTrade
1220
1109
  end
1221
1110
 
1222
1111
 
1223
- # Place order
1224
- #
1225
- # Places an order in the specified account.
1226
- # This endpoint does not compute the impact to the account balance from the order before submitting the order.
1227
- #
1228
- # @param instrument [TradingInstrument]
1229
- # @param side [ActionStrict] The action describes the intent or side of a trade. This is either `BUY` or `SELL`.
1230
- # @param type [SimpleOrderFormType] The type of order to place.
1231
- # @param time_in_force [SimpleOrderFormTimeInForce] The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled. - `GTD` - Good Til Date. The order is valid until the specified date.
1232
- # @param amount [Float] The amount of the base currency to buy or sell.
1233
- # @param user_id [String]
1234
- # @param user_secret [String]
1235
- # @param account_id [String]
1236
- # @param limit_price [Float] The limit price. Required if the order type is LIMIT, STOP_LOSS_LIMIT or TAKE_PROFIT_LIMIT.
1237
- # @param stop_price [Float] The stop price. Required if the order type is STOP_LOSS_MARKET, STOP_LOSS_LIMIT, TAKE_PROFIT_MARKET or TAKE_PROFIT_LIMIT.
1238
- # @param post_only [Boolean] Valid and required only for order type LIMIT. If true orders that would be filled immediately are rejected to avoid incurring TAKER fees.
1239
- # @param expiration_date [Time] The expiration date of the order. Required if the time_in_force is GTD.
1240
- # @param body [SimpleOrderForm]
1241
- # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
1242
- def place_simple_order(instrument:, side:, type:, time_in_force:, amount:, user_id:, user_secret:, account_id:, limit_price: SENTINEL, stop_price: SENTINEL, post_only: SENTINEL, expiration_date: SENTINEL, extra: {})
1243
- _body = {}
1244
- _body[:instrument] = instrument if instrument != SENTINEL
1245
- _body[:side] = side if side != SENTINEL
1246
- _body[:type] = type if type != SENTINEL
1247
- _body[:time_in_force] = time_in_force if time_in_force != SENTINEL
1248
- _body[:amount] = amount if amount != SENTINEL
1249
- _body[:limit_price] = limit_price if limit_price != SENTINEL
1250
- _body[:stop_price] = stop_price if stop_price != SENTINEL
1251
- _body[:post_only] = post_only if post_only != SENTINEL
1252
- _body[:expiration_date] = expiration_date if expiration_date != SENTINEL
1253
- simple_order_form = _body
1254
- data, _status_code, _headers = place_simple_order_with_http_info_impl(user_id, user_secret, account_id, simple_order_form, extra)
1255
- data
1256
- end
1257
-
1258
- # Place order
1259
- #
1260
- # Places an order in the specified account.
1261
- # This endpoint does not compute the impact to the account balance from the order before submitting the order.
1262
- #
1263
- # @param instrument [TradingInstrument]
1264
- # @param side [ActionStrict] The action describes the intent or side of a trade. This is either `BUY` or `SELL`.
1265
- # @param type [SimpleOrderFormType] The type of order to place.
1266
- # @param time_in_force [SimpleOrderFormTimeInForce] The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled. - `GTD` - Good Til Date. The order is valid until the specified date.
1267
- # @param amount [Float] The amount of the base currency to buy or sell.
1268
- # @param user_id [String]
1269
- # @param user_secret [String]
1270
- # @param account_id [String]
1271
- # @param limit_price [Float] The limit price. Required if the order type is LIMIT, STOP_LOSS_LIMIT or TAKE_PROFIT_LIMIT.
1272
- # @param stop_price [Float] The stop price. Required if the order type is STOP_LOSS_MARKET, STOP_LOSS_LIMIT, TAKE_PROFIT_MARKET or TAKE_PROFIT_LIMIT.
1273
- # @param post_only [Boolean] Valid and required only for order type LIMIT. If true orders that would be filled immediately are rejected to avoid incurring TAKER fees.
1274
- # @param expiration_date [Time] The expiration date of the order. Required if the time_in_force is GTD.
1275
- # @param body [SimpleOrderForm]
1276
- # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
1277
- def place_simple_order_with_http_info(instrument:, side:, type:, time_in_force:, amount:, user_id:, user_secret:, account_id:, limit_price: SENTINEL, stop_price: SENTINEL, post_only: SENTINEL, expiration_date: SENTINEL, extra: {})
1278
- _body = {}
1279
- _body[:instrument] = instrument if instrument != SENTINEL
1280
- _body[:side] = side if side != SENTINEL
1281
- _body[:type] = type if type != SENTINEL
1282
- _body[:time_in_force] = time_in_force if time_in_force != SENTINEL
1283
- _body[:amount] = amount if amount != SENTINEL
1284
- _body[:limit_price] = limit_price if limit_price != SENTINEL
1285
- _body[:stop_price] = stop_price if stop_price != SENTINEL
1286
- _body[:post_only] = post_only if post_only != SENTINEL
1287
- _body[:expiration_date] = expiration_date if expiration_date != SENTINEL
1288
- simple_order_form = _body
1289
- place_simple_order_with_http_info_impl(user_id, user_secret, account_id, simple_order_form, extra)
1290
- end
1291
-
1292
- # Place order
1293
- # Places an order in the specified account. This endpoint does not compute the impact to the account balance from the order before submitting the order.
1294
- # @param user_id [String]
1295
- # @param user_secret [String]
1296
- # @param account_id [String]
1297
- # @param simple_order_form [SimpleOrderForm]
1298
- # @param [Hash] opts the optional parameters
1299
- # @return [OrderUpdatedResponse]
1300
- private def place_simple_order_impl(user_id, user_secret, account_id, simple_order_form, opts = {})
1301
- data, _status_code, _headers = place_simple_order_with_http_info(user_id, user_secret, account_id, simple_order_form, opts)
1302
- data
1303
- end
1304
-
1305
- # Place order
1306
- # Places an order in the specified account. This endpoint does not compute the impact to the account balance from the order before submitting the order.
1307
- # @param user_id [String]
1308
- # @param user_secret [String]
1309
- # @param account_id [String]
1310
- # @param simple_order_form [SimpleOrderForm]
1311
- # @param [Hash] opts the optional parameters
1312
- # @return [Array<(OrderUpdatedResponse, Integer, Hash)>] OrderUpdatedResponse data, response status code and response headers
1313
- private def place_simple_order_with_http_info_impl(user_id, user_secret, account_id, simple_order_form, opts = {})
1314
- if @api_client.config.debugging
1315
- @api_client.config.logger.debug 'Calling API: TradingApi.place_simple_order ...'
1316
- end
1317
- # verify the required parameter 'user_id' is set
1318
- if @api_client.config.client_side_validation && user_id.nil?
1319
- fail ArgumentError, "Missing the required parameter 'user_id' when calling TradingApi.place_simple_order"
1320
- end
1321
- # verify the required parameter 'user_secret' is set
1322
- if @api_client.config.client_side_validation && user_secret.nil?
1323
- fail ArgumentError, "Missing the required parameter 'user_secret' when calling TradingApi.place_simple_order"
1324
- end
1325
- # verify the required parameter 'account_id' is set
1326
- if @api_client.config.client_side_validation && account_id.nil?
1327
- fail ArgumentError, "Missing the required parameter 'account_id' when calling TradingApi.place_simple_order"
1328
- end
1329
- # verify the required parameter 'simple_order_form' is set
1330
- if @api_client.config.client_side_validation && simple_order_form.nil?
1331
- fail ArgumentError, "Missing the required parameter 'simple_order_form' when calling TradingApi.place_simple_order"
1332
- end
1333
- # resource path
1334
- local_var_path = '/accounts/{accountId}/trading/simple'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
1335
-
1336
- # query parameters
1337
- query_params = opts[:query_params] || {}
1338
- query_params[:'userId'] = user_id
1339
- query_params[:'userSecret'] = user_secret
1340
-
1341
- # header parameters
1342
- header_params = opts[:header_params] || {}
1343
- # HTTP header 'Accept' (if needed)
1344
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1345
- # HTTP header 'Content-Type'
1346
- content_type = @api_client.select_header_content_type(['application/json'])
1347
- if !content_type.nil?
1348
- header_params['Content-Type'] = content_type
1349
- end
1350
-
1351
- # form parameters
1352
- form_params = opts[:form_params] || {}
1353
-
1354
- # http body (model)
1355
- post_body = opts[:debug_body] || @api_client.object_to_http_body(simple_order_form)
1356
-
1357
- # return_type
1358
- return_type = opts[:debug_return_type] || 'OrderUpdatedResponse'
1359
-
1360
- # auth_names
1361
- auth_names = opts[:debug_auth_names] || ['PartnerClientId', 'PartnerSignature', 'PartnerTimestamp']
1362
-
1363
- new_options = opts.merge(
1364
- :operation => :"TradingApi.place_simple_order",
1365
- :header_params => header_params,
1366
- :query_params => query_params,
1367
- :form_params => form_params,
1368
- :body => post_body,
1369
- :auth_names => auth_names,
1370
- :return_type => return_type
1371
- )
1372
-
1373
- data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
1374
- if @api_client.config.debugging
1375
- @api_client.config.logger.debug "API called: TradingApi#place_simple_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1376
- end
1377
- return data, status_code, headers, response
1378
- end
1379
-
1380
-
1381
1112
  # Preview order
1382
1113
  #
1383
1114
  # Previews an order using the specified account.
@@ -1692,123 +1423,6 @@ module SnapTrade
1692
1423
  end
1693
1424
  return data, status_code, headers, response
1694
1425
  end
1695
-
1696
-
1697
- # Search cryptocurrency pairs instruments
1698
- #
1699
- # Searches cryptocurrency pairs instruments accessible to the specified account.
1700
- #
1701
- # @param user_id [String]
1702
- # @param user_secret [String]
1703
- # @param account_id [String]
1704
- # @param base [String]
1705
- # @param quote [String]
1706
- # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
1707
- def search_cryptocurrency_pair_instruments(user_id:, user_secret:, account_id:, base: SENTINEL, quote: SENTINEL, extra: {})
1708
- extra[:base] = base if base != SENTINEL
1709
- extra[:quote] = quote if quote != SENTINEL
1710
- data, _status_code, _headers = search_cryptocurrency_pair_instruments_with_http_info_impl(user_id, user_secret, account_id, extra)
1711
- data
1712
- end
1713
-
1714
- # Search cryptocurrency pairs instruments
1715
- #
1716
- # Searches cryptocurrency pairs instruments accessible to the specified account.
1717
- #
1718
- # @param user_id [String]
1719
- # @param user_secret [String]
1720
- # @param account_id [String]
1721
- # @param base [String]
1722
- # @param quote [String]
1723
- # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
1724
- def search_cryptocurrency_pair_instruments_with_http_info(user_id:, user_secret:, account_id:, base: SENTINEL, quote: SENTINEL, extra: {})
1725
- extra[:base] = base if base != SENTINEL
1726
- extra[:quote] = quote if quote != SENTINEL
1727
- search_cryptocurrency_pair_instruments_with_http_info_impl(user_id, user_secret, account_id, extra)
1728
- end
1729
-
1730
- # Search cryptocurrency pairs instruments
1731
- # Searches cryptocurrency pairs instruments accessible to the specified account.
1732
- # @param user_id [String]
1733
- # @param user_secret [String]
1734
- # @param account_id [String]
1735
- # @param [Hash] opts the optional parameters
1736
- # @option opts [String] :base
1737
- # @option opts [String] :quote
1738
- # @return [TradingSearchCryptocurrencyPairInstruments200Response]
1739
- private def search_cryptocurrency_pair_instruments_impl(user_id, user_secret, account_id, opts = {})
1740
- data, _status_code, _headers = search_cryptocurrency_pair_instruments_with_http_info(user_id, user_secret, account_id, opts)
1741
- data
1742
- end
1743
-
1744
- # Search cryptocurrency pairs instruments
1745
- # Searches cryptocurrency pairs instruments accessible to the specified account.
1746
- # @param user_id [String]
1747
- # @param user_secret [String]
1748
- # @param account_id [String]
1749
- # @param [Hash] opts the optional parameters
1750
- # @option opts [String] :base
1751
- # @option opts [String] :quote
1752
- # @return [Array<(TradingSearchCryptocurrencyPairInstruments200Response, Integer, Hash)>] TradingSearchCryptocurrencyPairInstruments200Response data, response status code and response headers
1753
- private def search_cryptocurrency_pair_instruments_with_http_info_impl(user_id, user_secret, account_id, opts = {})
1754
- if @api_client.config.debugging
1755
- @api_client.config.logger.debug 'Calling API: TradingApi.search_cryptocurrency_pair_instruments ...'
1756
- end
1757
- # verify the required parameter 'user_id' is set
1758
- if @api_client.config.client_side_validation && user_id.nil?
1759
- fail ArgumentError, "Missing the required parameter 'user_id' when calling TradingApi.search_cryptocurrency_pair_instruments"
1760
- end
1761
- # verify the required parameter 'user_secret' is set
1762
- if @api_client.config.client_side_validation && user_secret.nil?
1763
- fail ArgumentError, "Missing the required parameter 'user_secret' when calling TradingApi.search_cryptocurrency_pair_instruments"
1764
- end
1765
- # verify the required parameter 'account_id' is set
1766
- if @api_client.config.client_side_validation && account_id.nil?
1767
- fail ArgumentError, "Missing the required parameter 'account_id' when calling TradingApi.search_cryptocurrency_pair_instruments"
1768
- end
1769
- # resource path
1770
- local_var_path = '/accounts/{accountId}/trading/instruments/cryptocurrencyPairs'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
1771
-
1772
- # query parameters
1773
- query_params = opts[:query_params] || {}
1774
- query_params[:'userId'] = user_id
1775
- query_params[:'userSecret'] = user_secret
1776
- query_params[:'base'] = opts[:'base'] if !opts[:'base'].nil?
1777
- query_params[:'quote'] = opts[:'quote'] if !opts[:'quote'].nil?
1778
-
1779
- # header parameters
1780
- header_params = opts[:header_params] || {}
1781
- # HTTP header 'Accept' (if needed)
1782
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1783
-
1784
- # form parameters
1785
- form_params = opts[:form_params] || {}
1786
-
1787
- # http body (model)
1788
- post_body = opts[:debug_body]
1789
-
1790
- # return_type
1791
- return_type = opts[:debug_return_type] || 'TradingSearchCryptocurrencyPairInstruments200Response'
1792
-
1793
- # auth_names
1794
- auth_names = opts[:debug_auth_names] || ['PartnerClientId', 'PartnerSignature', 'PartnerTimestamp']
1795
-
1796
- new_options = opts.merge(
1797
- :operation => :"TradingApi.search_cryptocurrency_pair_instruments",
1798
- :header_params => header_params,
1799
- :query_params => query_params,
1800
- :form_params => form_params,
1801
- :body => post_body,
1802
- :auth_names => auth_names,
1803
- :return_type => return_type
1804
- )
1805
-
1806
- data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
1807
- if @api_client.config.debugging
1808
- @api_client.config.logger.debug "API called: TradingApi#search_cryptocurrency_pair_instruments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1809
- end
1810
- return data, status_code, headers, response
1811
- end
1812
1426
  end
1813
1427
 
1814
1428
  # top-level client access to avoid having the user to insantiate their own API instances
@@ -8,5 +8,5 @@ Contact: api@snaptrade.com
8
8
  =end
9
9
 
10
10
  module SnapTrade
11
- VERSION = '2.0.106'
11
+ VERSION = '2.0.107'
12
12
  end
data/lib/snaptrade.rb CHANGED
@@ -169,6 +169,7 @@ require 'snaptrade/api/account_information_api'
169
169
  require 'snaptrade/api/api_status_api'
170
170
  require 'snaptrade/api/authentication_api'
171
171
  require 'snaptrade/api/connections_api'
172
+ require 'snaptrade/api/crypto_trading_api'
172
173
  require 'snaptrade/api/options_api'
173
174
  require 'snaptrade/api/reference_data_api'
174
175
  require 'snaptrade/api/trading_api'
@@ -242,6 +243,7 @@ module SnapTrade
242
243
  attr_reader :api_status
243
244
  attr_reader :authentication
244
245
  attr_reader :connections
246
+ attr_reader :crypto_trading
245
247
  attr_reader :options
246
248
  attr_reader :reference_data
247
249
  attr_reader :trading
@@ -253,6 +255,7 @@ module SnapTrade
253
255
  @api_status = SnapTrade::APIStatusApi.new(@api_client)
254
256
  @authentication = SnapTrade::AuthenticationApi.new(@api_client)
255
257
  @connections = SnapTrade::ConnectionsApi.new(@api_client)
258
+ @crypto_trading = SnapTrade::CryptoTradingApi.new(@api_client)
256
259
  @options = SnapTrade::OptionsApi.new(@api_client)
257
260
  @reference_data = SnapTrade::ReferenceDataApi.new(@api_client)
258
261
  @trading = SnapTrade::TradingApi.new(@api_client)
@@ -0,0 +1,76 @@
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
+
13
+ # Unit tests for SnapTrade::CryptoTradingApi
14
+ describe 'CryptoTradingApi' do
15
+ before do
16
+ # run before each test
17
+ @api_instance = SnapTrade::CryptoTradingApi.new
18
+ end
19
+
20
+ after do
21
+ # run after each test
22
+ end
23
+
24
+ describe 'test an instance of CryptoTradingApi' do
25
+ it 'should create an instance of CryptoTradingApi' do
26
+ expect(@api_instance).to be_instance_of(SnapTrade::CryptoTradingApi)
27
+ end
28
+ end
29
+
30
+ # unit tests for get_cryptocurrency_pair_quote
31
+ # Get cryptocurrency pair quote
32
+ # Gets a quote for the specified account.
33
+ # @param user_id
34
+ # @param user_secret
35
+ # @param account_id
36
+ # @param instrument_symbol
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [CryptocurrencyPairQuote]
39
+ describe 'get_cryptocurrency_pair_quote test' do
40
+ it 'should work' do
41
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
42
+ end
43
+ end
44
+
45
+ # unit tests for place_simple_order
46
+ # Place order
47
+ # Places an order in the specified account. This endpoint does not compute the impact to the account balance from the order before submitting the order.
48
+ # @param user_id
49
+ # @param user_secret
50
+ # @param account_id
51
+ # @param simple_order_form
52
+ # @param [Hash] opts the optional parameters
53
+ # @return [OrderUpdatedResponse]
54
+ describe 'place_simple_order test' do
55
+ it 'should work' do
56
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
57
+ end
58
+ end
59
+
60
+ # unit tests for search_cryptocurrency_pair_instruments
61
+ # Search cryptocurrency pairs instruments
62
+ # Searches cryptocurrency pairs instruments accessible to the specified account.
63
+ # @param user_id
64
+ # @param user_secret
65
+ # @param account_id
66
+ # @param [Hash] opts the optional parameters
67
+ # @option opts [String] :base
68
+ # @option opts [String] :quote
69
+ # @return [TradingSearchCryptocurrencyPairInstruments200Response]
70
+ describe 'search_cryptocurrency_pair_instruments test' do
71
+ it 'should work' do
72
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
73
+ end
74
+ end
75
+
76
+ end
@@ -57,21 +57,6 @@ describe 'TradingApi' do
57
57
  end
58
58
  end
59
59
 
60
- # unit tests for get_cryptocurrency_pair_quote
61
- # Get cryptocurrency pair quote
62
- # Gets a quote for the specified account.
63
- # @param user_id
64
- # @param user_secret
65
- # @param account_id
66
- # @param instrument_symbol
67
- # @param [Hash] opts the optional parameters
68
- # @return [CryptocurrencyPairQuote]
69
- describe 'get_cryptocurrency_pair_quote test' do
70
- it 'should work' do
71
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
72
- end
73
- end
74
-
75
60
  # unit tests for get_order_impact
76
61
  # Check order impact
77
62
  # Simulates an order and its impact on the account. This endpoint does not place the order with the brokerage. If successful, it returns a &#x60;Trade&#x60; 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 &#x60;Trade&#x60; object returned expires after 5 minutes. Any order placed using an expired &#x60;Trade&#x60; will be rejected.
@@ -161,21 +146,6 @@ describe 'TradingApi' do
161
146
  end
162
147
  end
163
148
 
164
- # unit tests for place_simple_order
165
- # Place order
166
- # Places an order in the specified account. This endpoint does not compute the impact to the account balance from the order before submitting the order.
167
- # @param user_id
168
- # @param user_secret
169
- # @param account_id
170
- # @param simple_order_form
171
- # @param [Hash] opts the optional parameters
172
- # @return [OrderUpdatedResponse]
173
- describe 'place_simple_order test' do
174
- it 'should work' do
175
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
176
- end
177
- end
178
-
179
149
  # unit tests for preview_simple_order
180
150
  # Preview order
181
151
  # Previews an order using the specified account.
@@ -207,20 +177,4 @@ describe 'TradingApi' do
207
177
  end
208
178
  end
209
179
 
210
- # unit tests for search_cryptocurrency_pair_instruments
211
- # Search cryptocurrency pairs instruments
212
- # Searches cryptocurrency pairs instruments accessible to the specified account.
213
- # @param user_id
214
- # @param user_secret
215
- # @param account_id
216
- # @param [Hash] opts the optional parameters
217
- # @option opts [String] :base
218
- # @option opts [String] :quote
219
- # @return [TradingSearchCryptocurrencyPairInstruments200Response]
220
- describe 'search_cryptocurrency_pair_instruments test' do
221
- it 'should work' do
222
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
223
- end
224
- end
225
-
226
180
  end