bot18
Version:
A high-frequency cryptocurrency trading bot by Zenbot creator @carlos8f
27 lines (21 loc) • 435 B
JavaScript
const Model = require('../model')
const BOOL_FIELDS = []
const FIELDS = {
mts: 0,
open: 1,
close: 2,
high: 3,
low: 4,
volume: 5
}
const FIELD_KEYS = Object.keys(FIELDS)
class Candle extends Model {
constructor (data = {}) {
super(data, FIELDS, BOOL_FIELDS, FIELD_KEYS)
}
static unserialize (arr) {
return super.unserialize(arr, FIELDS, BOOL_FIELDS, FIELD_KEYS)
}
}
module.exports = Candle