I am using subxt to get the block details, including the block number, hash, parent hash, timestamp, events and the extrinsics.

I am able to find most details, except the timestamp. Is there a way to get the block inclusion time?

Following is how I get the block details.

enter image description here

Is it possible to get the block timestamp using the subxt?

1 Answer 1


Timestamp is an item stored in storage.


Simply retrieve it from storage.

Follow this example and replace system().account() with timestamp().now().

  • thank you, this solved my problem.
    – Yeou
    Commented Sep 7, 2023 at 9:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.