Skip to main content

Crate df_papertrade_core

Crate df_papertrade_core 

Source
Expand description

Papertrade SDK for Rust: perps on HyperEVM at Hyperliquid’s BBO mid, gasless through a relayer.

  • client: the Client, its config and reads, the relayer, the deployment and HyperEVM reads.
  • markets: the trading state and the relayer’s protocol figures.
  • account: the live account, the session key, storage and the wallet.
  • trade: intents, signatures, the venue’s integer math and the writes.
  • transfer: deposits from Hyperliquid.
  • live: the account stream’s event parser.
  • utils: units, nonces and JSON readers.

Mainnet only. Money is integers and exact decimals, never floats.

Re-exports§

pub use client::Client;
pub use client::Config;
pub use client::Error;

Modules§

account
The account and who signs for it.
client
The Client an app trades through, and what it stands on.
live
Sans-IO server-sent events parser: feed Events::push chunks of any size and get whole events back. The account stream sends LIVENESS once, then WALLET frames and a HEARTBEAT every interval. Reopen a stream that stays quiet for several intervals.
markets
What the venue lists and its figures.
trade
Trading on the venue.
transfer
Moving money into the venue: deposit plans and sends USDC from the wallet’s Hyperliquid balance to its deposit address. Withdrawals are intents, in crate::trade.
utils
Units, intent nonces and the relayer’s JSON readers.