Farbeam
Docs / Get started

Playground

The API playground sends real requests from your browser to the same API your code calls. It has no mock data. If a chain is degraded, you see that.

#Steps

  1. Open /playground.
  2. Pick an endpoint from the list.
  3. Fill in the parameters. Example values are filled in where the reference has them.
  4. Optional: paste a key. It stays in the page. Reloading clears it.
  5. Press Send request and read the raw reply.

The curl box updates as you type. Copy it into a shell to repeat the call. When a key is present, the box shows $FARBEAM_KEY instead of the value, so a screenshot of the page does not expose your key.

Every reference page links to its endpoint in the playground with the e query value, for example /playground?e=transfers.

#What it costs

Playground requests are normal API requests. They count against your limit like any other call:

  • With no key, they draw on the 30 units per minute of your network.
  • With a key, they draw on the 120 units per minute of that key, and they appear in usage on GET /me.

A token report costs 3 units. Twenty quick token reports with no key will return 429 until the next minute.

#What is left out

These endpoints are not in the playground list, because a stray click would have side effects or because they are not request and reply calls.

EndpointReasonUse instead
POST /keysNeeds a wallet sessionThe console
DELETE /meRevokes the keycurl
GET /api/liveA long-lived streamThe live transfers page or the streaming guide

Other write endpoints are in the list and act on real data when you send a key. DELETE /rules/{id} deletes that rule, and POST /rules/{id}/test sends a real delivery to the rule URL.

#Good first requests

GoalEndpointValues
See the state of each chainGET /statusNone. Costs 0 units.
See recent large stablecoin movesGET /transferstoken=USDT, min_usd=1000000, limit=5
Read a labeled walletGET /wallets/{address}0x28C6c06298d514Db089934071355E5743bf21d60
Read a token reportGET /tokens/{chain}/{address}solana, JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN
Check a rulePOST /rules/validate{"expression":"usd >= 1m and not sampled"}

#Reading the reply

The reply panel shows the HTTP status and JSON body. On success, look at meta.as_of for the time of the response. On failure, the body holds error.code and error.request_id. The errors page lists all codes.

meta.as_of is the response time. It is not the age of the data, because some endpoints are served from a cache. The freshness page lists the cache time per endpoint.

#Browser notes

The API sends access-control-allow-origin: *, so you can also call it from browser code on your own origin. Keep keys out of public front-end code, because anyone can read them there. See security.

The OpenAPI file describes the same endpoints as the playground list, and you can load it into your own API client.