finnhub_ruby 1.1.17 → 1.1.18
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/README.md +1 -1
 - data/docs/BondTickData.md +34 -0
 - data/docs/DefaultApi.md +543 -7
 - data/docs/ETFProfileData.md +8 -2
 - data/docs/InstitutionalOwnership.md +22 -0
 - data/docs/InstitutionalOwnershipGroup.md +20 -0
 - data/docs/InstitutionalOwnershipInfo.md +36 -0
 - data/docs/InstitutionalPortfolio.md +22 -0
 - data/docs/InstitutionalPortfolioGroup.md +22 -0
 - data/docs/InstitutionalPortfolioInfo.md +38 -0
 - data/docs/InstitutionalProfile.md +20 -0
 - data/docs/InstitutionalProfileInfo.md +28 -0
 - data/docs/IsinChange.md +22 -0
 - data/docs/IsinChangeInfo.md +22 -0
 - data/docs/PriceMetrics.md +20 -0
 - data/docs/SymbolChange.md +22 -0
 - data/docs/SymbolChangeInfo.md +22 -0
 - data/finnhub_ruby-1.1.17.gem +0 -0
 - data/lib/finnhub_ruby/api/default_api.rb +534 -4
 - data/lib/finnhub_ruby/models/bond_tick_data.rb +311 -0
 - data/lib/finnhub_ruby/models/etf_profile_data.rb +35 -5
 - data/lib/finnhub_ruby/models/institutional_ownership.rb +241 -0
 - data/lib/finnhub_ruby/models/institutional_ownership_group.rb +231 -0
 - data/lib/finnhub_ruby/models/institutional_ownership_info.rb +309 -0
 - data/lib/finnhub_ruby/models/institutional_portfolio.rb +241 -0
 - data/lib/finnhub_ruby/models/institutional_portfolio_group.rb +241 -0
 - data/lib/finnhub_ruby/models/institutional_portfolio_info.rb +319 -0
 - data/lib/finnhub_ruby/models/institutional_profile.rb +231 -0
 - data/lib/finnhub_ruby/models/institutional_profile_info.rb +269 -0
 - data/lib/finnhub_ruby/models/isin_change.rb +241 -0
 - data/lib/finnhub_ruby/models/isin_change_info.rb +239 -0
 - data/lib/finnhub_ruby/models/price_metrics.rb +228 -0
 - data/lib/finnhub_ruby/models/symbol_change.rb +241 -0
 - data/lib/finnhub_ruby/models/symbol_change_info.rb +239 -0
 - data/lib/finnhub_ruby/version.rb +1 -1
 - data/lib/finnhub_ruby.rb +14 -0
 - data/spec/models/bond_tick_data_spec.rb +82 -0
 - data/spec/models/institutional_ownership_group_spec.rb +40 -0
 - data/spec/models/institutional_ownership_info_spec.rb +88 -0
 - data/spec/models/institutional_ownership_spec.rb +46 -0
 - data/spec/models/institutional_portfolio_group_spec.rb +46 -0
 - data/spec/models/institutional_portfolio_info_spec.rb +94 -0
 - data/spec/models/institutional_portfolio_spec.rb +46 -0
 - data/spec/models/institutional_profile_info_spec.rb +64 -0
 - data/spec/models/institutional_profile_spec.rb +40 -0
 - data/spec/models/isin_change_info_spec.rb +46 -0
 - data/spec/models/isin_change_spec.rb +46 -0
 - data/spec/models/price_metrics_spec.rb +40 -0
 - data/spec/models/symbol_change_info_spec.rb +46 -0
 - data/spec/models/symbol_change_spec.rb +46 -0
 - metadata +59 -2
 
| 
         @@ -91,7 +91,7 @@ module FinnhubRuby 
     | 
|
| 
       91 
91 
     | 
    
         
             
                end
         
     | 
| 
       92 
92 
     | 
    
         | 
| 
       93 
93 
     | 
    
         
             
                # Bond price data
         
     | 
| 
       94 
     | 
    
         
            -
                # Get  
     | 
| 
      
 94 
     | 
    
         
            +
                # <p>Get bond's price data. The following datasets are supported:</p><table class=\"table table-hover\">   <thead>     <tr>       <th>Exchange</th>       <th>Segment</th>       <th>Delay</th>     </tr>   </thead>   <tbody>   <tr>       <td class=\"text-blue\">US Government Bonds</th>       <td>Government Bonds</td>       <td>End-of-day</td>     </tr>     <tr>       <td class=\"text-blue\">FINRA Trace</th>       <td>BTDS: US Corporate Bonds</td>       <td>Delayed 4h</td>     </tr>     <tr>       <td class=\"text-blue\">FINRA Trace</th>       <td>144A Bonds</td>       <td>Delayed 4h</td>     </tr>   </tbody> </table>
         
     | 
| 
       95 
95 
     | 
    
         
             
                # @param isin [String] ISIN.
         
     | 
| 
       96 
96 
     | 
    
         
             
                # @param from [Integer] UNIX timestamp. Interval initial value.
         
     | 
| 
       97 
97 
     | 
    
         
             
                # @param to [Integer] UNIX timestamp. Interval end value.
         
     | 
| 
         @@ -103,7 +103,7 @@ module FinnhubRuby 
     | 
|
| 
       103 
103 
     | 
    
         
             
                end
         
     | 
| 
       104 
104 
     | 
    
         | 
| 
       105 
105 
     | 
    
         
             
                # Bond price data
         
     | 
| 
       106 
     | 
    
         
            -
                # Get  
     | 
| 
      
 106 
     | 
    
         
            +
                # <p>Get bond's price data. The following datasets are supported:</p><table class=\"table table-hover\">   <thead>     <tr>       <th>Exchange</th>       <th>Segment</th>       <th>Delay</th>     </tr>   </thead>   <tbody>   <tr>       <td class=\"text-blue\">US Government Bonds</th>       <td>Government Bonds</td>       <td>End-of-day</td>     </tr>     <tr>       <td class=\"text-blue\">FINRA Trace</th>       <td>BTDS: US Corporate Bonds</td>       <td>Delayed 4h</td>     </tr>     <tr>       <td class=\"text-blue\">FINRA Trace</th>       <td>144A Bonds</td>       <td>Delayed 4h</td>     </tr>   </tbody> </table>
         
     | 
| 
       107 
107 
     | 
    
         
             
                # @param isin [String] ISIN.
         
     | 
| 
       108 
108 
     | 
    
         
             
                # @param from [Integer] UNIX timestamp. Interval initial value.
         
     | 
| 
       109 
109 
     | 
    
         
             
                # @param to [Integer] UNIX timestamp. Interval end value.
         
     | 
| 
         @@ -234,6 +234,98 @@ module FinnhubRuby 
     | 
|
| 
       234 
234 
     | 
    
         
             
                  return data, status_code, headers
         
     | 
| 
       235 
235 
     | 
    
         
             
                end
         
     | 
| 
       236 
236 
     | 
    
         | 
| 
      
 237 
     | 
    
         
            +
                # Bond Tick Data
         
     | 
| 
      
 238 
     | 
    
         
            +
                # <p>Get trade-level data for bonds. The following datasets are supported:</p><table class=\"table table-hover\">   <thead>     <tr>       <th>Exchange</th>       <th>Segment</th>       <th>Delay</th>     </tr>   </thead>   <tbody>     <tr>       <td class=\"text-blue\">FINRA Trace</th>       <td>BTDS: US Corporate Bonds</td>       <td>Delayed 4h</td>     </tr>     <tr>       <td class=\"text-blue\">FINRA Trace</th>       <td>144A Bonds</td>       <td>Delayed 4h</td>     </tr>   </tbody> </table>
         
     | 
| 
      
 239 
     | 
    
         
            +
                # @param isin [String] ISIN.
         
     | 
| 
      
 240 
     | 
    
         
            +
                # @param date [Date] Date: 2020-04-02.
         
     | 
| 
      
 241 
     | 
    
         
            +
                # @param limit [Integer] Limit number of ticks returned. Maximum value: <code>25000</code>
         
     | 
| 
      
 242 
     | 
    
         
            +
                # @param skip [Integer] Number of ticks to skip. Use this parameter to loop through the entire data.
         
     | 
| 
      
 243 
     | 
    
         
            +
                # @param exchange [String] Currently support the following values: <code>trace</code>.
         
     | 
| 
      
 244 
     | 
    
         
            +
                # @param [Hash] opts the optional parameters
         
     | 
| 
      
 245 
     | 
    
         
            +
                # @return [BondTickData]
         
     | 
| 
      
 246 
     | 
    
         
            +
                def bond_tick(isin, date, limit, skip, exchange, opts = {})
         
     | 
| 
      
 247 
     | 
    
         
            +
                  data, _status_code, _headers = bond_tick_with_http_info(isin, date, limit, skip, exchange, opts)
         
     | 
| 
      
 248 
     | 
    
         
            +
                  data
         
     | 
| 
      
 249 
     | 
    
         
            +
                end
         
     | 
| 
      
 250 
     | 
    
         
            +
             
     | 
| 
      
 251 
     | 
    
         
            +
                # Bond Tick Data
         
     | 
| 
      
 252 
     | 
    
         
            +
                # <p>Get trade-level data for bonds. The following datasets are supported:</p><table class=\"table table-hover\">   <thead>     <tr>       <th>Exchange</th>       <th>Segment</th>       <th>Delay</th>     </tr>   </thead>   <tbody>     <tr>       <td class=\"text-blue\">FINRA Trace</th>       <td>BTDS: US Corporate Bonds</td>       <td>Delayed 4h</td>     </tr>     <tr>       <td class=\"text-blue\">FINRA Trace</th>       <td>144A Bonds</td>       <td>Delayed 4h</td>     </tr>   </tbody> </table>
         
     | 
| 
      
 253 
     | 
    
         
            +
                # @param isin [String] ISIN.
         
     | 
| 
      
 254 
     | 
    
         
            +
                # @param date [Date] Date: 2020-04-02.
         
     | 
| 
      
 255 
     | 
    
         
            +
                # @param limit [Integer] Limit number of ticks returned. Maximum value: <code>25000</code>
         
     | 
| 
      
 256 
     | 
    
         
            +
                # @param skip [Integer] Number of ticks to skip. Use this parameter to loop through the entire data.
         
     | 
| 
      
 257 
     | 
    
         
            +
                # @param exchange [String] Currently support the following values: <code>trace</code>.
         
     | 
| 
      
 258 
     | 
    
         
            +
                # @param [Hash] opts the optional parameters
         
     | 
| 
      
 259 
     | 
    
         
            +
                # @return [Array<(BondTickData, Integer, Hash)>] BondTickData data, response status code and response headers
         
     | 
| 
      
 260 
     | 
    
         
            +
                def bond_tick_with_http_info(isin, date, limit, skip, exchange, opts = {})
         
     | 
| 
      
 261 
     | 
    
         
            +
                  if @api_client.config.debugging
         
     | 
| 
      
 262 
     | 
    
         
            +
                    @api_client.config.logger.debug 'Calling API: DefaultApi.bond_tick ...'
         
     | 
| 
      
 263 
     | 
    
         
            +
                  end
         
     | 
| 
      
 264 
     | 
    
         
            +
                  # verify the required parameter 'isin' is set
         
     | 
| 
      
 265 
     | 
    
         
            +
                  if @api_client.config.client_side_validation && isin.nil?
         
     | 
| 
      
 266 
     | 
    
         
            +
                    fail ArgumentError, "Missing the required parameter 'isin' when calling DefaultApi.bond_tick"
         
     | 
| 
      
 267 
     | 
    
         
            +
                  end
         
     | 
| 
      
 268 
     | 
    
         
            +
                  # verify the required parameter 'date' is set
         
     | 
| 
      
 269 
     | 
    
         
            +
                  if @api_client.config.client_side_validation && date.nil?
         
     | 
| 
      
 270 
     | 
    
         
            +
                    fail ArgumentError, "Missing the required parameter 'date' when calling DefaultApi.bond_tick"
         
     | 
| 
      
 271 
     | 
    
         
            +
                  end
         
     | 
| 
      
 272 
     | 
    
         
            +
                  # verify the required parameter 'limit' is set
         
     | 
| 
      
 273 
     | 
    
         
            +
                  if @api_client.config.client_side_validation && limit.nil?
         
     | 
| 
      
 274 
     | 
    
         
            +
                    fail ArgumentError, "Missing the required parameter 'limit' when calling DefaultApi.bond_tick"
         
     | 
| 
      
 275 
     | 
    
         
            +
                  end
         
     | 
| 
      
 276 
     | 
    
         
            +
                  # verify the required parameter 'skip' is set
         
     | 
| 
      
 277 
     | 
    
         
            +
                  if @api_client.config.client_side_validation && skip.nil?
         
     | 
| 
      
 278 
     | 
    
         
            +
                    fail ArgumentError, "Missing the required parameter 'skip' when calling DefaultApi.bond_tick"
         
     | 
| 
      
 279 
     | 
    
         
            +
                  end
         
     | 
| 
      
 280 
     | 
    
         
            +
                  # verify the required parameter 'exchange' is set
         
     | 
| 
      
 281 
     | 
    
         
            +
                  if @api_client.config.client_side_validation && exchange.nil?
         
     | 
| 
      
 282 
     | 
    
         
            +
                    fail ArgumentError, "Missing the required parameter 'exchange' when calling DefaultApi.bond_tick"
         
     | 
| 
      
 283 
     | 
    
         
            +
                  end
         
     | 
| 
      
 284 
     | 
    
         
            +
                  # resource path
         
     | 
| 
      
 285 
     | 
    
         
            +
                  local_var_path = '/bond/tick'
         
     | 
| 
      
 286 
     | 
    
         
            +
             
     | 
| 
      
 287 
     | 
    
         
            +
                  # query parameters
         
     | 
| 
      
 288 
     | 
    
         
            +
                  query_params = opts[:query_params] || {}
         
     | 
| 
      
 289 
     | 
    
         
            +
                  query_params[:'isin'] = isin
         
     | 
| 
      
 290 
     | 
    
         
            +
                  query_params[:'date'] = date
         
     | 
| 
      
 291 
     | 
    
         
            +
                  query_params[:'limit'] = limit
         
     | 
| 
      
 292 
     | 
    
         
            +
                  query_params[:'skip'] = skip
         
     | 
| 
      
 293 
     | 
    
         
            +
                  query_params[:'exchange'] = exchange
         
     | 
| 
      
 294 
     | 
    
         
            +
             
     | 
| 
      
 295 
     | 
    
         
            +
                  # header parameters
         
     | 
| 
      
 296 
     | 
    
         
            +
                  header_params = opts[:header_params] || {}
         
     | 
| 
      
 297 
     | 
    
         
            +
                  # HTTP header 'Accept' (if needed)
         
     | 
| 
      
 298 
     | 
    
         
            +
                  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
         
     | 
| 
      
 299 
     | 
    
         
            +
             
     | 
| 
      
 300 
     | 
    
         
            +
                  # form parameters
         
     | 
| 
      
 301 
     | 
    
         
            +
                  form_params = opts[:form_params] || {}
         
     | 
| 
      
 302 
     | 
    
         
            +
             
     | 
| 
      
 303 
     | 
    
         
            +
                  # http body (model)
         
     | 
| 
      
 304 
     | 
    
         
            +
                  post_body = opts[:debug_body]
         
     | 
| 
      
 305 
     | 
    
         
            +
             
     | 
| 
      
 306 
     | 
    
         
            +
                  # return_type
         
     | 
| 
      
 307 
     | 
    
         
            +
                  return_type = opts[:debug_return_type] || 'BondTickData'
         
     | 
| 
      
 308 
     | 
    
         
            +
             
     | 
| 
      
 309 
     | 
    
         
            +
                  # auth_names
         
     | 
| 
      
 310 
     | 
    
         
            +
                  auth_names = opts[:debug_auth_names] || ['api_key']
         
     | 
| 
      
 311 
     | 
    
         
            +
             
     | 
| 
      
 312 
     | 
    
         
            +
                  new_options = opts.merge(
         
     | 
| 
      
 313 
     | 
    
         
            +
                    :operation => :"DefaultApi.bond_tick",
         
     | 
| 
      
 314 
     | 
    
         
            +
                    :header_params => header_params,
         
     | 
| 
      
 315 
     | 
    
         
            +
                    :query_params => query_params,
         
     | 
| 
      
 316 
     | 
    
         
            +
                    :form_params => form_params,
         
     | 
| 
      
 317 
     | 
    
         
            +
                    :body => post_body,
         
     | 
| 
      
 318 
     | 
    
         
            +
                    :auth_names => auth_names,
         
     | 
| 
      
 319 
     | 
    
         
            +
                    :return_type => return_type
         
     | 
| 
      
 320 
     | 
    
         
            +
                  )
         
     | 
| 
      
 321 
     | 
    
         
            +
             
     | 
| 
      
 322 
     | 
    
         
            +
                  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
         
     | 
| 
      
 323 
     | 
    
         
            +
                  if @api_client.config.debugging
         
     | 
| 
      
 324 
     | 
    
         
            +
                    @api_client.config.logger.debug "API called: DefaultApi#bond_tick\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
         
     | 
| 
      
 325 
     | 
    
         
            +
                  end
         
     | 
| 
      
 326 
     | 
    
         
            +
                  return data, status_code, headers
         
     | 
| 
      
 327 
     | 
    
         
            +
                end
         
     | 
| 
      
 328 
     | 
    
         
            +
             
     | 
| 
       237 
329 
     | 
    
         
             
                # Basic Financials
         
     | 
| 
       238 
330 
     | 
    
         
             
                # Get company basic financials such as margin, P/E ratio, 52-week high/low etc.
         
     | 
| 
       239 
331 
     | 
    
         
             
                # @param symbol [String] Symbol of the company: AAPL.
         
     | 
| 
         @@ -851,9 +943,10 @@ module FinnhubRuby 
     | 
|
| 
       851 
943 
     | 
    
         
             
                end
         
     | 
| 
       852 
944 
     | 
    
         | 
| 
       853 
945 
     | 
    
         
             
                # Peers
         
     | 
| 
       854 
     | 
    
         
            -
                # Get company peers. Return a list of peers in the same country and  
     | 
| 
      
 946 
     | 
    
         
            +
                # Get company peers. Return a list of peers operating in the same country and sector/industry.
         
     | 
| 
       855 
947 
     | 
    
         
             
                # @param symbol [String] Symbol of the company: AAPL.
         
     | 
| 
       856 
948 
     | 
    
         
             
                # @param [Hash] opts the optional parameters
         
     | 
| 
      
 949 
     | 
    
         
            +
                # @option opts [String] :grouping Specify the grouping criteria for choosing peers.Supporter values: <code>sector</code>, <code>industry</code>, <code>subIndustry</code>. Default to <code>subIndustry</code>.
         
     | 
| 
       857 
950 
     | 
    
         
             
                # @return [Array<String>]
         
     | 
| 
       858 
951 
     | 
    
         
             
                def company_peers(symbol, opts = {})
         
     | 
| 
       859 
952 
     | 
    
         
             
                  data, _status_code, _headers = company_peers_with_http_info(symbol, opts)
         
     | 
| 
         @@ -861,9 +954,10 @@ module FinnhubRuby 
     | 
|
| 
       861 
954 
     | 
    
         
             
                end
         
     | 
| 
       862 
955 
     | 
    
         | 
| 
       863 
956 
     | 
    
         
             
                # Peers
         
     | 
| 
       864 
     | 
    
         
            -
                # Get company peers. Return a list of peers in the same country and  
     | 
| 
      
 957 
     | 
    
         
            +
                # Get company peers. Return a list of peers operating in the same country and sector/industry.
         
     | 
| 
       865 
958 
     | 
    
         
             
                # @param symbol [String] Symbol of the company: AAPL.
         
     | 
| 
       866 
959 
     | 
    
         
             
                # @param [Hash] opts the optional parameters
         
     | 
| 
      
 960 
     | 
    
         
            +
                # @option opts [String] :grouping Specify the grouping criteria for choosing peers.Supporter values: <code>sector</code>, <code>industry</code>, <code>subIndustry</code>. Default to <code>subIndustry</code>.
         
     | 
| 
       867 
961 
     | 
    
         
             
                # @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
         
     | 
| 
       868 
962 
     | 
    
         
             
                def company_peers_with_http_info(symbol, opts = {})
         
     | 
| 
       869 
963 
     | 
    
         
             
                  if @api_client.config.debugging
         
     | 
| 
         @@ -879,6 +973,7 @@ module FinnhubRuby 
     | 
|
| 
       879 
973 
     | 
    
         
             
                  # query parameters
         
     | 
| 
       880 
974 
     | 
    
         
             
                  query_params = opts[:query_params] || {}
         
     | 
| 
       881 
975 
     | 
    
         
             
                  query_params[:'symbol'] = symbol
         
     | 
| 
      
 976 
     | 
    
         
            +
                  query_params[:'grouping'] = opts[:'grouping'] if !opts[:'grouping'].nil?
         
     | 
| 
       882 
977 
     | 
    
         | 
| 
       883 
978 
     | 
    
         
             
                  # header parameters
         
     | 
| 
       884 
979 
     | 
    
         
             
                  header_params = opts[:header_params] || {}
         
     | 
| 
         @@ -2291,6 +2386,8 @@ module FinnhubRuby 
     | 
|
| 
       2291 
2386 
     | 
    
         
             
                # @option opts [String] :cik CIK.
         
     | 
| 
       2292 
2387 
     | 
    
         
             
                # @option opts [String] :access_number Access number of a specific report you want to retrieve financials from.
         
     | 
| 
       2293 
2388 
     | 
    
         
             
                # @option opts [String] :freq Frequency. Can be either <code>annual</code> or <code>quarterly</code>. Default to <code>annual</code>.
         
     | 
| 
      
 2389 
     | 
    
         
            +
                # @option opts [Date] :from From date <code>YYYY-MM-DD</code>. Filter for endDate.
         
     | 
| 
      
 2390 
     | 
    
         
            +
                # @option opts [Date] :to To date <code>YYYY-MM-DD</code>. Filter for endDate.
         
     | 
| 
       2294 
2391 
     | 
    
         
             
                # @return [FinancialsAsReported]
         
     | 
| 
       2295 
2392 
     | 
    
         
             
                def financials_reported(opts = {})
         
     | 
| 
       2296 
2393 
     | 
    
         
             
                  data, _status_code, _headers = financials_reported_with_http_info(opts)
         
     | 
| 
         @@ -2304,6 +2401,8 @@ module FinnhubRuby 
     | 
|
| 
       2304 
2401 
     | 
    
         
             
                # @option opts [String] :cik CIK.
         
     | 
| 
       2305 
2402 
     | 
    
         
             
                # @option opts [String] :access_number Access number of a specific report you want to retrieve financials from.
         
     | 
| 
       2306 
2403 
     | 
    
         
             
                # @option opts [String] :freq Frequency. Can be either <code>annual</code> or <code>quarterly</code>. Default to <code>annual</code>.
         
     | 
| 
      
 2404 
     | 
    
         
            +
                # @option opts [Date] :from From date <code>YYYY-MM-DD</code>. Filter for endDate.
         
     | 
| 
      
 2405 
     | 
    
         
            +
                # @option opts [Date] :to To date <code>YYYY-MM-DD</code>. Filter for endDate.
         
     | 
| 
       2307 
2406 
     | 
    
         
             
                # @return [Array<(FinancialsAsReported, Integer, Hash)>] FinancialsAsReported data, response status code and response headers
         
     | 
| 
       2308 
2407 
     | 
    
         
             
                def financials_reported_with_http_info(opts = {})
         
     | 
| 
       2309 
2408 
     | 
    
         
             
                  if @api_client.config.debugging
         
     | 
| 
         @@ -2318,6 +2417,8 @@ module FinnhubRuby 
     | 
|
| 
       2318 
2417 
     | 
    
         
             
                  query_params[:'cik'] = opts[:'cik'] if !opts[:'cik'].nil?
         
     | 
| 
       2319 
2418 
     | 
    
         
             
                  query_params[:'accessNumber'] = opts[:'access_number'] if !opts[:'access_number'].nil?
         
     | 
| 
       2320 
2419 
     | 
    
         
             
                  query_params[:'freq'] = opts[:'freq'] if !opts[:'freq'].nil?
         
     | 
| 
      
 2420 
     | 
    
         
            +
                  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
         
     | 
| 
      
 2421 
     | 
    
         
            +
                  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
         
     | 
| 
       2321 
2422 
     | 
    
         | 
| 
       2322 
2423 
     | 
    
         
             
                  # header parameters
         
     | 
| 
       2323 
2424 
     | 
    
         
             
                  header_params = opts[:header_params] || {}
         
     | 
| 
         @@ -2965,6 +3066,229 @@ module FinnhubRuby 
     | 
|
| 
       2965 
3066 
     | 
    
         
             
                  return data, status_code, headers
         
     | 
| 
       2966 
3067 
     | 
    
         
             
                end
         
     | 
| 
       2967 
3068 
     | 
    
         | 
| 
      
 3069 
     | 
    
         
            +
                # Institutional Ownership
         
     | 
| 
      
 3070 
     | 
    
         
            +
                # Get a list institutional investors' positions for a particular stock overtime. Data from 13-F filings. Limit to 1 year of data at a time.
         
     | 
| 
      
 3071 
     | 
    
         
            +
                # @param symbol [String] Filter by symbol.
         
     | 
| 
      
 3072 
     | 
    
         
            +
                # @param cusip [String] Filter by CUSIP.
         
     | 
| 
      
 3073 
     | 
    
         
            +
                # @param from [String] From date <code>YYYY-MM-DD</code>.
         
     | 
| 
      
 3074 
     | 
    
         
            +
                # @param to [String] To date <code>YYYY-MM-DD</code>.
         
     | 
| 
      
 3075 
     | 
    
         
            +
                # @param [Hash] opts the optional parameters
         
     | 
| 
      
 3076 
     | 
    
         
            +
                # @return [InstitutionalOwnership]
         
     | 
| 
      
 3077 
     | 
    
         
            +
                def institutional_ownership(symbol, cusip, from, to, opts = {})
         
     | 
| 
      
 3078 
     | 
    
         
            +
                  data, _status_code, _headers = institutional_ownership_with_http_info(symbol, cusip, from, to, opts)
         
     | 
| 
      
 3079 
     | 
    
         
            +
                  data
         
     | 
| 
      
 3080 
     | 
    
         
            +
                end
         
     | 
| 
      
 3081 
     | 
    
         
            +
             
     | 
| 
      
 3082 
     | 
    
         
            +
                # Institutional Ownership
         
     | 
| 
      
 3083 
     | 
    
         
            +
                # Get a list institutional investors' positions for a particular stock overtime. Data from 13-F filings. Limit to 1 year of data at a time.
         
     | 
| 
      
 3084 
     | 
    
         
            +
                # @param symbol [String] Filter by symbol.
         
     | 
| 
      
 3085 
     | 
    
         
            +
                # @param cusip [String] Filter by CUSIP.
         
     | 
| 
      
 3086 
     | 
    
         
            +
                # @param from [String] From date <code>YYYY-MM-DD</code>.
         
     | 
| 
      
 3087 
     | 
    
         
            +
                # @param to [String] To date <code>YYYY-MM-DD</code>.
         
     | 
| 
      
 3088 
     | 
    
         
            +
                # @param [Hash] opts the optional parameters
         
     | 
| 
      
 3089 
     | 
    
         
            +
                # @return [Array<(InstitutionalOwnership, Integer, Hash)>] InstitutionalOwnership data, response status code and response headers
         
     | 
| 
      
 3090 
     | 
    
         
            +
                def institutional_ownership_with_http_info(symbol, cusip, from, to, opts = {})
         
     | 
| 
      
 3091 
     | 
    
         
            +
                  if @api_client.config.debugging
         
     | 
| 
      
 3092 
     | 
    
         
            +
                    @api_client.config.logger.debug 'Calling API: DefaultApi.institutional_ownership ...'
         
     | 
| 
      
 3093 
     | 
    
         
            +
                  end
         
     | 
| 
      
 3094 
     | 
    
         
            +
                  # verify the required parameter 'symbol' is set
         
     | 
| 
      
 3095 
     | 
    
         
            +
                  if @api_client.config.client_side_validation && symbol.nil?
         
     | 
| 
      
 3096 
     | 
    
         
            +
                    fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.institutional_ownership"
         
     | 
| 
      
 3097 
     | 
    
         
            +
                  end
         
     | 
| 
      
 3098 
     | 
    
         
            +
                  # verify the required parameter 'cusip' is set
         
     | 
| 
      
 3099 
     | 
    
         
            +
                  if @api_client.config.client_side_validation && cusip.nil?
         
     | 
| 
      
 3100 
     | 
    
         
            +
                    fail ArgumentError, "Missing the required parameter 'cusip' when calling DefaultApi.institutional_ownership"
         
     | 
| 
      
 3101 
     | 
    
         
            +
                  end
         
     | 
| 
      
 3102 
     | 
    
         
            +
                  # verify the required parameter 'from' is set
         
     | 
| 
      
 3103 
     | 
    
         
            +
                  if @api_client.config.client_side_validation && from.nil?
         
     | 
| 
      
 3104 
     | 
    
         
            +
                    fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.institutional_ownership"
         
     | 
| 
      
 3105 
     | 
    
         
            +
                  end
         
     | 
| 
      
 3106 
     | 
    
         
            +
                  # verify the required parameter 'to' is set
         
     | 
| 
      
 3107 
     | 
    
         
            +
                  if @api_client.config.client_side_validation && to.nil?
         
     | 
| 
      
 3108 
     | 
    
         
            +
                    fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.institutional_ownership"
         
     | 
| 
      
 3109 
     | 
    
         
            +
                  end
         
     | 
| 
      
 3110 
     | 
    
         
            +
                  # resource path
         
     | 
| 
      
 3111 
     | 
    
         
            +
                  local_var_path = '/institutional/ownership'
         
     | 
| 
      
 3112 
     | 
    
         
            +
             
     | 
| 
      
 3113 
     | 
    
         
            +
                  # query parameters
         
     | 
| 
      
 3114 
     | 
    
         
            +
                  query_params = opts[:query_params] || {}
         
     | 
| 
      
 3115 
     | 
    
         
            +
                  query_params[:'symbol'] = symbol
         
     | 
| 
      
 3116 
     | 
    
         
            +
                  query_params[:'cusip'] = cusip
         
     | 
| 
      
 3117 
     | 
    
         
            +
                  query_params[:'from'] = from
         
     | 
| 
      
 3118 
     | 
    
         
            +
                  query_params[:'to'] = to
         
     | 
| 
      
 3119 
     | 
    
         
            +
             
     | 
| 
      
 3120 
     | 
    
         
            +
                  # header parameters
         
     | 
| 
      
 3121 
     | 
    
         
            +
                  header_params = opts[:header_params] || {}
         
     | 
| 
      
 3122 
     | 
    
         
            +
                  # HTTP header 'Accept' (if needed)
         
     | 
| 
      
 3123 
     | 
    
         
            +
                  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
         
     | 
| 
      
 3124 
     | 
    
         
            +
             
     | 
| 
      
 3125 
     | 
    
         
            +
                  # form parameters
         
     | 
| 
      
 3126 
     | 
    
         
            +
                  form_params = opts[:form_params] || {}
         
     | 
| 
      
 3127 
     | 
    
         
            +
             
     | 
| 
      
 3128 
     | 
    
         
            +
                  # http body (model)
         
     | 
| 
      
 3129 
     | 
    
         
            +
                  post_body = opts[:debug_body]
         
     | 
| 
      
 3130 
     | 
    
         
            +
             
     | 
| 
      
 3131 
     | 
    
         
            +
                  # return_type
         
     | 
| 
      
 3132 
     | 
    
         
            +
                  return_type = opts[:debug_return_type] || 'InstitutionalOwnership'
         
     | 
| 
      
 3133 
     | 
    
         
            +
             
     | 
| 
      
 3134 
     | 
    
         
            +
                  # auth_names
         
     | 
| 
      
 3135 
     | 
    
         
            +
                  auth_names = opts[:debug_auth_names] || ['api_key']
         
     | 
| 
      
 3136 
     | 
    
         
            +
             
     | 
| 
      
 3137 
     | 
    
         
            +
                  new_options = opts.merge(
         
     | 
| 
      
 3138 
     | 
    
         
            +
                    :operation => :"DefaultApi.institutional_ownership",
         
     | 
| 
      
 3139 
     | 
    
         
            +
                    :header_params => header_params,
         
     | 
| 
      
 3140 
     | 
    
         
            +
                    :query_params => query_params,
         
     | 
| 
      
 3141 
     | 
    
         
            +
                    :form_params => form_params,
         
     | 
| 
      
 3142 
     | 
    
         
            +
                    :body => post_body,
         
     | 
| 
      
 3143 
     | 
    
         
            +
                    :auth_names => auth_names,
         
     | 
| 
      
 3144 
     | 
    
         
            +
                    :return_type => return_type
         
     | 
| 
      
 3145 
     | 
    
         
            +
                  )
         
     | 
| 
      
 3146 
     | 
    
         
            +
             
     | 
| 
      
 3147 
     | 
    
         
            +
                  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
         
     | 
| 
      
 3148 
     | 
    
         
            +
                  if @api_client.config.debugging
         
     | 
| 
      
 3149 
     | 
    
         
            +
                    @api_client.config.logger.debug "API called: DefaultApi#institutional_ownership\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
         
     | 
| 
      
 3150 
     | 
    
         
            +
                  end
         
     | 
| 
      
 3151 
     | 
    
         
            +
                  return data, status_code, headers
         
     | 
| 
      
 3152 
     | 
    
         
            +
                end
         
     | 
| 
      
 3153 
     | 
    
         
            +
             
     | 
| 
      
 3154 
     | 
    
         
            +
                # Institutional Portfolio
         
     | 
| 
      
 3155 
     | 
    
         
            +
                # Get the holdings/portfolio data of institutional investors from 13-F filings. Limit to 1 year of data at a time.
         
     | 
| 
      
 3156 
     | 
    
         
            +
                # @param cik [String] Fund's CIK.
         
     | 
| 
      
 3157 
     | 
    
         
            +
                # @param from [String] From date <code>YYYY-MM-DD</code>.
         
     | 
| 
      
 3158 
     | 
    
         
            +
                # @param to [String] To date <code>YYYY-MM-DD</code>.
         
     | 
| 
      
 3159 
     | 
    
         
            +
                # @param [Hash] opts the optional parameters
         
     | 
| 
      
 3160 
     | 
    
         
            +
                # @return [InstitutionalPortfolio]
         
     | 
| 
      
 3161 
     | 
    
         
            +
                def institutional_portfolio(cik, from, to, opts = {})
         
     | 
| 
      
 3162 
     | 
    
         
            +
                  data, _status_code, _headers = institutional_portfolio_with_http_info(cik, from, to, opts)
         
     | 
| 
      
 3163 
     | 
    
         
            +
                  data
         
     | 
| 
      
 3164 
     | 
    
         
            +
                end
         
     | 
| 
      
 3165 
     | 
    
         
            +
             
     | 
| 
      
 3166 
     | 
    
         
            +
                # Institutional Portfolio
         
     | 
| 
      
 3167 
     | 
    
         
            +
                # Get the holdings/portfolio data of institutional investors from 13-F filings. Limit to 1 year of data at a time.
         
     | 
| 
      
 3168 
     | 
    
         
            +
                # @param cik [String] Fund's CIK.
         
     | 
| 
      
 3169 
     | 
    
         
            +
                # @param from [String] From date <code>YYYY-MM-DD</code>.
         
     | 
| 
      
 3170 
     | 
    
         
            +
                # @param to [String] To date <code>YYYY-MM-DD</code>.
         
     | 
| 
      
 3171 
     | 
    
         
            +
                # @param [Hash] opts the optional parameters
         
     | 
| 
      
 3172 
     | 
    
         
            +
                # @return [Array<(InstitutionalPortfolio, Integer, Hash)>] InstitutionalPortfolio data, response status code and response headers
         
     | 
| 
      
 3173 
     | 
    
         
            +
                def institutional_portfolio_with_http_info(cik, from, to, opts = {})
         
     | 
| 
      
 3174 
     | 
    
         
            +
                  if @api_client.config.debugging
         
     | 
| 
      
 3175 
     | 
    
         
            +
                    @api_client.config.logger.debug 'Calling API: DefaultApi.institutional_portfolio ...'
         
     | 
| 
      
 3176 
     | 
    
         
            +
                  end
         
     | 
| 
      
 3177 
     | 
    
         
            +
                  # verify the required parameter 'cik' is set
         
     | 
| 
      
 3178 
     | 
    
         
            +
                  if @api_client.config.client_side_validation && cik.nil?
         
     | 
| 
      
 3179 
     | 
    
         
            +
                    fail ArgumentError, "Missing the required parameter 'cik' when calling DefaultApi.institutional_portfolio"
         
     | 
| 
      
 3180 
     | 
    
         
            +
                  end
         
     | 
| 
      
 3181 
     | 
    
         
            +
                  # verify the required parameter 'from' is set
         
     | 
| 
      
 3182 
     | 
    
         
            +
                  if @api_client.config.client_side_validation && from.nil?
         
     | 
| 
      
 3183 
     | 
    
         
            +
                    fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.institutional_portfolio"
         
     | 
| 
      
 3184 
     | 
    
         
            +
                  end
         
     | 
| 
      
 3185 
     | 
    
         
            +
                  # verify the required parameter 'to' is set
         
     | 
| 
      
 3186 
     | 
    
         
            +
                  if @api_client.config.client_side_validation && to.nil?
         
     | 
| 
      
 3187 
     | 
    
         
            +
                    fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.institutional_portfolio"
         
     | 
| 
      
 3188 
     | 
    
         
            +
                  end
         
     | 
| 
      
 3189 
     | 
    
         
            +
                  # resource path
         
     | 
| 
      
 3190 
     | 
    
         
            +
                  local_var_path = '/institutional/portfolio'
         
     | 
| 
      
 3191 
     | 
    
         
            +
             
     | 
| 
      
 3192 
     | 
    
         
            +
                  # query parameters
         
     | 
| 
      
 3193 
     | 
    
         
            +
                  query_params = opts[:query_params] || {}
         
     | 
| 
      
 3194 
     | 
    
         
            +
                  query_params[:'cik'] = cik
         
     | 
| 
      
 3195 
     | 
    
         
            +
                  query_params[:'from'] = from
         
     | 
| 
      
 3196 
     | 
    
         
            +
                  query_params[:'to'] = to
         
     | 
| 
      
 3197 
     | 
    
         
            +
             
     | 
| 
      
 3198 
     | 
    
         
            +
                  # header parameters
         
     | 
| 
      
 3199 
     | 
    
         
            +
                  header_params = opts[:header_params] || {}
         
     | 
| 
      
 3200 
     | 
    
         
            +
                  # HTTP header 'Accept' (if needed)
         
     | 
| 
      
 3201 
     | 
    
         
            +
                  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
         
     | 
| 
      
 3202 
     | 
    
         
            +
             
     | 
| 
      
 3203 
     | 
    
         
            +
                  # form parameters
         
     | 
| 
      
 3204 
     | 
    
         
            +
                  form_params = opts[:form_params] || {}
         
     | 
| 
      
 3205 
     | 
    
         
            +
             
     | 
| 
      
 3206 
     | 
    
         
            +
                  # http body (model)
         
     | 
| 
      
 3207 
     | 
    
         
            +
                  post_body = opts[:debug_body]
         
     | 
| 
      
 3208 
     | 
    
         
            +
             
     | 
| 
      
 3209 
     | 
    
         
            +
                  # return_type
         
     | 
| 
      
 3210 
     | 
    
         
            +
                  return_type = opts[:debug_return_type] || 'InstitutionalPortfolio'
         
     | 
| 
      
 3211 
     | 
    
         
            +
             
     | 
| 
      
 3212 
     | 
    
         
            +
                  # auth_names
         
     | 
| 
      
 3213 
     | 
    
         
            +
                  auth_names = opts[:debug_auth_names] || ['api_key']
         
     | 
| 
      
 3214 
     | 
    
         
            +
             
     | 
| 
      
 3215 
     | 
    
         
            +
                  new_options = opts.merge(
         
     | 
| 
      
 3216 
     | 
    
         
            +
                    :operation => :"DefaultApi.institutional_portfolio",
         
     | 
| 
      
 3217 
     | 
    
         
            +
                    :header_params => header_params,
         
     | 
| 
      
 3218 
     | 
    
         
            +
                    :query_params => query_params,
         
     | 
| 
      
 3219 
     | 
    
         
            +
                    :form_params => form_params,
         
     | 
| 
      
 3220 
     | 
    
         
            +
                    :body => post_body,
         
     | 
| 
      
 3221 
     | 
    
         
            +
                    :auth_names => auth_names,
         
     | 
| 
      
 3222 
     | 
    
         
            +
                    :return_type => return_type
         
     | 
| 
      
 3223 
     | 
    
         
            +
                  )
         
     | 
| 
      
 3224 
     | 
    
         
            +
             
     | 
| 
      
 3225 
     | 
    
         
            +
                  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
         
     | 
| 
      
 3226 
     | 
    
         
            +
                  if @api_client.config.debugging
         
     | 
| 
      
 3227 
     | 
    
         
            +
                    @api_client.config.logger.debug "API called: DefaultApi#institutional_portfolio\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
         
     | 
| 
      
 3228 
     | 
    
         
            +
                  end
         
     | 
| 
      
 3229 
     | 
    
         
            +
                  return data, status_code, headers
         
     | 
| 
      
 3230 
     | 
    
         
            +
                end
         
     | 
| 
      
 3231 
     | 
    
         
            +
             
     | 
| 
      
 3232 
     | 
    
         
            +
                # Institutional Profile
         
     | 
| 
      
 3233 
     | 
    
         
            +
                # Get a list of well-known institutional investors. Currently support 60+ profiles.
         
     | 
| 
      
 3234 
     | 
    
         
            +
                # @param [Hash] opts the optional parameters
         
     | 
| 
      
 3235 
     | 
    
         
            +
                # @option opts [String] :cik Filter by CIK. Leave blank to get the full list.
         
     | 
| 
      
 3236 
     | 
    
         
            +
                # @return [InstitutionalProfile]
         
     | 
| 
      
 3237 
     | 
    
         
            +
                def institutional_profile(opts = {})
         
     | 
| 
      
 3238 
     | 
    
         
            +
                  data, _status_code, _headers = institutional_profile_with_http_info(opts)
         
     | 
| 
      
 3239 
     | 
    
         
            +
                  data
         
     | 
| 
      
 3240 
     | 
    
         
            +
                end
         
     | 
| 
      
 3241 
     | 
    
         
            +
             
     | 
| 
      
 3242 
     | 
    
         
            +
                # Institutional Profile
         
     | 
| 
      
 3243 
     | 
    
         
            +
                # Get a list of well-known institutional investors. Currently support 60+ profiles.
         
     | 
| 
      
 3244 
     | 
    
         
            +
                # @param [Hash] opts the optional parameters
         
     | 
| 
      
 3245 
     | 
    
         
            +
                # @option opts [String] :cik Filter by CIK. Leave blank to get the full list.
         
     | 
| 
      
 3246 
     | 
    
         
            +
                # @return [Array<(InstitutionalProfile, Integer, Hash)>] InstitutionalProfile data, response status code and response headers
         
     | 
| 
      
 3247 
     | 
    
         
            +
                def institutional_profile_with_http_info(opts = {})
         
     | 
| 
      
 3248 
     | 
    
         
            +
                  if @api_client.config.debugging
         
     | 
| 
      
 3249 
     | 
    
         
            +
                    @api_client.config.logger.debug 'Calling API: DefaultApi.institutional_profile ...'
         
     | 
| 
      
 3250 
     | 
    
         
            +
                  end
         
     | 
| 
      
 3251 
     | 
    
         
            +
                  # resource path
         
     | 
| 
      
 3252 
     | 
    
         
            +
                  local_var_path = '/institutional/profile'
         
     | 
| 
      
 3253 
     | 
    
         
            +
             
     | 
| 
      
 3254 
     | 
    
         
            +
                  # query parameters
         
     | 
| 
      
 3255 
     | 
    
         
            +
                  query_params = opts[:query_params] || {}
         
     | 
| 
      
 3256 
     | 
    
         
            +
                  query_params[:'cik'] = opts[:'cik'] if !opts[:'cik'].nil?
         
     | 
| 
      
 3257 
     | 
    
         
            +
             
     | 
| 
      
 3258 
     | 
    
         
            +
                  # header parameters
         
     | 
| 
      
 3259 
     | 
    
         
            +
                  header_params = opts[:header_params] || {}
         
     | 
| 
      
 3260 
     | 
    
         
            +
                  # HTTP header 'Accept' (if needed)
         
     | 
| 
      
 3261 
     | 
    
         
            +
                  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
         
     | 
| 
      
 3262 
     | 
    
         
            +
             
     | 
| 
      
 3263 
     | 
    
         
            +
                  # form parameters
         
     | 
| 
      
 3264 
     | 
    
         
            +
                  form_params = opts[:form_params] || {}
         
     | 
| 
      
 3265 
     | 
    
         
            +
             
     | 
| 
      
 3266 
     | 
    
         
            +
                  # http body (model)
         
     | 
| 
      
 3267 
     | 
    
         
            +
                  post_body = opts[:debug_body]
         
     | 
| 
      
 3268 
     | 
    
         
            +
             
     | 
| 
      
 3269 
     | 
    
         
            +
                  # return_type
         
     | 
| 
      
 3270 
     | 
    
         
            +
                  return_type = opts[:debug_return_type] || 'InstitutionalProfile'
         
     | 
| 
      
 3271 
     | 
    
         
            +
             
     | 
| 
      
 3272 
     | 
    
         
            +
                  # auth_names
         
     | 
| 
      
 3273 
     | 
    
         
            +
                  auth_names = opts[:debug_auth_names] || ['api_key']
         
     | 
| 
      
 3274 
     | 
    
         
            +
             
     | 
| 
      
 3275 
     | 
    
         
            +
                  new_options = opts.merge(
         
     | 
| 
      
 3276 
     | 
    
         
            +
                    :operation => :"DefaultApi.institutional_profile",
         
     | 
| 
      
 3277 
     | 
    
         
            +
                    :header_params => header_params,
         
     | 
| 
      
 3278 
     | 
    
         
            +
                    :query_params => query_params,
         
     | 
| 
      
 3279 
     | 
    
         
            +
                    :form_params => form_params,
         
     | 
| 
      
 3280 
     | 
    
         
            +
                    :body => post_body,
         
     | 
| 
      
 3281 
     | 
    
         
            +
                    :auth_names => auth_names,
         
     | 
| 
      
 3282 
     | 
    
         
            +
                    :return_type => return_type
         
     | 
| 
      
 3283 
     | 
    
         
            +
                  )
         
     | 
| 
      
 3284 
     | 
    
         
            +
             
     | 
| 
      
 3285 
     | 
    
         
            +
                  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
         
     | 
| 
      
 3286 
     | 
    
         
            +
                  if @api_client.config.debugging
         
     | 
| 
      
 3287 
     | 
    
         
            +
                    @api_client.config.logger.debug "API called: DefaultApi#institutional_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
         
     | 
| 
      
 3288 
     | 
    
         
            +
                  end
         
     | 
| 
      
 3289 
     | 
    
         
            +
                  return data, status_code, headers
         
     | 
| 
      
 3290 
     | 
    
         
            +
                end
         
     | 
| 
      
 3291 
     | 
    
         
            +
             
     | 
| 
       2968 
3292 
     | 
    
         
             
                # International Filings
         
     | 
| 
       2969 
3293 
     | 
    
         
             
                # List filings for international companies. Limit to 250 documents at a time. These are the documents we use to source our fundamental data. Only support SEDAR and UK Companies House for normal usage. Enterprise clients who need access to the full filings for global markets should contact us for the access.
         
     | 
| 
       2970 
3294 
     | 
    
         
             
                # @param [Hash] opts the optional parameters
         
     | 
| 
         @@ -3163,6 +3487,77 @@ module FinnhubRuby 
     | 
|
| 
       3163 
3487 
     | 
    
         
             
                  return data, status_code, headers
         
     | 
| 
       3164 
3488 
     | 
    
         
             
                end
         
     | 
| 
       3165 
3489 
     | 
    
         | 
| 
      
 3490 
     | 
    
         
            +
                # ISIN Change
         
     | 
| 
      
 3491 
     | 
    
         
            +
                # Get a list of ISIN changes for EU-listed securities. Limit to 2000 events at a time.
         
     | 
| 
      
 3492 
     | 
    
         
            +
                # @param from [String] From date <code>YYYY-MM-DD</code>.
         
     | 
| 
      
 3493 
     | 
    
         
            +
                # @param to [String] To date <code>YYYY-MM-DD</code>.
         
     | 
| 
      
 3494 
     | 
    
         
            +
                # @param [Hash] opts the optional parameters
         
     | 
| 
      
 3495 
     | 
    
         
            +
                # @return [IsinChange]
         
     | 
| 
      
 3496 
     | 
    
         
            +
                def isin_change(from, to, opts = {})
         
     | 
| 
      
 3497 
     | 
    
         
            +
                  data, _status_code, _headers = isin_change_with_http_info(from, to, opts)
         
     | 
| 
      
 3498 
     | 
    
         
            +
                  data
         
     | 
| 
      
 3499 
     | 
    
         
            +
                end
         
     | 
| 
      
 3500 
     | 
    
         
            +
             
     | 
| 
      
 3501 
     | 
    
         
            +
                # ISIN Change
         
     | 
| 
      
 3502 
     | 
    
         
            +
                # Get a list of ISIN changes for EU-listed securities. Limit to 2000 events at a time.
         
     | 
| 
      
 3503 
     | 
    
         
            +
                # @param from [String] From date <code>YYYY-MM-DD</code>.
         
     | 
| 
      
 3504 
     | 
    
         
            +
                # @param to [String] To date <code>YYYY-MM-DD</code>.
         
     | 
| 
      
 3505 
     | 
    
         
            +
                # @param [Hash] opts the optional parameters
         
     | 
| 
      
 3506 
     | 
    
         
            +
                # @return [Array<(IsinChange, Integer, Hash)>] IsinChange data, response status code and response headers
         
     | 
| 
      
 3507 
     | 
    
         
            +
                def isin_change_with_http_info(from, to, opts = {})
         
     | 
| 
      
 3508 
     | 
    
         
            +
                  if @api_client.config.debugging
         
     | 
| 
      
 3509 
     | 
    
         
            +
                    @api_client.config.logger.debug 'Calling API: DefaultApi.isin_change ...'
         
     | 
| 
      
 3510 
     | 
    
         
            +
                  end
         
     | 
| 
      
 3511 
     | 
    
         
            +
                  # verify the required parameter 'from' is set
         
     | 
| 
      
 3512 
     | 
    
         
            +
                  if @api_client.config.client_side_validation && from.nil?
         
     | 
| 
      
 3513 
     | 
    
         
            +
                    fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.isin_change"
         
     | 
| 
      
 3514 
     | 
    
         
            +
                  end
         
     | 
| 
      
 3515 
     | 
    
         
            +
                  # verify the required parameter 'to' is set
         
     | 
| 
      
 3516 
     | 
    
         
            +
                  if @api_client.config.client_side_validation && to.nil?
         
     | 
| 
      
 3517 
     | 
    
         
            +
                    fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.isin_change"
         
     | 
| 
      
 3518 
     | 
    
         
            +
                  end
         
     | 
| 
      
 3519 
     | 
    
         
            +
                  # resource path
         
     | 
| 
      
 3520 
     | 
    
         
            +
                  local_var_path = '/ca/isin-change'
         
     | 
| 
      
 3521 
     | 
    
         
            +
             
     | 
| 
      
 3522 
     | 
    
         
            +
                  # query parameters
         
     | 
| 
      
 3523 
     | 
    
         
            +
                  query_params = opts[:query_params] || {}
         
     | 
| 
      
 3524 
     | 
    
         
            +
                  query_params[:'from'] = from
         
     | 
| 
      
 3525 
     | 
    
         
            +
                  query_params[:'to'] = to
         
     | 
| 
      
 3526 
     | 
    
         
            +
             
     | 
| 
      
 3527 
     | 
    
         
            +
                  # header parameters
         
     | 
| 
      
 3528 
     | 
    
         
            +
                  header_params = opts[:header_params] || {}
         
     | 
| 
      
 3529 
     | 
    
         
            +
                  # HTTP header 'Accept' (if needed)
         
     | 
| 
      
 3530 
     | 
    
         
            +
                  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
         
     | 
| 
      
 3531 
     | 
    
         
            +
             
     | 
| 
      
 3532 
     | 
    
         
            +
                  # form parameters
         
     | 
| 
      
 3533 
     | 
    
         
            +
                  form_params = opts[:form_params] || {}
         
     | 
| 
      
 3534 
     | 
    
         
            +
             
     | 
| 
      
 3535 
     | 
    
         
            +
                  # http body (model)
         
     | 
| 
      
 3536 
     | 
    
         
            +
                  post_body = opts[:debug_body]
         
     | 
| 
      
 3537 
     | 
    
         
            +
             
     | 
| 
      
 3538 
     | 
    
         
            +
                  # return_type
         
     | 
| 
      
 3539 
     | 
    
         
            +
                  return_type = opts[:debug_return_type] || 'IsinChange'
         
     | 
| 
      
 3540 
     | 
    
         
            +
             
     | 
| 
      
 3541 
     | 
    
         
            +
                  # auth_names
         
     | 
| 
      
 3542 
     | 
    
         
            +
                  auth_names = opts[:debug_auth_names] || ['api_key']
         
     | 
| 
      
 3543 
     | 
    
         
            +
             
     | 
| 
      
 3544 
     | 
    
         
            +
                  new_options = opts.merge(
         
     | 
| 
      
 3545 
     | 
    
         
            +
                    :operation => :"DefaultApi.isin_change",
         
     | 
| 
      
 3546 
     | 
    
         
            +
                    :header_params => header_params,
         
     | 
| 
      
 3547 
     | 
    
         
            +
                    :query_params => query_params,
         
     | 
| 
      
 3548 
     | 
    
         
            +
                    :form_params => form_params,
         
     | 
| 
      
 3549 
     | 
    
         
            +
                    :body => post_body,
         
     | 
| 
      
 3550 
     | 
    
         
            +
                    :auth_names => auth_names,
         
     | 
| 
      
 3551 
     | 
    
         
            +
                    :return_type => return_type
         
     | 
| 
      
 3552 
     | 
    
         
            +
                  )
         
     | 
| 
      
 3553 
     | 
    
         
            +
             
     | 
| 
      
 3554 
     | 
    
         
            +
                  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
         
     | 
| 
      
 3555 
     | 
    
         
            +
                  if @api_client.config.debugging
         
     | 
| 
      
 3556 
     | 
    
         
            +
                    @api_client.config.logger.debug "API called: DefaultApi#isin_change\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
         
     | 
| 
      
 3557 
     | 
    
         
            +
                  end
         
     | 
| 
      
 3558 
     | 
    
         
            +
                  return data, status_code, headers
         
     | 
| 
      
 3559 
     | 
    
         
            +
                end
         
     | 
| 
      
 3560 
     | 
    
         
            +
             
     | 
| 
       3166 
3561 
     | 
    
         
             
                # Market News
         
     | 
| 
       3167 
3562 
     | 
    
         
             
                # Get latest market news.
         
     | 
| 
       3168 
3563 
     | 
    
         
             
                # @param category [String] This parameter can be 1 of the following values <code>general, forex, crypto, merger</code>.
         
     | 
| 
         @@ -3759,6 +4154,70 @@ module FinnhubRuby 
     | 
|
| 
       3759 
4154 
     | 
    
         
             
                  return data, status_code, headers
         
     | 
| 
       3760 
4155 
     | 
    
         
             
                end
         
     | 
| 
       3761 
4156 
     | 
    
         | 
| 
      
 4157 
     | 
    
         
            +
                # Price Metrics
         
     | 
| 
      
 4158 
     | 
    
         
            +
                # Get company price performance statistics such as 52-week high/low, YTD return and much more.
         
     | 
| 
      
 4159 
     | 
    
         
            +
                # @param symbol [String] Symbol of the company: AAPL.
         
     | 
| 
      
 4160 
     | 
    
         
            +
                # @param [Hash] opts the optional parameters
         
     | 
| 
      
 4161 
     | 
    
         
            +
                # @return [PriceMetrics]
         
     | 
| 
      
 4162 
     | 
    
         
            +
                def price_metrics(symbol, opts = {})
         
     | 
| 
      
 4163 
     | 
    
         
            +
                  data, _status_code, _headers = price_metrics_with_http_info(symbol, opts)
         
     | 
| 
      
 4164 
     | 
    
         
            +
                  data
         
     | 
| 
      
 4165 
     | 
    
         
            +
                end
         
     | 
| 
      
 4166 
     | 
    
         
            +
             
     | 
| 
      
 4167 
     | 
    
         
            +
                # Price Metrics
         
     | 
| 
      
 4168 
     | 
    
         
            +
                # Get company price performance statistics such as 52-week high/low, YTD return and much more.
         
     | 
| 
      
 4169 
     | 
    
         
            +
                # @param symbol [String] Symbol of the company: AAPL.
         
     | 
| 
      
 4170 
     | 
    
         
            +
                # @param [Hash] opts the optional parameters
         
     | 
| 
      
 4171 
     | 
    
         
            +
                # @return [Array<(PriceMetrics, Integer, Hash)>] PriceMetrics data, response status code and response headers
         
     | 
| 
      
 4172 
     | 
    
         
            +
                def price_metrics_with_http_info(symbol, opts = {})
         
     | 
| 
      
 4173 
     | 
    
         
            +
                  if @api_client.config.debugging
         
     | 
| 
      
 4174 
     | 
    
         
            +
                    @api_client.config.logger.debug 'Calling API: DefaultApi.price_metrics ...'
         
     | 
| 
      
 4175 
     | 
    
         
            +
                  end
         
     | 
| 
      
 4176 
     | 
    
         
            +
                  # verify the required parameter 'symbol' is set
         
     | 
| 
      
 4177 
     | 
    
         
            +
                  if @api_client.config.client_side_validation && symbol.nil?
         
     | 
| 
      
 4178 
     | 
    
         
            +
                    fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.price_metrics"
         
     | 
| 
      
 4179 
     | 
    
         
            +
                  end
         
     | 
| 
      
 4180 
     | 
    
         
            +
                  # resource path
         
     | 
| 
      
 4181 
     | 
    
         
            +
                  local_var_path = '/stock/price-metric'
         
     | 
| 
      
 4182 
     | 
    
         
            +
             
     | 
| 
      
 4183 
     | 
    
         
            +
                  # query parameters
         
     | 
| 
      
 4184 
     | 
    
         
            +
                  query_params = opts[:query_params] || {}
         
     | 
| 
      
 4185 
     | 
    
         
            +
                  query_params[:'symbol'] = symbol
         
     | 
| 
      
 4186 
     | 
    
         
            +
             
     | 
| 
      
 4187 
     | 
    
         
            +
                  # header parameters
         
     | 
| 
      
 4188 
     | 
    
         
            +
                  header_params = opts[:header_params] || {}
         
     | 
| 
      
 4189 
     | 
    
         
            +
                  # HTTP header 'Accept' (if needed)
         
     | 
| 
      
 4190 
     | 
    
         
            +
                  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
         
     | 
| 
      
 4191 
     | 
    
         
            +
             
     | 
| 
      
 4192 
     | 
    
         
            +
                  # form parameters
         
     | 
| 
      
 4193 
     | 
    
         
            +
                  form_params = opts[:form_params] || {}
         
     | 
| 
      
 4194 
     | 
    
         
            +
             
     | 
| 
      
 4195 
     | 
    
         
            +
                  # http body (model)
         
     | 
| 
      
 4196 
     | 
    
         
            +
                  post_body = opts[:debug_body]
         
     | 
| 
      
 4197 
     | 
    
         
            +
             
     | 
| 
      
 4198 
     | 
    
         
            +
                  # return_type
         
     | 
| 
      
 4199 
     | 
    
         
            +
                  return_type = opts[:debug_return_type] || 'PriceMetrics'
         
     | 
| 
      
 4200 
     | 
    
         
            +
             
     | 
| 
      
 4201 
     | 
    
         
            +
                  # auth_names
         
     | 
| 
      
 4202 
     | 
    
         
            +
                  auth_names = opts[:debug_auth_names] || ['api_key']
         
     | 
| 
      
 4203 
     | 
    
         
            +
             
     | 
| 
      
 4204 
     | 
    
         
            +
                  new_options = opts.merge(
         
     | 
| 
      
 4205 
     | 
    
         
            +
                    :operation => :"DefaultApi.price_metrics",
         
     | 
| 
      
 4206 
     | 
    
         
            +
                    :header_params => header_params,
         
     | 
| 
      
 4207 
     | 
    
         
            +
                    :query_params => query_params,
         
     | 
| 
      
 4208 
     | 
    
         
            +
                    :form_params => form_params,
         
     | 
| 
      
 4209 
     | 
    
         
            +
                    :body => post_body,
         
     | 
| 
      
 4210 
     | 
    
         
            +
                    :auth_names => auth_names,
         
     | 
| 
      
 4211 
     | 
    
         
            +
                    :return_type => return_type
         
     | 
| 
      
 4212 
     | 
    
         
            +
                  )
         
     | 
| 
      
 4213 
     | 
    
         
            +
             
     | 
| 
      
 4214 
     | 
    
         
            +
                  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
         
     | 
| 
      
 4215 
     | 
    
         
            +
                  if @api_client.config.debugging
         
     | 
| 
      
 4216 
     | 
    
         
            +
                    @api_client.config.logger.debug "API called: DefaultApi#price_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
         
     | 
| 
      
 4217 
     | 
    
         
            +
                  end
         
     | 
| 
      
 4218 
     | 
    
         
            +
                  return data, status_code, headers
         
     | 
| 
      
 4219 
     | 
    
         
            +
                end
         
     | 
| 
      
 4220 
     | 
    
         
            +
             
     | 
| 
       3762 
4221 
     | 
    
         
             
                # Price Target
         
     | 
| 
       3763 
4222 
     | 
    
         
             
                # Get latest price target consensus.
         
     | 
| 
       3764 
4223 
     | 
    
         
             
                # @param symbol [String] Symbol of the company: AAPL.
         
     | 
| 
         @@ -5273,6 +5732,77 @@ module FinnhubRuby 
     | 
|
| 
       5273 
5732 
     | 
    
         
             
                  return data, status_code, headers
         
     | 
| 
       5274 
5733 
     | 
    
         
             
                end
         
     | 
| 
       5275 
5734 
     | 
    
         | 
| 
      
 5735 
     | 
    
         
            +
                # Symbol Change
         
     | 
| 
      
 5736 
     | 
    
         
            +
                # Get a list of symbol changes for US-listed and EU-listed securities. Limit to 2000 events at a time.
         
     | 
| 
      
 5737 
     | 
    
         
            +
                # @param from [String] From date <code>YYYY-MM-DD</code>.
         
     | 
| 
      
 5738 
     | 
    
         
            +
                # @param to [String] To date <code>YYYY-MM-DD</code>.
         
     | 
| 
      
 5739 
     | 
    
         
            +
                # @param [Hash] opts the optional parameters
         
     | 
| 
      
 5740 
     | 
    
         
            +
                # @return [SymbolChange]
         
     | 
| 
      
 5741 
     | 
    
         
            +
                def symbol_change(from, to, opts = {})
         
     | 
| 
      
 5742 
     | 
    
         
            +
                  data, _status_code, _headers = symbol_change_with_http_info(from, to, opts)
         
     | 
| 
      
 5743 
     | 
    
         
            +
                  data
         
     | 
| 
      
 5744 
     | 
    
         
            +
                end
         
     | 
| 
      
 5745 
     | 
    
         
            +
             
     | 
| 
      
 5746 
     | 
    
         
            +
                # Symbol Change
         
     | 
| 
      
 5747 
     | 
    
         
            +
                # Get a list of symbol changes for US-listed and EU-listed securities. Limit to 2000 events at a time.
         
     | 
| 
      
 5748 
     | 
    
         
            +
                # @param from [String] From date <code>YYYY-MM-DD</code>.
         
     | 
| 
      
 5749 
     | 
    
         
            +
                # @param to [String] To date <code>YYYY-MM-DD</code>.
         
     | 
| 
      
 5750 
     | 
    
         
            +
                # @param [Hash] opts the optional parameters
         
     | 
| 
      
 5751 
     | 
    
         
            +
                # @return [Array<(SymbolChange, Integer, Hash)>] SymbolChange data, response status code and response headers
         
     | 
| 
      
 5752 
     | 
    
         
            +
                def symbol_change_with_http_info(from, to, opts = {})
         
     | 
| 
      
 5753 
     | 
    
         
            +
                  if @api_client.config.debugging
         
     | 
| 
      
 5754 
     | 
    
         
            +
                    @api_client.config.logger.debug 'Calling API: DefaultApi.symbol_change ...'
         
     | 
| 
      
 5755 
     | 
    
         
            +
                  end
         
     | 
| 
      
 5756 
     | 
    
         
            +
                  # verify the required parameter 'from' is set
         
     | 
| 
      
 5757 
     | 
    
         
            +
                  if @api_client.config.client_side_validation && from.nil?
         
     | 
| 
      
 5758 
     | 
    
         
            +
                    fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.symbol_change"
         
     | 
| 
      
 5759 
     | 
    
         
            +
                  end
         
     | 
| 
      
 5760 
     | 
    
         
            +
                  # verify the required parameter 'to' is set
         
     | 
| 
      
 5761 
     | 
    
         
            +
                  if @api_client.config.client_side_validation && to.nil?
         
     | 
| 
      
 5762 
     | 
    
         
            +
                    fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.symbol_change"
         
     | 
| 
      
 5763 
     | 
    
         
            +
                  end
         
     | 
| 
      
 5764 
     | 
    
         
            +
                  # resource path
         
     | 
| 
      
 5765 
     | 
    
         
            +
                  local_var_path = '/ca/symbol-change'
         
     | 
| 
      
 5766 
     | 
    
         
            +
             
     | 
| 
      
 5767 
     | 
    
         
            +
                  # query parameters
         
     | 
| 
      
 5768 
     | 
    
         
            +
                  query_params = opts[:query_params] || {}
         
     | 
| 
      
 5769 
     | 
    
         
            +
                  query_params[:'from'] = from
         
     | 
| 
      
 5770 
     | 
    
         
            +
                  query_params[:'to'] = to
         
     | 
| 
      
 5771 
     | 
    
         
            +
             
     | 
| 
      
 5772 
     | 
    
         
            +
                  # header parameters
         
     | 
| 
      
 5773 
     | 
    
         
            +
                  header_params = opts[:header_params] || {}
         
     | 
| 
      
 5774 
     | 
    
         
            +
                  # HTTP header 'Accept' (if needed)
         
     | 
| 
      
 5775 
     | 
    
         
            +
                  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
         
     | 
| 
      
 5776 
     | 
    
         
            +
             
     | 
| 
      
 5777 
     | 
    
         
            +
                  # form parameters
         
     | 
| 
      
 5778 
     | 
    
         
            +
                  form_params = opts[:form_params] || {}
         
     | 
| 
      
 5779 
     | 
    
         
            +
             
     | 
| 
      
 5780 
     | 
    
         
            +
                  # http body (model)
         
     | 
| 
      
 5781 
     | 
    
         
            +
                  post_body = opts[:debug_body]
         
     | 
| 
      
 5782 
     | 
    
         
            +
             
     | 
| 
      
 5783 
     | 
    
         
            +
                  # return_type
         
     | 
| 
      
 5784 
     | 
    
         
            +
                  return_type = opts[:debug_return_type] || 'SymbolChange'
         
     | 
| 
      
 5785 
     | 
    
         
            +
             
     | 
| 
      
 5786 
     | 
    
         
            +
                  # auth_names
         
     | 
| 
      
 5787 
     | 
    
         
            +
                  auth_names = opts[:debug_auth_names] || ['api_key']
         
     | 
| 
      
 5788 
     | 
    
         
            +
             
     | 
| 
      
 5789 
     | 
    
         
            +
                  new_options = opts.merge(
         
     | 
| 
      
 5790 
     | 
    
         
            +
                    :operation => :"DefaultApi.symbol_change",
         
     | 
| 
      
 5791 
     | 
    
         
            +
                    :header_params => header_params,
         
     | 
| 
      
 5792 
     | 
    
         
            +
                    :query_params => query_params,
         
     | 
| 
      
 5793 
     | 
    
         
            +
                    :form_params => form_params,
         
     | 
| 
      
 5794 
     | 
    
         
            +
                    :body => post_body,
         
     | 
| 
      
 5795 
     | 
    
         
            +
                    :auth_names => auth_names,
         
     | 
| 
      
 5796 
     | 
    
         
            +
                    :return_type => return_type
         
     | 
| 
      
 5797 
     | 
    
         
            +
                  )
         
     | 
| 
      
 5798 
     | 
    
         
            +
             
     | 
| 
      
 5799 
     | 
    
         
            +
                  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
         
     | 
| 
      
 5800 
     | 
    
         
            +
                  if @api_client.config.debugging
         
     | 
| 
      
 5801 
     | 
    
         
            +
                    @api_client.config.logger.debug "API called: DefaultApi#symbol_change\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
         
     | 
| 
      
 5802 
     | 
    
         
            +
                  end
         
     | 
| 
      
 5803 
     | 
    
         
            +
                  return data, status_code, headers
         
     | 
| 
      
 5804 
     | 
    
         
            +
                end
         
     | 
| 
      
 5805 
     | 
    
         
            +
             
     | 
| 
       5276 
5806 
     | 
    
         
             
                # Symbol Lookup
         
     | 
| 
       5277 
5807 
     | 
    
         
             
                # Search for best-matching symbols based on your query. You can input anything from symbol, security's name to ISIN and Cusip.
         
     | 
| 
       5278 
5808 
     | 
    
         
             
                # @param q [String] Query text can be symbol, name, isin, or cusip.
         
     |