I can get through the API course BTC to USD on PHP.
$WBTC = '8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS'; $WUSD = 'Ft8X1v1LTa1ABafufpaCWyVj8KkaxUWE6xBhW6sNFJck'; $api = "https://api.wavesplatform.com/v0/pairs?pairs=$WBTC/$WUSD"; $json = json_decode( file_get_contents( $api ), true ); $price = $json['data']['data']['lastPrice']; echo $price;
Where can I get numbers of other currencies?
Thank you, very much!!!
Why a can’t get this pairs? Empty array (
$USD = ‘Ft8X1v1LTa1ABafufpaCWyVj8KkaxUWE6xBhW6sNFJck’;
$LTC = ‘HZk1mbfuJpmxU1Fs4AX5MWLVYtctsNcg6e2C6VKqK8zk’;
$json = json_decode(file_get_contents(“https://api.wavesplatform.com/v0/pairs?pairs=$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.