Insiders API Routes
Base URL: https://api.polyinsiders.com/api
Codebase: /polyinsiders-backend-v1/src/routes/
🔒 = requires user JWT (Authorization: Bearer <token>). 🔑 = requires admin JWT.
Auth · /api/auth
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /login | — | Login via email/social (Privy) |
| POST | /verify | — | Verify login token |
| POST | /login/wallet | — | Login via wallet signature |
| POST | /wallet/link | 🔒 | Link an additional wallet |
| POST | /wallet/privy | 🔒 | Link Privy-managed wallet |
| GET | /wallet | 🔒 | Get linked wallets |
| POST | /set-primary-wallet | 🔒 | Set primary wallet |
| DELETE | /wallet/:walletId | 🔒 | Unlink a wallet |
| POST | /wallet/2fa/init | 🔒 | Initiate 2FA setup |
| POST | /wallet/2fa/verify | 🔒 | Verify 2FA code |
| POST | /wallet/2fa/disable | 🔒 | Disable 2FA |
| GET | /wallet/2fa | 🔒 | Get 2FA status |
Trading · /api/trade
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /buy | 🔒 | Buy an outcome token |
| POST | /sell | 🔒 | Sell an outcome token |
| POST | /buy-signal | 🔒 | Buy directly from a signal |
| POST | /sell-position | 🔒 | Sell an open position |
EOA Trade · /api/eoa-trade
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /prepare | 🔒 | Prepare an EOA order |
| POST | /execute | 🔒 | Execute prepared EOA trade |
Legacy (deprecated)
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /api/buy | 🔒 | Legacy buy — use /trade/buy |
| POST | /api/sell | 🔒 | Legacy sell — use /trade/sell |
Signals · /api/signals
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /v1 | — | V1 signals (public) |
| GET | /v1.2 | 🔒 | V1.2 signals |
| GET | /:id | 🔒 | Single signal by ID |
| GET | /stats | 🔒 | Signal performance stats |
| GET | /user/:id | 🔒 | Signals by user |
V1.3 Signal System · /api/v13
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /signals | — | All V1.3 signals |
| GET | /signals/:id | — | Single V1.3 signal |
| GET | /stats/overall | — | Overall performance stats |
| GET | /stats/by-tag | — | Stats grouped by tag |
| GET | /stats/timeline | — | Daily performance timeline |
| GET | /stats/recent | — | Last 1h / 4h / 24h stats |
| GET | /leaderboard | — | Top traders by tag (?tag= required) |
| GET | /markets/active | — | Active markets with V1.3 signals |
GET /api/v13/signals query params:
tag · sent · resolved · limit (default 50, max 500) · offset · since (ISO timestamp) · conditionId · isSmartMoney
Portfolio · /api/portfolio
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /positions | 🔒 | Current open positions |
| GET | /stats | 🔒 | Portfolio summary stats |
| GET | /history | 🔒 | Trade history |
PnL · /api/pnl
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /market/:marketTitle | — | PnL for a market |
| GET | /signal/:signalId | — | PnL for a signal |
| GET | /data/:marketTitle | — | Raw PnL chart data |
User Position PnL · /api/user-pnl
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /share | — | Create shareable position card |
| GET | /image/:shareId | — | Position OG image |
| GET | /meta/:shareId | — | Position OG metadata |
Market · /api/market
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /market/:slug | — | Polymarket market by slug |
Balances · /api/balances
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /:wallet | — | Token balances for a wallet |
| GET | /:wallet/multichain | — | Multichain balances |
| POST | / | — | Batch balance lookup |
TPSL · /api/tpsl
See TPSL Routes for full documentation.
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /triggers | 🔒 | Create TP/SL trigger |
| GET | /triggers | 🔒 | List user's triggers |
| GET | /triggers/:id | 🔒 | Get single trigger |
| PATCH | /triggers/:id | 🔒 | Update trigger |
| DELETE | /triggers/:id | 🔒 | Cancel trigger |
Copy Trading · /api/copytrade
See Copy Trading Routes for full documentation.
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /top-traders | — | Top traders to copy |
| GET | /trader/:address | — | Trader profile |
| GET | /history | 🔒 | Copy trade history |
| POST | /subscriptions | 🔒 | Create copy subscription |
| GET | /subscriptions | 🔒 | List subscriptions |
| GET | /subscriptions/:id | 🔒 | Get subscription |
| PATCH | /subscriptions/:id | 🔒 | Update subscription |
| DELETE | /subscriptions/:id | 🔒 | Cancel subscription |
Limit Orders · /api/limit
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | / | 🔒 | List open limit orders |
| DELETE | /:orderId | 🔒 | Cancel a limit order |
| DELETE | /cancel-all | 🔒 | Cancel all open limit orders |
Wallets · /api/wallets
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /:address | — | Wallet profile |
| GET | /:address/closed-positions | — | Closed positions |
| GET | /:address/pnl-chart | — | PnL chart data |
| GET | /:address/stats | — | Wallet stats |
| PUT | /:walletId/name | 🔒 | Rename a wallet |
| POST | /:walletId/approve-fees | 🔒 | Approve fee allowance |
| GET | /:walletId/fee-status | 🔒 | Fee approval status |
Wallet Tags · /api/v2
⚠️ Wrong host — currently on
tpslapi.polyinsiders.com, not the main API.
VITE_WALLET_TAGS_API_URLdefaults tohttps://tpslapi.polyinsiders.com. Routes below are relative to that host.
Migration required — move tags API into main ClickHouse pipeline ASAP.
Tags are currently served from a separate host (tpslapi.polyinsiders.com) backed by a standalone CH-fed daemon. This needs to be consolidated into apiclick.polyinsiders.com or the main ClickHouse query layer. Until then, any infra change to tpslapi directly breaks tags across the entire frontend (leaderboard, wallet detail, copy-trade UI, trader search).
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /api/v2/wallets/tags | — | Bulk tag lookup (≤100 wallets per call, body: {wallet_addresses:[]}) |
| GET | /api/v2/wallet/:address/tags | — | Tags for a single wallet |
| GET | /api/v2/wallets/tags/schema | — | Slug → display_name/emoji/floor table (cached 5min) |
| GET | /api/v2/wallets/by-tag/:tag | — | Wallets with a given tag |
WalletTag shape:
{
tag: string
display_name: string
emoji: string
category: string
confidence: number
evidence?: Record<string, number>
first_assigned_at: string
last_refreshed_at: string
}Wallet Setup · /api/wallet-setup
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /:walletId/status | 🔒 | Wallet setup status |
| POST | /:walletId/complete | 🔒 | Mark setup complete |
| POST | /:walletId/auto-approve | 🔒 | Auto-approve fees |
Wallet Withdraw · /api/wallet-withdraw
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /config | 🔒 | Withdrawal config (limits, fees) |
| POST | /:walletAddress/destinations | 🔒 | Add destination address |
| POST | /:walletAddress/withdraw | 🔒 | Initiate withdrawal |
| POST | /:walletAddress/bridge-withdraw | 🔒 | Bridge-based withdrawal |
Swap · /api/swap
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /usdc-to-usdce/all | — | Preview all USDC→USDCe routes |
| POST | /usdc-to-usdce | — | Execute USDC→USDCe |
| POST | /usdce-to-pusd | — | Preview USDCe→pUSD |
| POST | /usdce-to-pusd/execute | 🔒 | Execute USDCe→pUSD |
Transfer · /api/transfer
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | / | 🔒 | Transfer tokens between wallets |
Bridge · /api/bridge
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /supported-assets | — | Supported bridge assets |
| POST | /deposit | — | Initiate bridge deposit |
| POST | /withdraw | — | Initiate bridge withdrawal |
| POST | /quote | — | Get bridge quote |
| GET | /status/:address | — | Bridge transaction status |
Approvals · /api/approvals
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | / | — | Pending approvals (?wallet=) |
| POST | / | — | Create approval |
| POST | /execute | 🔒 | Execute approvals |
Redeem · /api/redeem
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /asset/:assetId | — | Get redeemable asset info |
| POST | /asset | — | Redeem an asset |
| GET | /condition-id/:assetId | — | Get condition ID |
| POST | /condition | — | Redeem by condition |
Batch · /api/batch
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | / | — | Batch transaction execution |
Referral (Legacy v1) · /api/referral
This is the legacy v1 referral API in the main backend. New integrations should target the Referral v2 service.
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /codes | 🔒 | Create referral code |
| GET | /codes | 🔒 | List user's codes |
| POST | /apply | 🔒 | Apply a referral code |
| GET | /stats | 🔒 | Referral stats |
| GET | /balance | 🔒 | Referral earnings balance |
| GET | /referrals | 🔒 | List referred users |
| GET | /tier | 🔒 | Current tier |
Rebate · /api/rebate
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /tier | 🔒 | Current rebate tier |
| GET | /balance | 🔒 | Rebate balance |
| GET | /history | 🔒 | Rebate history |
| POST | /withdraw | 🔒 | Request rebate withdrawal |
| GET | /withdrawals | 🔒 | Withdrawal requests |
| DELETE | /withdrawals/:id | 🔒 | Cancel withdrawal |
Points · /api/points
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /balance | 🔒 | Points balance |
| GET | /history | 🔒 | Points history |
| GET | /rewards | 🔒 | Available rewards |
| POST | /redeem | 🔒 | Redeem points |
| GET | /redemptions | 🔒 | Redemption history |
Leaderboard · /api/leaderboard
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /leaderboard | — | Global leaderboard |
| GET | /:address | — | Trader entry |
| GET | /:address/signals | — | Trader's signals |
| GET | /:address/pnl-chart | — | Trader PnL chart |
| GET | /:address/tags | — | Trader's tags |
| POST | /batch-scores | — | Batch score lookup |
Activity · /api/activity
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /:walletAddress | 🔒 | Activity feed for wallet |
Analytics · /api/analytics
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | / | — | Platform analytics snapshot |
User & Identity
/api/user
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | / (various) | 🔒 | User profile endpoints |
/api/username
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /resolve | — | Resolve username → userId |
| GET | /resolve/:username | — | Get user by username |
| GET | /search | — | Search usernames |
Language · /api/language
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /:identifier | — | Get strings for locale |
| POST | /update | 🔒 | Update language strings |
| POST | /update/:identifier | — | Update by identifier |
AI Chat · /api/gemini
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /chat | — | AI chat (market context) |
| POST | /insights | — | AI market insights |
| POST | /research | — | AI deep research |
CLOB Proxy · /api/clob-proxy
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /auth/api-key | — | Get CLOB API key |
| GET | /auth/derive-api-key | — | Derive CLOB API key |
| GET | /time | — | CLOB server time |
L2 Credentials · /api/l2-credentials
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /store | 🔒 | Store Polymarket L2 credentials |
| GET | /check/:walletAddress | 🔒 | Check if L2 creds exist |
Last Price · /api/lastprice
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | / | — | Last traded price (?marketId=) |
Pro · /api/pro
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /status/:userId | 🔒 | Pro subscription status |
| POST | /upgrade/:userId | 🔒 | Upgrade to Pro |
| POST | /downgrade/:userId | 🔒 | Downgrade from Pro |
Admin · /api/admin
All admin routes require admin-level JWT. Never expose to end users.
User Management
| Method | Path | Description |
|---|---|---|
| GET | /user-lookup | Lookup user by query |
| GET | /user-search | Search users |
Referral Admin
| Method | Path | Description |
|---|---|---|
| PATCH | /referral/tier/:userId | Set user referral tier |
| GET | /referral/overview | Referral program overview |
| GET | /referral/withdrawals | All referral withdrawal requests |
Rebate Admin
| Method | Path | Description |
|---|---|---|
| GET | /rebate/withdrawals | All rebate withdrawals |
| GET | /rebate/tiers | Tier config |
| PATCH | /rebate/tiers/:tier | Update tier config |
| PATCH | /rebate/tier/:userId | Set user tier |
| GET | /rebate/chains | Chain configs |
| POST | /rebate/chains | Add chain config |
| GET | /rebate/overview | Rebate overview stats |
Points Admin
| Method | Path | Description |
|---|---|---|
| POST | /points/rewards | Create reward |
| PATCH | /points/rewards/:id | Update reward |
| POST | /points/award | Manual points award |