Getting Started
1. Register as a Builder
Register a builder API key by signing a message with your wallet:
# Sign this message with your Ed25519 wallet:
# "Parti Builder Registration\nUser: <your pubkey>\nTimestamp: <unix seconds>"
curl -X POST https://api.parti-oracle.pbcapps.dev/v1/builders/register \
-H "Content-Type: application/json" \
-d '{
"user": "<your base58 pubkey>",
"name": "my-trading-app",
"signature": "<hex-encoded Ed25519 signature>",
"timestamp": 1777500000
}'
Response:
{
"api_key": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"wallet": "<your pubkey>",
"name": "my-trading-app"
}
Save the api_key — it's your authentication for all order operations. Valid for 7 days.
Or via admin (if you have an admin key):
curl -X POST https://api.parti-oracle.pbcapps.dev/admin/builders \
-H "X-Admin-Key: <admin key>" \
-H "Content-Type: application/json" \
-d '{"api_key": "my-key", "name": "my-bot", "fee_bps": 50, "wallet": "<pubkey>"}'
2. Fund Your Account
Get a deposit address:
curl https://oracle-deposit-4ettnbbgea-uc.a.run.app/v1/deposit/bridge-address/<your pubkey>
Send USDC (Fogo) or SOL (Solana) to the returned address. Deposits are detected automatically.
3. Place Orders
All 4 order types work — Buy YES, Buy NO, Sell YES, Sell NO:
curl -X POST https://api.parti-oracle.pbcapps.dev/v1/orders \
-H "Content-Type: application/json" \
-d '{
"market_id": "abc123...",
"user": "<your pubkey>",
"side": "buy",
"outcome": "yes",
"price": 6500,
"size": 100,
"order_type": "gtc",
"signature": "0000000000000000000000000000000000000000000000000000000000000000",
"nonce": 1234567890,
"builder_api_key": "<your api key>",
"builder_fee_bps": 50
}'
price: 1-9999 basis points (6500 = 65 cents)side:buyorselloutcome:yesornoorder_type:gtc,ioc,fok,post_onlysignature: placeholder (64 zero bytes hex) when using builder_api_keybuilder_fee_bps: your fee charged on fills (optional)
No position needed to sell — the engine mints a YES+NO pair on match (Polymarket model).
4. Get All Your Orders
curl https://api.parti-oracle.pbcapps.dev/v1/orders/all/<your pubkey>
Returns all open orders across all markets in a single call.
5. Cancel Orders
# Cancel all orders
curl -X POST https://api.parti-oracle.pbcapps.dev/v1/orders/cancel-all \
-H "Content-Type: application/json" \
-d '{
"user": "<your pubkey>",
"signature": "0000...0000",
"nonce": 1234567891,
"builder_api_key": "<your api key>"
}'
6. View Your Revenue
# Get your trade history
curl https://api.parti-oracle.pbcapps.dev/v1/trades/<your pubkey>?limit=100
Base URLs
| Environment | API | WebSocket |
|---|---|---|
| Staging | https://api.parti-oracle.pbcapps.dev |
wss://ws.parti-oracle.pbcapps.dev/v1/ws |
| Canary | https://api-canary.parti-oracle.pbcapps.dev |
wss://ws-canary.parti-oracle.pbcapps.dev/v1/ws |
Rate Limits
- 600 orders/min per builder API key
- 10 requests/sec per IP on public endpoints
- Internal services bypass via
X-Internal-Key