PHP code example of marekskopal / twelvedata
1. Go to this page and download the library: Download marekskopal/twelvedata library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
marekskopal / twelvedata example snippets
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,
);