diff --git a/DOCUMENTATION-ETC/TODO.txt b/DOCUMENTATION-ETC/TODO.txt index 0b40b55..c7031e8 100644 --- a/DOCUMENTATION-ETC/TODO.txt +++ b/DOCUMENTATION-ETC/TODO.txt @@ -25,8 +25,6 @@ ALWAYS do everything in the optimizations / bugs / tests / ux / qa / other secti OPTIMIZATIONS / BUGS / TESTS / UX / QA / OTHER SECTION /////////////////////////////////////////////////////// -Shitmart (bitmart) changed their websocket API...see WTF is going on - REDO feature sets in README / on SF project page, to include upgrade check features and raspi temperature display features. diff --git a/DOCUMENTATION-ETC/changelog.txt b/DOCUMENTATION-ETC/changelog.txt index e7d5152..16e7f6f 100644 --- a/DOCUMENTATION-ETC/changelog.txt +++ b/DOCUMENTATION-ETC/changelog.txt @@ -614,6 +614,10 @@ v3.08.3 -BUG FIX: Auto-installer script works again (sorry!) +-Removed bitmart's shitty API (lol) + +-Added changelog link to upgrade alert + --------------------------------------------------------- diff --git a/README.txt b/README.txt index 108f0cd..1780857 100644 --- a/README.txt +++ b/README.txt @@ -3,7 +3,7 @@ Slideshow Crypto Ticker - Developed by Michael Kilday , r Copyright 2019-2022 GPLv3 -Open source / 100% FREE real time slideshow crypto price ticker for Raspberry Pi LCD screens, including 24 hour volume and CoinGecko / Binance / Coinbase Pro / Kraken / Kucoin / Bitstamp / Bitfinex / HitBTC / OKex / Bitmart / Gate.io support (more market support coming in the future). +Open source / 100% FREE real time slideshow crypto price ticker for Raspberry Pi LCD screens, including 24 hour volume and CoinGecko / Binance / Coinbase Pro / Kraken / Kucoin / Bitstamp / Bitfinex / HitBTC / OKex / Gate.io support (more market support coming in the future). Supports running in "slideshow mode", to show all the markets you want. diff --git a/bash/firefox.bash b/bash/firefox.bash index 3e7af86..3662ddb 100644 --- a/bash/firefox.bash +++ b/bash/firefox.bash @@ -26,5 +26,5 @@ fi # kiosk mode (for UX) -$FIREFOX_PATH --kiosk -new-tab ~/slideshow-crypto-ticker/index.html +$FIREFOX_PATH --kiosk -private -new-tab ~/slideshow-crypto-ticker/index.html diff --git a/bash/ticker-restart.bash b/bash/ticker-restart.bash index cac24cc..a8a4d7e 100644 --- a/bash/ticker-restart.bash +++ b/bash/ticker-restart.bash @@ -16,6 +16,8 @@ xdotool windowactivate ${WID} xdotool key ctrl+F5 # firefox +rm -rf ~/.cache/mozilla/firefox/* +sleep 1 WID=$(xdotool search --onlyvisible --class firefox|head -1) xdotool windowactivate ${WID} xdotool key ctrl+F5 \ No newline at end of file diff --git a/config.js b/config.js index c06fb2f..be213db 100644 --- a/config.js +++ b/config.js @@ -35,8 +35,6 @@ var exchange_markets = []; // LEAVE ALONE, AND DON'T DELETE (REQUIRED!!) // Hitbtc formatting example (MULTIPLE TICKERS NOT SUPPORTED): 'ETHBTC' // Gate.io formatting example: 'MANA_USDT|SAMO_USDT' - -// Bitmart formatting example: 'SG_USDT|SG_BTC' //// //// // Bitstamp markets (set to '' to disable) @@ -84,10 +82,6 @@ exchange_markets['hitbtc'] = ''; //// // Gateio markets (set to '' to disable) exchange_markets['gateio'] = 'SLC_USDT|RNDR_USDT|SLRS_USDT|BIT_USDT|SAMO_USDT'; -//// -//// -// Bitmart markets (set to '' to disable) -exchange_markets['bitmart'] = ''; // SHITMART NOT WORKING FOR NOW, THEY DECIDED TO CHANGE THEIR API! // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/js/core/api.js b/js/core/api.js index 551a95f..d69e539 100644 --- a/js/core/api.js +++ b/js/core/api.js @@ -142,6 +142,7 @@ function upgrade_check() { window.latest_version_description = latest_version_description + "Manual Install File:\n\n" + latest_version_download + + "\n\nChangelog:\n\nhttps://raw.githubusercontent.com/taoteh1221/Slideshow_Crypto_Ticker/main/DOCUMENTATION-ETC/changelog.txt" + "\n\n(select all the text of either install method to auto-copy to clipboard)"; $("#upgrade_alert").css({ "display": "block" }); @@ -311,8 +312,6 @@ api['bitfinex'] = 'wss://api.bitfinex.com/ws/1'; api['okex'] = 'wss://ws.okex.com:8443/ws/v5/public'; -api['bitmart'] = 'wss://ws-manager-compress.bitmart.com?protocol=1.1'; - api['gateio'] = 'wss://ws.gate.io/v3/'; @@ -623,25 +622,6 @@ alph_symb_regex = /^[a-z0-9\/\-_|:]+$/i; }); } - // Bitmart - else if ( exchange == 'bitmart' ) { - - // API call config - subscribe_msg[exchange] = { - "op": "subscribe", - "args": [ - ] - }; - - - // Add markets to API call - var loop = 0; - markets[exchange].forEach(element => { - subscribe_msg[exchange].args[loop] = "spot/ticker:" + element; - loop = loop + 1; - }); - - } if ( debug_mode == 'on' ) { @@ -671,8 +651,8 @@ function websocket_connect(exchange) { sockets[exchange] = new WebSocket(api[exchange]); - // Fopr bitmart, hange binary type from "blob" to "arraybuffer" - if ( exchange == 'bitmart' ) { + // Fopr EXCHANGE_NAME_HERE, hange binary type from "blob" to "arraybuffer" + if ( exchange == 'EXCHANGE_NAME_HERE' ) { sockets[exchange].binaryType = "arraybuffer"; } @@ -687,15 +667,14 @@ function websocket_connect(exchange) { sockets[exchange].onmessage = function(e) { - // Check if response is JSON format or bitmart's compressed websocket data, otherwise presume just a regular string + // Check if response is JSON format or compressed websocket data, otherwise presume just a regular string if ( is_json(e.data) == true ) { msg = JSON.parse(e.data); } - else if ( exchange == 'bitmart' ) { + else if ( exchange == 'EXCHANGE_NAME_HERE' ) { // NOTES ON DECOMPRESSING (ALSO NEEDED sockets[exchange].binaryType = "arraybuffer"; before opening websocket) - // https://developer-pro.bitmart.com/en/ws/spot_ws/compress.html // https://nodeca.github.io/pako/ // https://stackoverflow.com/questions/4507316/zlib-decompression-client-side // https://stackoverflow.com/questions/57264517/pako-js-error-invalid-stored-block-lengths-when-trying-to-inflate-websocket-m @@ -850,18 +829,6 @@ function websocket_connect(exchange) { base_volume = pair_volume('pairing', price_raw, volume_raw); } - // Bitmart - else if ( exchange == 'bitmart' && msg['table'] == 'spot/ticker' ) { - - market_id = msg["data"][0]["symbol"]; - - price_raw = msg["data"][0]["last_price"]; - - volume_raw = msg["data"][0]["base_volume_24h"]; - - base_volume = pair_volume('pairing', price_raw, volume_raw); - - } // Nullify rendering under these circumstances (msg is not our data set)