tradex

0.1.4-beta.6 • Public • Published

💱Tradex

Cryptocurrency trade API for Nodejs.

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

⚖️Features

  • Support some popular cryptocurrency exchanges;
  • Lightweight, Less dependencies;
  • Easy to use;
  • Support spot and perpetual futures;
  • Support Node 12+.

🛠Installing

Using yarn:

$ yarn add tradex

Or using npm:

$ npm install tradex

🎁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

☎️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

📖APIs

  • spot
    • ✅ getTrick(symbol)
    • ✅ getDepth({ symbol, limit })
    • ✅ getKlines({ symbol, period, limit })
    • ✅ getBalance(currency)
    • ✅ getBalances(currencies)
    • ✅ buy({ symbol, amount, price })
    • ✅ sell({ symbol, amount, price })
    • ✅ 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

📄License

MIT

Copyright (c) 2020-present, 一俢(1Jay)

Readme

Keywords

Package Sidebar

Install

npm i tradex

Weekly Downloads

2

Version

0.1.4-beta.6

License

MIT

Unpacked Size

150 kB

Total Files

30

Last publish

Collaborators

  • lijiakof