class TinkoffInvestClient::MarketApi
Attributes
Public Class Methods
# File lib/tinkoff_invest_client/api/market_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Получение списка облигаций @param [Hash] opts the optional parameters @return [MarketInstrumentListResponse]
# File lib/tinkoff_invest_client/api/market_api.rb, line 25 def market_bonds_get(opts = {}) data, _status_code, _headers = market_bonds_get_with_http_info(opts) data end
Получение списка облигаций @param [Hash] opts the optional parameters @return [Array<(MarketInstrumentListResponse
, Integer, Hash)>] MarketInstrumentListResponse
data, response status code and response headers
# File lib/tinkoff_invest_client/api/market_api.rb, line 33 def market_bonds_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MarketApi.market_bonds_get ...' end # resource path local_var_path = '/market/bonds' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MarketInstrumentListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['sso_auth'] new_options = opts.merge( :operation => :"MarketApi.market_bonds_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: MarketApi#market_bonds_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Получение исторических свечей по FIGI @param figi [String] FIGI @param from [Time] Начало временного промежутка @param to [Time] Конец временного промежутка @param interval [CandleResolution] Интервал свечи @param [Hash] opts the optional parameters @return [CandlesResponse]
# File lib/tinkoff_invest_client/api/market_api.rb, line 84 def market_candles_get(figi, from, to, interval, opts = {}) data, _status_code, _headers = market_candles_get_with_http_info(figi, from, to, interval, opts) data end
Получение исторических свечей по FIGI @param figi [String] FIGI @param from [Time] Начало временного промежутка @param to [Time] Конец временного промежутка @param interval [CandleResolution] Интервал свечи @param [Hash] opts the optional parameters @return [Array<(CandlesResponse
, Integer, Hash)>] CandlesResponse
data, response status code and response headers
# File lib/tinkoff_invest_client/api/market_api.rb, line 96 def market_candles_get_with_http_info(figi, from, to, interval, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MarketApi.market_candles_get ...' end # verify the required parameter 'figi' is set if @api_client.config.client_side_validation && figi.nil? fail ArgumentError, "Missing the required parameter 'figi' when calling MarketApi.market_candles_get" end # verify the required parameter 'from' is set if @api_client.config.client_side_validation && from.nil? fail ArgumentError, "Missing the required parameter 'from' when calling MarketApi.market_candles_get" end # verify the required parameter 'to' is set if @api_client.config.client_side_validation && to.nil? fail ArgumentError, "Missing the required parameter 'to' when calling MarketApi.market_candles_get" end # verify the required parameter 'interval' is set if @api_client.config.client_side_validation && interval.nil? fail ArgumentError, "Missing the required parameter 'interval' when calling MarketApi.market_candles_get" end # resource path local_var_path = '/market/candles' # query parameters query_params = opts[:query_params] || {} query_params[:'figi'] = figi query_params[:'from'] = from query_params[:'to'] = to query_params[:'interval'] = interval # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CandlesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['sso_auth'] new_options = opts.merge( :operation => :"MarketApi.market_candles_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: MarketApi#market_candles_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Получение списка валютных пар @param [Hash] opts the optional parameters @return [MarketInstrumentListResponse]
# File lib/tinkoff_invest_client/api/market_api.rb, line 163 def market_currencies_get(opts = {}) data, _status_code, _headers = market_currencies_get_with_http_info(opts) data end
Получение списка валютных пар @param [Hash] opts the optional parameters @return [Array<(MarketInstrumentListResponse
, Integer, Hash)>] MarketInstrumentListResponse
data, response status code and response headers
# File lib/tinkoff_invest_client/api/market_api.rb, line 171 def market_currencies_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MarketApi.market_currencies_get ...' end # resource path local_var_path = '/market/currencies' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MarketInstrumentListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['sso_auth'] new_options = opts.merge( :operation => :"MarketApi.market_currencies_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: MarketApi#market_currencies_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Получение списка ETF @param [Hash] opts the optional parameters @return [MarketInstrumentListResponse]
# File lib/tinkoff_invest_client/api/market_api.rb, line 218 def market_etfs_get(opts = {}) data, _status_code, _headers = market_etfs_get_with_http_info(opts) data end
Получение списка ETF @param [Hash] opts the optional parameters @return [Array<(MarketInstrumentListResponse
, Integer, Hash)>] MarketInstrumentListResponse
data, response status code and response headers
# File lib/tinkoff_invest_client/api/market_api.rb, line 226 def market_etfs_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MarketApi.market_etfs_get ...' end # resource path local_var_path = '/market/etfs' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MarketInstrumentListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['sso_auth'] new_options = opts.merge( :operation => :"MarketApi.market_etfs_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: MarketApi#market_etfs_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Получение стакана по FIGI @param figi [String] FIGI @param depth [Integer] Глубина стакана [1..20] @param [Hash] opts the optional parameters @return [OrderbookResponse]
# File lib/tinkoff_invest_client/api/market_api.rb, line 275 def market_orderbook_get(figi, depth, opts = {}) data, _status_code, _headers = market_orderbook_get_with_http_info(figi, depth, opts) data end
Получение стакана по FIGI @param figi [String] FIGI @param depth [Integer] Глубина стакана [1..20] @param [Hash] opts the optional parameters @return [Array<(OrderbookResponse
, Integer, Hash)>] OrderbookResponse
data, response status code and response headers
# File lib/tinkoff_invest_client/api/market_api.rb, line 285 def market_orderbook_get_with_http_info(figi, depth, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MarketApi.market_orderbook_get ...' end # verify the required parameter 'figi' is set if @api_client.config.client_side_validation && figi.nil? fail ArgumentError, "Missing the required parameter 'figi' when calling MarketApi.market_orderbook_get" end # verify the required parameter 'depth' is set if @api_client.config.client_side_validation && depth.nil? fail ArgumentError, "Missing the required parameter 'depth' when calling MarketApi.market_orderbook_get" end # resource path local_var_path = '/market/orderbook' # query parameters query_params = opts[:query_params] || {} query_params[:'figi'] = figi query_params[:'depth'] = depth # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'OrderbookResponse' # auth_names auth_names = opts[:debug_auth_names] || ['sso_auth'] new_options = opts.merge( :operation => :"MarketApi.market_orderbook_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: MarketApi#market_orderbook_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Получение инструмента по FIGI @param figi [String] FIGI @param [Hash] opts the optional parameters @return [SearchMarketInstrumentResponse]
# File lib/tinkoff_invest_client/api/market_api.rb, line 343 def market_search_by_figi_get(figi, opts = {}) data, _status_code, _headers = market_search_by_figi_get_with_http_info(figi, opts) data end
Получение инструмента по FIGI @param figi [String] FIGI @param [Hash] opts the optional parameters @return [Array<(SearchMarketInstrumentResponse
, Integer, Hash)>] SearchMarketInstrumentResponse
data, response status code and response headers
# File lib/tinkoff_invest_client/api/market_api.rb, line 352 def market_search_by_figi_get_with_http_info(figi, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MarketApi.market_search_by_figi_get ...' end # verify the required parameter 'figi' is set if @api_client.config.client_side_validation && figi.nil? fail ArgumentError, "Missing the required parameter 'figi' when calling MarketApi.market_search_by_figi_get" end # resource path local_var_path = '/market/search/by-figi' # query parameters query_params = opts[:query_params] || {} query_params[:'figi'] = figi # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SearchMarketInstrumentResponse' # auth_names auth_names = opts[:debug_auth_names] || ['sso_auth'] new_options = opts.merge( :operation => :"MarketApi.market_search_by_figi_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: MarketApi#market_search_by_figi_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Получение инструмента по тикеру @param ticker [String] Тикер инструмента @param [Hash] opts the optional parameters @return [MarketInstrumentListResponse]
# File lib/tinkoff_invest_client/api/market_api.rb, line 405 def market_search_by_ticker_get(ticker, opts = {}) data, _status_code, _headers = market_search_by_ticker_get_with_http_info(ticker, opts) data end
Получение инструмента по тикеру @param ticker [String] Тикер инструмента @param [Hash] opts the optional parameters @return [Array<(MarketInstrumentListResponse
, Integer, Hash)>] MarketInstrumentListResponse
data, response status code and response headers
# File lib/tinkoff_invest_client/api/market_api.rb, line 414 def market_search_by_ticker_get_with_http_info(ticker, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MarketApi.market_search_by_ticker_get ...' end # verify the required parameter 'ticker' is set if @api_client.config.client_side_validation && ticker.nil? fail ArgumentError, "Missing the required parameter 'ticker' when calling MarketApi.market_search_by_ticker_get" end # resource path local_var_path = '/market/search/by-ticker' # query parameters query_params = opts[:query_params] || {} query_params[:'ticker'] = ticker # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MarketInstrumentListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['sso_auth'] new_options = opts.merge( :operation => :"MarketApi.market_search_by_ticker_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: MarketApi#market_search_by_ticker_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Получение списка акций @param [Hash] opts the optional parameters @return [MarketInstrumentListResponse]
# File lib/tinkoff_invest_client/api/market_api.rb, line 466 def market_stocks_get(opts = {}) data, _status_code, _headers = market_stocks_get_with_http_info(opts) data end
Получение списка акций @param [Hash] opts the optional parameters @return [Array<(MarketInstrumentListResponse
, Integer, Hash)>] MarketInstrumentListResponse
data, response status code and response headers
# File lib/tinkoff_invest_client/api/market_api.rb, line 474 def market_stocks_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MarketApi.market_stocks_get ...' end # resource path local_var_path = '/market/stocks' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MarketInstrumentListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['sso_auth'] new_options = opts.merge( :operation => :"MarketApi.market_stocks_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: MarketApi#market_stocks_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end