Expand description
HTTP client for the Hypercall REST API.
HypercallClient provides typed methods for every REST endpoint:
orders, markets, portfolio, margin mode, fills, and more.
§Example
use hypercall_client::{HypercallClient, HypercallWallet};
use hypercall_sdk_types::{Side, TimeInForce};
use rust_decimal::Decimal;
let api = HypercallClient::new("https://api.hypercall.xyz");
let wallet = HypercallWallet::from_private_key("0x...", 999)?;
// Get markets
let markets = api.get_markets().await?;
// Get portfolio
let portfolio = api.get_portfolio(&wallet.address).await?;
// Place an options order (typed args)
let resp = api.place_order(&wallet, "BTC-20260501-76000-C", Side::Buy, Decimal::new(2000, 0), Decimal::new(5, 0), TimeInForce::IOC).await?;
// Cancel an order
api.cancel_order(&wallet, 12345).await?;
// Set margin mode to the launch default.
api.set_margin_mode(&wallet, "standard").await?;Structs§
- Bulk
Order Params - Bulk
Replace Order Params - Hypercall
Client - HTTP API client for Hypercall.
- Order
Options - Place
Order Params - Public
Liquidations Query - Replace
Order Params - Standard
Margin Liquidation Params - Username
Lookup Response