Skip to content

Commit

Permalink
SameSource
Browse files Browse the repository at this point in the history
  • Loading branch information
adsbin committed Oct 24, 2022
1 parent f56496b commit cb80296
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 15 deletions.
23 changes: 18 additions & 5 deletions bnb.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title id="dynTitle">FFS BNB System 6.7 Standard Name</title>
<title id="dynTitle">FFS BNB System 6.8 Same source</title>
<script>
const geckoapiURL = "https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&ids=binancecoin";
//const geckoapiURL = "https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&ids=binancecoin";
const binanceapiURL = "https://api.binance.com/api/v3/ticker?symbol=BNBUSDT&windowSize=1d";
const binanceWSS = "wss://stream.binance.com:9443/ws/bnbusdt@trade";
//const fontPriceMulti = 5;

Expand Down Expand Up @@ -416,11 +417,23 @@
return await response.json();
}

// For coingecko, replaced by binance now
// function get24HighLow() {
// getAnyAPI(geckoapiURL).then(
// data => {
// UpperP.value = data[0].high_24h;
// LowerP.value = data[0].low_24h;
// UpperP.style.width = ((UpperP.value.length + 1) * 8) + 'px';
// LowerP.style.width = ((LowerP.value.length + 1) * 8) + 'px';
// }
// );
// }

function get24HighLow() {
getAnyAPI(geckoapiURL).then(
getAnyAPI(binanceapiURL).then(
data => {
UpperP.value = data[0].high_24h;
LowerP.value = data[0].low_24h;
UpperP.value = parseFloat(data["highPrice"]);
LowerP.value = parseFloat(data["lowPrice"]);
UpperP.style.width = ((UpperP.value.length + 1) * 8) + 'px';
LowerP.style.width = ((LowerP.value.length + 1) * 8) + 'px';
}
Expand Down
23 changes: 18 additions & 5 deletions btc.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title id="dynTitle">FFS BTC System 6.7 Standard Name</title>
<title id="dynTitle">FFS BTC System 6.8 Same source</title>
<script>
const geckoapiURL = "https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&ids=bitcoin";
//const geckoapiURL = "https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&ids=bitcoin";
const binanceapiURL = "https://api.binance.com/api/v3/ticker?symbol=BTCUSDT&windowSize=1d";
const binanceWSS = "wss://stream.binance.com:9443/ws/btcusdt@trade";
//const fontPriceMulti = 15;

Expand Down Expand Up @@ -416,11 +417,23 @@
return await response.json();
}

// For coingecko, replaced by binance now
// function get24HighLow() {
// getAnyAPI(geckoapiURL).then(
// data => {
// UpperP.value = data[0].high_24h;
// LowerP.value = data[0].low_24h;
// UpperP.style.width = ((UpperP.value.length + 1) * 8) + 'px';
// LowerP.style.width = ((LowerP.value.length + 1) * 8) + 'px';
// }
// );
// }

function get24HighLow() {
getAnyAPI(geckoapiURL).then(
getAnyAPI(binanceapiURL).then(
data => {
UpperP.value = data[0].high_24h;
LowerP.value = data[0].low_24h;
UpperP.value = parseFloat(data["highPrice"]);
LowerP.value = parseFloat(data["lowPrice"]);
UpperP.style.width = ((UpperP.value.length + 1) * 8) + 'px';
LowerP.style.width = ((LowerP.value.length + 1) * 8) + 'px';
}
Expand Down
23 changes: 18 additions & 5 deletions cake.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title id="dynTitle">FFS CAKE System 6.7 Standard Name</title>
<title id="dynTitle">FFS CAKE System 6.8 Same source</title>
<script>
const geckoapiURL = "https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&ids=pancakeswap-token";
//const geckoapiURL = "https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&ids=pancakeswap-token";
const binanceapiURL = "https://api.binance.com/api/v3/ticker?symbol=CAKEUSDT&windowSize=1d";
const binanceWSS = "wss://stream.binance.com:9443/ws/cakeusdt@trade";
//const fontPriceMulti = 80;

Expand Down Expand Up @@ -416,11 +417,23 @@
return await response.json();
}

// For coingecko, replaced by binance now
// function get24HighLow() {
// getAnyAPI(geckoapiURL).then(
// data => {
// UpperP.value = data[0].high_24h;
// LowerP.value = data[0].low_24h;
// UpperP.style.width = ((UpperP.value.length + 1) * 8) + 'px';
// LowerP.style.width = ((LowerP.value.length + 1) * 8) + 'px';
// }
// );
// }

function get24HighLow() {
getAnyAPI(geckoapiURL).then(
getAnyAPI(binanceapiURL).then(
data => {
UpperP.value = data[0].high_24h;
LowerP.value = data[0].low_24h;
UpperP.value = parseFloat(data["highPrice"]);
LowerP.value = parseFloat(data["lowPrice"]);
UpperP.style.width = ((UpperP.value.length + 1) * 8) + 'px';
LowerP.style.width = ((LowerP.value.length + 1) * 8) + 'px';
}
Expand Down

0 comments on commit cb80296

Please sign in to comment.