π±About API Execution
The QuantFun Client API is the trading execution layer for quant strategies running on Hyperliquid. It exposes a small set of authenticated REST endpoints that allow strategy services to:
Submit rebalancing instructions β specify target portfolio allocations (market, direction, size, leverage) and the API will calculate the required delta trades and execute them on Hyperliquid on behalf of the vault.
Query vault state β retrieve live equity, open positions, pending withdrawals, and account health.
Track execution status β each submission returns a transaction ID that can be polled for completion.
Key Concepts
Vaults β Each vault is an isolated trading account on Hyperliquid. Clients simply send a vaultName (e.g. my-fund-mainnet) to identify the vault in every request.
Portfolio Allocation β Positions are specified as a fraction of vault equity combined with a leverage multiplier. For example, portfolioAllocation: 0.5 with leverage: 4 targets a notional position of 2Γ equity (50% of equity used as margin at 4Γ leverage).
Delta Trading β The API computes the difference between the current position and the target, then trades only the delta. Sending the same allocation twice is safe β if the position is already correct (within small tolerance) it is skipped.
Maker-first Execution β Orders are first attempted as post-only (ALO) limit orders, minimising taker fees.
Async Execution β Trade submission returns immediately with a transactionId. Execution runs in the background. Poll the transaction status endpoint to confirm completion.
Authentication β All requests must be authenticated via a JWT Bearer token obtained from the Cognito OAuth2 token endpoint (https://auth.quant.fun/oauth2/token) using the client's vault-specific access keys.
Last updated