ohlcv_ctl/cli/command/fetch.rs
1use std::path::PathBuf;
2
3use tracing::instrument;
4
5use crate::{config::Config, Error};
6
7/// Fetch data from the origin.
8///
9/// # Arguments
10///
11/// * `config` - Optional path to the configuration file. If not provided, the
12/// default configuration file will be used. This file is expected to be in
13/// TOML format. The default file is `ohlcv.toml` and is expected to be in
14/// the current working directory or in `/etc/ohlcv`.
15///
16/// # Errors
17///
18/// Returns an error if the data cannot be fetched or if the configuration file
19/// cannot be loaded.
20#[instrument]
21pub async fn fetch(config: Option<&PathBuf>) -> Result<(), Error> {
22 let _config = Config::load(config)?;
23
24 todo!()
25}