Gathering detailed insights and metrics for smxt
Gathering detailed insights and metrics for smxt
Gathering detailed insights and metrics for smxt
Gathering detailed insights and metrics for smxt
npm install smxt
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
1,309
Last Day
1
Last Week
83
Last Month
176
Last Year
1,309
4 Stars
22 Commits
1 Watching
1 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
1.0.22
Package Id
smxt@1.0.22
Unpacked Size
114.77 kB
Size
13.05 kB
File Count
13
NPM Version
10.2.4
Node Version
20.11.1
Publised On
20 Dec 2024
Cumulative downloads
Total Downloads
Last day
-50%
1
Compared to previous day
Last week
822.2%
83
Compared to previous week
Last month
55.8%
176
Compared to previous month
Last year
0%
1,309
Compared to previous year
4
A JavaScript library for cryptocurrency trading.
We aim to easily link multiple exchanges with one strategy code.
1npm install smxt
1//cjs 2var smxt = require('smxt') 3console.log(smxt) // print all available exchanges
1var smxt = require('smxt') 2 3let binance = new smxt.Binance( 4 apiKey = "YOUR_API_KEY", 5 apiSecret = "YOUR_API_SECERT" 6) 7 8let bitget = new smxt.Bitget( 9 apiKey = "YOUR_API_KEY", 10 apiSecret = "YOUR_API_SECERT", 11 passphrase = "YOUR_PASSPHRASE" 12) 13 14let bybit = new smxt.Bybit( 15 apiKey = "YOUR_API_KEY", 16 apiSecret = "YOUR_API_SECERT" 17) 18 19let okx = new smxt.Okx( 20 apiKey = "YOUR_API_KEY", 21 apiSecret = "YOUR_API_SECERT", 22 passphrase = "YOUR_PASSPHRASE" 23) 24 25let gateIo = new smxt.GateIo( 26 apiKey = "YOUR_API_KEY", 27 apiSecret = "YOUR_API_SECERT" 28) 29 30let orderly = new smxt.Orderly( 31 accountId = "YOUR_ACCOUNT_ID", 32 apiSecret = "YOUR_API_SECERT" 33)
1let totalEquity = await bybit.getTotalEquity() 2console.log(totalEquity) // 1000.0 3 4let symbolBalance = await bybit.getSymbolBalance("USDT") 5console.log(symbolBalance) // 700.0
1// init symbol info (tick step, qty step, min qty) 2await bybit.initSymbolInfo() 3console.log(bybit.symbolInfo) 4// { 5// BTCUSDT: { amountTick: 0.001, priceTick: 0.1, minValue: 0.001, maxOrderSize: 100, contractValue: 1} 6// ETHUSDT: { amountTick: 1, priceTick: 0.0001, minValue: 1, maxOrderSize: 10000, contractValue: 1} 7// } 8 9let timeframe = "1d" // or 4h, 1h, 30m, 15m, 5m, 1m 10let kline = await bybit.getKline("ETHUSDT", timeframe) 11console.log(kline) 12// [ 13// { 14// open: 3138.75, 15// high: 3169.63, 16// low: 3126.45, 17// close: 3135.52, 18// volume: 10228.3683, 19// timestamp: 1714003200000 20// }, 21// { 22// open: 3219.37, 23// high: 3292.7, 24// low: 3103.04, 25// close: 3138.74, 26// volume: 53623.2576, 27// timestamp: 1713916800000 28// } 29// ]
1let orderType = "limit" // or market
2let side = "buy" // or sell
3let amount = 10
4let price = 0.4
5let orderId = await bybit.postOrder(
6 "XRPUSDT",
7 orderType,
8 side,
9 amount,
10 price
11)
12console.log(orderId)
13
14let position = await bybit.getPosition("XRPUSDT")
15console.log(position) // 10.0(long) or -10.0(short)
16
17await bybit.cancelAllOrders("XRPUSDT")
For business inquiries: dev@tradingtau.com
No vulnerabilities found.
No security vulnerabilities found.