项目作者: lijiakof
项目描述 :
💱Cryptocurrency trade API
高级语言: JavaScript
项目地址: git://github.com/lijiakof/tradex.git
💱Tradex
Cryptocurrency trade API for Nodejs.
" class="reference-link">⚖️Features
- Support some popular cryptocurrency exchanges;
- Lightweight, Less dependencies;
- Easy to use;
- Support spot, and perpetual futures is in progress;
- Support Node 12+.
" class="reference-link">🛠Installing
Using yarn:
$ yarn add tradex
Or using npm:
$ npm install tradex
" class="reference-link">🎁Useage
const Tradex = require('tradex');const tradex = new Tradex({ id: 'binance', host: 'https://api.domain.com', apiKey: 'your-apiKey', secretKey: 'your-secretKey'});// use promise.then()tradex.spot.getBalance('usdt').then(res => { console.log(res);});// or use async/await(async () => { const balance = await tradex.spot.getBalance('usdt'); console.log(balance);})();
🔐How to get API’s access permission
If you have any other questions on APIs, you can contact us by below ways:
- Telegram: 👉https://t.me/aikuant👈
- Wechat: Scan 👇QR code👇 and add as a friend, then invite you to join the technical group

🏋🏻♂️Supported Exchange Markets
| Name |
id |
Document |
| Binance |
binance |
doc |
| Huobi Global |
huobi |
doc |
| OKEx |
okex |
doc |
" class="reference-link">📖APIs
- spot
- ✅ getTrick(symbol)
- ✅ getKlines({ symbol, period, limit })
- ✅ getDepth({ symbol, limit })
- ✅ getBalance(currency)
- ✅ getBalances(currencies)
- ✅ buy({ symbol, amount, price })
- 🕐 buys(orders)
- ✅ sell({ symbol, amount, price })
- 🕐 sells(orders)
- 🕐 order(options)
- ✅ cancelOrder({ id, symbol })
- ✅ getOrder({ id, symbol })
- 🚧 getOrders({ symbol, startTime, endTime, limit })
- ✅ invoke({ method, path, data })
- futures(perpetual)
- ✅ getTrick(symbol)
- ✅ getDepth({ symbol, limit })
- ✅ getKlines({ symbol, period, limit })
- ✅ setLeverage({ symbol, leverage })
- 🛠 order({ symbol, position, price, amount })
- 🛠 cancelOrder({ id, symbol })
- 🛠 getOrder({ id, symbol })
- 🚧 getOrders({ symbol, startTime, endTime, limit })
- ✅ invoke({ method, path, data })
Models
" class="reference-link">📄License
MIT
Copyright (c) 2020-present, 一俢(1Jay)