Lewati ke isi

API Reference

Base URL production: https://api.garudachain.id

Base URL lokal: http://localhost:4000

Health

GET /health

REST v1

Method Endpoint Deskripsi
GET /api/v1/chain Chain info & block number
GET /api/v1/blocks/latest Block terbaru (full)
GET /api/v1/blocks/:number Block by number
GET /api/v1/transactions/:hash Tx + receipt
GET /api/v1/accounts/:address Balance & tx count
GET /api/v1/validators Daftar validator
GET /api/v1/validators/ranking Ranking validator
GET /api/v1/network/contracts Contract addresses
GET /api/v1/openapi.json OpenAPI spec (YAML)

Contoh

curl https://api.garudachain.id/api/v1/chain
curl https://api.garudachain.id/api/v1/blocks/latest
curl https://api.garudachain.id/api/v1/accounts/0x...

GraphQL

POST /graphql
Content-Type: application/json

{"query": "{ chain { blockNumber chainId } }"}

Schema: GET /api/v1/graphql-schema

OpenAPI & Postman

  • Spec: docs/openapi.yaml
  • Collection: docs/postman/Garuda-Chain-API.postman_collection.json

Rate Limiting

Default: 100 req/min (production API: 200 req/min).

CORS

Production API mengizinkan origin: explorer.garudachain.id, garudachain.id.