Skip to content

API Authentication

API key required

API key is required to authenticate your requests to the API.

If you don't have an API key, please follow the instructions in the Obtaining an API Key guide.

Authenticating requests

All of the API endpoints require authentication with API key in the Authorization header.

http
Authorization: <API_KEY>

Examples

bash
curl -X GET "https://data.api.forgd.com/api/v1/exchanges" \
  -H "Authorization: <API_KEY>"
js
const response = await fetch('https://data.api.forgd.com/api/v1/exchanges', {
  method: 'GET',
  headers: {
    Authorization: '<API_KEY>',
  },
})

const data = await response.json()

if (response.ok) {
  console.log('Response:', data)
} else {
  console.error('Error:', response.status, response.statusText, data)
}
python
import requests

response = requests.get(
    'https://data.api.forgd.com/api/v1/exchanges',
    headers={'Authorization': '<API_KEY>'},
)

data = response.json()

if response.ok:
    print('Response:', data)
else:
    print('Error:', response.status_code, response.reason, data)