global: snapshot

This commit is contained in:
nym21
2025-10-23 18:30:29 +02:00
parent 6cd60a064b
commit 4f1653b086
234 changed files with 758 additions and 722 deletions

View File

@@ -12,7 +12,7 @@ build = "build.rs"
[dependencies]
brk_error = { workspace = true }
brk_logger = { workspace = true }
brk_structs = { workspace = true }
brk_types = { workspace = true }
log = { workspace = true }
minreq = { workspace = true }
sonic-rs = { workspace = true }

View File

@@ -34,7 +34,7 @@ cargo add brk_fetcher
```rust
use brk_fetcher::Fetcher;
use brk_structs::{Date, Height, Timestamp};
use brk_types::{Date, Height, Timestamp};
// Initialize fetcher with exchange APIs enabled
let mut fetcher = Fetcher::import(true, None)?;
@@ -88,7 +88,7 @@ The fetcher implements aggressive retry logic with exponential backoff, attempti
```rust
use brk_fetcher::Fetcher;
use brk_structs::Date;
use brk_types::Date;
let mut fetcher = Fetcher::import(true, None)?;
@@ -162,7 +162,7 @@ Binance integration supports HTTP Archive (HAR) files for extended historical da
**Caching**: BTreeMap-based caching for both timestamp and date-indexed price data \
**Network Layer**: Built on `minreq` HTTP client with automatic JSON parsing \
**Error Handling**: Comprehensive retry logic with source rotation and cache management \
**Dependencies**: Integrates `brk_structs` for type definitions and `brk_error` for unified error handling \
**Dependencies**: Integrates `brk_types` for type definitions and `brk_error` for unified error handling \
**Architecture**: Multi-source aggregation pattern with hierarchical fallback and intelligent caching
---

View File

@@ -1,6 +1,6 @@
use brk_error::Result;
use brk_fetcher::{BRK, Binance, Fetcher, Kraken};
use brk_structs::{Date, Height};
use brk_types::{Date, Height};
fn main() -> Result<()> {
brk_logger::init(None)?;

View File

@@ -6,7 +6,7 @@ use std::{
};
use brk_error::{Error, Result};
use brk_structs::{Cents, OHLCCents, Timestamp};
use brk_types::{Cents, OHLCCents, Timestamp};
use log::info;
use sonic_rs::{JsonContainerTrait, JsonValueTrait, Value};

View File

@@ -1,7 +1,7 @@
use std::collections::BTreeMap;
use brk_error::{Error, Result};
use brk_structs::{Cents, CheckedSub, Date, DateIndex, Height, OHLCCents};
use brk_types::{Cents, CheckedSub, Date, DateIndex, Height, OHLCCents};
use log::info;
use sonic_rs::{JsonContainerTrait, JsonValueTrait, Value};

View File

@@ -1,7 +1,7 @@
use std::collections::BTreeMap;
use brk_error::{Error, Result};
use brk_structs::{Cents, Close, Date, Dollars, High, Low, OHLCCents, Open, Timestamp};
use brk_types::{Cents, Close, Date, Dollars, High, Low, OHLCCents, Open, Timestamp};
use log::info;
use sonic_rs::{JsonContainerTrait, JsonValueTrait, Value};

View File

@@ -3,7 +3,7 @@
use std::{collections::BTreeMap, path::Path, thread::sleep, time::Duration};
use brk_error::{Error, Result};
use brk_structs::{Close, Date, Dollars, Height, High, Low, OHLCCents, Open, Timestamp};
use brk_types::{Close, Date, Dollars, Height, High, Low, OHLCCents, Open, Timestamp};
use log::info;
mod binance;