Fix backfill freshness
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
12
src/init.rs
12
src/init.rs
@@ -34,15 +34,13 @@ pub async fn check_account(config: &Arc<Config>) {
|
||||
warn!("Account cash is zero, qrust will not be able to trade.");
|
||||
}
|
||||
|
||||
warn!(
|
||||
"qrust active on {} account with {} {}, avoid transferring funds without shutting down.",
|
||||
info!(
|
||||
"qrust running on {} account with {} {}, avoid transferring funds without shutting down.",
|
||||
*ALPACA_API_BASE, account.currency, account.cash
|
||||
);
|
||||
}
|
||||
|
||||
pub async fn rehydrate_orders(config: &Arc<Config>) {
|
||||
info!("Rehydrating order data.");
|
||||
|
||||
let mut orders = vec![];
|
||||
let mut after = OffsetDateTime::UNIX_EPOCH;
|
||||
|
||||
@@ -77,13 +75,9 @@ pub async fn rehydrate_orders(config: &Arc<Config>) {
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
info!("Rehydrated order data.");
|
||||
}
|
||||
|
||||
pub async fn rehydrate_positions(config: &Arc<Config>) {
|
||||
info!("Rehydrating position data.");
|
||||
|
||||
let positions_future = async {
|
||||
alpaca::positions::get(
|
||||
&config.alpaca_client,
|
||||
@@ -135,6 +129,4 @@ pub async fn rehydrate_positions(config: &Arc<Config>) {
|
||||
position.symbol, position.qty
|
||||
);
|
||||
}
|
||||
|
||||
info!("Rehydrated position data.");
|
||||
}
|
||||
|
Reference in New Issue
Block a user