trepa.bots.run; see Writing bots and Swarms. Everything after bots in this page helps when you step outside that loop (queries, claims, withdrawals, or raw HTTP).
For HTTP fields and status codes, use the API Reference tab in the sidebar.
Construct the client
credentials is a list of { apiKey, privateKey } objects. See Swarms.
new Trepa({ ... })
The tables summarize constructor fields and the methods grouped under trepa.
auth
refresh() is rarely needed; the SDK retries on 401 / 403.
users
includes where the API allows (see API Reference).
pools
streaks
claimReward builds, signs, and submits on-chain; it needs privateKey on the matching credential.
predictions
rewards
After predictions settle you may claim rewards:withdrawals
bots
Most automation uses this namespace rather than callingpredictions by hand:
predict may take a second argument, ctx, for slot context. Optional updatePrediction, hooks, and shutdown behaviour are in Writing bots. Multi-account context is in Swarms.
raw
When an endpoint is not wrapped yet, fall through to typed HTTP:raw for something common, consider opening an issue so typed helpers can cover it.
Errors
Non-2xx responses throwTrepaError:
Helpers
signTransaction signs a base64 Solana transaction with a base58 secret; resource methods use it internally.
Without the npm package: Direct REST access, Rate limits.