# Get Smart Wallet Portfolio History URL: /docs/api-reference/smart-wallets/GetPortfolioHistoryController_getPortfolioHistory_v1 The wallet's value at each day's close over a period, the last point now, and the account that explains it: started with + deposits − withdrawals + result = ended with. Built from every on-chain movement of the wallet, so it covers pools, lending and every supported chain. Days close at 00:00 America/Sao_Paulo; `1d`, and a history that started yesterday or today, go by the hour. A smart wallet the indexer never read is registered on the first call and returns INDEXING with its progress. Pass `chainId` and `token` for a single token's history. ## GET /api/v1/wallets/{walletAddress}/portfolio/history ```json { "description": "The wallet's value at each day's close over a period, the last point now, and the account that explains it: started with + deposits − withdrawals + result = ended with. Built from every on-chain movement of the wallet, so it covers pools, lending and every supported chain. Days close at 00:00 America/Sao_Paulo; `1d`, and a history that started yesterday or today, go by the hour. A smart wallet the indexer never read is registered on the first call and returns INDEXING with its progress. Pass `chainId` and `token` for a single token's history.", "operationId": "GetPortfolioHistoryController_getPortfolioHistory_v1", "parameters": [ { "name": "walletAddress", "required": true, "in": "path", "description": "Wallet address whose portfolio history you want\nAccepted formats:\n\n- **EVM**\n - pattern: `^0x[a-fA-F0-9]{40}$`\n - example: `0xa7a9dcfcb65ed67e05d9c7eb49d2d74ce1f5f4f1`\n- **Bitcoin**\n - pattern: `^(?:[13][a-km-zA-HJ-NP-Z1-9]{25,35}|bc1q[02-9ac-hj-np-z]{38}|bc1q[02-9ac-hj-np-z]{58}|bc1p[02-9ac-hj-np-z]{10,70})$`\n - example: `bc1qgv5fuheq50ghnju8lafqvps7h96ztfjtcvmsnd`\n- **Stellar**\n - pattern: `^G[A-Z2-7]{55}$`\n - example: `GCNHC2KY3QLJYXJCTY64TWDFHZWMOUYRD6AGMWUZOSK2VHK7D5MYUYZA`", "schema": { "oneOf": [ { "title": "EVM Address", "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "examples": [ "0xa7a9dcfcb65ed67e05d9c7eb49d2d74ce1f5f4f1" ] }, { "title": "Bitcoin Address", "type": "string", "pattern": "^(?:[13][a-km-zA-HJ-NP-Z1-9]{25,35}|bc1q[02-9ac-hj-np-z]{38}|bc1q[02-9ac-hj-np-z]{58}|bc1p[02-9ac-hj-np-z]{10,70})$", "examples": [ "bc1qgv5fuheq50ghnju8lafqvps7h96ztfjtcvmsnd" ] }, { "title": "Stellar Address", "type": "string", "pattern": "^G[A-Z2-7]{55}$", "examples": [ "GCNHC2KY3QLJYXJCTY64TWDFHZWMOUYRD6AGMWUZOSK2VHK7D5MYUYZA" ] } ] } }, { "name": "timerange", "required": false, "in": "query", "description": "Period ending now. `1a` is one year, `all` starts the day before the wallet first moved.", "schema": { "default": "1m", "type": "string", "enum": [ "1d", "7d", "1m", "3m", "6m", "1a", "all" ], "examples": [ "1m" ] } }, { "name": "currency", "required": false, "in": "query", "description": "Currency of every value, converted at each day close rate", "schema": { "default": "USD", "type": "string", "enum": [ "USD", "BRL" ], "examples": [ "BRL" ] } }, { "name": "chainId", "required": false, "in": "query", "description": "Chain of `token`. Send both or neither.", "schema": { "type": "number", "examples": [ 8453 ] } }, { "name": "token", "required": false, "in": "query", "description": "Only this token (`0xeeee…eeee` for the native coin): its own history, where every movement of it is a deposit or a withdrawal and the result is what it earned by itself, e.g. a yield token interest.", "schema": { "type": "string", "examples": [ "0x4e65fe4dba92790696d040ac24aa414708f5c0ab" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortfolioHistoryResponseDTO" } } } }, "403": { "description": "FORBIDDEN", "content": { "application/json": { "schema": { "type": "object", "description": "UNAVAILABLE_COMPUTE_UNITS", "required": [ "statusCode", "id", "message" ], "properties": { "statusCode": { "type": "number", "description": "HTTP status code", "examples": [ 403 ] }, "id": { "type": "string", "description": "Our ID of the problem", "examples": [ "UNAVAILABLE_COMPUTE_UNITS" ] }, "message": { "type": "string", "description": "A human readable message that explains the problem", "examples": [ "The project doesn't have enough compute units to perform this action. Please upgrade your plan." ] } } } } } }, "404": { "description": "NOT_FOUND", "content": { "application/json": { "schema": { "type": "object", "description": "ACCOUNT_ABSTRACTION_ADDRESS_NOT_REGISTERED_WITH_PROJECT", "required": [ "statusCode", "id", "message" ], "properties": { "statusCode": { "type": "number", "description": "HTTP status code", "examples": [ 404 ] }, "id": { "type": "string", "description": "Our ID of the problem", "examples": [ "ACCOUNT_ABSTRACTION_ADDRESS_NOT_REGISTERED_WITH_PROJECT" ] }, "message": { "type": "string", "description": "A human readable message that explains the problem", "examples": [ "The requested wallet is not registered with the project" ] } } } } } } }, "summary": "Get Smart Wallet Portfolio History", "tags": [ "Smart Wallets" ] } ``` ### Schema PortfolioHistoryResponseDTO ```json { "type": "object", "properties": { "status": { "type": "string", "enum": [ "INDEXED", "INDEXING" ], "description": "INDEXING while the wallet history is being read for the first time (a wallet asked for the first time starts then), with the points read so far.", "examples": [ "INDEXED" ] }, "granularity": { "type": "string", "enum": [ "DAY", "HOUR" ], "description": "DAY: a point per São Paulo day. HOUR: a point per hour, for `1d` and for a history that started yesterday or today.", "examples": [ "DAY" ] }, "progress": { "description": "How far the indexer is while INDEXING, null once INDEXED.", "type": [ "object", "null" ], "allOf": [ { "$ref": "#/components/schemas/PortfolioHistoryProgressDTO" } ] }, "timerange": { "type": "string", "enum": [ "1d", "7d", "1m", "3m", "6m", "1a", "all" ], "examples": [ "1m" ] }, "currency": { "type": "string", "enum": [ "USD", "BRL" ], "examples": [ "BRL" ] }, "firstActivityDate": { "type": [ "object", "null" ], "description": "First day the wallet (or the token) moved. A timerange that starts before it is cut to the day before it.", "examples": [ "2026-07-05" ] }, "summary": { "description": "startValue + deposits − withdrawals + result = endValue. Null when the first or the last point has no value.", "type": [ "object", "null" ], "allOf": [ { "$ref": "#/components/schemas/PortfolioHistorySummaryDTO" } ] }, "points": { "description": "One point per day or hour, oldest first, the last one now. The first one is the start of the period: its deposits and withdrawals are not part of the summary. A wallet that never moved has two points at 0: the period start and now.", "type": "array", "items": { "$ref": "#/components/schemas/PortfolioHistoryPointDTO" } } }, "required": [ "status", "granularity", "progress", "timerange", "currency", "firstActivityDate", "summary", "points" ] } ``` ### Schema PortfolioHistoryProgressDTO ```json { "type": "object", "properties": { "chains": { "type": "number", "description": "Chains the wallet is read on.", "examples": [ 9 ] }, "chainsIndexed": { "type": "number", "description": "Chains whose history is read up to now.", "examples": [ 4 ] } }, "required": [ "chains", "chainsIndexed" ] } ``` ### Schema PortfolioHistorySummaryDTO ```json { "type": "object", "properties": { "startValue": { "type": "number", "description": "Value at the first point.", "examples": [ 4500 ] }, "deposits": { "type": "number", "examples": [ 1500 ] }, "withdrawals": { "type": "number", "examples": [ 0 ] }, "result": { "type": "number", "description": "endValue − startValue − deposits + withdrawals: what the wallet gained or lost by itself (prices, yield, pool fees, network and swap fees).", "examples": [ 200 ] }, "resultPercent": { "type": [ "object", "null" ], "description": "Result as a percentage of the money the period worked with: the value it started with plus its deposits. Null when that is zero.", "examples": [ 3.81 ] }, "endValue": { "type": "number", "description": "Value at the last point.", "examples": [ 6200 ] }, "missingDays": { "type": "number", "description": "Points of the period without a value.", "examples": [ 0 ] } }, "required": [ "startValue", "deposits", "withdrawals", "result", "resultPercent", "endValue", "missingDays" ] } ``` ### Schema PortfolioHistoryPointDTO ```json { "type": "object", "properties": { "date": { "type": "string", "description": "Day in America/Sao_Paulo the point is in.", "examples": [ "2026-10-28" ] }, "time": { "type": "string", "description": "End of the point (the day close at 00:00 America/Sao_Paulo, or the hour), the value is at. The last point is now.", "examples": [ "2026-10-29T03:00:00Z" ] }, "value": { "type": [ "object", "null" ], "description": "Value held at the close, in `currency`. A token without a price in the close's hour or the two before takes its last price up to 30 days before, else its first up to 30 days after, else counts as nothing. Null only when `currency` has no exchange rate at the close.", "examples": [ 6200.12 ] }, "deposits": { "type": "number", "description": "Money that came in from outside the wallet that day (transfers and Pix). With a token, everything that came into that token.", "examples": [ 500 ] }, "withdrawals": { "type": "number", "description": "Money that left to outside the wallet that day. With a token, everything that left that token.", "examples": [ 0 ] }, "amount": { "type": [ "object", "null" ], "description": "Balance of the token in whole units at the close. Only with a token.", "examples": [ 1503.1 ] }, "depositsAmount": { "type": [ "object", "null" ], "description": "Whole units of the token that came in that day. Only with a token.", "examples": [ 1500 ] }, "withdrawalsAmount": { "type": [ "object", "null" ], "description": "Whole units of the token that left that day. Only with a token.", "examples": [ 0 ] } }, "required": [ "date", "time", "value", "deposits", "withdrawals", "amount", "depositsAmount", "withdrawalsAmount" ] } ```