Positions
This commit is contained in:
+5
-2
@@ -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}"))?;
|
||||
|
||||
Reference in New Issue
Block a user