Got a cool example to share? Get listed here! Submit it now.

useChainlinkFunctions()

Collection of community submitted examples for Chainlink Functions

Get inspired from quick examples

Chainlink Functions, a new self-service platform that allows anyone to write serverless code to fetch any data from any API and run custom compute on Chainlink's network. Learn from examples created by the community or contribute your own!
Learn more about Chainlink Functions

Fetch the UTC time

Submitted by:
Evan Drake
This function fetches the UTC timestamp from WorldTimeAPI.
1 2 3 4 5 6 7 8 9 const config = { url: "https://worldtimeapi.org/api/timezone/Etc/UTC", }; const response = await Functions.makeHttpRequest(config); const datetime = response.data.utc_datetime; return Functions.encodeString(datetime);