Module Algostream_common_config.Exchange_config

Per-exchange ingestion configuration.

Pure data + a JSON loader. Read from a config file at startup or built programmatically.

type retry_policy = {
  1. base_backoff_ms : int;
  2. max_backoff_ms : int;
  3. jitter_pct : float;
  4. circuit_breaker_threshold : int;
  5. circuit_open_ms : int;
  6. connect_timeout_ms : int;
  7. read_timeout_ms : int;
}
type t = {
  1. name : string;
  2. endpoints : string list;
  3. symbols : string list;
  4. retry : retry_policy;
  5. rate_limit_per_sec : int;
  6. pong_reserve_per_sec : int;
}
val default_retry : retry_policy
val binance_default : symbols:string list -> t
val coinbase_default : symbols:string list -> t
val of_yojson : Yojson.Safe.t -> (t, string) Stdlib.result

Parse a single-exchange JSON object.

val load_file : string -> (t list, string) Stdlib.result

Load a JSON config file. Top-level shape is either a single exchange object or an array of them.