This project was developed to assist in formatting the binance symbols to better represent values in both the backend and front end. No api is used to query and perform the formatting, it is purely done with string manipulation to have more performance and availability.
npm install @clubinvestbr/format --save
yarn add @clubinvestbr/format
const { format } = require('@clubinvestbr/binance-format');
format("BTCETH");
// "BTC/ETH"
format("BTCUSDT");
// "BTC/USDT"
format("BTCWAVES");
// "BTC/WAVES"
const { unformat } = require('@clubinvestbr/binance-format');
unformat("BTC/ETH");
// "BTCETH"
unformat("BTC/USDT");
// "BTCUSDT"
unformat("BTC/WAVES");
// "BTCWAVES"