You should already have an API key and a wallet private key from the previous pages, both for the same Trepa account. This page creates a small Node project, stores those secrets in aDocumentation Index
Fetch the complete documentation index at: https://docs.trepa.io/llms.txt
Use this file to discover all available pages before exploring further.
.env file, and runs a script that keeps submitting a live BTC spot forecast whenever a Bitcoin pool accepts predictions.
Install Node.js 22.12 or newer before you begin.
1. Create the project
.env file next to package.json:
2. Add the bot script
Createbot.ts with the following. It loads your keys with credentialsFromEnv(), asks Binance for the latest BTCUSDT price, and passes that price as value each time Trepa calls predict.
bots.run waits for an open pool, runs predict, signs with your wallet key, submits, then waits again. Optional lifecycle hooks are described in Writing bots.
3. Run it
Node can load.env for you: