finnhub_ruby 1.1.11 → 1.1.14
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 +9 -3
- data/docs/DefaultApi.md +240 -8
- data/docs/InsiderSentiments.md +20 -0
- data/docs/InsiderSentimentsData.md +26 -0
- data/docs/StockSymbol.md +7 -1
- data/docs/UsptoPatent.md +34 -0
- data/docs/UsptoPatentResult.md +20 -0
- data/docs/VisaApplication.md +62 -0
- data/docs/VisaApplicationResult.md +20 -0
- data/finnhub_ruby-1.1.11.gem +0 -0
- data/finnhub_ruby-1.1.12.gem +0 -0
- data/finnhub_ruby-1.1.13.gem +0 -0
- data/lib/finnhub_ruby/api/default_api.rb +252 -12
- data/lib/finnhub_ruby/models/insider_sentiments.rb +231 -0
- data/lib/finnhub_ruby/models/insider_sentiments_data.rb +259 -0
- data/lib/finnhub_ruby/models/stock_symbol.rb +34 -4
- data/lib/finnhub_ruby/models/uspto_patent.rb +301 -0
- data/lib/finnhub_ruby/models/uspto_patent_result.rb +231 -0
- data/lib/finnhub_ruby/models/visa_application.rb +439 -0
- data/lib/finnhub_ruby/models/visa_application_result.rb +231 -0
- data/lib/finnhub_ruby/version.rb +1 -1
- data/lib/finnhub_ruby.rb +6 -0
- data/spec/models/insider_sentiments_data_spec.rb +58 -0
- data/spec/models/insider_sentiments_spec.rb +40 -0
- data/spec/models/uspto_patent_result_spec.rb +40 -0
- data/spec/models/uspto_patent_spec.rb +82 -0
- data/spec/models/visa_application_result_spec.rb +40 -0
- data/spec/models/visa_application_spec.rb +166 -0
- metadata +29 -2
@@ -1676,6 +1676,7 @@ module FinnhubRuby
|
|
1676
1676
|
# @option opts [String] :symbol ETF symbol.
|
1677
1677
|
# @option opts [String] :isin ETF isin.
|
1678
1678
|
# @option opts [Integer] :skip Skip the first n results. You can use this parameter to query historical constituents data. The latest result is returned if skip=0 or not set.
|
1679
|
+
# @option opts [String] :date Query holdings by date. You can use either this param or <code>skip</code> param, not both.
|
1679
1680
|
# @return [ETFsHoldings]
|
1680
1681
|
def etfs_holdings(opts = {})
|
1681
1682
|
data, _status_code, _headers = etfs_holdings_with_http_info(opts)
|
@@ -1688,6 +1689,7 @@ module FinnhubRuby
|
|
1688
1689
|
# @option opts [String] :symbol ETF symbol.
|
1689
1690
|
# @option opts [String] :isin ETF isin.
|
1690
1691
|
# @option opts [Integer] :skip Skip the first n results. You can use this parameter to query historical constituents data. The latest result is returned if skip=0 or not set.
|
1692
|
+
# @option opts [String] :date Query holdings by date. You can use either this param or <code>skip</code> param, not both.
|
1691
1693
|
# @return [Array<(ETFsHoldings, Integer, Hash)>] ETFsHoldings data, response status code and response headers
|
1692
1694
|
def etfs_holdings_with_http_info(opts = {})
|
1693
1695
|
if @api_client.config.debugging
|
@@ -1701,6 +1703,7 @@ module FinnhubRuby
|
|
1701
1703
|
query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil?
|
1702
1704
|
query_params[:'isin'] = opts[:'isin'] if !opts[:'isin'].nil?
|
1703
1705
|
query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
|
1706
|
+
query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil?
|
1704
1707
|
|
1705
1708
|
# header parameters
|
1706
1709
|
header_params = opts[:header_params] || {}
|
@@ -2352,6 +2355,7 @@ module FinnhubRuby
|
|
2352
2355
|
# Get rates for all forex pairs. Ideal for currency conversion
|
2353
2356
|
# @param [Hash] opts the optional parameters
|
2354
2357
|
# @option opts [String] :base Base currency. Default to EUR.
|
2358
|
+
# @option opts [String] :date Date. Leave blank to get the latest data.
|
2355
2359
|
# @return [Forexrates]
|
2356
2360
|
def forex_rates(opts = {})
|
2357
2361
|
data, _status_code, _headers = forex_rates_with_http_info(opts)
|
@@ -2362,6 +2366,7 @@ module FinnhubRuby
|
|
2362
2366
|
# Get rates for all forex pairs. Ideal for currency conversion
|
2363
2367
|
# @param [Hash] opts the optional parameters
|
2364
2368
|
# @option opts [String] :base Base currency. Default to EUR.
|
2369
|
+
# @option opts [String] :date Date. Leave blank to get the latest data.
|
2365
2370
|
# @return [Array<(Forexrates, Integer, Hash)>] Forexrates data, response status code and response headers
|
2366
2371
|
def forex_rates_with_http_info(opts = {})
|
2367
2372
|
if @api_client.config.debugging
|
@@ -2373,6 +2378,7 @@ module FinnhubRuby
|
|
2373
2378
|
# query parameters
|
2374
2379
|
query_params = opts[:query_params] || {}
|
2375
2380
|
query_params[:'base'] = opts[:'base'] if !opts[:'base'].nil?
|
2381
|
+
query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil?
|
2376
2382
|
|
2377
2383
|
# header parameters
|
2378
2384
|
header_params = opts[:header_params] || {}
|
@@ -2604,7 +2610,7 @@ module FinnhubRuby
|
|
2604
2610
|
end
|
2605
2611
|
|
2606
2612
|
# Indices Historical Constituents
|
2607
|
-
# Get full history of index's constituents including symbols and dates of joining and leaving the Index. Currently support <code>^GSPC
|
2613
|
+
# Get full history of index's constituents including symbols and dates of joining and leaving the Index. Currently support <code>^GSPC</code>, <code>^NDX</code>, <code>^DJI</code>
|
2608
2614
|
# @param symbol [String] symbol
|
2609
2615
|
# @param [Hash] opts the optional parameters
|
2610
2616
|
# @return [IndicesHistoricalConstituents]
|
@@ -2614,7 +2620,7 @@ module FinnhubRuby
|
|
2614
2620
|
end
|
2615
2621
|
|
2616
2622
|
# Indices Historical Constituents
|
2617
|
-
# Get full history of index's constituents including symbols and dates of joining and leaving the Index. Currently support <code>^GSPC
|
2623
|
+
# Get full history of index's constituents including symbols and dates of joining and leaving the Index. Currently support <code>^GSPC</code>, <code>^NDX</code>, <code>^DJI</code>
|
2618
2624
|
# @param symbol [String] symbol
|
2619
2625
|
# @param [Hash] opts the optional parameters
|
2620
2626
|
# @return [Array<(IndicesHistoricalConstituents, Integer, Hash)>] IndicesHistoricalConstituents data, response status code and response headers
|
@@ -2667,6 +2673,84 @@ module FinnhubRuby
|
|
2667
2673
|
return data, status_code, headers
|
2668
2674
|
end
|
2669
2675
|
|
2676
|
+
# Insider Sentiment
|
2677
|
+
# Get insider sentiment data for US companies calculated using method discussed <a href=\"https://medium.com/@stock-api/finnhub-insiders-sentiment-analysis-cc43f9f64b3a\" target=\"_blank\">here</a>. The MSPR ranges from -100 for the most negative to 100 for the most positive which can signal price changes in the coming 30-90 days.
|
2678
|
+
# @param symbol [String] Symbol of the company: AAPL.
|
2679
|
+
# @param from [Date] From date: 2020-03-15.
|
2680
|
+
# @param to [Date] To date: 2020-03-16.
|
2681
|
+
# @param [Hash] opts the optional parameters
|
2682
|
+
# @return [InsiderSentiments]
|
2683
|
+
def insider_sentiment(symbol, from, to, opts = {})
|
2684
|
+
data, _status_code, _headers = insider_sentiment_with_http_info(symbol, from, to, opts)
|
2685
|
+
data
|
2686
|
+
end
|
2687
|
+
|
2688
|
+
# Insider Sentiment
|
2689
|
+
# Get insider sentiment data for US companies calculated using method discussed <a href=\"https://medium.com/@stock-api/finnhub-insiders-sentiment-analysis-cc43f9f64b3a\" target=\"_blank\">here</a>. The MSPR ranges from -100 for the most negative to 100 for the most positive which can signal price changes in the coming 30-90 days.
|
2690
|
+
# @param symbol [String] Symbol of the company: AAPL.
|
2691
|
+
# @param from [Date] From date: 2020-03-15.
|
2692
|
+
# @param to [Date] To date: 2020-03-16.
|
2693
|
+
# @param [Hash] opts the optional parameters
|
2694
|
+
# @return [Array<(InsiderSentiments, Integer, Hash)>] InsiderSentiments data, response status code and response headers
|
2695
|
+
def insider_sentiment_with_http_info(symbol, from, to, opts = {})
|
2696
|
+
if @api_client.config.debugging
|
2697
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.insider_sentiment ...'
|
2698
|
+
end
|
2699
|
+
# verify the required parameter 'symbol' is set
|
2700
|
+
if @api_client.config.client_side_validation && symbol.nil?
|
2701
|
+
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.insider_sentiment"
|
2702
|
+
end
|
2703
|
+
# verify the required parameter 'from' is set
|
2704
|
+
if @api_client.config.client_side_validation && from.nil?
|
2705
|
+
fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.insider_sentiment"
|
2706
|
+
end
|
2707
|
+
# verify the required parameter 'to' is set
|
2708
|
+
if @api_client.config.client_side_validation && to.nil?
|
2709
|
+
fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.insider_sentiment"
|
2710
|
+
end
|
2711
|
+
# resource path
|
2712
|
+
local_var_path = '/stock/insider-sentiment'
|
2713
|
+
|
2714
|
+
# query parameters
|
2715
|
+
query_params = opts[:query_params] || {}
|
2716
|
+
query_params[:'symbol'] = symbol
|
2717
|
+
query_params[:'from'] = from
|
2718
|
+
query_params[:'to'] = to
|
2719
|
+
|
2720
|
+
# header parameters
|
2721
|
+
header_params = opts[:header_params] || {}
|
2722
|
+
# HTTP header 'Accept' (if needed)
|
2723
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2724
|
+
|
2725
|
+
# form parameters
|
2726
|
+
form_params = opts[:form_params] || {}
|
2727
|
+
|
2728
|
+
# http body (model)
|
2729
|
+
post_body = opts[:debug_body]
|
2730
|
+
|
2731
|
+
# return_type
|
2732
|
+
return_type = opts[:debug_return_type] || 'InsiderSentiments'
|
2733
|
+
|
2734
|
+
# auth_names
|
2735
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
2736
|
+
|
2737
|
+
new_options = opts.merge(
|
2738
|
+
:operation => :"DefaultApi.insider_sentiment",
|
2739
|
+
:header_params => header_params,
|
2740
|
+
:query_params => query_params,
|
2741
|
+
:form_params => form_params,
|
2742
|
+
:body => post_body,
|
2743
|
+
:auth_names => auth_names,
|
2744
|
+
:return_type => return_type
|
2745
|
+
)
|
2746
|
+
|
2747
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2748
|
+
if @api_client.config.debugging
|
2749
|
+
@api_client.config.logger.debug "API called: DefaultApi#insider_sentiment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2750
|
+
end
|
2751
|
+
return data, status_code, headers
|
2752
|
+
end
|
2753
|
+
|
2670
2754
|
# Insider Transactions
|
2671
2755
|
# Company insider transactions data sourced from <code>Form 3,4,5</code>. This endpoint only covers US companies at the moment. Limit to 100 transactions per API call.
|
2672
2756
|
# @param symbol [String] Symbol of the company: AAPL. Leave this param blank to get the latest transactions.
|
@@ -2738,7 +2822,7 @@ module FinnhubRuby
|
|
2738
2822
|
end
|
2739
2823
|
|
2740
2824
|
# International Filings
|
2741
|
-
# List filings for international companies
|
2825
|
+
# List filings for international companies. Limit to 250 documents at a time. These are the documents we use to source our fundamental data.
|
2742
2826
|
# @param [Hash] opts the optional parameters
|
2743
2827
|
# @option opts [String] :symbol Symbol. Leave empty to list latest filings.
|
2744
2828
|
# @option opts [String] :country Filter by country using country's 2-letter code.
|
@@ -2749,7 +2833,7 @@ module FinnhubRuby
|
|
2749
2833
|
end
|
2750
2834
|
|
2751
2835
|
# International Filings
|
2752
|
-
# List filings for international companies
|
2836
|
+
# List filings for international companies. Limit to 250 documents at a time. These are the documents we use to source our fundamental data.
|
2753
2837
|
# @param [Hash] opts the optional parameters
|
2754
2838
|
# @option opts [String] :symbol Symbol. Leave empty to list latest filings.
|
2755
2839
|
# @option opts [String] :country Filter by country using country's 2-letter code.
|
@@ -4377,7 +4461,7 @@ module FinnhubRuby
|
|
4377
4461
|
end
|
4378
4462
|
|
4379
4463
|
# Stock Symbol
|
4380
|
-
# List supported stocks. We use the following symbology to identify stocks on Finnhub <code>Exchange_Ticker.Exchange_Code</code>. A list of supported exchange codes can be found <a href=\"https://docs.google.com/spreadsheets/d/1I3pBxjfXB056-g_JYf_6o3Rns3BV2kMGG1nCatb91ls/edit?usp=sharing\" target=\"_blank\">here</a>.
|
4464
|
+
# List supported stocks. We use the following symbology to identify stocks on Finnhub <code>Exchange_Ticker.Exchange_Code</code>. A list of supported exchange codes can be found <a href=\"https://docs.google.com/spreadsheets/d/1I3pBxjfXB056-g_JYf_6o3Rns3BV2kMGG1nCatb91ls/edit?usp=sharing\" target=\"_blank\">here</a>.
|
4381
4465
|
# @param exchange [String] Exchange you want to get the list of symbols from. List of exchange codes can be found <a href=\"https://docs.google.com/spreadsheets/d/1I3pBxjfXB056-g_JYf_6o3Rns3BV2kMGG1nCatb91ls/edit?usp=sharing\" target=\"_blank\">here</a>.
|
4382
4466
|
# @param [Hash] opts the optional parameters
|
4383
4467
|
# @option opts [String] :mic Filter by MIC code.
|
@@ -4390,7 +4474,7 @@ module FinnhubRuby
|
|
4390
4474
|
end
|
4391
4475
|
|
4392
4476
|
# Stock Symbol
|
4393
|
-
# List supported stocks. We use the following symbology to identify stocks on Finnhub <code>Exchange_Ticker.Exchange_Code</code>. A list of supported exchange codes can be found <a href=\"https://docs.google.com/spreadsheets/d/1I3pBxjfXB056-g_JYf_6o3Rns3BV2kMGG1nCatb91ls/edit?usp=sharing\" target=\"_blank\">here</a>.
|
4477
|
+
# List supported stocks. We use the following symbology to identify stocks on Finnhub <code>Exchange_Ticker.Exchange_Code</code>. A list of supported exchange codes can be found <a href=\"https://docs.google.com/spreadsheets/d/1I3pBxjfXB056-g_JYf_6o3Rns3BV2kMGG1nCatb91ls/edit?usp=sharing\" target=\"_blank\">here</a>.
|
4394
4478
|
# @param exchange [String] Exchange you want to get the list of symbols from. List of exchange codes can be found <a href=\"https://docs.google.com/spreadsheets/d/1I3pBxjfXB056-g_JYf_6o3Rns3BV2kMGG1nCatb91ls/edit?usp=sharing\" target=\"_blank\">here</a>.
|
4395
4479
|
# @param [Hash] opts the optional parameters
|
4396
4480
|
# @option opts [String] :mic Filter by MIC code.
|
@@ -4450,7 +4534,7 @@ module FinnhubRuby
|
|
4450
4534
|
end
|
4451
4535
|
|
4452
4536
|
# Tick Data
|
4453
|
-
# <p>Get historical tick data for global exchanges. You can send the request directly to our tick server at <a href=\"https://tick.finnhub.io/\">https://tick.finnhub.io/</a> with the same path and parameters or get redirected there if you call our main server.</p><p>For US market, you can visit our bulk download page in the Dashboard <a target=\"_blank\" href=\"/dashboard/download\",>here</a> to speed up the download process.</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 CTA/UTP</th> <td>Full SIP</td> <td>15 minute</td> </tr> <tr> <td class=\"text-blue\">TSX</th> <td><ul><li>TSX</li><li>TSX Venture</li><li>Index</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">LSE</th> <td><ul><li>London Stock Exchange (L)</li><li>LSE International (L)</li><li>LSE European (L)</li></ul></td> <td>15 minute</td> </tr> <tr> <td class=\"text-blue\">Euronext</th> <td><ul> <li>Euronext Paris (PA)</li> <li>Euronext Amsterdam (AS)</li> <li>Euronext Lisbon (LS)</li> <li>Euronext Brussels (BR)</li> <li>Euronext Oslo (OL)</li> <li>Euronext London (LN)</li> <li>Euronext Dublin (IR)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">Deutsche Börse</th> <td><ul> <li>Frankfurt (F)</li> <li>Xetra (DE)</li> <li>Duesseldorf (DU)</li> <li>Hamburg (HM)</li> <li>Berlin (BE)</li> <li>Hanover (HA)</li> <li>Stoxx (SX)</li> <li>TradeGate (TG)</li> <li>Zertifikate (SC)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr>
|
4537
|
+
# <p>Get historical tick data for global exchanges. You can send the request directly to our tick server at <a href=\"https://tick.finnhub.io/\">https://tick.finnhub.io/</a> with the same path and parameters or get redirected there if you call our main server.</p><p>For US market, you can visit our bulk download page in the Dashboard <a target=\"_blank\" href=\"/dashboard/download\",>here</a> to speed up the download process.</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 CTA/UTP</th> <td>Full SIP</td> <td>15 minute</td> </tr> <tr> <td class=\"text-blue\">TSX</th> <td><ul><li>TSX</li><li>TSX Venture</li><li>Index</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">LSE</th> <td><ul><li>London Stock Exchange (L)</li><li>LSE International (L)</li><li>LSE European (L)</li></ul></td> <td>15 minute</td> </tr> <tr> <td class=\"text-blue\">Euronext</th> <td><ul> <li>Euronext Paris (PA)</li> <li>Euronext Amsterdam (AS)</li> <li>Euronext Lisbon (LS)</li> <li>Euronext Brussels (BR)</li> <li>Euronext Oslo (OL)</li> <li>Euronext London (LN)</li> <li>Euronext Dublin (IR)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">Deutsche Börse</th> <td><ul> <li>Frankfurt (F)</li> <li>Xetra (DE)</li> <li>Duesseldorf (DU)</li> <li>Hamburg (HM)</li> <li>Berlin (BE)</li> <li>Hanover (HA)</li> <li>Stoxx (SX)</li> <li>TradeGate (TG)</li> <li>Zertifikate (SC)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr> </tbody> </table>
|
4454
4538
|
# @param symbol [String] Symbol.
|
4455
4539
|
# @param date [Date] Date: 2020-04-02.
|
4456
4540
|
# @param limit [Integer] Limit number of ticks returned. Maximum value: <code>25000</code>
|
@@ -4463,7 +4547,7 @@ module FinnhubRuby
|
|
4463
4547
|
end
|
4464
4548
|
|
4465
4549
|
# Tick Data
|
4466
|
-
# <p>Get historical tick data for global exchanges. You can send the request directly to our tick server at <a href=\"https://tick.finnhub.io/\">https://tick.finnhub.io/</a> with the same path and parameters or get redirected there if you call our main server.</p><p>For US market, you can visit our bulk download page in the Dashboard <a target=\"_blank\" href=\"/dashboard/download\",>here</a> to speed up the download process.</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 CTA/UTP</th> <td>Full SIP</td> <td>15 minute</td> </tr> <tr> <td class=\"text-blue\">TSX</th> <td><ul><li>TSX</li><li>TSX Venture</li><li>Index</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">LSE</th> <td><ul><li>London Stock Exchange (L)</li><li>LSE International (L)</li><li>LSE European (L)</li></ul></td> <td>15 minute</td> </tr> <tr> <td class=\"text-blue\">Euronext</th> <td><ul> <li>Euronext Paris (PA)</li> <li>Euronext Amsterdam (AS)</li> <li>Euronext Lisbon (LS)</li> <li>Euronext Brussels (BR)</li> <li>Euronext Oslo (OL)</li> <li>Euronext London (LN)</li> <li>Euronext Dublin (IR)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">Deutsche Börse</th> <td><ul> <li>Frankfurt (F)</li> <li>Xetra (DE)</li> <li>Duesseldorf (DU)</li> <li>Hamburg (HM)</li> <li>Berlin (BE)</li> <li>Hanover (HA)</li> <li>Stoxx (SX)</li> <li>TradeGate (TG)</li> <li>Zertifikate (SC)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr>
|
4550
|
+
# <p>Get historical tick data for global exchanges. You can send the request directly to our tick server at <a href=\"https://tick.finnhub.io/\">https://tick.finnhub.io/</a> with the same path and parameters or get redirected there if you call our main server.</p><p>For US market, you can visit our bulk download page in the Dashboard <a target=\"_blank\" href=\"/dashboard/download\",>here</a> to speed up the download process.</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 CTA/UTP</th> <td>Full SIP</td> <td>15 minute</td> </tr> <tr> <td class=\"text-blue\">TSX</th> <td><ul><li>TSX</li><li>TSX Venture</li><li>Index</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">LSE</th> <td><ul><li>London Stock Exchange (L)</li><li>LSE International (L)</li><li>LSE European (L)</li></ul></td> <td>15 minute</td> </tr> <tr> <td class=\"text-blue\">Euronext</th> <td><ul> <li>Euronext Paris (PA)</li> <li>Euronext Amsterdam (AS)</li> <li>Euronext Lisbon (LS)</li> <li>Euronext Brussels (BR)</li> <li>Euronext Oslo (OL)</li> <li>Euronext London (LN)</li> <li>Euronext Dublin (IR)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">Deutsche Börse</th> <td><ul> <li>Frankfurt (F)</li> <li>Xetra (DE)</li> <li>Duesseldorf (DU)</li> <li>Hamburg (HM)</li> <li>Berlin (BE)</li> <li>Hanover (HA)</li> <li>Stoxx (SX)</li> <li>TradeGate (TG)</li> <li>Zertifikate (SC)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr> </tbody> </table>
|
4467
4551
|
# @param symbol [String] Symbol.
|
4468
4552
|
# @param date [Date] Date: 2020-04-02.
|
4469
4553
|
# @param limit [Integer] Limit number of ticks returned. Maximum value: <code>25000</code>
|
@@ -4534,8 +4618,164 @@ module FinnhubRuby
|
|
4534
4618
|
return data, status_code, headers
|
4535
4619
|
end
|
4536
4620
|
|
4621
|
+
# USPTO Patents
|
4622
|
+
# List USPTO patents for companies. Limit to 250 records per API call.
|
4623
|
+
# @param symbol [String] Symbol.
|
4624
|
+
# @param from [Date] From date <code>YYYY-MM-DD</code>.
|
4625
|
+
# @param to [Date] To date <code>YYYY-MM-DD</code>.
|
4626
|
+
# @param [Hash] opts the optional parameters
|
4627
|
+
# @return [UsptoPatentResult]
|
4628
|
+
def stock_uspto_patent(symbol, from, to, opts = {})
|
4629
|
+
data, _status_code, _headers = stock_uspto_patent_with_http_info(symbol, from, to, opts)
|
4630
|
+
data
|
4631
|
+
end
|
4632
|
+
|
4633
|
+
# USPTO Patents
|
4634
|
+
# List USPTO patents for companies. Limit to 250 records per API call.
|
4635
|
+
# @param symbol [String] Symbol.
|
4636
|
+
# @param from [Date] From date <code>YYYY-MM-DD</code>.
|
4637
|
+
# @param to [Date] To date <code>YYYY-MM-DD</code>.
|
4638
|
+
# @param [Hash] opts the optional parameters
|
4639
|
+
# @return [Array<(UsptoPatentResult, Integer, Hash)>] UsptoPatentResult data, response status code and response headers
|
4640
|
+
def stock_uspto_patent_with_http_info(symbol, from, to, opts = {})
|
4641
|
+
if @api_client.config.debugging
|
4642
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.stock_uspto_patent ...'
|
4643
|
+
end
|
4644
|
+
# verify the required parameter 'symbol' is set
|
4645
|
+
if @api_client.config.client_side_validation && symbol.nil?
|
4646
|
+
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.stock_uspto_patent"
|
4647
|
+
end
|
4648
|
+
# verify the required parameter 'from' is set
|
4649
|
+
if @api_client.config.client_side_validation && from.nil?
|
4650
|
+
fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.stock_uspto_patent"
|
4651
|
+
end
|
4652
|
+
# verify the required parameter 'to' is set
|
4653
|
+
if @api_client.config.client_side_validation && to.nil?
|
4654
|
+
fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.stock_uspto_patent"
|
4655
|
+
end
|
4656
|
+
# resource path
|
4657
|
+
local_var_path = '/stock/uspto-patent'
|
4658
|
+
|
4659
|
+
# query parameters
|
4660
|
+
query_params = opts[:query_params] || {}
|
4661
|
+
query_params[:'symbol'] = symbol
|
4662
|
+
query_params[:'from'] = from
|
4663
|
+
query_params[:'to'] = to
|
4664
|
+
|
4665
|
+
# header parameters
|
4666
|
+
header_params = opts[:header_params] || {}
|
4667
|
+
# HTTP header 'Accept' (if needed)
|
4668
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
4669
|
+
|
4670
|
+
# form parameters
|
4671
|
+
form_params = opts[:form_params] || {}
|
4672
|
+
|
4673
|
+
# http body (model)
|
4674
|
+
post_body = opts[:debug_body]
|
4675
|
+
|
4676
|
+
# return_type
|
4677
|
+
return_type = opts[:debug_return_type] || 'UsptoPatentResult'
|
4678
|
+
|
4679
|
+
# auth_names
|
4680
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
4681
|
+
|
4682
|
+
new_options = opts.merge(
|
4683
|
+
:operation => :"DefaultApi.stock_uspto_patent",
|
4684
|
+
:header_params => header_params,
|
4685
|
+
:query_params => query_params,
|
4686
|
+
:form_params => form_params,
|
4687
|
+
:body => post_body,
|
4688
|
+
:auth_names => auth_names,
|
4689
|
+
:return_type => return_type
|
4690
|
+
)
|
4691
|
+
|
4692
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
4693
|
+
if @api_client.config.debugging
|
4694
|
+
@api_client.config.logger.debug "API called: DefaultApi#stock_uspto_patent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
4695
|
+
end
|
4696
|
+
return data, status_code, headers
|
4697
|
+
end
|
4698
|
+
|
4699
|
+
# H1-B Visa Application
|
4700
|
+
# Get a list of H1-B and Permanent visa applications for companies from the DOL. The data is updated quarterly.
|
4701
|
+
# @param symbol [String] Symbol.
|
4702
|
+
# @param from [Date] From date <code>YYYY-MM-DD</code>. Filter on the <code>beginDate</code> column.
|
4703
|
+
# @param to [Date] To date <code>YYYY-MM-DD</code>. Filter on the <code>beginDate</code> column.
|
4704
|
+
# @param [Hash] opts the optional parameters
|
4705
|
+
# @return [VisaApplicationResult]
|
4706
|
+
def stock_visa_application(symbol, from, to, opts = {})
|
4707
|
+
data, _status_code, _headers = stock_visa_application_with_http_info(symbol, from, to, opts)
|
4708
|
+
data
|
4709
|
+
end
|
4710
|
+
|
4711
|
+
# H1-B Visa Application
|
4712
|
+
# Get a list of H1-B and Permanent visa applications for companies from the DOL. The data is updated quarterly.
|
4713
|
+
# @param symbol [String] Symbol.
|
4714
|
+
# @param from [Date] From date <code>YYYY-MM-DD</code>. Filter on the <code>beginDate</code> column.
|
4715
|
+
# @param to [Date] To date <code>YYYY-MM-DD</code>. Filter on the <code>beginDate</code> column.
|
4716
|
+
# @param [Hash] opts the optional parameters
|
4717
|
+
# @return [Array<(VisaApplicationResult, Integer, Hash)>] VisaApplicationResult data, response status code and response headers
|
4718
|
+
def stock_visa_application_with_http_info(symbol, from, to, opts = {})
|
4719
|
+
if @api_client.config.debugging
|
4720
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.stock_visa_application ...'
|
4721
|
+
end
|
4722
|
+
# verify the required parameter 'symbol' is set
|
4723
|
+
if @api_client.config.client_side_validation && symbol.nil?
|
4724
|
+
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.stock_visa_application"
|
4725
|
+
end
|
4726
|
+
# verify the required parameter 'from' is set
|
4727
|
+
if @api_client.config.client_side_validation && from.nil?
|
4728
|
+
fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.stock_visa_application"
|
4729
|
+
end
|
4730
|
+
# verify the required parameter 'to' is set
|
4731
|
+
if @api_client.config.client_side_validation && to.nil?
|
4732
|
+
fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.stock_visa_application"
|
4733
|
+
end
|
4734
|
+
# resource path
|
4735
|
+
local_var_path = '/stock/visa-application'
|
4736
|
+
|
4737
|
+
# query parameters
|
4738
|
+
query_params = opts[:query_params] || {}
|
4739
|
+
query_params[:'symbol'] = symbol
|
4740
|
+
query_params[:'from'] = from
|
4741
|
+
query_params[:'to'] = to
|
4742
|
+
|
4743
|
+
# header parameters
|
4744
|
+
header_params = opts[:header_params] || {}
|
4745
|
+
# HTTP header 'Accept' (if needed)
|
4746
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
4747
|
+
|
4748
|
+
# form parameters
|
4749
|
+
form_params = opts[:form_params] || {}
|
4750
|
+
|
4751
|
+
# http body (model)
|
4752
|
+
post_body = opts[:debug_body]
|
4753
|
+
|
4754
|
+
# return_type
|
4755
|
+
return_type = opts[:debug_return_type] || 'VisaApplicationResult'
|
4756
|
+
|
4757
|
+
# auth_names
|
4758
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
4759
|
+
|
4760
|
+
new_options = opts.merge(
|
4761
|
+
:operation => :"DefaultApi.stock_visa_application",
|
4762
|
+
:header_params => header_params,
|
4763
|
+
:query_params => query_params,
|
4764
|
+
:form_params => form_params,
|
4765
|
+
:body => post_body,
|
4766
|
+
:auth_names => auth_names,
|
4767
|
+
:return_type => return_type
|
4768
|
+
)
|
4769
|
+
|
4770
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
4771
|
+
if @api_client.config.debugging
|
4772
|
+
@api_client.config.logger.debug "API called: DefaultApi#stock_visa_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
4773
|
+
end
|
4774
|
+
return data, status_code, headers
|
4775
|
+
end
|
4776
|
+
|
4537
4777
|
# Supply Chain Relationships
|
4538
|
-
# <p>This endpoint provides an overall map of public companies' key customers and suppliers. The data offers a deeper look into a company's supply chain and how products are created. The data will help investors manage risk, limit exposure or generate alpha-generating ideas and trading insights.</p
|
4778
|
+
# <p>This endpoint provides an overall map of public companies' key customers and suppliers. The data offers a deeper look into a company's supply chain and how products are created. The data will help investors manage risk, limit exposure or generate alpha-generating ideas and trading insights.</p>
|
4539
4779
|
# @param symbol [String] Symbol.
|
4540
4780
|
# @param [Hash] opts the optional parameters
|
4541
4781
|
# @return [SupplyChainRelationships]
|
@@ -4545,7 +4785,7 @@ module FinnhubRuby
|
|
4545
4785
|
end
|
4546
4786
|
|
4547
4787
|
# Supply Chain Relationships
|
4548
|
-
# <p>This endpoint provides an overall map of public companies' key customers and suppliers. The data offers a deeper look into a company's supply chain and how products are created. The data will help investors manage risk, limit exposure or generate alpha-generating ideas and trading insights.</p>
|
4788
|
+
# <p>This endpoint provides an overall map of public companies' key customers and suppliers. The data offers a deeper look into a company's supply chain and how products are created. The data will help investors manage risk, limit exposure or generate alpha-generating ideas and trading insights.</p>
|
4549
4789
|
# @param symbol [String] Symbol.
|
4550
4790
|
# @param [Hash] opts the optional parameters
|
4551
4791
|
# @return [Array<(SupplyChainRelationships, Integer, Hash)>] SupplyChainRelationships data, response status code and response headers
|
@@ -4894,7 +5134,7 @@ module FinnhubRuby
|
|
4894
5134
|
end
|
4895
5135
|
|
4896
5136
|
# Earnings Call Transcripts List
|
4897
|
-
# List earnings call transcripts' metadata. This endpoint is available for US, UK and Canadian companies.
|
5137
|
+
# List earnings call transcripts' metadata. This endpoint is available for US, UK, European, Australian and Canadian companies.
|
4898
5138
|
# @param symbol [String] Company symbol: AAPL. Leave empty to list the latest transcripts
|
4899
5139
|
# @param [Hash] opts the optional parameters
|
4900
5140
|
# @return [EarningsCallTranscriptsList]
|
@@ -4904,7 +5144,7 @@ module FinnhubRuby
|
|
4904
5144
|
end
|
4905
5145
|
|
4906
5146
|
# Earnings Call Transcripts List
|
4907
|
-
# List earnings call transcripts' metadata. This endpoint is available for US, UK and Canadian companies.
|
5147
|
+
# List earnings call transcripts' metadata. This endpoint is available for US, UK, European, Australian and Canadian companies.
|
4908
5148
|
# @param symbol [String] Company symbol: AAPL. Leave empty to list the latest transcripts
|
4909
5149
|
# @param [Hash] opts the optional parameters
|
4910
5150
|
# @return [Array<(EarningsCallTranscriptsList, Integer, Hash)>] EarningsCallTranscriptsList data, response status code and response headers
|
@@ -0,0 +1,231 @@
|
|
1
|
+
=begin
|
2
|
+
#Finnhub API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.2.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module FinnhubRuby
|
17
|
+
class InsiderSentiments
|
18
|
+
# Symbol of the company.
|
19
|
+
attr_accessor :symbol
|
20
|
+
|
21
|
+
# Array of sentiment data.
|
22
|
+
attr_accessor :data
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'symbol' => :'symbol',
|
28
|
+
:'data' => :'data'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Returns all the JSON keys this model knows about
|
33
|
+
def self.acceptable_attributes
|
34
|
+
attribute_map.values
|
35
|
+
end
|
36
|
+
|
37
|
+
# Attribute type mapping.
|
38
|
+
def self.openapi_types
|
39
|
+
{
|
40
|
+
:'symbol' => :'String',
|
41
|
+
:'data' => :'Array<InsiderSentimentsData>'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# List of attributes with nullable: true
|
46
|
+
def self.openapi_nullable
|
47
|
+
Set.new([
|
48
|
+
])
|
49
|
+
end
|
50
|
+
|
51
|
+
# Initializes the object
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
53
|
+
def initialize(attributes = {})
|
54
|
+
if (!attributes.is_a?(Hash))
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FinnhubRuby::InsiderSentiments` initialize method"
|
56
|
+
end
|
57
|
+
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
60
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FinnhubRuby::InsiderSentiments`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
62
|
+
end
|
63
|
+
h[k.to_sym] = v
|
64
|
+
}
|
65
|
+
|
66
|
+
if attributes.key?(:'symbol')
|
67
|
+
self.symbol = attributes[:'symbol']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.key?(:'data')
|
71
|
+
if (value = attributes[:'data']).is_a?(Array)
|
72
|
+
self.data = value
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
78
|
+
# @return Array for valid properties with the reasons
|
79
|
+
def list_invalid_properties
|
80
|
+
invalid_properties = Array.new
|
81
|
+
invalid_properties
|
82
|
+
end
|
83
|
+
|
84
|
+
# Check to see if the all the properties in the model are valid
|
85
|
+
# @return true if the model is valid
|
86
|
+
def valid?
|
87
|
+
true
|
88
|
+
end
|
89
|
+
|
90
|
+
# Checks equality by comparing each attribute.
|
91
|
+
# @param [Object] Object to be compared
|
92
|
+
def ==(o)
|
93
|
+
return true if self.equal?(o)
|
94
|
+
self.class == o.class &&
|
95
|
+
symbol == o.symbol &&
|
96
|
+
data == o.data
|
97
|
+
end
|
98
|
+
|
99
|
+
# @see the `==` method
|
100
|
+
# @param [Object] Object to be compared
|
101
|
+
def eql?(o)
|
102
|
+
self == o
|
103
|
+
end
|
104
|
+
|
105
|
+
# Calculates hash code according to all attributes.
|
106
|
+
# @return [Integer] Hash code
|
107
|
+
def hash
|
108
|
+
[symbol, data].hash
|
109
|
+
end
|
110
|
+
|
111
|
+
# Builds the object from hash
|
112
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
113
|
+
# @return [Object] Returns the model itself
|
114
|
+
def self.build_from_hash(attributes)
|
115
|
+
new.build_from_hash(attributes)
|
116
|
+
end
|
117
|
+
|
118
|
+
# Builds the object from hash
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
120
|
+
# @return [Object] Returns the model itself
|
121
|
+
def build_from_hash(attributes)
|
122
|
+
return nil unless attributes.is_a?(Hash)
|
123
|
+
self.class.openapi_types.each_pair do |key, type|
|
124
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
125
|
+
self.send("#{key}=", nil)
|
126
|
+
elsif type =~ /\AArray<(.*)>/i
|
127
|
+
# check to ensure the input is an array given that the attribute
|
128
|
+
# is documented as an array but the input is not
|
129
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
130
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
131
|
+
end
|
132
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
133
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
self
|
138
|
+
end
|
139
|
+
|
140
|
+
# Deserializes the data based on type
|
141
|
+
# @param string type Data type
|
142
|
+
# @param string value Value to be deserialized
|
143
|
+
# @return [Object] Deserialized data
|
144
|
+
def _deserialize(type, value)
|
145
|
+
case type.to_sym
|
146
|
+
when :Time
|
147
|
+
Time.parse(value)
|
148
|
+
when :Date
|
149
|
+
Date.parse(value)
|
150
|
+
when :String
|
151
|
+
value.to_s
|
152
|
+
when :Integer
|
153
|
+
value.to_i
|
154
|
+
when :Float
|
155
|
+
value.to_f
|
156
|
+
when :Boolean
|
157
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
158
|
+
true
|
159
|
+
else
|
160
|
+
false
|
161
|
+
end
|
162
|
+
when :Object
|
163
|
+
# generic object (usually a Hash), return directly
|
164
|
+
value
|
165
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
166
|
+
inner_type = Regexp.last_match[:inner_type]
|
167
|
+
value.map { |v| _deserialize(inner_type, v) }
|
168
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
169
|
+
k_type = Regexp.last_match[:k_type]
|
170
|
+
v_type = Regexp.last_match[:v_type]
|
171
|
+
{}.tap do |hash|
|
172
|
+
value.each do |k, v|
|
173
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
174
|
+
end
|
175
|
+
end
|
176
|
+
else # model
|
177
|
+
# models (e.g. Pet) or oneOf
|
178
|
+
klass = FinnhubRuby.const_get(type)
|
179
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
# Returns the string representation of the object
|
184
|
+
# @return [String] String presentation of the object
|
185
|
+
def to_s
|
186
|
+
to_hash.to_s
|
187
|
+
end
|
188
|
+
|
189
|
+
# to_body is an alias to to_hash (backward compatibility)
|
190
|
+
# @return [Hash] Returns the object in the form of hash
|
191
|
+
def to_body
|
192
|
+
to_hash
|
193
|
+
end
|
194
|
+
|
195
|
+
# Returns the object in the form of hash
|
196
|
+
# @return [Hash] Returns the object in the form of hash
|
197
|
+
def to_hash
|
198
|
+
hash = {}
|
199
|
+
self.class.attribute_map.each_pair do |attr, param|
|
200
|
+
value = self.send(attr)
|
201
|
+
if value.nil?
|
202
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
203
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
204
|
+
end
|
205
|
+
|
206
|
+
hash[param] = _to_hash(value)
|
207
|
+
end
|
208
|
+
hash
|
209
|
+
end
|
210
|
+
|
211
|
+
# Outputs non-array value in the form of hash
|
212
|
+
# For object, use to_hash. Otherwise, just return the value
|
213
|
+
# @param [Object] value Any valid value
|
214
|
+
# @return [Hash] Returns the value in the form of hash
|
215
|
+
def _to_hash(value)
|
216
|
+
if value.is_a?(Array)
|
217
|
+
value.compact.map { |v| _to_hash(v) }
|
218
|
+
elsif value.is_a?(Hash)
|
219
|
+
{}.tap do |hash|
|
220
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
221
|
+
end
|
222
|
+
elsif value.respond_to? :to_hash
|
223
|
+
value.to_hash
|
224
|
+
else
|
225
|
+
value
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
end
|
230
|
+
|
231
|
+
end
|