> For the complete documentation index, see [llms.txt](https://docs.pearprotocol.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pearprotocol.io/api-integration/api-specification/agent-wallet.md).

# Agent Wallet

## Get agent wallet status

> Check if an agent wallet exists for the authenticated user and retrieve its status. Agent wallets are used to execute trades on Hyperliquid Exchange on behalf of users and are valid for 180 days with automatic 30-day rotations.

```json
{"openapi":"3.0.0","info":{"title":"Pear Protocol Trading API","version":"1.0.0"},"servers":[{"url":"https://hl-v2.pearprotocol.io","description":"Production (Mainnet)"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"GetAgentWalletResponseDto":{"type":"object","properties":{"agentWalletAddress":{"type":"string","description":"Agent wallet address for Hyperliquid operations"}},"required":["agentWalletAddress"]}}},"paths":{"/agentWallet":{"get":{"description":"Check if an agent wallet exists for the authenticated user and retrieve its status. Agent wallets are used to execute trades on Hyperliquid Exchange on behalf of users and are valid for 180 days with automatic 30-day rotations.","operationId":"AgentWalletController_getAgentWallet","parameters":[],"responses":{"200":{"description":"Agent wallet found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAgentWalletResponseDto"}}}},"404":{"description":"Agent wallet not found"}},"summary":"Get agent wallet status","tags":["Agent Wallet"]}}}}
```

## Create a new agent wallet

> Create a new agent wallet for the authenticated user. The wallet private key is securely stored and encrypted within Pear Protocol. After creation, the user must approve the wallet through Hyperliquid's agent wallet approval process.

```json
{"openapi":"3.0.0","info":{"title":"Pear Protocol Trading API","version":"1.0.0"},"servers":[{"url":"https://hl-v2.pearprotocol.io","description":"Production (Mainnet)"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"CreateAgentWalletResponseDto":{"type":"object","properties":{"agentWalletAddress":{"type":"string","description":"Newly created agent wallet address - user must approve this on Hyperliquid"},"message":{"type":"string","description":"Next steps instruction for user"}},"required":["agentWalletAddress","message"]}}},"paths":{"/agentWallet":{"post":{"description":"Create a new agent wallet for the authenticated user. The wallet private key is securely stored and encrypted within Pear Protocol. After creation, the user must approve the wallet through Hyperliquid's agent wallet approval process.","operationId":"AgentWalletController_createAgentWallet","parameters":[],"responses":{"201":{"description":"Agent wallet created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentWalletResponseDto"}}}}},"summary":"Create a new agent wallet","tags":["Agent Wallet"]}}}}
```
