Write and read from Go or Python
A few lines to write bars and read them back. A command-line tool imports and exports CSV.
Candles and ticks for trading and research, live and historical.
A few lines to write bars and read them back. A command-line tool imports and exports CSV.
c, err := client.Dial("localhost:8080", client.Options{})
if err != nil {
log.Fatal(err)
}
defer c.Close()
stream := client.NewStreamID("binance", "ETHUSDT", "1m")
err = c.IngestCandles(ctx, stream, bars, client.DurabilityAcked)
resp, err := c.QueryCandles(ctx, client.QueryRequest{
StreamID: stream,
StartTime: start.UnixNano(),
EndTime: end.UnixNano(),
})
for _, p := range resp.Points {
fmt.Println(p.Candle.Timestamp, p.Candle.Close)
}Seven databases and plain Parquet files, on one cloud machine that ran nothing but the benchmark, with the same 10 million candles. Each system ran at its defaults and with tuning; the table shows whichever did better. Median of five runs.
| Measure | Mirexa | Next best | QuestDB |
|---|---|---|---|
| Candles written per second, each batch saved to disk | 1,653K | 1,742KParquet + DuckDB | 311K |
| Read one day of one symbol (1,440 bars), median | 0.58 ms | 2.70 msTimescaleDB | 8.47 ms |
| Read the latest 100 bars, median | 0.19 ms | 1.14 msQuestDB | 1.14 ms |
| One-day reads per second, eight clients at once | 4,259 | 1,066TimescaleDB | 576 |
| Size on disk for 10 million candles | 116 MiB | 102 MiBDuckDB table | 525 MiB |
Level with Parquet + DuckDB on writing (a library inside the client, not a server) and with DuckDB table on size on disk. A whole symbol reads 1.3× faster than on ClickHouse here; ClickHouse is quicker on cold reads and at 100 million rows. All results and caveats.
In development, by one developer.