[Javascript] TRX価格を比較してみました
こんにちは、@yasuです。
日本と韓国の両方で取引されているTRXの価格を表示してみました。
実行方法
https://ojagggyo.github.io/javascript/market_trx.html
実行結果
ソース
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery.getJSON</title>
<script src="https://code.jquery.com/jquery-3.5.0.js"></script>
</head>
<body>
<script>
let url = "https://api.upbit.com/v1/ticker?markets=KRW-TRX";
$.getJSON(url, (data) => {
$("#text1").html(data[0].trade_price);
});
url = "https://api-cloud.huobi.co.jp/market/trade?symbol=trxjpy"
$.getJSON(url, (data) => {
$("#text2").html(data.tick.data[0].price);
});
</script>
<h1>TRX価格</h1>
<b id="text1"></b>ウォン (取引所)
<br/>
<b id="text2"></b>円 (HOUBI取引所)
</body>
</html>
ありがとうございました。
steemit サインアップ
https://ojagggyo.github.io/steemitsignup
steemit 知識
https://ojagggyo.github.io/steemittips
日本語 Steemit Discord (超初心者~誰でも)
https://discord.gg/zKJgfzS