这适用于所有货币。我可以输出'0','1','2',...
的所有数据$url = 'https://bittrex.com/api/v1.1/public/getmarketsummaries
$response = file_get_contents($url);
$obj = json_decode($response,true);
$marketname = $obj['result'][0]['MarketName'] . '';
此网址是针对带有“市场”字符串的单一货币。
https://bittrex.com/api/v1.1/public/getmarketsummary?market=btc-neo
但我怎么能读到这个?
$url = 'https://bittrex.com/api/v1.1/public/getmarketsummaries?market=btc-neo
$response = file_get_contents($url);
$obj = json_decode($response,true);
$marketname = $obj['result'][0]['MarketName'] . '';
不起作用!
有什么想法吗?
答案 0 :(得分:1)
来自API
$url = 'https://bittrex.com/api/v1.1/public/getmarketsummary?market=btc-neo'
答案 1 :(得分:0)
有它:
相反:
$url = 'https://bittrex.com/api/v1.1/public/getmarketsummaries?market=btc-neo';
此:
$url = "https://bittrex.com/api/v1.1/public/getmarketsummary?market=btc-neo";
关键还是"而不是'
感谢所有人!