# Data API

Api for getting marketplace data stats

## Get collection activity

> Retrieves trading activity history for a specific collection based on its slug

```json
{"openapi":"3.0.0","info":{"title":"Ordinalsbot Marketplace API","version":"0.0.1"},"servers":[{"url":"https://api.ordinalsbot.com/marketplace","description":"Production server"},{"url":"https://testnet-api.ordinalsbot.com/marketplace","description":"Testnet server"},{"url":"https://signet-api.ordinalsbot.com/marketplace","description":"Signet server"}],"paths":{"/data/collections/activity":{"get":{"summary":"Get collection activity","description":"Retrieves trading activity history for a specific collection based on its slug","parameters":[{"in":"query","name":"slug","required":true,"schema":{"type":"string"},"description":"The slug identifier of the collection"},{"in":"query","name":"startDate","required":false,"schema":{"type":"string","format":"date","nullable":true},"description":"Filter activities from this date (format YYYY-MM-DD). By default, it will filter activities from the last 7 days.\n"},{"in":"query","name":"page","required":false,"schema":{"type":"integer","minimum":0,"default":0},"description":"Page number for pagination"},{"in":"query","name":"limit","required":false,"schema":{"type":"integer","minimum":20,"maximum":100,"default":100},"description":"Number of records to return per page (between 20 and 100)"},{"in":"query","name":"order","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Sort order for activities (ascending or descending)"}],"responses":{"200":{"description":"Successfully retrieved collection activity","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"inscription_id":{"type":"string","description":"ID of the inscription involved in the activity"},"inscription_name":{"type":"string","description":"Name of the inscription"},"maker_address":{"type":"string","description":"Seller/maker address"},"taker_address":{"type":"string","nullable":true,"description":"Buyer/taker address (can be null)"},"collection_slug":{"type":"string","description":"Slug of the collection"},"collection_name":{"type":"string","description":"Name of the collection"},"price":{"type":"number","description":"Price in satoshis"},"trade_timestamp":{"type":"string","format":"date-time","description":"Timestamp when the trade occurred"},"transaction_id":{"type":"string","description":"Bitcoin transaction ID"},"thumbnail_url":{"type":"string","description":"URL to the inscription thumbnail image"}}}}}}},"400":{"description":"Bad request - validation error","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"msg":{"type":"string"},"param":{"type":"string"},"location":{"type":"string"}}}}}}}}}}}}}}
```
