API Reference
Insiders API

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

MethodPathAuthDescription
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

MethodPathAuthDescription
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

MethodPathAuthDescription
POST/prepare🔒Prepare an EOA order
POST/execute🔒Execute prepared EOA trade

Legacy (deprecated)

MethodPathAuthDescription
POST/api/buy🔒Legacy buy — use /trade/buy
POST/api/sell🔒Legacy sell — use /trade/sell

Signals · /api/signals

MethodPathAuthDescription
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

MethodPathAuthDescription
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

MethodPathAuthDescription
GET/positions🔒Current open positions
GET/stats🔒Portfolio summary stats
GET/history🔒Trade history

PnL · /api/pnl

MethodPathAuthDescription
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

MethodPathAuthDescription
POST/share—Create shareable position card
GET/image/:shareId—Position OG image
GET/meta/:shareId—Position OG metadata

Market · /api/market

MethodPathAuthDescription
GET/market/:slug—Polymarket market by slug

Balances · /api/balances

MethodPathAuthDescription
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.

MethodPathAuthDescription
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.

MethodPathAuthDescription
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

MethodPathAuthDescription
GET/🔒List open limit orders
DELETE/:orderId🔒Cancel a limit order
DELETE/cancel-all🔒Cancel all open limit orders

Wallets · /api/wallets

MethodPathAuthDescription
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_URL defaults to https://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).

MethodPathAuthDescription
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

MethodPathAuthDescription
GET/:walletId/status🔒Wallet setup status
POST/:walletId/complete🔒Mark setup complete
POST/:walletId/auto-approve🔒Auto-approve fees

Wallet Withdraw · /api/wallet-withdraw

MethodPathAuthDescription
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

MethodPathAuthDescription
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

MethodPathAuthDescription
POST/🔒Transfer tokens between wallets

Bridge · /api/bridge

MethodPathAuthDescription
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

MethodPathAuthDescription
GET/—Pending approvals (?wallet=)
POST/—Create approval
POST/execute🔒Execute approvals

Redeem · /api/redeem

MethodPathAuthDescription
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

MethodPathAuthDescription
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.

MethodPathAuthDescription
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

MethodPathAuthDescription
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

MethodPathAuthDescription
GET/balance🔒Points balance
GET/history🔒Points history
GET/rewards🔒Available rewards
POST/redeem🔒Redeem points
GET/redemptions🔒Redemption history

Leaderboard · /api/leaderboard

MethodPathAuthDescription
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

MethodPathAuthDescription
GET/:walletAddress🔒Activity feed for wallet

Analytics · /api/analytics

MethodPathAuthDescription
GET/—Platform analytics snapshot

User & Identity

/api/user

MethodPathAuthDescription
GET/ (various)🔒User profile endpoints

/api/username

MethodPathAuthDescription
POST/resolve—Resolve username → userId
GET/resolve/:username—Get user by username
GET/search—Search usernames

Language · /api/language

MethodPathAuthDescription
GET/:identifier—Get strings for locale
POST/update🔒Update language strings
POST/update/:identifier—Update by identifier

AI Chat · /api/gemini

MethodPathAuthDescription
POST/chat—AI chat (market context)
POST/insights—AI market insights
POST/research—AI deep research

CLOB Proxy · /api/clob-proxy

MethodPathAuthDescription
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

MethodPathAuthDescription
POST/store🔒Store Polymarket L2 credentials
GET/check/:walletAddress🔒Check if L2 creds exist

Last Price · /api/lastprice

MethodPathAuthDescription
GET/—Last traded price (?marketId=)

Pro · /api/pro

MethodPathAuthDescription
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

MethodPathDescription
GET/user-lookupLookup user by query
GET/user-searchSearch users

Referral Admin

MethodPathDescription
PATCH/referral/tier/:userIdSet user referral tier
GET/referral/overviewReferral program overview
GET/referral/withdrawalsAll referral withdrawal requests

Rebate Admin

MethodPathDescription
GET/rebate/withdrawalsAll rebate withdrawals
GET/rebate/tiersTier config
PATCH/rebate/tiers/:tierUpdate tier config
PATCH/rebate/tier/:userIdSet user tier
GET/rebate/chainsChain configs
POST/rebate/chainsAdd chain config
GET/rebate/overviewRebate overview stats

Points Admin

MethodPathDescription
POST/points/rewardsCreate reward
PATCH/points/rewards/:idUpdate reward
POST/points/awardManual points award