Skip to main content

Transfers · Quick start

export BASE_URL=https://gateway.gelabs.org
export API_KEY=your-api-key

1. Watch an address​

curl -X POST "$BASE_URL/tx/api/v1/addresses" \
-H "Content-Type: application/json" \
-H "X-API-Key: $API_KEY" \
-d '{"wallets":[{"chain_type":"evm","chain_id":1,"address":["0x1234567890abcdef1234567890abcdef12345678"]}]}'

2. Enable push​

curl -X PUT "$BASE_URL/tx/api/v1/app/config" \
-H "Content-Type: application/json" \
-H "X-API-Key: $API_KEY" \
-d '{"enable_ws":true,"enable_webhook":true,"webhook_url":"https://your-server.example/hooks/tx","webhook_secret":"your-secret"}'

webhook_url must be publicly reachable. For WebSocket only, set enable_webhook to false.

3. Connect WebSocket​

npx wscat -c "wss://gateway.gelabs.org/tx/ws" -H "X-API-Key: $API_KEY"

First frame is type: connected. A hit is type: transaction; data carries tx_hash / txHash:

{
"id": "msg-1",
"time": 1710000000000,
"type": "transaction",
"code": 0,
"data": {
"chain_type": "evm",
"chain_id": 1,
"tx_hash": "0xabc...",
"txHash": "0xabc...",
"sender": "0x1111...",
"receiver": "0x2222...",
"amount": "1000000000000000000",
"listenAddress": ["0x1111..."]
},
"message": "success"
}

ACK immediately or the server resends. The frame field is message, not msg:

{
"id": "ack-1",
"type": "transactionACK",
"data": {"chain_type": "evm", "txHash": "0xabc...", "messageId": "msg-1"}
}

4. Receive webhook​

The server POSTs to your webhook_url with Content-Type: application/json and Sign: your-secret. Body is a bare JSON array; each item has both camelCase (chainType, txHash) and snake_case compatibility keys (chain_type, tx_hash, etc.):

[
{
"chain_type": "evm",
"chain_id": 1,
"tx_hash": "0xabc...",
"chainType": "evm",
"chainId": 1,
"txHash": "0xabc...",
"sender": "0x1111...",
"receiver": "0x2222...",
"amount": "1000000000000000000",
"listenAddress": ["0x1111..."]
}
]

Respond with HTTP 2xx. Full fields: API reference.

5. Query history​

curl -X POST "$BASE_URL/tx/api/v1/transfers/search" \
-H "Content-Type: application/json" \
-H "X-API-Key: $API_KEY" \
-d '{"chain_type":"evm","chain_id":1,"address":"0x1234567890abcdef1234567890abcdef12345678","limit":20}'