PHP script that writes a JSON file with iextrading API data












1












$begingroup$


iextrading has two APIs (v1, v2) which provide financial market data. Following script records a JSON file with their equity information (using a CRON job).



Would you be kind and review it for any possible improvement or anything that may be incorrect?



<?php


date_default_timezone_set("UTC");
ini_set('max_execution_time' , 0);
ini_set('memory_limit','-1');
set_time_limit(0);

$i = new I();
I::scrapeAllStocks($i);

Class I
{


/**
*
* @var an integer for version of iextrading api
*/

private $version;

/**
*
* @var a string of iextrading symbols
*/

private $symbolsPath;

/**
*
* @var a string of our symbols json directory
*/

private $symbolsDir;

/**
*
* @var a string of target path and query
*/

private $targetQuery;

/**
*
* @var a string of iextrading base URL
*/

private $baseUrl;

/**
*
* @var a string of iextrading end point
*/

private $endPoint;

// For version 1, tokens are not required.
// SECRET TOKEN: *********************************
// PUBLISHABLE TOKEN: *********************************

## https://cloud.iexapis.com/beta/iex/tops?symbols=AAPL&token=*********************************

function __construct()
{
$this->version = 2;

$this->symbolsPath = __DIR__ . "/../../config/symobls.md";
$this->symbolsDir = __DIR__ . "/../../a/path/to/your/dir/symbols";
$this->targetQuery = "stock/market/batch?symbols=";

// baseUrl for version 1

$this->baseUrl = "https://api.iextrading.com/1.0/";
// baseUrl for version 2
// $this->baseUrl = "https://cloud.iexapis.com/beta/";

// endPoint for version 1
$this->endPoint = "&types=quote,chart&range=1m&last=10";
// endPoint for version 2
// $this->endPoint = "&token=*********************************&types=quote,chart&range=1m&last=10";

echo "YAAAY! Class I is running 💚n";
return true;
}



public static function symbs($i){
$fnm= $i->symbolsPath;
$cnt= file_get_contents($fnm);
$sym=preg_split('/rn|r|n/', $cnt);
$child=array();
$mother=array();
$c=100;
foreach ($sym as $k=>$v){
$c=$c-1;
$sym=preg_split('/[t]/', $v);
array_push($child,$sym);

if($c<=0){
$c=100;
array_push($mother, $child);
$child=array();
}

}
return $mother;
}

public static function scrapeAllStocks($i){
$vStocks=I::symbs($i);
$baseUrl=$i->baseUrl.$i->targetQuery;

$currentTime=date("Y-m-d-H-i-s");
$allStocks=array();
foreach ($vStocks as $k=>$v) {
$s=array_column($v, 0);
$stockUrl=$baseUrl . implode(",", $s) . $i->endPoint;
$rawStockJson=file_get_contents($stockUrl);
$rawStockArray=json_decode($rawStockJson, true);
$allStocks=array_merge($allStocks, $rawStockArray);
}

$allStocksJson=json_encode($allStocks);

// Write the raw file
$symbolsDir= $i->symbolsDir;

if (!is_dir($symbolsDir)) {mkdir($symbolsDir, 0755,true);}

$rawStockFile=$symbolsDir . "/" . $currentTime . ".json";
$fp=fopen($rawStockFile, "x+");
fwrite($fp, $allStocksJson);
fclose($fp);
echo "YAAAY! stock large json file updated successfully! 💚 n";
}


}

?>


Example of symobls.md:



A   2019-01-04  AGILENT TECHNOLOGIES INC
AA 2019-01-04 ALCOA CORP
AAAU 2019-01-04 PERTH MINT PHYSICAL GOLD ETF
AABA 2019-01-04 ALTABA INC
AAC 2019-01-04 AAC HOLDINGS INC
AADR 2019-01-04 ADVISORSHARES DORSEY WRIGHT
AAL 2019-01-04 AMERICAN AIRLINES GROUP INC
AAMC 2019-01-04 ALTISOURCE ASSET MANAGEMENT
AAME 2019-01-04 ATLANTIC AMERICAN CORP
AAN 2019-01-04 AARON'S INC
AAOI 2019-01-04 APPLIED OPTOELECTRONICS INC
AAON 2019-01-04 AAON INC
AAP 2019-01-04 ADVANCE AUTO PARTS INC
AAPL 2019-01-04 APPLE INC
AAT 2019-01-04 AMERICAN ASSETS TRUST INC
AAU 2019-01-04 ALMADEN MINERALS LTD - B
AAWW 2019-01-04 ATLAS AIR WORLDWIDE HOLDINGS
AAXJ 2019-01-04 ISHARES MSCI ALL COUNTRY ASI
AAXN 2019-01-04 AXON ENTERPRISE INC
AB 2019-01-04 ALLIANCEBERNSTEIN HOLDING LP
ABAC 2019-01-04 RENMIN TIANLI GROUP INC
ABB 2019-01-04 ABB LTD-SPON ADR
ABBV 2019-01-04 ABBVIE INC
ABC 2019-01-04 AMERISOURCEBERGEN CORP
ABCB 2019-01-04 AMERIS BANCORP
ABDC 2019-01-04 ALCENTRA CAPITAL CORP
ABEO 2019-01-04 ABEONA THERAPEUTICS INC
ABEOW 2019-01-04
ABEV 2019-01-04 AMBEV SA-ADR
ABG 2019-01-04 ASBURY AUTOMOTIVE GROUP
ABIL 2019-01-04 ABILITY INC
ABIO 2019-01-04 ARCA BIOPHARMA INC
ABM 2019-01-04 ABM INDUSTRIES INC
ABMD 2019-01-04 ABIOMED INC
ABR 2019-01-04 ARBOR REALTY TRUST INC
ABR-A 2019-01-04
ABR-B 2019-01-04
ABR-C 2019-01-04
ABT 2019-01-04 ABBOTT LABORATORIES
ABTX 2019-01-04 ALLEGIANCE BANCSHARES INC
ABUS 2019-01-04 ARBUTUS BIOPHARMA CORP
AC 2019-01-04 ASSOCIATED CAPITAL GROUP - A
ACA 2019-01-04 ARCOSA INC
ACAD 2019-01-04 ACADIA PHARMACEUTICALS INC
ACB 2019-01-04 AURORA CANNABIS INC
ACBI 2019-01-04 ATLANTIC CAPITAL BANCSHARES
ACC 2019-01-04 AMERICAN CAMPUS COMMUNITIES









share|improve this question









New contributor




Emma is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$












  • $begingroup$
    @200_success thanks so much for editing the question!
    $endgroup$
    – Emma
    15 mins ago
















1












$begingroup$


iextrading has two APIs (v1, v2) which provide financial market data. Following script records a JSON file with their equity information (using a CRON job).



Would you be kind and review it for any possible improvement or anything that may be incorrect?



<?php


date_default_timezone_set("UTC");
ini_set('max_execution_time' , 0);
ini_set('memory_limit','-1');
set_time_limit(0);

$i = new I();
I::scrapeAllStocks($i);

Class I
{


/**
*
* @var an integer for version of iextrading api
*/

private $version;

/**
*
* @var a string of iextrading symbols
*/

private $symbolsPath;

/**
*
* @var a string of our symbols json directory
*/

private $symbolsDir;

/**
*
* @var a string of target path and query
*/

private $targetQuery;

/**
*
* @var a string of iextrading base URL
*/

private $baseUrl;

/**
*
* @var a string of iextrading end point
*/

private $endPoint;

// For version 1, tokens are not required.
// SECRET TOKEN: *********************************
// PUBLISHABLE TOKEN: *********************************

## https://cloud.iexapis.com/beta/iex/tops?symbols=AAPL&token=*********************************

function __construct()
{
$this->version = 2;

$this->symbolsPath = __DIR__ . "/../../config/symobls.md";
$this->symbolsDir = __DIR__ . "/../../a/path/to/your/dir/symbols";
$this->targetQuery = "stock/market/batch?symbols=";

// baseUrl for version 1

$this->baseUrl = "https://api.iextrading.com/1.0/";
// baseUrl for version 2
// $this->baseUrl = "https://cloud.iexapis.com/beta/";

// endPoint for version 1
$this->endPoint = "&types=quote,chart&range=1m&last=10";
// endPoint for version 2
// $this->endPoint = "&token=*********************************&types=quote,chart&range=1m&last=10";

echo "YAAAY! Class I is running 💚n";
return true;
}



public static function symbs($i){
$fnm= $i->symbolsPath;
$cnt= file_get_contents($fnm);
$sym=preg_split('/rn|r|n/', $cnt);
$child=array();
$mother=array();
$c=100;
foreach ($sym as $k=>$v){
$c=$c-1;
$sym=preg_split('/[t]/', $v);
array_push($child,$sym);

if($c<=0){
$c=100;
array_push($mother, $child);
$child=array();
}

}
return $mother;
}

public static function scrapeAllStocks($i){
$vStocks=I::symbs($i);
$baseUrl=$i->baseUrl.$i->targetQuery;

$currentTime=date("Y-m-d-H-i-s");
$allStocks=array();
foreach ($vStocks as $k=>$v) {
$s=array_column($v, 0);
$stockUrl=$baseUrl . implode(",", $s) . $i->endPoint;
$rawStockJson=file_get_contents($stockUrl);
$rawStockArray=json_decode($rawStockJson, true);
$allStocks=array_merge($allStocks, $rawStockArray);
}

$allStocksJson=json_encode($allStocks);

// Write the raw file
$symbolsDir= $i->symbolsDir;

if (!is_dir($symbolsDir)) {mkdir($symbolsDir, 0755,true);}

$rawStockFile=$symbolsDir . "/" . $currentTime . ".json";
$fp=fopen($rawStockFile, "x+");
fwrite($fp, $allStocksJson);
fclose($fp);
echo "YAAAY! stock large json file updated successfully! 💚 n";
}


}

?>


Example of symobls.md:



A   2019-01-04  AGILENT TECHNOLOGIES INC
AA 2019-01-04 ALCOA CORP
AAAU 2019-01-04 PERTH MINT PHYSICAL GOLD ETF
AABA 2019-01-04 ALTABA INC
AAC 2019-01-04 AAC HOLDINGS INC
AADR 2019-01-04 ADVISORSHARES DORSEY WRIGHT
AAL 2019-01-04 AMERICAN AIRLINES GROUP INC
AAMC 2019-01-04 ALTISOURCE ASSET MANAGEMENT
AAME 2019-01-04 ATLANTIC AMERICAN CORP
AAN 2019-01-04 AARON'S INC
AAOI 2019-01-04 APPLIED OPTOELECTRONICS INC
AAON 2019-01-04 AAON INC
AAP 2019-01-04 ADVANCE AUTO PARTS INC
AAPL 2019-01-04 APPLE INC
AAT 2019-01-04 AMERICAN ASSETS TRUST INC
AAU 2019-01-04 ALMADEN MINERALS LTD - B
AAWW 2019-01-04 ATLAS AIR WORLDWIDE HOLDINGS
AAXJ 2019-01-04 ISHARES MSCI ALL COUNTRY ASI
AAXN 2019-01-04 AXON ENTERPRISE INC
AB 2019-01-04 ALLIANCEBERNSTEIN HOLDING LP
ABAC 2019-01-04 RENMIN TIANLI GROUP INC
ABB 2019-01-04 ABB LTD-SPON ADR
ABBV 2019-01-04 ABBVIE INC
ABC 2019-01-04 AMERISOURCEBERGEN CORP
ABCB 2019-01-04 AMERIS BANCORP
ABDC 2019-01-04 ALCENTRA CAPITAL CORP
ABEO 2019-01-04 ABEONA THERAPEUTICS INC
ABEOW 2019-01-04
ABEV 2019-01-04 AMBEV SA-ADR
ABG 2019-01-04 ASBURY AUTOMOTIVE GROUP
ABIL 2019-01-04 ABILITY INC
ABIO 2019-01-04 ARCA BIOPHARMA INC
ABM 2019-01-04 ABM INDUSTRIES INC
ABMD 2019-01-04 ABIOMED INC
ABR 2019-01-04 ARBOR REALTY TRUST INC
ABR-A 2019-01-04
ABR-B 2019-01-04
ABR-C 2019-01-04
ABT 2019-01-04 ABBOTT LABORATORIES
ABTX 2019-01-04 ALLEGIANCE BANCSHARES INC
ABUS 2019-01-04 ARBUTUS BIOPHARMA CORP
AC 2019-01-04 ASSOCIATED CAPITAL GROUP - A
ACA 2019-01-04 ARCOSA INC
ACAD 2019-01-04 ACADIA PHARMACEUTICALS INC
ACB 2019-01-04 AURORA CANNABIS INC
ACBI 2019-01-04 ATLANTIC CAPITAL BANCSHARES
ACC 2019-01-04 AMERICAN CAMPUS COMMUNITIES









share|improve this question









New contributor




Emma is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$












  • $begingroup$
    @200_success thanks so much for editing the question!
    $endgroup$
    – Emma
    15 mins ago














1












1








1





$begingroup$


iextrading has two APIs (v1, v2) which provide financial market data. Following script records a JSON file with their equity information (using a CRON job).



Would you be kind and review it for any possible improvement or anything that may be incorrect?



<?php


date_default_timezone_set("UTC");
ini_set('max_execution_time' , 0);
ini_set('memory_limit','-1');
set_time_limit(0);

$i = new I();
I::scrapeAllStocks($i);

Class I
{


/**
*
* @var an integer for version of iextrading api
*/

private $version;

/**
*
* @var a string of iextrading symbols
*/

private $symbolsPath;

/**
*
* @var a string of our symbols json directory
*/

private $symbolsDir;

/**
*
* @var a string of target path and query
*/

private $targetQuery;

/**
*
* @var a string of iextrading base URL
*/

private $baseUrl;

/**
*
* @var a string of iextrading end point
*/

private $endPoint;

// For version 1, tokens are not required.
// SECRET TOKEN: *********************************
// PUBLISHABLE TOKEN: *********************************

## https://cloud.iexapis.com/beta/iex/tops?symbols=AAPL&token=*********************************

function __construct()
{
$this->version = 2;

$this->symbolsPath = __DIR__ . "/../../config/symobls.md";
$this->symbolsDir = __DIR__ . "/../../a/path/to/your/dir/symbols";
$this->targetQuery = "stock/market/batch?symbols=";

// baseUrl for version 1

$this->baseUrl = "https://api.iextrading.com/1.0/";
// baseUrl for version 2
// $this->baseUrl = "https://cloud.iexapis.com/beta/";

// endPoint for version 1
$this->endPoint = "&types=quote,chart&range=1m&last=10";
// endPoint for version 2
// $this->endPoint = "&token=*********************************&types=quote,chart&range=1m&last=10";

echo "YAAAY! Class I is running 💚n";
return true;
}



public static function symbs($i){
$fnm= $i->symbolsPath;
$cnt= file_get_contents($fnm);
$sym=preg_split('/rn|r|n/', $cnt);
$child=array();
$mother=array();
$c=100;
foreach ($sym as $k=>$v){
$c=$c-1;
$sym=preg_split('/[t]/', $v);
array_push($child,$sym);

if($c<=0){
$c=100;
array_push($mother, $child);
$child=array();
}

}
return $mother;
}

public static function scrapeAllStocks($i){
$vStocks=I::symbs($i);
$baseUrl=$i->baseUrl.$i->targetQuery;

$currentTime=date("Y-m-d-H-i-s");
$allStocks=array();
foreach ($vStocks as $k=>$v) {
$s=array_column($v, 0);
$stockUrl=$baseUrl . implode(",", $s) . $i->endPoint;
$rawStockJson=file_get_contents($stockUrl);
$rawStockArray=json_decode($rawStockJson, true);
$allStocks=array_merge($allStocks, $rawStockArray);
}

$allStocksJson=json_encode($allStocks);

// Write the raw file
$symbolsDir= $i->symbolsDir;

if (!is_dir($symbolsDir)) {mkdir($symbolsDir, 0755,true);}

$rawStockFile=$symbolsDir . "/" . $currentTime . ".json";
$fp=fopen($rawStockFile, "x+");
fwrite($fp, $allStocksJson);
fclose($fp);
echo "YAAAY! stock large json file updated successfully! 💚 n";
}


}

?>


Example of symobls.md:



A   2019-01-04  AGILENT TECHNOLOGIES INC
AA 2019-01-04 ALCOA CORP
AAAU 2019-01-04 PERTH MINT PHYSICAL GOLD ETF
AABA 2019-01-04 ALTABA INC
AAC 2019-01-04 AAC HOLDINGS INC
AADR 2019-01-04 ADVISORSHARES DORSEY WRIGHT
AAL 2019-01-04 AMERICAN AIRLINES GROUP INC
AAMC 2019-01-04 ALTISOURCE ASSET MANAGEMENT
AAME 2019-01-04 ATLANTIC AMERICAN CORP
AAN 2019-01-04 AARON'S INC
AAOI 2019-01-04 APPLIED OPTOELECTRONICS INC
AAON 2019-01-04 AAON INC
AAP 2019-01-04 ADVANCE AUTO PARTS INC
AAPL 2019-01-04 APPLE INC
AAT 2019-01-04 AMERICAN ASSETS TRUST INC
AAU 2019-01-04 ALMADEN MINERALS LTD - B
AAWW 2019-01-04 ATLAS AIR WORLDWIDE HOLDINGS
AAXJ 2019-01-04 ISHARES MSCI ALL COUNTRY ASI
AAXN 2019-01-04 AXON ENTERPRISE INC
AB 2019-01-04 ALLIANCEBERNSTEIN HOLDING LP
ABAC 2019-01-04 RENMIN TIANLI GROUP INC
ABB 2019-01-04 ABB LTD-SPON ADR
ABBV 2019-01-04 ABBVIE INC
ABC 2019-01-04 AMERISOURCEBERGEN CORP
ABCB 2019-01-04 AMERIS BANCORP
ABDC 2019-01-04 ALCENTRA CAPITAL CORP
ABEO 2019-01-04 ABEONA THERAPEUTICS INC
ABEOW 2019-01-04
ABEV 2019-01-04 AMBEV SA-ADR
ABG 2019-01-04 ASBURY AUTOMOTIVE GROUP
ABIL 2019-01-04 ABILITY INC
ABIO 2019-01-04 ARCA BIOPHARMA INC
ABM 2019-01-04 ABM INDUSTRIES INC
ABMD 2019-01-04 ABIOMED INC
ABR 2019-01-04 ARBOR REALTY TRUST INC
ABR-A 2019-01-04
ABR-B 2019-01-04
ABR-C 2019-01-04
ABT 2019-01-04 ABBOTT LABORATORIES
ABTX 2019-01-04 ALLEGIANCE BANCSHARES INC
ABUS 2019-01-04 ARBUTUS BIOPHARMA CORP
AC 2019-01-04 ASSOCIATED CAPITAL GROUP - A
ACA 2019-01-04 ARCOSA INC
ACAD 2019-01-04 ACADIA PHARMACEUTICALS INC
ACB 2019-01-04 AURORA CANNABIS INC
ACBI 2019-01-04 ATLANTIC CAPITAL BANCSHARES
ACC 2019-01-04 AMERICAN CAMPUS COMMUNITIES









share|improve this question









New contributor




Emma is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$




iextrading has two APIs (v1, v2) which provide financial market data. Following script records a JSON file with their equity information (using a CRON job).



Would you be kind and review it for any possible improvement or anything that may be incorrect?



<?php


date_default_timezone_set("UTC");
ini_set('max_execution_time' , 0);
ini_set('memory_limit','-1');
set_time_limit(0);

$i = new I();
I::scrapeAllStocks($i);

Class I
{


/**
*
* @var an integer for version of iextrading api
*/

private $version;

/**
*
* @var a string of iextrading symbols
*/

private $symbolsPath;

/**
*
* @var a string of our symbols json directory
*/

private $symbolsDir;

/**
*
* @var a string of target path and query
*/

private $targetQuery;

/**
*
* @var a string of iextrading base URL
*/

private $baseUrl;

/**
*
* @var a string of iextrading end point
*/

private $endPoint;

// For version 1, tokens are not required.
// SECRET TOKEN: *********************************
// PUBLISHABLE TOKEN: *********************************

## https://cloud.iexapis.com/beta/iex/tops?symbols=AAPL&token=*********************************

function __construct()
{
$this->version = 2;

$this->symbolsPath = __DIR__ . "/../../config/symobls.md";
$this->symbolsDir = __DIR__ . "/../../a/path/to/your/dir/symbols";
$this->targetQuery = "stock/market/batch?symbols=";

// baseUrl for version 1

$this->baseUrl = "https://api.iextrading.com/1.0/";
// baseUrl for version 2
// $this->baseUrl = "https://cloud.iexapis.com/beta/";

// endPoint for version 1
$this->endPoint = "&types=quote,chart&range=1m&last=10";
// endPoint for version 2
// $this->endPoint = "&token=*********************************&types=quote,chart&range=1m&last=10";

echo "YAAAY! Class I is running 💚n";
return true;
}



public static function symbs($i){
$fnm= $i->symbolsPath;
$cnt= file_get_contents($fnm);
$sym=preg_split('/rn|r|n/', $cnt);
$child=array();
$mother=array();
$c=100;
foreach ($sym as $k=>$v){
$c=$c-1;
$sym=preg_split('/[t]/', $v);
array_push($child,$sym);

if($c<=0){
$c=100;
array_push($mother, $child);
$child=array();
}

}
return $mother;
}

public static function scrapeAllStocks($i){
$vStocks=I::symbs($i);
$baseUrl=$i->baseUrl.$i->targetQuery;

$currentTime=date("Y-m-d-H-i-s");
$allStocks=array();
foreach ($vStocks as $k=>$v) {
$s=array_column($v, 0);
$stockUrl=$baseUrl . implode(",", $s) . $i->endPoint;
$rawStockJson=file_get_contents($stockUrl);
$rawStockArray=json_decode($rawStockJson, true);
$allStocks=array_merge($allStocks, $rawStockArray);
}

$allStocksJson=json_encode($allStocks);

// Write the raw file
$symbolsDir= $i->symbolsDir;

if (!is_dir($symbolsDir)) {mkdir($symbolsDir, 0755,true);}

$rawStockFile=$symbolsDir . "/" . $currentTime . ".json";
$fp=fopen($rawStockFile, "x+");
fwrite($fp, $allStocksJson);
fclose($fp);
echo "YAAAY! stock large json file updated successfully! 💚 n";
}


}

?>


Example of symobls.md:



A   2019-01-04  AGILENT TECHNOLOGIES INC
AA 2019-01-04 ALCOA CORP
AAAU 2019-01-04 PERTH MINT PHYSICAL GOLD ETF
AABA 2019-01-04 ALTABA INC
AAC 2019-01-04 AAC HOLDINGS INC
AADR 2019-01-04 ADVISORSHARES DORSEY WRIGHT
AAL 2019-01-04 AMERICAN AIRLINES GROUP INC
AAMC 2019-01-04 ALTISOURCE ASSET MANAGEMENT
AAME 2019-01-04 ATLANTIC AMERICAN CORP
AAN 2019-01-04 AARON'S INC
AAOI 2019-01-04 APPLIED OPTOELECTRONICS INC
AAON 2019-01-04 AAON INC
AAP 2019-01-04 ADVANCE AUTO PARTS INC
AAPL 2019-01-04 APPLE INC
AAT 2019-01-04 AMERICAN ASSETS TRUST INC
AAU 2019-01-04 ALMADEN MINERALS LTD - B
AAWW 2019-01-04 ATLAS AIR WORLDWIDE HOLDINGS
AAXJ 2019-01-04 ISHARES MSCI ALL COUNTRY ASI
AAXN 2019-01-04 AXON ENTERPRISE INC
AB 2019-01-04 ALLIANCEBERNSTEIN HOLDING LP
ABAC 2019-01-04 RENMIN TIANLI GROUP INC
ABB 2019-01-04 ABB LTD-SPON ADR
ABBV 2019-01-04 ABBVIE INC
ABC 2019-01-04 AMERISOURCEBERGEN CORP
ABCB 2019-01-04 AMERIS BANCORP
ABDC 2019-01-04 ALCENTRA CAPITAL CORP
ABEO 2019-01-04 ABEONA THERAPEUTICS INC
ABEOW 2019-01-04
ABEV 2019-01-04 AMBEV SA-ADR
ABG 2019-01-04 ASBURY AUTOMOTIVE GROUP
ABIL 2019-01-04 ABILITY INC
ABIO 2019-01-04 ARCA BIOPHARMA INC
ABM 2019-01-04 ABM INDUSTRIES INC
ABMD 2019-01-04 ABIOMED INC
ABR 2019-01-04 ARBOR REALTY TRUST INC
ABR-A 2019-01-04
ABR-B 2019-01-04
ABR-C 2019-01-04
ABT 2019-01-04 ABBOTT LABORATORIES
ABTX 2019-01-04 ALLEGIANCE BANCSHARES INC
ABUS 2019-01-04 ARBUTUS BIOPHARMA CORP
AC 2019-01-04 ASSOCIATED CAPITAL GROUP - A
ACA 2019-01-04 ARCOSA INC
ACAD 2019-01-04 ACADIA PHARMACEUTICALS INC
ACB 2019-01-04 AURORA CANNABIS INC
ACBI 2019-01-04 ATLANTIC CAPITAL BANCSHARES
ACC 2019-01-04 AMERICAN CAMPUS COMMUNITIES






php json api client






share|improve this question









New contributor




Emma is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Emma is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 16 mins ago









200_success

129k15153417




129k15153417






New contributor




Emma is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 1 hour ago









EmmaEmma

1063




1063




New contributor




Emma is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Emma is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Emma is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • $begingroup$
    @200_success thanks so much for editing the question!
    $endgroup$
    – Emma
    15 mins ago


















  • $begingroup$
    @200_success thanks so much for editing the question!
    $endgroup$
    – Emma
    15 mins ago
















$begingroup$
@200_success thanks so much for editing the question!
$endgroup$
– Emma
15 mins ago




$begingroup$
@200_success thanks so much for editing the question!
$endgroup$
– Emma
15 mins ago










0






active

oldest

votes











Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
});
});
}, "mathjax-editing");

StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "196"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Emma is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f214146%2fphp-script-that-writes-a-json-file-with-iextrading-api-data%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes








Emma is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















Emma is a new contributor. Be nice, and check out our Code of Conduct.













Emma is a new contributor. Be nice, and check out our Code of Conduct.












Emma is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Code Review Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f214146%2fphp-script-that-writes-a-json-file-with-iextrading-api-data%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to make a Squid Proxy server?

Is this a new Fibonacci Identity?

19世紀