1.0.6 • Published 5 years ago

@strong-roots-capital/to-bitmex-timeframe v1.0.6

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

to-bitmex-timeframe Build status npm version codecov

Convert a TradingView timeframe to a BitMEX timeframe

Install

npm install @strong-roots-capital/to-bitmex-timeframe

Use

import toBitmexTimeframe from '@strong-roots-capital/to-bitmex-timeframe'

toBitmexTimeframe('1')
//=> '1m'

toBitmexTimeframe('5')
//=> '5m'

toBitmexTimeframe('1H')
//=> '1h'

toBitmexTimeframe('1D')
//=> '1d'

toBitmextimeframe('1W')
//=> { ArgumentError: Expected string to be one of `["1","5","1H","1D"]`, got `1W` }

Note: for convenience in conjunction with bitmex-node, the type of return type is '1m' | '5m' | '1h' | '1d'.

Related

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago