@strong-roots-capital/bitmex-get-last-record
v1.0.1
Published
Fetch the most-recent record from BitMEX
Downloads
4
Readme
bitmex-get-last-record
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'})
}) ()