1.0.6 • Published 5 years ago

beast-api-node v1.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

beast-api-node

Node.js wrapper for the Beast framework master API server. All functions return promises.

Install

npm i beast-api-node

Setup

const beast = new BeastAPI({
  apiBase: 'http://localhost:3100/api/',
  wsBase: 'ws://localhost:3100/',
  debug: true
});

Websockets

The subscribe function returns a promise that resolves with the websocket object, if the connection is successfully opened.

beast.subscribe('workers', message => {
  console.log('received message on channel workers: ', JSON.parse(message, null, 4));
});

REST

All REST API methods return a promise that resolves with the result of the request.

const rangeInfo = {
  time: '90d',
  strategy: 'ts_rsi'
};
const symbols = 'XRPUSDT';
const timeframes = '4h';

const backfillResults = await beast.backfill(
  symbols,
  timeframes,
  rangeInfo
);
1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago