@strong-roots-capital/bitmex-type-guards
v1.0.0
Published
Type-guards for Bitmex API objects
Downloads
7
Readme
bitmex-type-guards
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
- [X] Order
More to come as they prove useful. Pull-requests welcome.