Getting Started
From signup to your first API call in 5 minutes
Getting Started
This guide walks through creating an account, generating an API key, and making your first request to the PAPI API.
1. Create an Account
Sign up at the PAPI Dashboard.
You can register with email/password or sign in with Google or GitHub. Depending on the current access mode, you may need to verify your email before you can sign in.
2. Create an API Key
After signing in, create an API key from the dashboard. Each user is limited to one API key.
The key is shown once on creation -- save it immediately. It looks like:
papi_sk_live_a1b2c3d4e5f6...When creating a key, you choose which scopes to grant:
| Scope | Access |
|---|---|
read | Market data endpoints (default) |
trade | Trading endpoints (orders, positions, balance) |
admin | All endpoints |
3. Make Your First Request
Fetch open markets from Polymarket:
curl -s "https://papi.tylerthebuildor.com/polymarket/markets?limit=2&status=open" \
-H "Authorization: Bearer papi_sk_live_a1b2c3d4e5f6..."Response (array of Market objects):
[
{
"market_id": "0x1234abcd...",
"event_id": "evt_001",
"title": "Will Bitcoin exceed $100k?",
"description": "This market resolves Yes if...",
"slug": "will-bitcoin-exceed-100k",
"outcomes": [
{
"outcome_id": "71234567890",
"label": "Yes",
"price": "0.72",
"price_change_24h": "0.05"
},
{
"outcome_id": "71234567891",
"label": "No",
"price": "0.28",
"price_change_24h": "-0.05"
}
],
"resolution_date": "2026-12-31T23:59:59Z",
"volume_24h": "150000.00",
"volume_total": "1250000.00",
"liquidity": "50000.00",
"open_interest": null,
"url": "https://polymarket.com/event/will-bitcoin-exceed-100k",
"image": "https://...",
"status": "open",
"category": "Crypto",
"tags": [],
"tick_size": "0.01",
"exchange": "Polymarket"
}
]The response is a raw JSON array, not wrapped in {"markets": [...]}.
4. Check Your Auth Info
Verify your API key is working and see your scopes:
curl -s https://papi.tylerthebuildor.com/me \
-H "Authorization: Bearer papi_sk_live_a1b2c3d4e5f6..."{
"user_id": "usr_abc123",
"key_prefix": "papi_sk_live_a1b2",
"scopes": ["read", "trade"]
}5. Store Exchange Credentials (for Trading)
To place orders, you need to store your exchange credentials. They are encrypted with AES-256-GCM before storage.
Polymarket:
curl -X PUT https://papi.tylerthebuildor.com/account/credentials/polymarket \
-H "Authorization: Bearer papi_sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"api_key": "your-clob-api-key",
"secret": "your-clob-secret",
"passphrase": "your-passphrase",
"wallet_address": "0x..."
}'Kalshi:
curl -X PUT https://papi.tylerthebuildor.com/account/credentials/kalshi \
-H "Authorization: Bearer papi_sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"access_key": "your-kalshi-access-key",
"private_key": "your-kalshi-private-key"
}'Next Steps
- API Overview -- Full endpoint reference
- Market Data -- Markets, events, orderbooks, trades, candlesticks
- Trading -- Orders, positions, balances
- Authentication -- JWT and API key auth in depth