Command line
mirexa-cli drives a node from a shell: write CSV, read ranges back as CSV, follow a stream live, set the stream settings that live on the node (trading calendars, lineage, cache size), administer a cluster, check a node's storage, and bulk-load CSV and Parquet files. Without any node, it also issues access tokens and the certificates a cluster's nodes use. make build puts it at ./bin/cli; its messages call it mirexa-cli. Every example here uses ./bin/cli.
- authenticationTokens, permissions and TLS
- ingestWrite candles or ticks from CSV
- queryRead a range as CSV
- subscribeFollow a stream live
- streamsList the streams a node holds
- calendarTrading hours and closures
- lineageWhat a stream is derived from
- cacheHow much of a stream is kept in memory
- streamCreate, delete, label and inspect a stream
- gapList a stream's gaps; accept an incomplete bar
- clusterNodes, partitions, health, moves and drains
- diagA node's disk and what it stores
- dataCheck a data directory for damage
- loadBulk-load CSV and Parquet files
- tokenSigning keys and access tokens, offline
- certsA cluster's certificates, offline
Two listeners
Some commands speak Mirexa's binary protocol on the node's data port. Those that change stream settings or administer a cluster use the node's control listener (gRPC), which is off until you turn it on. data verify uses neither: it reads a data directory on the node's own machine.
| Commands | Port | Flag |
|---|---|---|
ingest query subscribe streams stream inspect gap list diag | network.addr | -addr, default localhost:8080 |
calendar lineage cache gap accept stream create/delete/set-custom-fields cluster | control.addr | -control, default 127.0.0.1:9091 |
data verify | none | -data-dir, the node's storage.data_dir |
To use the setting commands, turn the control listener on in the node's configuration. It listens on 127.0.0.1:9091, which is also where -control looks by default; metrics and health checks keep 9090. A node refuses a configuration that puts two of its listeners on one port.
control:
enabled: true./bin/cli calendar get -stream nyse:AAPL:1mThe node refuses a control address that is not loopback unless control.admin_auth is on. With it on, every setting command needs a token carrying ADMIN_CLUSTER; see Authentication.
Flags every data-port command takes
| Flag | Default | What it does |
|---|---|---|
-addr | localhost:8080 | The node's data port, host:port. |
-stream | The stream, as exchange:symbol:timeframe, for example binance:BTCUSDT:1m. | |
-token | $MIREXA_TOKEN | A token from token issue, or the node's own admin token. With none, the CLI connects unauthenticated, which only a node with authentication off accepts. |
-token-file | A file holding the token. Give -token or -token-file, not both. | |
-tls-ca | A PEM file with the CA to trust. Setting it turns TLS on. | |
-tls-server-name | the -addr host | The name the node's certificate must carry. |
-reconnect | 3 | Connection attempts per operation, so a command rides out a node restarting. 1 fails on the first refused dial. |
Flags every setting command takes
| Flag | Default | What it does |
|---|---|---|
-control | 127.0.0.1:9091 | The node's control listener, host:port. |
-stream | The stream, as exchange:symbol:timeframe. | |
-token | $MIREXA_TOKEN | A token with ADMIN_CLUSTER, needed when control.admin_auth is on. |
-token-file | A file holding that token. | |
-tls-ca | A PEM file with the CA to trust, when the node sets control.use_tls. | |
-tls-server-name | the -control host | The name the node's certificate must carry. |
-timeout | 30s | Deadline for the whole command. |
Conventions
- A timestamp you give is RFC 3339 (
2026-10-20T09:30:00Z) or Unix nanoseconds. - A range is
[start, end): the start is included and the end is not. - Results go to standard output; progress and warnings go to standard error, so output can be piped as it is.
- A command that fails exits with status 1 and prints
mirexa-cli:and the reason, including the node's own reason for a refusal. - On a cluster, the CLI talks to the one node you name. A data command for a stream another node is primary of fails with a redirect naming that node; run it there. Send setting changes to the stream's primary too: copies take their primary's settings.
Authentication
Authentication is on by default, and a node with it on refuses a connection that carries no valid token. The CLI does not log in: you hand it a token. A single node with no trusted_keys configured makes its own signing key and writes an admin token, carrying every permission, to <data_dir>/auth/admin.token; it re-mints the file every 20 minutes. Narrower tokens are minted offline with token issue, from the node's key (<data_dir>/auth/issuer.key) or from your own. Get started, step 6 covers both. The examples on this page leave the token out; with authentication on, add one.
The CLI takes the token from the first of these that is set:
-token, the token itself. Convenient, and it ends up in your shell history.-token-file, a file holding it. Give one of the two flags, not both.$MIREXA_TOKEN, the environment variable.
With none set, the CLI connects without a token, which only a node with security.auth.enabled: false accepts. Such a node grants what security.max_permissions allows.
./bin/cli query -stream binance:BTCUSDT:1m -token-file data/auth/admin.token
./bin/cli token issue -key data/auth/issuer.key \
-perms READ_CANDLES,WRITE_CANDLES -validity 1h > token
./bin/cli query -stream binance:BTCUSDT:1m -token-file token
export MIREXA_TOKEN=$(cat token)
./bin/cli query -stream binance:BTCUSDT:1mWhich permission each command needs
| Command | Permission |
|---|---|
ingest | WRITE_CANDLES, or WRITE_TICKS with -ticks |
query subscribe | READ_CANDLES, or READ_TICKS with -ticks |
streams diag storage | LIST_STREAMS |
stream inspect gap list | READ_CANDLES; inspect adds storage statistics with LIST_STREAMS |
calendar lineage cache gap accept stream create/delete/set-custom-fields cluster | ADMIN_CLUSTER, only when the node sets control.admin_auth |
data verify | none: it reads files, so it needs read access to the data directory |
The node may grant less than a token asks for: it caps every grant at security.max_permissions. ingest and streams check the grant before reading any input and stop with the permission that is missing; the other commands get the node's refusal.
Expiry
- A token lives at most one hour. A node refuses an expired token at the handshake, refuses a writer's next write once it expires, and disconnects a subscriber at the moment it does.
- With
-token-file, a longsubscribeoringestre-reads the file before its token runs out and renews the session over the open connection, and on every reconnect. Rewrite the file with a fresh token before the old one expires and the command keeps running. - A token from
-tokenor$MIREXA_TOKENcannot be refreshed: the command fails once it expires.
TLS
-tls-ca names a PEM file holding the CA to trust and turns TLS on; the CLI then speaks TLS 1.3 only. The certificate must carry the host in -addr (or -control), or the name in -tls-server-name. A token sent without TLS can be read by anyone on the path, so use both when the node is not on your machine.
ingest
Reads CSV from standard input and writes it to one stream. Candles are timestamp,open,high,low,close,volume; ticks (-ticks) are timestamp,price,volume. Needs WRITE_CANDLES or WRITE_TICKS.
| Flag | Default | What it does |
|---|---|---|
-ack | true | Wait for each batch to be in the node's write-ahead log and fsynced. -ack=false does not wait: faster, and the command can finish before the data is durable. |
-batch | 1000 | Records per batch sent. |
-flush | 100ms | Send a partial batch once its oldest record has waited this long. |
-ticks | Read ticks instead of candles. | |
-history | Bulk historical load: the node compresses the rows straight into stored chunks, skipping the write-ahead log and the in-memory cache. They become readable when the command finishes. The way to load old data, and the only way to load bars older than the stream's cache. | |
-correct | Restate bars the node already stores. Bars already on disk get a patch; bars still in memory are replaced in place. | |
-overwrite | Write to a derived stream, which the node otherwise refuses. Combines with -history or -correct. |
./bin/cli ingest -stream binance:BTCUSDT:1m < candles.csv
ingested 1440 candles into binance:BTCUSDT:1m in 2 batch(es)
./bin/cli ingest -stream binance:BTCUSDT:1m -history < last-year.csv
./bin/cli ingest -stream binance:BTCUSDT:1s -ticks < trades.csvA live write must land within the stream's cache, near its newest data, and a batch must not span more slots than the cache holds. A batch the node is too busy to take is resent for you.
query
Reads [start, end) and prints CSV with no header: timestamp,open,high,low,close,volume for candles and timestamp,price,volume for ticks, timestamps in RFC 3339, UTC. Pages through long ranges by itself. Needs READ_CANDLES or READ_TICKS.
| Flag | Default | What it does |
|---|---|---|
-start, -end | required | The range. |
-max | 0 | Stop after this many rows. 0 reads the whole range. |
-gaps | Also print each missing bar, as a row with empty prices and gap in a seventh column; data rows get an empty seventh column. | |
-ticks | Read trades instead of candles. | |
-rollup | Answer bars of this length (7m, 4h, 24h), made from the stream's candles at query time, or with -ticks from its trades. Nothing is stored. |
./bin/cli query -stream binance:BTCUSDT:1m \
-start 2026-10-20T09:30:00Z -end 2026-10-20T09:33:00Z -gaps
2026-10-20T09:30:00Z,67012.5,67248.75,66981.25,67104,148.2,
2026-10-20T09:31:00Z,,,,,,gap
2026-10-20T09:32:00Z,67171.3,67202,67120.45,67140.8,121.9,Give -stream a comma-separated list to read several streams over the same range in one request; each row then starts with its stream. If some streams fail, the rows of the others are printed and the command then fails, naming the ones that failed.
./bin/cli query -stream binance:BTCUSDT:1m,binance:ETHUSDT:1m \
-start 2026-10-20T09:30:00Z -end 2026-10-20T09:31:00Z
binance:BTCUSDT:1m,2026-10-20T09:30:00Z,67012.5,67248.75,66981.25,67104,148.2
binance:ETHUSDT:1m,2026-10-20T09:30:00Z,2412.1,2415.8,2409.55,2414.95,182.4subscribe
Prints every new bar (or trade, with -ticks) as the node stores it, as CSV with Unix-nanosecond timestamps, until stopped with Ctrl+C. Needs READ_CANDLES or READ_TICKS.
| Flag | Default | What it does |
|---|---|---|
-backfill | Send stored history first, then live data, with no gap between them. Standard error says backfill complete; live from here at the switch. | |
-from | 0 | Where the history starts, in Unix nanoseconds; 0 is the earliest stored. |
-count | 0 | Stop after this many records. 0 runs until stopped. |
-resume | If the connection drops, reconnect and carry on from the last record received. | |
-ticks | Follow trades instead of candles. |
./bin/cli subscribe -stream binance:BTCUSDT:1m -backfill -resumeA record that arrives while the history is being sent can be printed twice, once in each part; never missed. If this consumer falls behind, the node drops batches rather than slowing the stream, and standard error says how many and which.
streams
Lists every stream the node holds, as CSV with a header. Needs LIST_STREAMS.
| Flag | Default | What it does |
|---|---|---|
-stats | Add persisted_records, chunks, corrections, bytes_on_disk, first_time and last_time. The counts cover what is stored on disk; the times include what is still in memory. |
./bin/cli streams
exchange,symbol,timeframe
binance,BTCUSDT,1m
nyse,AAPL,1m
2 stream(s)calendar
A stream's trading calendar is what tells a market closure apart from missing data: weekly hours in the exchange's time zone, declared closures such as holidays and halts, and for a market with no hours, how long a pause has to be to count as a closure. Every change re-files the gaps the stream already recorded before the command returns, and standard error says how much was re-filed. Prints the calendar as JSON.
| Command | Flags | What it does |
|---|---|---|
calendar get | Print the calendar. | |
calendar set | -timezone, -hours, -no-hours, -threshold-low, -threshold-high | Change the weekly hours and thresholds. Flags you do not give keep their values. Registers a stream the node does not know yet. |
calendar add-closure | -from, -to, -note | Declare a closure over [from, to). Also the way to mark one gap as expected. |
calendar remove-closure | -from, -to | Remove a range from the declared closures, cutting any it overlaps. |
| Flag | Default | What it does |
|---|---|---|
-timezone | The IANA time zone the hours are written in, such as America/New_York. Hours with none are UTC. | |
-hours | DAYS=WINDOWS, repeatable, replacing the weekly hours: mon-fri=09:30-16:00, or sat=10:00-12:00,13:00-15:00 for a break. | |
-no-hours | Remove the weekly hours: the market never closes. | |
-threshold-low | The shortest gap recorded, such as 5m. | |
-threshold-high | On a stream with no hours, a gap at least this long is a closure, such as 12h. |
./bin/cli calendar set -control 127.0.0.1:9091 -stream nyse:AAPL:1m \
-timezone America/New_York -hours mon-fri=09:30-16:00
./bin/cli calendar add-closure -control 127.0.0.1:9091 -stream nyse:AAPL:1m \
-from 2026-11-26T09:30:00-05:00 -to 2026-11-26T16:00:00-05:00 -note Thanksgivinglineage
Declares that a stream's candles are derived from a source — the same instrument's trades, or its shorter candles — so the node writes them itself as the source's data arrives. Prints the lineage as JSON, or null for a stream that is not derived.
| Command | What it does |
|---|---|
lineage get | Print the lineage. |
lineage set | Declare or change it. |
lineage clear | Stop deriving. Candles already derived are kept. |
| Flag | Default | What it does |
|---|---|---|
-kind | ticks or candles: what the stream is derived from. | |
-source | -stream | The source stream. For ticks it defaults to the stream itself, whose trades feed its candles. |
-history | required | from-now derives only what arrives from now on. rederive also derives everything the source already holds, walking it in the background; rederive_pending in the printed lineage stays true until it has caught up. |
-grace | 1s | How long past a bar's close late data still joins that bar. |
-no-trade-limit | 10s | Ticks only: the longest silence between trades that is not missing data. |
./bin/cli lineage set -control 127.0.0.1:9091 -stream binance:ETHUSDT:1m \
-kind ticks -history from-now
./bin/cli lineage set -control 127.0.0.1:9091 -stream binance:ETHUSDT:5m \
-kind candles -source binance:ETHUSDT:1m -history rederiveA derived stream refuses ordinary writes; write to it with ingest -overwrite.
cache
Each stream keeps its newest bars in memory, in a window of slots one bar-length apart. The window's size is the stream's memory — 40 bytes a slot, set aside whether or not a bar fills it — and the widest batch a live write can span. By default the node sizes it from the stream's timeframe: enough slots for about five weeks of bars (what 50,000 one-minute bars cover), but no fewer than 2,048 and no more than 50,000.
| Timeframe | Slots | Memory |
|---|---|---|
1s to 1m | 50,000 | 2 MB |
5m | 10,000 | 400 KB |
15m | 3,334 | 133 KB |
30m and longer | 2,048 | 82 KB |
The node settings behind it are ingestion.live_candle.cache_arena_capacity (50000, the most slots a window can have) and cache_span (the time a window covers; unset, what cache_arena_capacity one-minute bars cover, so raising the capacity raises it too). cache overrides one stream.
| Command | What it does |
|---|---|
cache get | Print the stream's size and where it comes from. |
cache set -slots N | Give the stream N slots, from 16 to 8,388,608. Registers a stream the node does not know yet. |
cache clear | Remove the override; the default for the timeframe applies again. |
./bin/cli cache get -control 127.0.0.1:9091 -stream nyse:IBM:1h
2048 slots (node default for 1h)
./bin/cli cache set -control 127.0.0.1:9091 -stream nyse:IBM:1h -slots 8760
8760 slots (override)
./bin/cli cache clear -control 127.0.0.1:9091 -stream nyse:IBM:1h
2048 slots (node default for 1h)- The running stream takes the new size before the command returns: what its cache holds is written to disk, and the cache is rebuilt at the new size. Nothing is lost, and everything stays readable.
- Raise it when a client writes a stream live in batches wider than its window, such as a year of hourly bars at once. Loading old data with
ingest -historyneeds no cache at all. - Lower it to save memory on streams no client writes in large batches. Below the client's batch size, its batches are refused as too wide.
- The size is kept with the stream across restarts, and a copy takes its primary's. Only this command changes it; the clients cannot.
stream
Creates, deletes, labels and inspects one stream. A write registers a stream on its own, so create is for setting a stream up before its first data.
| Command | Listener | What it does |
|---|---|---|
stream create | control | Registers the stream. One already registered is left as it is; the command says so and succeeds. |
stream delete | control | Takes the stream out of the node's catalog. Its chunks, indexes and log records are not deleted, and a write to it registers it again. One not in the catalog is reported and succeeds. |
stream set-custom-fields | control | Adds, changes or removes free-form labels on the stream (-set key=value, -remove key, each repeatable). The rest of the stream's settings are kept. Labels change nothing the node does. |
stream inspect | data | Prints one JSON object: the stream's settings (hours, thresholds, closures, lineage, cache size, labels), its storage statistics, and a summary of its gaps. |
./bin/cli stream create -stream nyse:AAPL:1m
./bin/cli stream set-custom-fields -stream nyse:AAPL:1m -set desk=equities -set owner=ops
./bin/cli stream inspect -stream nyse:AAPL:1m
{
"stream": "nyse:AAPL:1m",
"metadata": {
"working_hours": { "timezone": "America/New_York", "days": [ ... ] },
"gap_threshold_low": "0s",
"gap_threshold_high": "0s",
"closures": [],
"lineage": null,
"cache_capacity": 0,
"custom_fields": { "desk": "equities", "owner": "ops" }
},
"stats": { "persisted_records": 98280, "chunks": 252, "corrections": 0, ... },
"gaps": { "count": 251, "open": 1, "fillable": 1, "off_time_count": 250,
"missing": "5m0s", "off_time": "4377h30m0s" }
}stats is null when the token lacks LIST_STREAMS. The counts cover what is on disk.
gap
gap list prints a stream's filed gaps as CSV, one row per range, with its status, its reason and whether it may be filled. A reason of OFF_TIME is a market closure, which is never fillable; the fill_refusal column says why a gap is not. Only gaps in data already written to disk are filed: a hole still in memory is not listed yet. A summary goes to standard error. gap list uses the data port and needs READ_CANDLES.
| Flag | Default | What it does |
|---|---|---|
-start | the beginning | Window start. A gap that overlaps the window is listed whole. |
-end | no end | Window end, not included. |
-open | Only gaps still OPEN. |
./bin/cli gap list -stream nyse:AAPL:1m
start,end,duration,status,reason,fillable,fill_refusal
2026-10-27T15:12:00Z,2026-10-27T15:17:00Z,5m0s,OPEN,UNKNOWN,true,
2026-10-27T20:00:00Z,2026-10-28T13:30:00Z,17h30m0s,PERMANENT,OFF_TIME,false,the market was closed for this period, so there is no data to recover
2 gap(s), 1 open, 1 fillable: 5m0s missing, 17h30m0s closed (off-time)A bar the node derived while some of its source data was missing carries an INCOMPLETE mark. gap accept marks it accepted: known incomplete, keep it. gap unaccept puts it back. Only an incomplete mark can be accepted; a gap with no data is filled or left open. These two use the control listener.
| Flag | Default | What it does |
|---|---|---|
-start | required | The mark's start exactly as gap list reports it, RFC 3339 or Unix nanoseconds. |
./bin/cli gap accept -control 127.0.0.1:9091 -stream binance:ETHUSDT:5m \
-start 2026-10-22T09:00:00Zcluster
Administers a cluster through any member's control listener. status is answered by the node you name, without needing the cluster to agree, so it works while the cluster is broken. Every other command is sent to the cluster's current leader, which the CLI finds from the node you name. Run against a node with clustering off, a command says so.
| Command | What it does |
|---|---|
cluster status | This node's view: who leads, the term, voters and non-voters, how far its log has applied. |
cluster nodes | The registered nodes and their status. -status online (or leaving, offline, offline-leaving, decommissioned) filters. |
cluster partitions | Every partition's primary, copies and epoch. -node N: only what node N holds. |
cluster health | Each partition's health: serving, short of copies, primary down, or unavailable, and which copy could take over. -impaired: only those that are not fully serving. |
cluster config get | The settings every node agrees on. |
cluster config set -compression C | Changes the codec new chunks are written with (fixed_point_dod, gorilla or none), the one setting that may change. A node takes it when it restarts; existing chunks keep theirs. |
cluster plan | What the balancer would move, from the leader's latest evaluation. Nothing is moved. |
cluster migrate -partition P -to N | Moves partition P to node N. It returns at once; the cluster does the move. |
cluster abort -partition P -to N | Stops that move. Anything it already landed stays. |
cluster migrations | The moves in flight and how far each has got. |
cluster drain -node N | Decommissions node N: it moves its partitions away, then leaves the cluster and exits. |
cluster drains | Every draining node's progress. |
cluster deregister -node N | Forgets a decommissioned or dead node, so its id may be used again. An online node is drained first. |
Output is JSON with the protocol's field names. The list commands also take -format table.
Running a command twice is safe. If the cluster refuses a change, the CLI reads the cluster back: when what you asked for already holds (the partition is already on that node, the node is already draining, the codec is already set), it says so on standard error and succeeds. It never sends a change twice. When a change may or may not have landed, it reads back the same way and tells you which.
./bin/cli cluster nodes -format table
NODE STATUS DATA CONTROL REPLICATION INCARNATION
1 ONLINE 10.0.0.1:8080 10.0.0.1:9091 10.0.0.1:9300 12
2 ONLINE 10.0.0.2:8080 10.0.0.2:9091 10.0.0.2:9300 418
./bin/cli cluster migrate -partition 17 -to 2
./bin/cli cluster migrations -format table
PARTITION KIND SOURCE TARGET STEP
17 PRIMARY 1 2 CATCHING_UPdiag
diag storage prints one JSON object about the node you name: its disk (total, free, the fraction used), what it holds and what it is primary of (streams, records, bytes, partitions), its chunk and correction counts, and its ten largest streams by bytes on disk. A value the node did not measure is null, not zero. It lists every stream's statistics, which costs the node one index read per stream. Needs LIST_STREAMS.
./bin/cli diag storage
{
"node_id": 1,
"disk": { "total_bytes": 501809635328, "free_bytes": 19533381632, "used_fraction": 0.961 },
"held": { "streams": 1, "records": 30, "bytes": 375, "partitions": 1 },
"primary": { "streams": 1, "records": 30, "bytes": 375, "partitions": 1 },
"chunks": 1,
"corrections": 0,
"largest_streams": [ { "stream": "binance:BTCUSDT:1m", "bytes": 375, "records": 30, "chunks": 1 } ]
}data
data verify -data-dir DIR checks every candle stream under a node's storage.data_dir: that its indexes can be read, and that every chunk they name is on disk and passes its own checksums, size, record count and time range. Run it on the node's machine. It only reads, so it is safe while the node runs: a chunk the node retires during the check is not reported. Tick data and the write-ahead log are not checked.
Each damaged file is one line on standard output (stream directory, chunk number, path, what is wrong), and the command exits with status 2 when there is any. A directory holding no partitions is an error rather than a clean result, so a wrong path cannot pass for a healthy one.
./bin/cli data verify -data-dir /var/lib/mirexa
verified 1840 stream(s), 96211 chunk(s), 41730212352 bytes: no damage foundload
load loads candle files into a node or a cluster: CSV (plain, .gz, .zst, tab-separated .tsv) and Apache Parquet. Give it files or directories. It sends each row through an ordinary write, or through the history route for bars a live write cannot place, and then reads its window back: a row already stored with the same values is skipped, and one stored with different values is refused unless you pass -correct. A row that does not read is refused with its file and line, and the rest still load. A summary goes to standard error; the command exits with status 2 when any row was refused.
The columns default to timestamp,open,high,low,close,volume by position for CSV and by name for Parquet; -map names them otherwise. Each row's stream comes from -stream, or from columns and -exchange/-symbol/-timeframe, so one file can hold many streams. -addr takes any nodes of a cluster, comma-separated: each row is sent to its stream's primary. Needs WRITE_CANDLES and READ_CANDLES. Candles only; for trades use ingest -ticks.
| Flag | Default | What it does |
|---|---|---|
-addr | localhost:8080 | Node addresses, comma-separated: any nodes of a cluster. |
-stream | none | One stream for every row, as exchange:symbol:timeframe. |
-exchange, -symbol, -timeframe | none | One part of the stream for every row, where no column names it. |
-map | by position | The column mapping, field=source,…. Fields are ts open high low close volume exchange symbol timeframe; a source is a header name, #N (the Nth column) or a 'quoted constant'. |
-map-file | none | A file of field=source lines, instead of -map. |
-ts-format | none | unix-s, unix-ms, unix-us, unix-ns, rfc3339 or a Go layout. A Parquet timestamp column needs none. |
-tz | none | The time zone of timestamps that carry none (an IANA name). |
-header | auto | Whether a CSV file starts with a header line: auto, yes or no. |
-delimiter | , | The CSV field separator (a tab for .tsv). |
-correct | off | Restate stored bars a row disagrees with, instead of refusing the row. |
-dry-run | off | Read, map and check every row and report, sending nothing. |
-parallel | 4 | Streams loaded at once. |
-report | none | Write the JSON report to this file (- for standard output). |
It also takes -token, -token-file, -tls-ca and -tls-server-name, as the data-port commands do. Every rule (decimals, duplicates, how a refused row is reported, the report's fields) is in the wiki's load reference, and a walkthrough in Bulk loading files.
./bin/cli load -stream binance:BTCUSDT:1m -ts-format unix-ms dump/*.csv.gz
./bin/cli load -addr node1:8080,node2:8080 -exchange binance -timeframe 1m \
-map 'ts=open_time,open=o,high=h,low=l,close=c,volume=v,symbol=sym' \
-report report.json vendor.parquettoken
token makes the keys and access tokens of authentication. It talks to no node: a token is signed with a private key on your machine, and the node checks it against the public key in its configuration. A token cannot be revoked before it expires, so its validity is the limit on a leaked one; to cut every outstanding token short, change the signing key.
A single node with no trusted_keys configured makes its own key, <data_dir>/auth/issuer.key, in the format keygen writes, so issue -key takes it as it is. Once trusted_keys lists a key, the node makes none.
| Command | What it does |
|---|---|
token keygen -name N [-dir D] | Writes an Ed25519 keypair, N.key (mode 0600) and N.pub, into D (default the current directory), and prints the trusted_keys entry to add to the node's configuration. It refuses to overwrite a key. |
token issue -key F -perms P,… [-validity D] | Prints a signed token, alone on standard output, so > token gives a usable file; what it issued goes to standard error. -validity defaults to 30 minutes and may not exceed an hour. The permissions are READ_CANDLES, WRITE_CANDLES, READ_TICKS, WRITE_TICKS, LIST_STREAMS, ADMIN_STREAM and ADMIN_CLUSTER. |
token inspect TOKEN [-pub F] | Prints a token's permissions and expiry. With -pub it also checks the signature against that public key; without it, it says the signature was not checked. |
./bin/cli token keygen -name ops -dir ./keys
./bin/cli token issue -key keys/ops.key -perms READ_CANDLES,LIST_STREAMS -validity 1h > token
./bin/cli token inspect "$(cat token)" -pub keys/ops.pub
tenant: 0
permissions: READ_CANDLES|LIST_STREAMS
expires: 2026-10-31T15:12:04Z
status: valid for another 59m59s
signature: valid, signed by keys/ops.pubThe wiki's token reference has every flag.
certs
certs is the certificate authority for a cluster's inter-node mutual TLS. It talks to no node. Make a CA once, then a key and certificate for each node; give each node its own pair plus ca.crt. A node certificate names the node (mirexa-node-<id>) and the addresses its peers dial it at.
| Command | What it does |
|---|---|
certs ca -dir D [-cn NAME] [-validity D] | Writes ca.key (mode 0600) and ca.crt into D; valid ten years by default. It refuses to replace a CA that exists, since every certificate it issued would stop verifying. |
certs issue -dir D -node-id N -hosts H,… [-validity D] | Writes node-N.key and node-N.crt beside the CA, signed by it; valid 90 days by default. -hosts are the node's IP addresses and names. |
certs inspect -cert F | Prints a certificate's node id, issuer, validity (and whether it expires within two weeks) and addresses. |
A certificate is replaced without a restart: write the new files and send the node SIGHUP. There is no revocation list; a node that must stop being used is fenced, or drained and decommissioned. The wiki's certs reference and TLS and certificates have the rest.
./bin/cli certs ca -dir ./certs
./bin/cli certs issue -dir ./certs -node-id 1 -hosts 10.0.0.1,node1.internal