diff --git a/HIP/hip-980.md b/HIP/hip-980.md index e1dbd94f5..c41927121 100644 --- a/HIP/hip-980.md +++ b/HIP/hip-980.md @@ -61,6 +61,8 @@ For example, if we have an `asc` ordering of the results, then `?timestamp=X`, ` The `timestamp` query parameter will support having a range of timestamps. For example, `timestamp=gt:X×tamp=lt:Y` will return a single result with the entity or entity related info in the most recent state within the range that is greater than `X` and less than `Y`, where `X` and `Y` are different timestamps. +Here are the affected APIs with the query parameter added: + ``` /api/v1/accounts/{idOrAliasOrEvmAddress}/tokens?timestamp={value} /api/v1/accounts/{idOrAliasOrEvmAddress}/nfts?timestamp={value} @@ -70,6 +72,9 @@ The `timestamp` query parameter will support having a range of timestamps. For e /api/v1/tokens/{tokenId}/nfts/{serialNumber}?timestamp={value} ``` +Note: There is an existing API with a `timestamp` query parameter, which is `/api/v1/accounts/{idOrAliasOrEvmAddress}?timestamp={value}`. While parameter changes won't be applied for it, it's +behaviour will reflect to actually return modification changes of all account fields. Currently, the timestamp filter is applied only to the transaction list. The balance info section will continue to have granularity of 15 minutes. + **Request** ``` /api/v1/accounts/{idOrAliasOrEvmAddress}/tokens?timestamp={value} @@ -87,6 +92,8 @@ GET api/v1/accounts/4408244/tokens?order=asc×tamp=eq:1705334449.803393003 **Response** +The response format of all the mentioned APIs will be enhanced with additional timestamp range with `from` and `to` fields, reflecting the period in which the returned data state was valid. The `to` field will be null if the result represent the latest updated state. + ```json { "tokens": [ @@ -97,7 +104,11 @@ GET api/v1/accounts/4408244/tokens?order=asc×tamp=eq:1705334449.803393003 "decimals": 0, "token_id": "0.0.4328145", "freeze_status": "NOT_APPLICABLE", - "kyc_status": "NOT_APPLICABLE" + "kyc_status": "NOT_APPLICABLE", + "timestamp": { + "from": "1705334449.803393003", + "to": null + } } ], "links": {