API Reference

Generating and providing an API Key with requests,

Obtaining a Key

Visit our Discord and post in the #support channel to request a key.

Using the Key

Simply set the x-api-key header with your api key when making a request against the Arcade.xyz API. You may optionally set x-expires-at with a epoch timestamp in milliseconds that is in the future as an additional security measure to prevent replay attacks.

Example

const { ADDRESS, ARCADE_API_KEY } = process.env;

const url = `https://api-v2.arcade.xyz/api/v2/accounts/${ADDRESS}`;

(async function () {
  // Request expires 10 seconds from now
  const expiresAt = (Date.now() + 10 * 1000).toString();
  
  const res = await fetch(url, {
    headers: {
      'x-api-key': ARCADE_API_KEY,
      'x-expires-at': expiresAt,
    },
  })
  
  console.log(res)
})();

Errors

Status CodeError CodeErrorSolution
401401Unauthorized
403804x-expires-at is not an integerSend expires at as an epoch timestamp in milliseconds.
403805x-expires-at must be in the futureSend an expires at that is at least ten seconds in the future.
403806x-expires-at is greater than 60 secs in futureSend an expires at that is less than sixty seconds in the future.