Can't fetch data on localhost

I use a php framework. When trying to fetch currency data on my local machine it throws an error: Key “name” does not exist as the array is empty.

https://api.nomics.com/v1/currencies?key=mykey&ids=BTC,ETH,XRP&attributes=id,name

Any help!

Thank you!

Hello,

That endpoint is responding correctly with this information:

[
{
"id": "BTC",
"name": "Bitcoin"
},
{
"id": "ETH",
"name": "Ethereum"
},
{
"id": "XRP",
"name": "XRP"
}
]

I can’t help you with your PHP code.

Thank you very much! Indeed it was my code wrong!