Serve last execution prices and directions for individual and batch token queries

This commit is contained in:
2026-12-03 09:25:44 +08:00
parent 9b25fdc424
commit b523a8890f
11 changed files with 220 additions and 16 deletions
+16 -1
View File
@@ -20,6 +20,7 @@ mod cancellation;
mod command;
mod inventory;
mod kickoff;
mod last_trades;
mod ledger;
mod lots;
mod market;
@@ -45,7 +46,21 @@ use std::{path::Path, time::Duration};
pub use assets::parse_id as parse_asset_id;
pub use depth_feed::MarketPage;
pub use prices_history::http::{HistoryError, HistoryQuery};
pub use prices_history::http::HistoryQuery;
#[derive(Debug)]
pub enum MarketDataError {
Invalid(String),
Unavailable,
}
impl From<rusqlite::Error> for MarketDataError {
fn from(_: rusqlite::Error) -> Self {
Self::Unavailable
}
}
pub type HistoryError = MarketDataError;
pub struct Exchange {
db: Connection,