Developer Portal
Build on GMAChain. Read-only REST endpoints power this explorer, a JSON-RPC interface talks directly to validator nodes, and a WebSocket stream pushes blocks and transactions in real time.
REST Endpoints
GET
/v1/statsLive network statisticsGET
/v1/blocksList latest blocksGET
/v1/blocks/{height}Get a block by heightGET
/v1/transactions/{hash}Get a transaction by hashGET
/v1/accounts/{address}Get account / wallet detailsGET
/v1/accounts/{address}/transactionsAccount transaction historyGET
/v1/validatorsList the PoA validator setGET
/v1/tgx/poolsTGX liquidity poolsGET
/v1/tgx/swapsRecent TGX swapsGET
/v1/richlistTop GMA holdersGET
/v1/treasury/walletsTreasury wallets & balancesGET
/v1/burnsBurn event historyGET
/v1/unlocksVesting & unlock calendarGET
/v1/search?q=Universal search resolverBase URLs
REST API
https://api.gmascan.io/v1JSON-RPC
https://rpc.gmachain.networkWebSocket Stream
wss://api.gmascan.io/v1/streamNo API key is required for read-only endpoints. Rate limits apply per IP; contact the foundation for elevated limits.
cURL
bash
curl https://api.gmascan.io/v1/blocks?limit=5 \
-H "Accept: application/json"JavaScript
javascript
const res = await fetch("https://api.gmascan.io/v1/accounts/gma1...", {
headers: { Accept: "application/json" },
})
const account = await res.json()
console.log(account.balance, account.txCount)Python
python
import requests
res = requests.get(
"https://api.gmascan.io/v1/validators",
headers={"Accept": "application/json"},
)
validators = res.json()
print(len(validators), "active validators")JSON-RPC
bash
curl -X POST https://rpc.gmachain.network \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "gma_getBlockByHeight",
"params": [18452900],
"id": 1
}'Live WebSocket Stream
javascript
const ws = new WebSocket("wss://api.gmascan.io/v1/stream")
ws.onmessage = (event) => {
const msg = JSON.parse(event.data)
if (msg.channel === "blocks") console.log("new block", msg.data.height)
if (msg.channel === "transactions") console.log("new tx", msg.data.hash)
}
ws.onopen = () => {
ws.send(JSON.stringify({ type: "subscribe", channels: ["blocks", "transactions"] }))
}Subscribe to blocks and transactions channels for the same live feed that powers this explorer's dashboard.