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
    Sep 7 at 9:39

Your Answer

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

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