Line refs are against the registered v0.2.0 tarball.
Problem
docs/src/guide/historical.md ("Streaming records: foreach_record") shows:
foreach_record(client, DBN.TradeMsg;
dataset = "XNAS.ITCH", schema = Schema.TRADES, ...) do trade
...
end
i.e. a positional record-type argument after client. The actual method (src/historical/timeseries.jl:111) is:
foreach_record(f, c::Historical; dataset, schema, ..., record_type = nothing)
There is no positional-type method, so the documented call raises a MethodError. The surrounding prose ("The first argument after client is the concrete record type...") is wrong too; the type is inferred from schema by default and overridable via the record_type kwarg.
Suggested fix
Update the example to:
foreach_record(client;
dataset = "XNAS.ITCH", schema = Schema.TRADES,
symbols = ["AAPL"],
start_dt = DateTime(2024, 1, 2, 14, 30),
end_dt = DateTime(2024, 1, 2, 20, 0)) do trade
n_trades[] += 1
end
and fix the paragraph below it. A doctest would prevent regression.
Line refs are against the registered v0.2.0 tarball.
Problem
docs/src/guide/historical.md("Streaming records: foreach_record") shows:i.e. a positional record-type argument after
client. The actual method (src/historical/timeseries.jl:111) is:There is no positional-type method, so the documented call raises a
MethodError. The surrounding prose ("The first argument afterclientis the concrete record type...") is wrong too; the type is inferred fromschemaby default and overridable via therecord_typekwarg.Suggested fix
Update the example to:
and fix the paragraph below it. A doctest would prevent regression.