arequena93/world-trading-data-api

World Trading Data API client

0.9.1 2019-10-23 15:56 UTC

This package is auto-updated.

Last update: 2025-05-24 06:51:02 UTC


README

Build Status

PHP-Client (wrapper) for the World Trading Data service.

Requirements

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');
  • symbol
  • sort_order
  • sort_by
  • output
Mutual fund real time $client->realtime()->mutualFundRealTime('AAAAX');
  • symbol
  • sort_order
  • sort_by
  • output
Intraday Market Data Stock and index intraday    
Historical Market Data Full history $client->historical()->fullHistory('ITX.MC');
  • symbol
  • date_from
  • date_to
  • sort
  • output
  • formatted
Multi single day history $client->historical()->multiSingleDayHistory('AAPL,ITX.MC', '2018-01-02');
  • symbol
  • date
  • sort
  • output
  • formatted
Forex Real time $client->forex()->realTime('EUR');
  • base
Historical $client->forex()->historical('USD', 'GBP');
  • base
  • convert_to
  • date_from
  • date_to
  • sort
  • output
  • formatted
Single day history $client->forex()->singleDayHistory('USD', '2018-08-31');
  • base
  • date
  • output
  • formatted