Нурлан @daager
Количество элементов в группе всегда одинаково?
if($curl = curl_init()){
curl_setopt($curl, CURLOPT_URL, 'https://api.minergate.com/1.0/transfers');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'token: ' . $token
));
curl_setopt($curl, CURLOPT_URL, 'https://api.minergate.com/1.0/balance');
$out = json_decode(curl_exec($curl));
echo $out->eth;
curl_close($curl);
}
$data = array("email" => $email, "password" => $pass, 'totp' => 123456);
$data_string = json_encode($data);
$ch = curl_init('https://api.minergate.com/1.0/auth/login');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($data_string))
);
$result = curl_exec($ch);
echo $result;
{"code":"InternalError","message":"Cannot read property 'send' of undefined"}