(download! {:keys [market index date-str]})Return input stream of csv.gzip file, given opts map:
:index e/o #{:trading :spot :premium}:market instrument symbol to download data from:date-str date to download as string in format 'YYYY-MM-DD'See: https://public.bybit.com/
Note: The input stream is from a gzipped file, you have to pipe it through a GZipInputStream to read it line by line.
Note: Some files might come in reverse order, first line (after csv header) being last event of the day. (Observed in :trading index 'BTCUSD' market, where format was changed in 07-12-2021 from decreasing time to increasing time, also changing timestamp from seconds.micros to only seconds).
Example:
(->> (download! :trading "BTCUSD" "2020-01-01")
(java.util.zip.GZIPInputStream.)
(clojure.java.io/reader)
(line-seq))
Return input stream of csv.gzip file, given opts map:
- `:index` e/o #{:trading :spot :premium}
- `:market` instrument symbol to download data from
- `:date-str` date to download as string in format 'YYYY-MM-DD'
See: https://public.bybit.com/
Note: The input stream is from a gzipped file, you have to pipe it through a GZipInputStream
to read it line by line.
Note: Some files might come in reverse order, first line (after csv header) being last event of
the day. (Observed in :trading index 'BTCUSD' market, where format was changed in 07-12-2021 from
decreasing time to increasing time, also changing timestamp from seconds.micros to only seconds).
Example:
```clojure
(->> (download! :trading "BTCUSD" "2020-01-01")
(java.util.zip.GZIPInputStream.)
(clojure.java.io/reader)
(line-seq))
```cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |