Skip to main content

Get started

Gel Labs public APIs cover prices, transfer monitoring, RPC, and TRON energy rental. Fastest path: create an App in Console, copy the API Key, send your first request.

Get an API Key​

  1. Open Console and sign in with a wallet.
  2. Create an App.
  3. Copy the API Key from the App page. Keep it on the server. Do not ship it in a browser or mobile app.
export API_KEY="your-api-key"

Sending TRX to rent energy, and the public quote GET|POST /energy-rental/trx-quote, do not need a key; see Energy rental. RPC authenticates with the endpoint token in the path, not X-API-Key.

Base URL​

HTTPS https://gateway.gelabs.org
WSS wss://gateway.gelabs.org

Authentication​

Most HTTP APIs take one header:

X-API-Key: your-api-key
ProductAuth
Price, transfers, energy rental APIX-API-Key
RPC{token} in the URL; do not send X-API-Key

Send your first request​

Verify the key with a price call (1 = BTC, 1027 = ETH):

curl -H "X-API-Key: $API_KEY" \
"https://gateway.gelabs.org/market/api/v1/quotes/latest?ids=1,1027"

On success code is 0 and quotes are in data.items.

Response format​

Except RPC (upstream JSON-RPC), HTTP success looks like:

{
"code": 0,
"message": "success",
"data": {}
}
FieldTypeMeaning
codeintegerBusiness code. Success is always 0
messagestringText. Often success or ok
dataobject / array / string / nullPayload. Failures are usually "" or null

Treat code === 0 as success. Do not rely on HTTP status alone. The field name is message, not msg.

Products​

ProductWhat it doesEntry
Token priceLive quotes by token id or contract/market/api/v1
TransfersWatch addresses, history, live push/tx/api/v1, /tx/ws
RPCJSON-RPC HTTP / WebSocket/rpc/{network}/{token}
Energy rentalRent 1 hour of TRON energy: send TRX or call the API/energy-rental

Pick a product and open its Quick start.