Skip to content

GET /api/time/{chainId}

GET
/api/time/{chainId}

get the current time from the chain with the chainId specified. If a contract timestamp is specified, it will depends on that contract

Parameters

Path Parameters

chainId*
Typestring
Required

Responses

Samples

cURL
curl -X GET http://localhost/api/time/{chainId}
JavaScript
fetch("http://localhost/api/time/{chainId}")
  .then(response => response.json())
  .then(data => console.log(data));
PHP
file_get_contents("http://localhost/api/time/{chainId}");
Python
import requests
response = requests.get("http://localhost/api/time/{chainId}")
print(response.json())
Powered by VitePress OpenAPI