Closed hems closed 1 year ago
hmm, I'll go for the 3rd option, the library will now check if an interval is supported and, if not, it will throw an error: https://github.com/wnz99/tvcd/pull/61
The other options would be good to, but there are a few tricky potential issues, for example 1M
is for months, so it would clash with 1m
for minutes.
I remember I took inspiration from bitfinex for the naming. Bitfines has:
TimeFrame
string
required
Available values: '1m', '5m', '15m', '30m', '1h', '3h', '6h', '12h', '1D', '1W', '14D', '1M'
Good point!
Maybe we could use 30d or 30D instead of 1M tough as that is really unusual timeframe to be used it wouldn't affect most people.
Maybe worth checking how vercel does the 30D thing: https://github.com/vercel/ms
Today i accidentally tried to ask for
3H
candle instead of3h
candle for Bitfinex.For some reason it triggered tons of requests for Bitfinex and screwed my rate limit.
Those are some expectations / suggestions
3H
or3h
the library should be able to "translate" it to the right format, TLDR: allow users to use lowercase or uppercase for the letters perhaps looking at this issue could help standardize it3h
has lowercaseh
but1D
has uppercaseD
undefined
on the URL ( see screenshot )