arequena93 / world-trading-data-api
World Trading Data API client
0.9.1
2019-10-23 15:56 UTC
Requires
- php: ^7.0
- guzzlehttp/guzzle: ^6.3
Requires (Dev)
- phpunit/phpunit: ^6.2.2 || ^7.4.3
This package is auto-updated.
Last update: 2025-05-24 06:51:02 UTC
README
PHP-Client (wrapper) for the World Trading Data service.
Requirements
- PHP 7.0+
- Composer (https://getcomposer.org/download/)
- WorldTradingData API key: WorldTradingData-Api-Key
Installation
php composer.phar require arequena93/world-trading-data-api
Usage
Initialization
$option = new WorldTradingData\Options();
$option->setApiKey('YOUR_API_KEY');
$client = new WorldTradingData\Client($option);
Functionalities
WTD functions | Example usage | Parameters (required in bold) | |
---|---|---|---|
Real Time Market Data | Stock and index real time | $client->realtime()->stockAndIndexRealTime('AAPL'); |
|
Mutual fund real time | $client->realtime()->mutualFundRealTime('AAAAX'); |
|
|
Intraday Market Data | Stock and index intraday | ||
Historical Market Data | Full history | $client->historical()->fullHistory('ITX.MC'); |
|
Multi single day history | $client->historical()->multiSingleDayHistory('AAPL,ITX.MC', '2018-01-02'); |
|
|
Forex | Real time | $client->forex()->realTime('EUR'); |
|
Historical | $client->forex()->historical('USD', 'GBP'); |
|
|
Single day history | $client->forex()->singleDayHistory('USD', '2018-08-31'); |
|