# twapHistory

## POST /info

> Request twap history of a user.

```json
{"openapi":"3.1.1","info":{"title":"Hyperliquid API - info/twapHistory","version":"1.0.0"},"tags":[{"name":"twapHistory"}],"servers":[{"url":"https://api.hyperliquid.xyz","description":"Mainnet"},{"url":"https://api.hyperliquid-testnet.xyz","description":"Testnet"}],"paths":{"/info":{"post":{"tags":["twapHistory"],"description":"Request twap history of a user.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"description":"Type of request.","enum":["twapHistory"]},"user":{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":42,"maxLength":42,"description":"User address."}},"required":["type","user"],"description":"Request twap history of a user."}}},"required":true},"responses":{"200":{"description":"Array of user's TWAP history.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"time":{"type":"integer","minimum":0,"description":"Creation time of the history record (in seconds since epoch)."},"state":{"type":"object","properties":{"coin":{"type":"string","description":"Asset symbol."},"executedNtl":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Executed notional value."},"executedSz":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Executed size."},"minutes":{"type":"integer","minimum":0,"description":"Duration in minutes."},"randomize":{"type":"boolean","description":"Indicates if the TWAP randomizes execution."},"reduceOnly":{"type":"boolean","description":"Indicates if the order is reduce-only."},"side":{"enum":["B","A"],"description":"Order side (\"B\" = Bid/Buy, \"A\" = Ask/Sell)."},"sz":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Order size."},"timestamp":{"type":"integer","minimum":0,"description":"Start time of the TWAP order (in ms since epoch)."},"user":{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":42,"maxLength":42,"description":"User address."}},"required":["coin","executedNtl","executedSz","minutes","randomize","reduceOnly","side","sz","timestamp","user"],"description":"State of the TWAP order."},"status":{"oneOf":[{"type":"object","properties":{"status":{"enum":["finished","activated","terminated"],"description":"Status of the TWAP order."}},"required":["status"]},{"type":"object","properties":{"status":{"description":"Status of the TWAP order.","enum":["error"]},"description":{"type":"string","description":"Error message."}},"required":["status","description"]}],"description":"Current status of the TWAP order.\n- `\"finished\"`: Fully executed.\n- `\"activated\"`: Active and executing.\n- `\"terminated\"`: Terminated.\n- `\"error\"`: An error occurred."},"twapId":{"type":"integer","minimum":0,"description":"ID of the TWAP."}},"required":["time","state","status"],"description":"TWAP history record."},"description":"Array of user's TWAP history."}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"null"}}}}}}}}}
```
