diff --git a/index.js b/index.js index b2faa0c..fa14c4a 100644 --- a/index.js +++ b/index.js @@ -9,15 +9,19 @@ module.exports = { macd: macd, } const main = async () => { + console.log("RSI 14 on Binance BTC/USDT 15m") console.log(await rsi(14, "close", "binance", "BTC/USDT", "15m", true)) + console.log("SMA 8 on Binance BTC/USDT 15m") let smaData = await sma(8, "close", "binance", "BTC/USDT", "15m", true) console.log(smaData[smaData.length - 1]) + console.log("Bollinger bands 50, 2 on Binance BTC/USDT 15m") let bbData = await bb(50, 2, "close", "binance", "BTC/USDT", "15m", true) console.log(bbData[bbData.length - 2]) + console.log("MACD 12 26 9 on Binance BTC/USDT 15m") let macdData = await macd(12, 26, 9, "close", "binance", "BTC/USDT", "15m", true) console.log(macdData[macdData.length - 2]) } -main() +main() \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 392affb..5e31e80 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,26 +1,31 @@ { - "name": "trading-indicator", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@types/node": { - "version": "6.14.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-6.14.9.tgz", - "integrity": "sha512-leP/gxHunuazPdZaCvsCefPQxinqUDsCxCR5xaDUrY2MkYxQRFZZwU5e7GojyYsGB7QVtCi7iVEl/hoFXQYc+w==" + "name": "trading-indicator", + "version": "1.0.0", + "description": "provide trading technical indicator values", + "main": "index.js", + "scripts": { + "start": "echo example to fetch data from binance && node index.js", + "test": "echo \"Error: no test specified\" && exit 1" }, - "ccxt": { - "version": "1.22.7", - "resolved": "https://registry.npmjs.org/ccxt/-/ccxt-1.22.7.tgz", - "integrity": "sha512-lkmgr4t/mXK45RrDc+Z2l3nazQTYCR2Udoooo2Mbe93a4mNyBS1EMrTrXULiN/A+BNOQht+ykeWA191pOcm7/Q==" + "repository": { + "type": "git", + "url": "git+https://github.com/thanhnguyennguyen/trading-indicator.git" }, - "technicalindicators": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/technicalindicators/-/technicalindicators-3.0.0.tgz", - "integrity": "sha512-SfRG4sc964nladilTg/rhxi1BeEBaj4KMlxH3lnVm8t7bMgzId/dTePGYuxBe49kE545C66w+/DloPJC9omeew==", - "requires": { - "@types/node": "^6.0.96" - } + "keywords": [ + "trading", + "indicators", + "technicalindicators", + "nguyennguyen", + "ccxt" + ], + "author": "NguyenNguyen (nguyenbk92@gmail.com)", + "license": "ISC", + "bugs": { + "url": "https://github.com/thanhnguyennguyen/trading-indicator/issues" + }, + "homepage": "https://github.com/thanhnguyennguyen/trading-indicator#readme", + "dependencies": { + "ccxt": "^1.22.7", + "technicalindicators": "^3.0.0" } - } -} +} \ No newline at end of file diff --git a/package.json b/package.json index e66c13d..6db9620 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "provide trading technical indicator values", "main": "index.js", "scripts": { +"start": "echo example to fetch data from binance && node index.js", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": {