The shape
A bot using Hive typically runs on a schedule rather than conversationally:1
Authenticate with an API key
No browser in a cron job, so create an API key in the
dashboard and keep it in your secret
manager. See authentication.
2
Pull the state your strategy needs
One tool call per job:
get_token_price for a price, market_positioning for funding,
open interest and liquidations. Keep the set small; every call costs credits and time.3
Check the receipts before acting
This is the step people skip. Reject data that is too old, came back with a degraded
runtime_status, or is listed under missing, rather than trading on it.4
Decide and execute elsewhere
Your venue integration handles the order. Hive is not in that path.
From the CLI
Each of the nine tools has a CLI command. WithHIVE_API_KEY set in the environment:
--json prints an envelope with ok, data, and meta, where meta carries the provider
and runtime status. The CLI has a built-in --jq filter if you want to pull one field out
without piping:
From a service
A long-running service can keep an MCP session open with the API key in theAuthorization: Bearer header and call the same tools, or shell out to the CLI with
--json. Both take the same arguments.
What it costs
Leaving a default metric out does not lower the price. Asking for fewer metrics makes the
answer smaller, not cheaper.
Staying inside limits
Rate limits are per minute and credits are per month, and a bot can exhaust either. Practical habits:- Poll on the interval your strategy actually needs, not the fastest one available.
- Use one multi-part tool instead of looping single lookups.
market_positioningcovers several venues in one call. - Handle the quota error properly. Hive hard stops rather than billing overage, so a bot that ignores the error simply trades on nothing.
The failure mode worth designing for
Data can be stale or degraded without being wrong-looking. A bot that acts on any number it receives will eventually act on a price fetched during a provider outage. Gate onfetched_at,
runtime_status and missing explicitly, and treat a failed check as a reason to skip the
cycle rather than to guess.
