I can get through the API course BTC to USD on PHP.

1 Like
$WUSD = 'Ft8X1v1LTa1ABafufpaCWyVj8KkaxUWE6xBhW6sNFJck';
$api = "$WBTC/$WUSD";

$json = json_decode( file_get_contents( $api ), true );
$price = $json['data'][0]['data']['lastPrice'];

echo $price;
1 Like

Where can I get numbers of other currencies?

1 Like

Thank you, very much!!! :+1::+1::+1:

Why a can’t get this pairs? Empty array (

$USD = ‘Ft8X1v1LTa1ABafufpaCWyVj8KkaxUWE6xBhW6sNFJck’;
$LTC = ‘HZk1mbfuJpmxU1Fs4AX5MWLVYtctsNcg6e2C6VKqK8zk’;
$json = json_decode(file_get_contents(“$LTC/$USD”), true);

Because there is no trades on DEX in 24 hours on LTC/USD pair.

I want to display on my site the cost of a BTC LTC ETH in USD.
How best to do this?

If you want DEX numbers, use your own cache system of numbers above.

I will be completely honest.
I have little knowledge of cryptocurrency and tokens.
I’m just a programmer.
I was given the task to display the cost of cryptocurrency on the website using the Waves platform.
So I need the easiest way to get prices.

You’re not acting like a programmer.

This screenshot is from an official wavesplatform client. Do you see LTC / USD price?


So, it looks like if you rely just on the API (the easiest way), you wouldn’t finish the task. Good luck.