I am trying to get data from Binance Exchange API (https://api.etherdelta.com/returnTicker). I able to get the data and convert the data into an array. But the whole data is in the key of the first data of the array.
$uri = "https://api.etherdelta.com/returnTicker";
$data = array();
$ch = curl_init ($uri);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
parse_str(curl_exec($ch), $data);
Sample data:
Array ( [{"ETH_VIBE":{"tokenAddr":"0xe8ff5c9c75deb346acac493c463c8950be03dfba","quoteVolume":2022554_248,"baseVolume":3212_187,"last":0_001659444,"percentChange":3_2991,"bid":5,"ask":0_00163},"ETH_0xc27a":{"tokenAddr":"0xc27a2f05fa577a83ba0fdb4c38443c0718356501","quoteVolume":1379508_983,"baseVolume":1262_329,"last":0_000911962,"percentChange":-0_0685,"bid":0_0009785,"ask":0_00093}])
I wish to access last price of each token(ETH_VIBE).
Thanks in advance!