Jump to content

How to get the timestamp of a transaction via API


Recommended Posts

Hi, 

Looking at https://explorer.elrond.com/transactions, I see transactions have a timestamp, but this information is not present in the transaction GET API.

I tried querying the block API as well to see if it's saved there, but I get a Missing Authentication Token error. 

Thanks

 

Link to post
Share on other sites
20 minutes ago, Bogdan said:

Hi, 

Looking at https://explorer.elrond.com/transactions, I see transactions have a timestamp, but this information is not present in the transaction GET API.

I tried querying the block API as well to see if it's saved there, but I get a Missing Authentication Token error. 

Thanks

 

Hi Bogdan,

If I'm not wrong, you can use the get_block_timestamp api function. It gives you the current time as a unix timestamp. You'll have to do conversions yourself if you're interested in the actual date as a DD/MM/YY format or whatever.

I invite you to our developers Telegram group, here we have lot of devs and can get an instant support.
https://t.me/ElrondDevelopers

Best regards,
Marius

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...