1.0.0 • Published 5 years ago

@strong-roots-capital/bitmex-type-guards v1.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

bitmex-type-guards Build status npm version codecov

Type-guards for Bitmex API objects

Install

npm install @strong-roots-capital/bitmex-type-guards

Use

import is from '@strong-roots-capital/bitmex-type-guards'

const promise = bitmex.Order.new({
    symbol: tradepair,
    side: 'Buy',
    orderQty: 100,
    ordType: 'Limit',
    price: 10000,
    execInst: 'ParticipateDoNotInitiate'
})

promise.then(order => console.log(is.order(order)))
//=> true

Supported Type-Guards

  • Order

More to come as they prove useful. Pull-requests welcome.

Acknowledgments