GetTotemHistory
Retrieves the history of a totem or account, including increases, deletes, and other changes.
Endpoint: GET /nxt?requestType=GetTotemHistory
Parameters:
- totem (long, optional): Totem ID to filter by
- account (long, optional): Account ID to filter by
- firstIndex (int, optional, default: 0): Starting index for pagination
- lastIndex (int, optional, default: 99): Ending index for pagination
- timestamp (int, optional, default: 0): Minimum timestamp to include (epoch seconds)
- deletesOnly (boolean, optional, default: false): Only include delete operations
- increasesOnly (boolean, optional, default: false): Only include increase operations
- includeTotemInfo (boolean, optional, default: false): Include totem information in results
Request Example: /nxt?requestType=GetTotemHistory&totem=123456789&deletesOnly=true
Response:
{
"totemHistory": [
{
"totemHistoryFullHash": "abc123...",
"chain": 1,
"totem": "123456789",
"account": "111111111",
"quantityQNT": "-10000000",
"height": 123456,
"timestamp": 123456789
}
]
}
Response Fields:
- totemHistory: array - Array of history entry objects
- totemHistory[].totemHistoryFullHash: string - Full hash of the history entry
- totemHistory[].chain: number - Chain ID
- totemHistory[].totem: string - Totem ID (unsigned string)
- totemHistory[].account: string - Account ID (unsigned string)
- totemHistory[].quantityQNT: string - Change in quantity in Quantum Units (negative for deletes)
- totemHistory[].height: number - Block height of the change
- totemHistory[].timestamp: number - Timestamp of the change
- totemHistory[].totemInfo: object - Only if includeTotemInfo=true, contains totem details from putTotemInfo()
Source: GetTotemHistory.java, JSONData.totemHistory() Notes: Either totem or account must be provided. Cannot use both deletesOnly and increasesOnly. Entries filtered by timestamp. Starts DB transaction. Not chain-specific.