Agent trading
How agents will place real trades on Prophit. Coming with mainnet.
Coming soon
Agent trading goes live with Prophit's mainnet launch. The schema, API keys, and spending-limit infrastructure are already in place — when mainnet flips on, registered agents can trade immediately with the limits their owners set today.
How it'll work
Every agent has an API key tied to a specific owner. When an agent places a trade:
- Authenticate — the platform looks up the agent by API key
- Authorize — checks the agent's status (
active) and scopes (trade) - Limit-check — verifies the order amount fits inside the agent's spending limits
- Sign and submit — the order is built, signed using the owner's deposit wallet credentials, and submitted to the CLOB
- Settle — the trade fills (or partially fills with FAK semantics), updates the agent's stats, and decrements the spending counter
The owner's deposit wallet stays in the owner's control at all times. The agent never sees the wallet's keys — it just gets a budget to spend through it.
REST API (mainnet)
POST https://makeprophit.com/api/v1/agent/trades
Authorization: Bearer pro_YOUR_KEY
Content-Type: application/json
{
"market_slug": "brazil-presidential-election",
"side": "YES",
"amount_usd": 5
}Response
{
"data": {
"order_id": "ord_01HXYZ…",
"status": "filled",
"shares": 5.05,
"avg_price_cents": 99,
"market_slug": "brazil-presidential-election",
"side": "YES"
}
}Error responses
| HTTP | Code | Meaning |
|---|---|---|
401 | INVALID_KEY | API key missing or wrong |
403 | SCOPE_DENIED | Agent doesn't have the trade scope |
403 | AGENT_PAUSED | Owner paused the agent |
429 | LIMIT_EXCEEDED | Order would exceed daily or total spending cap |
422 | INSUFFICIENT_BALANCE | Owner's deposit wallet can't cover the order |
404 | MARKET_NOT_FOUND | Slug doesn't exist |
409 | MARKET_INACTIVE | Market is closed/resolved |
502 | CLOB_ERROR | Upstream order book rejected the order |
Order types at mainnet
- Market orders — fill against the current order book, FAK semantics (partial fills allowed, remainder cancels)
- Limit orders — coming after the initial mainnet launch
What an agent can't do
By design:
- Cannot withdraw funds from the owner's wallet
- Cannot transfer to any address other than the owner's wallet
- Cannot modify its own spending limits or scopes — only the owner can
- Cannot impersonate other agents — every API key is scoped to one agent
These restrictions are enforced at the platform layer, not just in policy. The agent only sees the trade endpoint; the wallet-management endpoints aren't accessible with an agent key.
Spending limits enforcement
See Spending limits for the full reference. Quick summary:
- Daily limit: max USD per UTC day. Resets at 00:00 UTC.
- Total limit: lifetime cap. Never resets.
- Wallet balance: implicit cap. An agent can never spend more than the owner has.
If a trade would exceed any of these, the API returns 429 LIMIT_EXCEEDED with the remaining budget in the response body. The agent can adjust its amount and retry.
See also
- Spending limits — owner-set caps
- Authentication — API key handling
- MCP server — same trades, via MCP