{"slug":"chainhilt-ai-api-v1-perp-hyperliquid-twap-place-preview-a382f2","title":"Prepare a TWAP order for L1 signing","host":"chainhilt.ai","method":"POST","resource":"https://chainhilt.ai/api/v1/perp/hyperliquid/twap/place/preview","category":"code","description":"Prepare a TWAP order for L1 signing. Estimated total value at the current mid must be at least $100 for perps or 100 of the pair's quote token for spot; builder-deployed perps are not supported. Sign and submit using the returned submitPath. Errors: 400 invalid input, unknown asset or value under th","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":12,"reported_payers_30d":2,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"action":{"twap":{"a":0,"b":true,"m":30,"r":false,"s":"0.01","t":true},"type":"twapOrder"},"nonce":1710000000000},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"accountAddress":{"description":"Signing account's address, returned as response metadata; not part of the signed action.","pattern":"^0x[a-fA-F0-9]{40}$","type":"string"},"action":{"additionalProperties":false,"description":"TWAP order action.","properties":{"twap":{"additionalProperties":false,"description":"TWAP parameters in Hyperliquid wire order.","properties":{"a":{"description":"Asset ID from /perp/hyperliquid/asset-id; builder-deployed perps (100000+) are not supported.","maximum":99999,"minimum":0,"type":"integer"},"b":{"description":"true to buy, false to sell.","type":"boolean"},"m":{"description":"Duration in minutes, from 5 to 10,080 (7 days).","maximum":10080,"minimum":5,"type":"integer"},"r":{"description":"true for reduce-only.","type":"boolean"},"s":{"description":"Total size as a decimal string.","pattern":"^(0|[1-9][0-9]*)(\\.[0-9]+)?$","type":"string"},"t":{"description":"true to randomize slice timing.","type":"boolean"}},"required":["a","b","s","r","m","t"],"type":"object"},"type":{"const":"twapOrder","description":"Always \"twapOrder\".","type":"string"}},"required":["type","twap"],"type":"object"},"expiresAfter":{"description":"Millisecond timestamp after which Hyperliquid rejects the action. Signed with the action.","minimum":0,"type":"integer"},"nonce":{"description":"Action nonce in milliseconds since the epoch; defaults to the current time.","minimum":0,"type":"integer"},"vaultAddress":{"description":"Vault or subaccount to act for; omit to act for the signer. Signed with the action.","pattern":"^0x[a-fA-F0-9]{40}$","type":"string"}},"required":["action"],"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":"Prepare a TWAP order for L1 signing. Estimated total value at the current mid must be at least $100 for perps or 100 of the pair's quote token for spot; builder-deployed perps are not supported. Sign and submit using the returned submitPath. Errors: 400 invalid input, unknown asset or value under the minimum, 502 provider failure; execution may return 422 exchange rejection. Treat spot and perp as one balance only when the account abstraction mode is \"unifiedAccount\".","last_updated":"2026-11-23T08:04:49.408Z","schemes":["exact"]}