@strong-roots-capital/bitmex-get-last-record
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

bitmex-get-last-record Build status npm version codecov

Fetch the most-recent record from BitMEX, allowing for a slight publishing-delay

Tests with the /trade/bucketed endpoint show it takes ~15 seconds for BitMEX to publish a candle after session-end. This package abstracts away that (potential) wait with a Promise.

Install

npm install @strong-roots-capital/bitmex-get-last-record

Use

import bitmexGetLastRecord from '@strong-roots-capital/bitmex-get-last-record'
import Record from 'timeseries-record'

(async () => {
    const record: Record = await bitmexGetLastRecord({symbol: 'XBTUSD', binSize: '1d'})
}) ()

Related

Package Sidebar

Install

npm i @strong-roots-capital/bitmex-get-last-record

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

11.2 kB

Total Files

4

Last publish

Collaborators

  • amchelle
  • hamroctopus