marekskopal / twelvedata
TwelveData API client library
v0.4.1
2024-11-29 14:36 UTC
Requires
- php: >=8.3
- php-http/discovery: ^1.19
- psr/http-client: ^1.0
- psr/http-factory: ^1.0
- psr/http-message: ^1.1 || ^2.0
Requires (Dev)
- php-http/guzzle7-adapter: ^1.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- phpunit/phpunit: ^10.2
- slevomat/coding-standard: ^8.14
- spatie/ray: ^1.39
Suggests
- nyholm/psr7: PSR-7 message implementation
- symfony/http-client: HTTP client
README
Unofficial PHP API client library for the Twelve Data API service.
Install
composer require marekskopal/twelvedata
Usage
use MarekSkopal\TwelveData\TwelveData; use MarekSkopal\TwelveData\Enum\IntervalEnum; // Create TwelveData instance $twelveData = new TwelveData('<yourApiKey>'); // Get the one minute time series for the AAPL symbol $response = $twelveData->getCoreData()->timeSeries( symbol: 'AAPL', interval: IntervalEnum::OneMinute, );
Covered endpoints
More endpoints will be covered in future versions.
Reference Data
- Stocks List ✅
- Forex Pairs List ✅
- Cryptocurrencies List ✅
- Funds List ✅
- Bonds List ✅
- ETF List ✅
- Indices List ✅
- Commodities List ✅
- Cross listings ✅
- Exchanges ✅
- Exchange schedule ✅
- Cryptocurrency Exchanges ✅
- Market State ✅
- Instrument Type ✅
- Countries ✅
- Technical Indicators Interface ❌
- Earliest Timestamp ✅
- Symbol Search ✅
Core Data
- Time Series ✅
- Exchange Rate ✅
- Currency Conversion ✅
- Quote ✅
- Real-Time Price ✅
- Edd of Day Price ✅
- Market Movers ✅
Mutual Funds ❌
ETFs ❌
Fundamentals
- Logo ✅
- Profile ✅
- Dividends ✅
- Splits ✅
- Earnings ✅
- Earnings Calendar ❌
- IPO Calendar ❌
- Statistics ✅
- Insider Transactions ✅
- Income Statement ✅
- Balance Sheet ✅
- Cash Flow ✅
- Options Expiration ✅
- Options Chain ✅
- Key Executives ✅
- Institutional Holders ✅
- Fund Holders ✅
- Direct Holders ✅
- Last changes ❌
Analysis
- Earnings Estimate ❌
- Revenue Estimate ❌
- EPS Trend ❌
- EPS Revisions ❌
- Growth Estimates ❌
- Recommendations ❌
- Price Target ❌
- Analyst Ratings - Light ❌
- Analyst Ratings - US Equities ❌
WebSocket ❌
Advanced
- Complex Data ❌
- Usage ✅
Technical Indicators ❌
Notice
This is NOT an official Twelve Data library, and the authors of this library are not affiliated with Twelve Data in any way, shape or form. Twelve Data APIs and data are Copyright © 2024 Twelve Data Pte. Ltd.
Contributing
If you want to contribute, feel free to submit a pull request.