{"id":21618682,"url":"https://github.com/finnhub-stock-api/finnhub-php","last_synced_at":"2025-04-06T04:13:00.631Z","repository":{"id":54404563,"uuid":"275674912","full_name":"Finnhub-Stock-API/finnhub-php","owner":"Finnhub-Stock-API","description":"Finnhub PHP API client. Finnhub API provides institutional-grade financial data to investors, fintech startups and investment firms. We support real-time stock price, global fundamentals and alternative data. https://finnhub.io/docs/api","archived":false,"fork":false,"pushed_at":"2024-11-05T10:52:09.000Z","size":429,"stargazers_count":23,"open_issues_count":6,"forks_count":22,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-06T04:12:52.835Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Finnhub-Stock-API.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-28T21:56:19.000Z","updated_at":"2024-11-05T10:52:14.000Z","dependencies_parsed_at":"2024-06-21T04:20:33.096Z","dependency_job_id":"17cfea40-0e01-4392-9d14-0aba72d1629a","html_url":"https://github.com/Finnhub-Stock-API/finnhub-php","commit_stats":{"total_commits":28,"total_committers":4,"mean_commits":7.0,"dds":0.4642857142857143,"last_synced_commit":"eb509293b7f158c82afcb0ffc42e15737d5c37bf"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Finnhub-Stock-API%2Ffinnhub-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Finnhub-Stock-API%2Ffinnhub-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Finnhub-Stock-API%2Ffinnhub-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Finnhub-Stock-API%2Ffinnhub-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Finnhub-Stock-API","download_url":"https://codeload.github.com/Finnhub-Stock-API/finnhub-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247430878,"owners_count":20937874,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-24T23:06:29.465Z","updated_at":"2025-04-06T04:13:00.437Z","avatar_url":"https://github.com/Finnhub-Stock-API.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Finnhub\n\n- Finnhub php api clent\n- API version: 1.0.0\n- Package version: 1.1.17\n\n## Requirements\n\nPHP 5.5 and later\n\n## Installation \u0026 Usage\n\n### Composer\n\nIn composer.json:\n\n```json\n{\n  \"require\": {\n    \"finnhub/client\": \"1.1.17\"\n  }\n}\n```\n\nThen run `composer install`\n\n## Getting Started\n\n```php\n\u003c?php\n\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n$config = Finnhub\\Configuration::getDefaultConfiguration()-\u003esetApiKey('token', 'YOUR API KEY');\n$client = new Finnhub\\Api\\DefaultApi(\n    new GuzzleHttp\\Client(),\n    $config\n);\n\n// Stock candles\nprint_r($client-\u003estockCandles(\"AAPL\", \"D\", 1590988249, 1591852249));\n\n// Aggregate Indicators\nprint_r($client-\u003eaggregateIndicator(\"AAPL\", \"D\"));\n\n// Basic financials\nprint_r($client-\u003ecompanyBasicFinancials(\"AAPL\", \"margin\"));\n\n// Earnings surprises\nprint_r($client-\u003ecompanyEarnings(\"TSLA\", 5));\n\n// EPS estimates\nprint_r($client-\u003ecompanyEpsEstimates(\"AMZN\", \"quarterly\"));\n\n// Company Executives\nprint_r($client-\u003ecompanyExecutive(\"AAPL\"));\n\n// Company News\nprint_r($client-\u003ecompanyNews(\"AAPL\", \"2020-06-01\", \"2020-06-10\"));\n\n// Company Peers\nprint_r($client-\u003ecompanyPeers(\"AAPL\"));\n\n// Company Profile\nprint_r($client-\u003ecompanyProfile(\"AAPL\"));\nprint_r($client-\u003ecompanyProfile(null, \"US0378331005\"));\nprint_r($client-\u003ecompanyProfile(null, null, \"037833100\"));\n\n// Company Profile 2\nprint_r($client-\u003ecompanyProfile2(\"AAPL\"));\n\n// Revenue Estimates\nprint_r($client-\u003ecompanyRevenueEstimates(\"TSLA\", \"quarterly\"));\n\n// List country\nprint_r($client-\u003ecountry());\n\n// Crypto Exchange\nprint_r($client-\u003ecryptoExchanges());\n\n// Crypto symbols\nprint_r($client-\u003ecryptoSymbols(\"BINANCE\"));\n\n// Economic data\nprint_r($client-\u003eeconomicData(\"MA-USA-656880\"));\n\n// Filings\nprint_r($client-\u003efilings($symbol = \"AAPL\", $from = \"2020-01-01\", $to = \"2020-06-11\"));\n\n// Financials\nprint_r($client-\u003efinancials(\"AAPL\", \"bs\", \"annual\"));\n\n// Financials as reported\nprint_r($client-\u003efinancialsReported($symbol = \"AAPL\", $freq = \"annual\"));\n\n// Forex exchanges\nprint_r($client-\u003eforexExchanges());\n\n// Forex all pairs\nprint_r($client-\u003eforexRates(\"USD\"));\n\n// Forex symbols\nprint_r($client-\u003eforexSymbols(\"OANDA\"));\n\n// Fund Ownership\nprint_r($client-\u003efundOwnership(\"AMZN\", 5));\n\n// General news\nprint_r($client-\u003emarketNews(\"forex\", 0));\n\n// Ownership\nprint_r($client-\u003eownership(\"AAPL\", 5));\n\n// IPO calendar\nprint_r($client-\u003eipoCalendar(\"2020-05-01\", \"2020-06-01\"));\n\n// Major developments\nprint_r($client-\u003epressReleases(\"AAPL\", \"2020-01-01\", \"2020-12-31\"));\n\n// News sentiment\nprint_r($client-\u003enewsSentiment(\"AAPL\"));\n\n// Pattern recognition\nprint_r($client-\u003epatternRecognition(\"AAPL\", \"D\"));\n\n// Price target\nprint_r($client-\u003epriceTarget(\"AAPL\"));\n\n// Quote\nprint_r($client-\u003equote(\"AAPL\"));\n\n// Recommendation trends\nprint_r($client-\u003erecommendationTrends(\"AAPL\"));\n\n// Stock dividends\nprint_r($client-\u003estockDividends(\"KO\", \"2019-01-01\", \"2020-01-01\"));\n\n// Stock symbols\nprint_r($client-\u003estockSymbols(\"US\"));\n\n// Transcripts\nprint_r($client-\u003etranscripts(\"AAPL_162777\"));\n\n// Transcripts list\nprint_r($client-\u003etranscriptsList(\"AAPL\"));\n\n// Earnings Calendar\nprint_r($client-\u003eearningsCalendar(\"2020-06-10\", \"2020-06-30\", null, false));\n\n// Covid-19\nprint_r($client-\u003ecovid19());\n\n// Upgrade downgrade\nprint_r($client-\u003eupgradeDowngrade(\"AAPL\", \"2020-01-01\", \"2020-06-30\"));\n\n// Economic code\nprint_r($client-\u003eeconomicCode());\n\n// Support resistance\nprint_r($client-\u003esupportResistance(\"AAPL\", \"D\"));\n\n// Technical Indicator\n$indicatorFields = new stdClass();\n$indicatorFields-\u003etimeperiod = 3;\nprint_r($client-\u003etechnicalIndicator(\"AAPL\", \"D\", 1583098857, 1584308457, \"rsi\", $indicatorFields));\n\n// Stock splits\nprint_r($client-\u003estockSplits(\"AAPL\", \"2000-01-01\", \"2020-01-01\"));\n\n// Forex candles\nprint_r($client-\u003eforexCandles(\"OANDA:EUR_USD\", \"D\", 1590988249, 1591852249));\n\n// Crypto Candles\nprint_r($client-\u003ecryptoCandles(\"BINANCE:BTCUSDT\", \"D\", 1590988249, 1591852249));\n\n// Tick Data\nprint_r($client-\u003estockTick(\"AAPL\", \"2020-03-25\", 500, 0));\n\n// Indices Constituents\nprint_r($client-\u003eindicesConstituents(\"^GSPC\"));\n\n// Indices Historical Constituents\nprint_r($client-\u003eindicesHistoricalConstituents(\"^GSPC\"));\n\n// ETFs Profile\nprint_r($client-\u003eetfsProfile(\"SPY\"));\n\n// ETFs Holdings\nprint_r($client-\u003eetfsHoldings(\"SPY\"));\n\n// ETFs Industry Exposure\nprint_r($client-\u003eetfsSectorExposure(\"SPY\"));\n\n// ETFs Country Exposure\nprint_r($client-\u003eetfsCountryExposure(\"SPY\"));\n\n// Mutual Fund Profile\nprint_r($client-\u003emutualFundProfile(\"VTSAX\"));\n\n// Mutual Fund Holdings\nprint_r($client-\u003emutualFundHoldings(\"VTSAX\"));\n\n// Mutual Fund Sector Exposure\nprint_r($client-\u003emutualFundSectorExposure(\"VTSAX\"));\n\n// Mutual Fund Country Exposure\nprint_r($client-\u003emutualFundCountryExposure(\"VTSAX\"));\n\n// Revenue Breakdown\nprint_r($client-\u003erevenueBreakdown($symbol = \"AAPL\"));\n\n// Social sentiment\nprint_r($client-\u003esocialSentiment(\"GME\"));\n\n// Investment themes\nprint_r($client-\u003einvestmentThemes(\"financialExchangesData\"));\n\n// Supply Chain\nprint_r($client-\u003esupplyChainRelationships(\"AAPL\"));\n\n// Insider Transactions\nprint_r($client-\u003einsiderTransactions(\"AAPL\", \"2021-01-01\", \"2021-03-01\"));\n\n// International Filings\nprint_r($client-\u003einternationalFilings(\"AC.TO\"));\n\n// Filings sentiment\nprint_r($client-\u003efilingsSentiment(\"0000320193-20-000052\"));\n\n// Similarity Index\nprint_r($client-\u003esimilarityIndex($symbol = \"AAPL\"));\n\n//Symbol Search\nprint_r($client-\u003esymbolSearch(\"AAPL\"));\n\n//Company ESG\nprint_r($client-\u003ecompanyEsgScore(\"AAPL\"));\n\n//Company Earnings Quality Score\nprint_r($client-\u003ecompanyEarningsQualityScore(\"AAPL\", \"quarterly\"));\n\n//Company Earnings Quality Score\nprint_r($client-\u003ecryptoProfile(\"AAPL\"));\n\n// EBITDA Estimates\nprint_r($client-\u003ecompanyEbitdaEstimates(\"AAPL\", \"quarterly\"));\n\n// EBIT Estimates\nprint_r($client-\u003ecompanyEbitEstimates(\"TSLA\", \"quarterly\"));\n\n// USPTO Patent\nprint_r($client-\u003estockUsptoPatent(\"NVDA\", \"2021-01-01\", \"2022-01-10\"));\n\n// Visa Application\nprint_r($client-\u003estockVisaApplication(\"NVDA\", \"2021-01-01\", \"2022-01-10\"));\n\n?\u003e\n```\n\n## License\n\nApache License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinnhub-stock-api%2Ffinnhub-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffinnhub-stock-api%2Ffinnhub-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinnhub-stock-api%2Ffinnhub-php/lists"}