ProphetX is the friendliest venue on this list to learn on, because it hands you a sandbox with demo funds. Break your bot there for free, then take it live.
New to the overall setup? Read the prediction market bot overview first.
Step 1: connect
Start in the sandbox.
- Register on the ProphetX sandbox site. Use a real phone number, because two-factor applies even there.
- Ask the ProphetX team to set your sandbox account up as an API account and send demo funds. Their integration guide at docs.prophetx.co lists how to reach them.
Create your API token. In the sandbox, open the top-right menu, choose API integration and click create a new token. You get an access key and a secret key. Use a separate pair for each process you run at the same time, because ProphetX limits sessions per access key.
How auth works:
POST /auth/loginwith youraccess_keyandsecret_key.- You get an access token (about 20 minutes) and a refresh token (about three days).
- Send the access token as
Authorization: Bearer <token>on every call, and refresh it before it lapses.
Calling login again on a key with a live session opens a second session instead of replacing the first, which is how bots trip the session limit. Log in once per process and refresh.
The pieces you'll use:
- Sandbox base:
https://api.sandbox.prophetx.dev/partner(keep the/partnerpath) - Balance:
GET /v4/mm/get_balance - Markets:
GET /mm/get_tournaments,GET /mm/get_sport_events,GET /v4/mm/get_multiple_markets. You trade onstrike_id. - Live feed: Pusher. Get the config from
GET /websocket/connection-config, then your channels fromPOST /v4/mm/websocket, and refresh the config at least every 30 minutes. - Orders:
POST /v4/mm/submit_orderwith a uniqueexternal_id,strike_id,priceandquantity. Cancel withPOST /v4/mm/cancel_order.
Two gotchas: orders are buy-only, and a successful submit comes back inactive, not open. Wait for open before your bot counts it as resting.
Step 2: build the bot with AI
You are a senior engineer helping me build a small, safe trading bot for ProphetX.
API facts:
- Docs: https://docs.prophetx.co (integration guide: /docs/integration; index: /llms.txt)
- Sandbox base: https://api.sandbox.prophetx.dev/partner (keep the /partner path).
Production base comes from ProphetX's going-live guide; read it from PX_BASE_URL.
- Auth: POST /auth/login with access_key and secret_key returns an access token
(~20 min) and a refresh token (~3 days). Send "Authorization: Bearer <access>".
Refresh before expiry. Log in ONCE per process; a second login opens a new session.
Read PX_ACCESS_KEY and PX_SECRET_KEY from environment variables. Never print or
log them. Never ask me to paste them into this chat.
- Markets: /mm/get_tournaments, /mm/get_sport_events, /v4/mm/get_multiple_markets.
Trade on strike_id.
- Feed: Pusher. GET /websocket/connection-config, then POST /v4/mm/websocket for
channels. Refresh the config at least every 30 minutes.
- Orders: POST /v4/mm/submit_order {external_id, strike_id, price, quantity}.
Buy-only. A success returns status "inactive"; wait for "open" before treating it
as resting. Cancel with POST /v4/mm/cancel_order.
Market: [e.g. NFL game winner markets].
Rule: [YOUR RULE IN ONE OR TWO SENTENCES].
Build:
1. [Python 3.12 / Node 24]. No axios.
2. ingest, decide and execute as separate modules.
3. Rails in config: max per position, max open positions, daily loss stop, and a
KILL file that halts everything.
4. DRY_RUN=true by default. Log every decision and skip, with a reason, to CSV.
5. Reconnect with backoff. Stale data = no trade.
6. Default to the sandbox. Production only when PX_ENV=production is set.
7. If you are unsure of an endpoint or field, say so and point me to the docs page.
Do not invent endpoints.
List the files first, then write them one at a time, then give me a sandbox test plan.
Step 3: go live, fund it and fence it
Production access is its own step. ProphetX has a going-live process for moving a key from the sandbox to production on your verified account. Follow it at docs.prophetx.co, and expect new keys to start on conservative limits.
Open the real account (through our link, promo details on the ProphetX promo code page), deposit in the app, and put the fence in code:
- A max per position and a max number of open positions.
- A daily loss stop that halts the bot until tomorrow.
- A kill switch: one file or flag that stops every order.
- Keep the account balance to what the bot may lose.
Run the same code you ran in the sandbox, in dry-run first, then live at minimum size.
Step 4: start with our stuff
- Kalshi vs ProphetX: where the two venues price the same games differently.
- Combo Builder: free, and it prices legs across venues.
- Kelly sizing: size from your edge instead of guessing.
Want to copy how our bots are wired? The Bot Playbook is the build sheet: a Fly server that ingests prices, an engine that does the math, and a bot that places only what the math recommends. Get it with Pro →
Other venues: Kalshi · Polymarket US · Novig
Bots lose money too. Fund only what you can lose, and trade responsibly.
