# portfolio

## POST /info

> Request user portfolio.

```json
{"openapi":"3.1.1","info":{"title":"Hyperliquid API - info/portfolio","version":"1.0.0"},"tags":[{"name":"portfolio"}],"servers":[{"url":"https://api.hyperliquid.xyz","description":"Mainnet"},{"url":"https://api.hyperliquid-testnet.xyz","description":"Testnet"}],"paths":{"/info":{"post":{"tags":["portfolio"],"description":"Request user portfolio.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"description":"Type of request.","enum":["portfolio"]},"user":{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":42,"maxLength":42,"description":"User address."}},"required":["type","user"],"description":"Request user portfolio."}}},"required":true},"responses":{"200":{"description":"Portfolio metrics grouped by time periods.","content":{"application/json":{"schema":{"type":"array","items":[{"type":"array","items":[{"enum":["day"]},{"type":"object","properties":{"accountValueHistory":{"type":"array","items":{"type":"array","items":[{"type":"integer","minimum":0},{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$"}],"minItems":2},"description":"History entries for account value as [timestamp, value]."},"pnlHistory":{"type":"array","items":{"type":"array","items":[{"type":"integer","minimum":0},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}],"minItems":2},"description":"History entries for profit and loss as [timestamp, value]."},"vlm":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Volume metric for the portfolio."}},"required":["accountValueHistory","pnlHistory","vlm"],"description":"Portfolio metrics snapshot."}],"minItems":2},{"type":"array","items":[{"enum":["week"]},{"type":"object","properties":{"accountValueHistory":{"type":"array","items":{"type":"array","items":[{"type":"integer","minimum":0},{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$"}],"minItems":2},"description":"History entries for account value as [timestamp, value]."},"pnlHistory":{"type":"array","items":{"type":"array","items":[{"type":"integer","minimum":0},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}],"minItems":2},"description":"History entries for profit and loss as [timestamp, value]."},"vlm":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Volume metric for the portfolio."}},"required":["accountValueHistory","pnlHistory","vlm"],"description":"Portfolio metrics snapshot."}],"minItems":2},{"type":"array","items":[{"enum":["month"]},{"type":"object","properties":{"accountValueHistory":{"type":"array","items":{"type":"array","items":[{"type":"integer","minimum":0},{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$"}],"minItems":2},"description":"History entries for account value as [timestamp, value]."},"pnlHistory":{"type":"array","items":{"type":"array","items":[{"type":"integer","minimum":0},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}],"minItems":2},"description":"History entries for profit and loss as [timestamp, value]."},"vlm":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Volume metric for the portfolio."}},"required":["accountValueHistory","pnlHistory","vlm"],"description":"Portfolio metrics snapshot."}],"minItems":2},{"type":"array","items":[{"enum":["allTime"]},{"type":"object","properties":{"accountValueHistory":{"type":"array","items":{"type":"array","items":[{"type":"integer","minimum":0},{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$"}],"minItems":2},"description":"History entries for account value as [timestamp, value]."},"pnlHistory":{"type":"array","items":{"type":"array","items":[{"type":"integer","minimum":0},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}],"minItems":2},"description":"History entries for profit and loss as [timestamp, value]."},"vlm":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Volume metric for the portfolio."}},"required":["accountValueHistory","pnlHistory","vlm"],"description":"Portfolio metrics snapshot."}],"minItems":2},{"type":"array","items":[{"enum":["perpDay"]},{"type":"object","properties":{"accountValueHistory":{"type":"array","items":{"type":"array","items":[{"type":"integer","minimum":0},{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$"}],"minItems":2},"description":"History entries for account value as [timestamp, value]."},"pnlHistory":{"type":"array","items":{"type":"array","items":[{"type":"integer","minimum":0},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}],"minItems":2},"description":"History entries for profit and loss as [timestamp, value]."},"vlm":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Volume metric for the portfolio."}},"required":["accountValueHistory","pnlHistory","vlm"],"description":"Portfolio metrics snapshot."}],"minItems":2},{"type":"array","items":[{"enum":["perpWeek"]},{"type":"object","properties":{"accountValueHistory":{"type":"array","items":{"type":"array","items":[{"type":"integer","minimum":0},{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$"}],"minItems":2},"description":"History entries for account value as [timestamp, value]."},"pnlHistory":{"type":"array","items":{"type":"array","items":[{"type":"integer","minimum":0},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}],"minItems":2},"description":"History entries for profit and loss as [timestamp, value]."},"vlm":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Volume metric for the portfolio."}},"required":["accountValueHistory","pnlHistory","vlm"],"description":"Portfolio metrics snapshot."}],"minItems":2},{"type":"array","items":[{"enum":["perpMonth"]},{"type":"object","properties":{"accountValueHistory":{"type":"array","items":{"type":"array","items":[{"type":"integer","minimum":0},{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$"}],"minItems":2},"description":"History entries for account value as [timestamp, value]."},"pnlHistory":{"type":"array","items":{"type":"array","items":[{"type":"integer","minimum":0},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}],"minItems":2},"description":"History entries for profit and loss as [timestamp, value]."},"vlm":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Volume metric for the portfolio."}},"required":["accountValueHistory","pnlHistory","vlm"],"description":"Portfolio metrics snapshot."}],"minItems":2},{"type":"array","items":[{"enum":["perpAllTime"]},{"type":"object","properties":{"accountValueHistory":{"type":"array","items":{"type":"array","items":[{"type":"integer","minimum":0},{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$"}],"minItems":2},"description":"History entries for account value as [timestamp, value]."},"pnlHistory":{"type":"array","items":{"type":"array","items":[{"type":"integer","minimum":0},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}],"minItems":2},"description":"History entries for profit and loss as [timestamp, value]."},"vlm":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Volume metric for the portfolio."}},"required":["accountValueHistory","pnlHistory","vlm"],"description":"Portfolio metrics snapshot."}],"minItems":2}],"minItems":8,"description":"Portfolio metrics grouped by time periods."}}}},"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"}}}}}}}}}
```
