{"slug":"chainhilt-ai-api-v1-perp-hyperliquid-trade-preview-edbf30","title":"Preview a Hyperliquid trade with notional, margin impact, slippage, liquidation ","host":"chainhilt.ai","method":"POST","resource":"https://chainhilt.ai/api/v1/perp/hyperliquid/trade/preview","category":"market","description":"Preview a Hyperliquid trade with notional, margin impact, slippage, liquidation estimate, exchange fees, and builder fee. Errors: 400 invalid input, 502 provider failure. Treat spot and perp as one balance only when the account abstraction mode is \"unifiedAccount\".","price_listed":0.001,"price_asked":null,"state":"effects","state_label":"Not tested: has real-world effects","checks_7d":0,"answered_7d":0,"latency_ms_median":null,"reported_calls_30d":16,"reported_payers_30d":5,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"address":"0x1111111111111111111111111111111111111111","coin":"ETH","includeRaw":false,"limitPx":"3500","side":"buy","size":"0.1","slippageBps":25},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"additionalProperties":false,"properties":{"address":{"description":"Account to preview the trade for.","pattern":"^0x[a-fA-F0-9]{40}$","type":"string"},"builderFeeBps":{"description":"Accepted but ignored: the estimate uses the API's configured builder fee.","maximum":10,"minimum":0,"type":"number"},"coin":{"description":"Market symbol, e.g. \"ETH\".","maxLength":32,"minLength":1,"type":"string"},"includeRaw":{"description":"true to include the raw Hyperliquid payloads in the response.","type":"boolean"},"limitPx":{"description":"Reference price as a decimal string; defaults to the mid, then the best book price.","pattern":"^(0|[1-9][0-9]*)(\\.[0-9]+)?$","type":"string"},"side":{"description":"\"buy\" or \"sell\".","enum":["buy","sell"],"type":"string"},"size":{"description":"Order size as a decimal string.","pattern":"^(0|[1-9][0-9]*)(\\.[0-9]+)?$","type":"string"},"slippageBps":{"description":"Slippage in basis points applied to the reference price; defaults to 50.","maximum":10000,"minimum":0,"type":"integer"},"takerFeeBps":{"description":"Taker fee in basis points for the fee estimate; defaults to 4.5.","maximum":100,"minimum":0,"type":"number"}},"required":["address","coin","side","size"],"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[],"description_full":"Preview a Hyperliquid trade with notional, margin impact, slippage, liquidation estimate, exchange fees, and builder fee. Errors: 400 invalid input, 502 provider failure. Treat spot and perp as one balance only when the account abstraction mode is \"unifiedAccount\".","last_updated":"2026-11-23T08:04:47.187Z","schemes":["exact"]}