Expand description
HTTP and websocket for native programs: Native sends requests through
reqwest on rustls, and clock is the system clock. Hand both to
crate::client::Api:
let api = df_hyperliquid_core::client::Api::new(df_hyperliquid_core::client::native::Native::new(), df_hyperliquid_core::client::Network::Mainnet, df_hyperliquid_core::client::native::clock);A Native future must be polled inside a tokio runtime. Nothing here
retries.
Re-exports§
Modules§
- socket
- The websocket for native programs: a
Feedcarries onecrate::live::Sessionover tokio-tungstenite. Subscriptions made while down are sent on the next open; a post made while down is refused, and one cut off by a drop is reported, never resent.
Structs§
- Native
- One HTTP client, cheap to clone: clones share their connections.
Constants§
- TIMEOUT
- How long a request may take, connection and answer together, unless the program says otherwise.
Functions§
- clock
- Unix milliseconds from the system clock: the
crate::client::Clockfor a native program. A clock set before 1970 reads 0.