# Accounts

Query account statistics and marketplace activity

## Query account statistics and activity

> Retrieves accounts with their marketplace activity statistics including sales, purchases, \
> earnings, spending, royalties, and collection counts.\
> \
> Supports filtering and sorting by various metrics:\
> \- Most sales, purchases, collections created\
> \- Highest earnings, spending, or royalties earned\
> \- Specific accounts by address or ID\
> \- Network filtering (Ethereum, Polygon)\
> \
> Use this endpoint to:\
> \- Display marketplace leaderboards\
> \- Track user trading statistics\
> \- Analyze account activity and performance\
> \- Identify top sellers, buyers, and creators\
> \
> Results are paginated and can be sorted by different ranking criteria.<br>

```json
{"openapi":"3.1.0","info":{"title":"Decentraland Marketplace Server API","version":"1.0.0"},"tags":[{"name":"Accounts","description":"Query account statistics and marketplace activity"}],"servers":[{"url":"https://marketplace-api.decentraland.org","description":"Production server"},{"url":"https://marketplace-api.decentraland.zone","description":"Development server"}],"security":[],"paths":{"/v1/accounts":{"get":{"tags":["Accounts"],"summary":"Query account statistics and activity","description":"Retrieves accounts with their marketplace activity statistics including sales, purchases, \nearnings, spending, royalties, and collection counts.\n\nSupports filtering and sorting by various metrics:\n- Most sales, purchases, collections created\n- Highest earnings, spending, or royalties earned\n- Specific accounts by address or ID\n- Network filtering (Ethereum, Polygon)\n\nUse this endpoint to:\n- Display marketplace leaderboards\n- Track user trading statistics\n- Analyze account activity and performance\n- Identify top sellers, buyers, and creators\n\nResults are paginated and can be sorted by different ranking criteria.\n","operationId":"getAccounts","parameters":[{"name":"first","in":"query","required":false,"description":"Maximum number of accounts to return (default: 100, max: 1000)","schema":{"type":"number"}},{"name":"skip","in":"query","required":false,"description":"Number of accounts to skip for pagination (default: 0)","schema":{"type":"number"}},{"name":"sortBy","in":"query","required":false,"description":"Sort accounts by specific metrics:\n- most_sales: Accounts with most items sold\n- most_purchases: Accounts with most items purchased\n- most_royalties: Accounts earning most royalties\n- most_collections: Accounts with most collections created\n- most_earned: Accounts with highest total earnings\n- most_spent: Accounts with highest total spending\n","schema":{"type":"string","enum":["most_sales","most_purchases","most_royalties","most_collections","most_earned","most_spent"]}},{"name":"id","in":"query","required":false,"description":"Filter by specific account ID","schema":{"type":"string"}},{"name":"address","in":"query","required":false,"description":"Filter by one or more account addresses (can be repeated or comma-separated)","schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true},{"name":"network","in":"query","required":false,"description":"Filter by network","schema":{"type":"string","enum":["ETHEREUM","MATIC"]}}],"responses":{"200":{"description":"Account statistics","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Account identifier"},"address":{"type":"string","description":"Wallet address of the account"},"sales":{"type":"number","description":"Total number of items sold"},"purchases":{"type":"number","description":"Total number of items purchased"},"spent":{"type":"string","description":"Total amount spent in Wei (as string to handle large numbers)"},"earned":{"type":"string","description":"Total amount earned from sales in Wei"},"royalties":{"type":"string","description":"Total royalties earned in Wei"},"collections":{"type":"number","description":"Number of collections created"}},"required":["id","address","sales","purchases","spent","earned","royalties","collections"]}},"total":{"type":"number","description":"Total number of accounts matching the filters"}},"required":["data","total"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"message":{"type":"string"}}}}}}}}}}}
```
