我想简单地采取从这个API显示来自“最后”的数据: https://bittrex.com/api/v1.1/public/getticker?market=usdt-btc使用卷曲解码和回声一个RESTful API响应
这里是我到目前为止,但它没有返回任何东西。我不是一个有经验的开发人员,并且从几个不同的来源拼凑出这些代码。任何帮助是极大的赞赏。
<?php
$service_url = 'https://bittrex.com/api/v1.1/public/getticker?market=usdt-btc';
$curl = curl_init($service_url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$curl_response = curl_exec($curl);
$decoded = json_decode($curl_response);
echo $decoded->Last;
?>