项目作者: lijiakof

项目描述 :
💱Cryptocurrency trade API
高级语言: JavaScript
项目地址: git://github.com/lijiakof/tradex.git
创建时间: 2020-04-20T14:06:00Z
项目社区:https://github.com/lijiakof/tradex

开源协议:MIT License

下载


💱Tradex

Cryptocurrency trade API for Nodejs.

Features · Install · Useage · Contact · APIs · License · 中文

" 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:

  1. $ yarn add tradex

Or using npm:

  1. $ npm install tradex

" class="reference-link">🎁Useage

  1. const Tradex = require('tradex');
  2. const tradex = new Tradex({
  3. id: 'binance',
  4. host: 'https://api.domain.com',
  5. apiKey: 'your-apiKey',
  6. secretKey: 'your-secretKey'
  7. });
  8. // use promise.then()
  9. tradex.spot.getBalance('usdt').then(res => {
  10. console.log(res);
  11. });
  12. // or use async/await
  13. (async () => {
  14. const balance = await tradex.spot.getBalance('usdt');
  15. console.log(balance);
  16. })();

🔐How to get API’s access permission

" class="reference-link">☎️Contact

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

Wechat

🏋🏻‍♂️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)