> For the complete documentation index, see [llms.txt](https://docs.afx.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.afx.xyz/api-reference/info/account.md).

# Account

## GET /info/account/wallet

> Query Wallet Balances

```json
{"openapi":"3.0.3","info":{"title":"AFX DEX Info API","version":"1.0.0"},"servers":[{"url":"https://api.afx.xyz","description":"Mainnet"},{"url":"https://api-testnet.afx.xyz","description":"Testnet"}],"paths":{"/info/account/wallet":{"get":{"operationId":"queryWallet","summary":"Query Wallet Balances","tags":["Account"],"parameters":[{"name":"userAddr","in":"query","required":true,"schema":{"type":"string"},"description":"User address (0x hex)"},{"name":"currency","in":"query","schema":{"type":"integer","format":"int64"},"description":"Currency code filter"},{"name":"includeZero","in":"query","schema":{"type":"boolean","default":false},"description":"Include zero-balance currencies"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/AccountWallet"}}}}}}}}}}},"components":{"schemas":{"AccountWallet":{"type":"object","properties":{"blockHeight":{"type":"integer","format":"int64"},"userAddr":{"type":"string"},"currency":{"type":"integer","format":"int64"},"balance":{"type":"string"},"availableBalance":{"type":"string"},"availableTransferBalance":{"type":"string"},"equity":{"type":"string"},"status":{"type":"string"},"blockTime":{"type":"integer","format":"int64"}}}}}}
```

## GET /info/account/ledger

> Query Account Ledger

```json
{"openapi":"3.0.3","info":{"title":"AFX DEX Info API","version":"1.0.0"},"servers":[{"url":"https://api.afx.xyz","description":"Mainnet"},{"url":"https://api-testnet.afx.xyz","description":"Testnet"}],"paths":{"/info/account/ledger":{"get":{"operationId":"queryLedger","summary":"Query Account Ledger","tags":["Account"],"parameters":[{"name":"userAddr","in":"query","required":true,"schema":{"type":"string"}},{"name":"currency","in":"query","schema":{"type":"integer","format":"int64"}},{"name":"bizType","in":"query","schema":{"type":"string"},"description":"Business type filter"},{"name":"txHash","in":"query","schema":{"type":"string"}},{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"pageSize","in":"query","schema":{"type":"integer","default":20}},{"name":"startTime","in":"query","schema":{"type":"integer","format":"int64"},"description":"Start timestamp (ms)"},{"name":"endTime","in":"query","schema":{"type":"integer","format":"int64"},"description":"End timestamp (ms)"}],"responses":{"200":{"description":"Paginated ledger entries"}}}}}}
```

## GET /info/account/agent

> Query Account Agents

```json
{"openapi":"3.0.3","info":{"title":"AFX DEX Info API","version":"1.0.0"},"servers":[{"url":"https://api.afx.xyz","description":"Mainnet"},{"url":"https://api-testnet.afx.xyz","description":"Testnet"}],"paths":{"/info/account/agent":{"get":{"operationId":"queryAgent","summary":"Query Account Agents","tags":["Account"],"parameters":[{"name":"userAddr","in":"query","required":true,"schema":{"type":"string"}},{"name":"role","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"agentAddress","in":"query","schema":{"type":"string"}},{"name":"masterAddress","in":"query","schema":{"type":"string"}},{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"pageSize","in":"query","schema":{"type":"integer","default":20}}],"responses":{"200":{"description":"Paginated agent list","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/AccountAgent"}}}}}}}}}}},"components":{"schemas":{"AccountAgent":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"masterAddress":{"type":"string"},"agentAddress":{"type":"string"},"agentName":{"type":"string"},"status":{"type":"string","description":"1=ACTIVE, 2=REVOKED"},"permission":{"type":"string"},"approvedAt":{"type":"integer","format":"int64"},"approvedBlock":{"type":"integer","format":"int64"},"approvalTx":{"type":"string"},"revokedAt":{"type":"integer","format":"int64"},"revokedBlock":{"type":"integer","format":"int64"},"revokeTx":{"type":"string"}}}}}}
```

## GET /info/account/agent/active

> Query Active Agent

```json
{"openapi":"3.0.3","info":{"title":"AFX DEX Info API","version":"1.0.0"},"servers":[{"url":"https://api.afx.xyz","description":"Mainnet"},{"url":"https://api-testnet.afx.xyz","description":"Testnet"}],"paths":{"/info/account/agent/active":{"get":{"operationId":"queryActiveAgent","summary":"Query Active Agent","tags":["Account"],"parameters":[{"name":"userAddr","in":"query","required":true,"schema":{"type":"string"}},{"name":"agentName","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Active agent info","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"data":{"$ref":"#/components/schemas/AccountAgent"}}}}}}}}}},"components":{"schemas":{"AccountAgent":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"masterAddress":{"type":"string"},"agentAddress":{"type":"string"},"agentName":{"type":"string"},"status":{"type":"string","description":"1=ACTIVE, 2=REVOKED"},"permission":{"type":"string"},"approvedAt":{"type":"integer","format":"int64"},"approvedBlock":{"type":"integer","format":"int64"},"approvalTx":{"type":"string"},"revokedAt":{"type":"integer","format":"int64"},"revokedBlock":{"type":"integer","format":"int64"},"revokeTx":{"type":"string"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.afx.xyz/api-reference/info/account.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
