Serve last execution prices and directions for individual and batch token queries
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user