JSPM

  • Created
  • Published
  • Downloads 34
  • Score
    100M100P100Q67496F
  • License BSD 4-Clause

This package is make possible to get data from market, execute order or limit orders with NodeJS through WebSocket connection

Package Exports

  • xapi-node

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (xapi-node) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

xapi-node

This project is made possible to get data from market, execute order or limit orders with NodeJS through WebSocket connection

This module may can be used for X-Trade Brokers xStation5 accounts

WebSocket protocol description: http://developers.xstore.pro/documentation/

This module is usable on Front-end too.

Getting started

1. Install via npm

npm i xapi-node

2. Example usage

// TypeScript
import XAPI from "xapi-node";

const x = new XAPI({
    accountId: "(xStation5) accountID",
    password: "(xStation5) password",
    type: "real" // or demo
});

x.connect();

x.Socket.listen.getTradesHistory((history, time, transaction) => {
    console.log(history[0]);
    console.log(history.length);
});

x.onReady(() => {
    x.Socket.send.getTickPrices(["EURUSD"]).then(({ returnData, time, transaction }) => {
        console.log(returnData.quotations[0]);
    });

    x.Socket.send.getTradesHistory(1,0);
});

Now you can support these projects with bitcoin

BTC: 3Kng1TWvE8qzuoqYqeA2KmMcGucPZFJ75F www.blockchain.com