# GET /api/v1/activity > The ledger, newest first, paged. Source: https://docs.getport.app/api/reference/activity/ ## Example The key is read from `PORT_API_KEY`, so the command never prints it. ```sh curl -s https://getport.app/api/v1/activity -H "Authorization: Bearer $PORT_API_KEY" ``` ## Parameters | Name | In | Type | What it does | | -------- | ----- | ------- | -------------------------------------------------------------------------------------------------- | | `cursor` | query | string | The cursor from the previous page. | | `hidden` | query | boolean | Set to 1 or true to include what the Activity page folds: phishing names and what arrived unasked. | ## Notes A page can come back empty with a cursor that is not null. Keep paging until the cursor is null. Transactions that arrived unasked or carry a phishing name are left out unless `hidden` is set, as the Activity page folds them, and `folded` counts them. Your plan decides how far back this reads: rows older than `viewableFrom` are not returned and the cursor ends there. Null means all of it. PnL is computed over everything either way. ## Response A 200 with the [envelope](https://docs.getport.app/api/#the-envelope) every endpoint answers, and this endpoint's answer in `data`. Amounts and USD figures are strings. What `data` looks like, with sample values: the shape is the schema's, checked when these pages are built, and the figures are made up, not anyone's port. ``` { "events": [ { "id": "3f6c2a1e-8b7d-4e2f-9a1c-5d4b3e2f1a0c", "at": "2026-10-06T05:42:10.000Z", "kind": "swap", "title": "Swapped 1,000 USDC for 0.4 ETH", "walletAddress": "0x8f3c0e7b2a91d4c6f5e3b2a1908d7c6b5a4fc21a", "chainId": "ethereum", "valueLabel": "+0.4 ETH", "direction": "up", "txUrl": null, "groupId": "0x5e7b1c9d3a2f8e4b6c0d1a9f7e3b5c2d8a4f6e1b9c7d3a5f2e8b4c6d0a1f9e3b", "type": "swap", "subtype": "swap", "amount": "0.4", "symbol": "ETH", "tokenAddress": "native", "usdAt": "990.60", "counterparty": "0x7a2d94e1b3c58f06d1e4a9b2c7f3e8d5a6b1c093", "counterpartyLabel": "Uniswap", "spam": false, "spamReason": null } ], "cursor": "eyJvZmZzZXQiOjEwMH0", "folded": { "phishing": 1, "unsolicited": 1 }, "viewableFrom": null } ``` | Field of `data` | Type | Always present | | --------------- | ----------------- | -------------- | | `events` | `array of object` | yes | | `cursor` | `string or null` | yes | | `folded` | `object` | no | | `viewableFrom` | `string or null` | no | The whole schema of `data` As the OpenAPI document at [`https://getport.app/api/v1/openapi.json`](https://getport.app/api/v1/openapi.json) states it. Objects are left open, because a response only ever gains fields. ``` { "type": "object", "properties": { "events": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "kind": { "type": "string", "enum": [ "swap", "send", "receive", "claim", "stake", "mint", "buy", "sell", "short", "long" ] }, "title": { "type": "string" }, "walletAddress": { "type": "string" }, "chainId": { "type": "string" }, "valueLabel": { "type": [ "string", "null" ] }, "direction": { "type": "string", "enum": [ "up", "down", "neutral" ] }, "txUrl": { "type": [ "string", "null" ] }, "groupId": { "type": "string" }, "type": { "type": "string" }, "subtype": { "type": "string" }, "amount": { "type": [ "string", "null" ] }, "symbol": { "type": [ "string", "null" ] }, "tokenAddress": { "type": [ "string", "null" ] }, "usdAt": { "type": [ "string", "null" ] }, "counterparty": { "type": [ "string", "null" ] }, "counterpartyLabel": { "type": [ "string", "null" ] }, "spam": { "type": "boolean" }, "spamReason": { "type": [ "string", "null" ] } }, "required": [ "id", "at", "kind", "title", "walletAddress", "chainId", "valueLabel", "direction", "txUrl" ] } }, "cursor": { "type": [ "string", "null" ] }, "folded": { "type": "object", "properties": { "phishing": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "unsolicited": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "phishing", "unsolicited" ] }, "viewableFrom": { "type": [ "string", "null" ] } }, "required": [ "events", "cursor" ] } ``` ## From an agent The MCP tool `port_activity` answers the same question ("what moved in my wallets recently") with the same figures, over the [MCP server](https://docs.getport.app/api/mcp/). ## Refusals Every endpoint shares three: `401` for a missing or dead key, `402` for an account whose plan has no API ("Agents, MCP and the API are on Pro+ and above."), and `429` past the minute or day limit. The [errors](https://docs.getport.app/api/#errors) section has each body. This endpoint also refuses: - `400` `bad_cursor` when the cursor is not one this endpoint handed out.