Skip to main content

Authentication

The Sera GraphQL API is publicly accessible and does not require authentication.

Public Access

# No API key required
curl -X POST \
  -H "Content-Type: application/json" \
  -d '{"query": "{ markets(first: 5) { id } }"}' \
  https://api.goldsky.com/api/public/project_cmicv6kkbhyto01u3agb155hg/subgraphs/sera-pro/1.0.9/gn

Best Practices

Rate Limiting

While no authentication is required, please follow these guidelines:
  • Add delays between requests (recommended: 500ms)
  • Batch queries when possible
  • Cache responses for frequently accessed data

Request Headers

Include a descriptive User-Agent for debugging:
const response = await fetch(SUBGRAPH_URL, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'User-Agent': 'MyApp/1.0.0'
  },
  body: JSON.stringify({ query })
});

CORS

The API supports CORS for browser-based applications:
// Works directly from browser
fetch(SUBGRAPH_URL, {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ query: '{ markets(first: 1) { id } }' })
});

WebSocket Subscriptions

GraphQL subscriptions are not currently supported. Poll the API for updates.
For real-time data, consider:
  • Polling at regular intervals
  • Subscribing to on-chain events via WebSocket RPC