Positions

This commit is contained in:
2026-07-25 01:57:27 +02:00
parent 2cbcdc7108
commit e61dd25e72
5 changed files with 54 additions and 7 deletions
+5 -2
View File
@@ -12,8 +12,11 @@ fn number(value: &Value, field: &str) -> Result<f64, String> {
.map_err(|error| format!("could not parse asset context field {field} ({raw}): {error}"))
}
pub async fn fetch_watch_list(symbols: &[String]) -> Result<Vec<WatchListItem>, String> {
let response = hypersdk::hypercore::mainnet()
pub async fn fetch_watch_list(
client: &hypersdk::hypercore::HttpClient,
symbols: &[String],
) -> Result<Vec<WatchListItem>, String> {
let response = client
.meta_and_asset_ctxs(None)
.await
.map_err(|error| format!("Hyperliquid metaAndAssetCtxs request failed: {error}"))?;