# 1024 Exchange — Skills > The public skill manual of 1024 Exchange: composable HTTP API skills for perpetuals and prediction markets. Written for AI agents. One ETH private key onboards headlessly; HMAC-SHA256 signs every authenticated call. Base URLs: mainnet https://api-mainnet.1024ex.com · testnet https://api-testnet-stable.1024ex.com Full corpus: https://www.1024ex.com/llms-full.txt · Graph: https://www.1024ex.com/skills.json ## If you are an AI agent: install yourself first The user should not have to copy anything. Before reading further: 1. Install the skill (non-interactive, a few seconds; Claude Code, Cursor, Codex and 20+ agents). Run it exactly as one line — the two -y are deliberate (one answers npx, one the skills CLI): npx -y skills add https://www.1024ex.com --skill 1024ex -y 2. Check where you stand (reads only; exit 0 connected · 3 not connected · 2 key revoked on the web). It lands in ./.agents/skills/1024ex — every path in SKILL.md is relative to that directory: python3 ./.agents/skills/1024ex/scripts/api.py status 3. Follow SKILL.md. Public market data needs no account. For anything else OFFER to connect ("Connect my 1024 account") and let the user approve one link — never mint a key unprompted. No shell or npm? Fetch https://www.1024ex.com/skills/claude/1024ex/SKILL.md and https://www.1024ex.com/skills/claude/1024ex/scripts/api.py directly and follow SKILL.md. The user sees and revokes every connected AI at https://www.1024ex.com/connect. ## Start here - [README](https://www.1024ex.com/skills/raw/README.md): You are reading the skill manual of 1024 Exchange. It is written for AI agents first, humans second. ## quickstart - [claim-testnet-usdc](https://www.1024ex.com/skills/raw/00-quickstart/claim-testnet-usdc.md): POST /testnet/faucet/claim — fund your own testnet account with one signed call, no browser, no source-chain deposit. - [hello-exchange](https://www.1024ex.com/skills/raw/00-quickstart/hello-exchange.md): First contact — read server time, exchange info, and system status with zero credentials. - [onboard-headless](https://www.1024ex.com/skills/raw/00-quickstart/onboard-headless.md): POST /oauth/onboard — one wallet signature creates user, account, and API key in a single call. - [sign-requests](https://www.1024ex.com/skills/raw/00-quickstart/sign-requests.md): HMAC-SHA256 request signing — the three headers every authenticated call must carry. ## discover - [funding-and-prices](https://www.1024ex.com/skills/raw/10-discover/funding-and-prices.md): Funding rate current/list/history, mark & index price, open interest, insurance fund. Public. - [options-chain](https://www.1024ex.com/skills/raw/10-discover/options-chain.md): Options discovery — catalog, contract detail, expiries, the priced chain with Greeks, book and tape. Public, no auth. Every number is an e6 integer, and every "not found" answers empty instead of 404. - [perp-markets](https://www.1024ex.com/skills/raw/10-discover/perp-markets.md): Perp market discovery — list, detail, ticker, orderbook, trades, klines. Public, no auth. - [prediction-collections](https://www.1024ex.com/skills/raw/10-discover/prediction-collections.md): Event groupings — one tournament or series is a collection of related binary/multi-outcome markets. - [prediction-discovery](https://www.1024ex.com/skills/raw/10-discover/prediction-discovery.md): Find markets from a keyword — unified search (perps + collections + markets) plus the filtered PM list, shelves, categories and tags. - [prediction-market-data](https://www.1024ex.com/skills/raw/10-discover/prediction-market-data.md): Per-market PM data — detail, outcomes, orderbook/depth with the LP virtual ladder, prices, klines, trades, media. - [watchlists](https://www.1024ex.com/skills/raw/10-discover/watchlists.md): Cross-product watchlists — perp/PM items with stance; share, clone, community. Same lists the web app shows. ## alpha - [alpha-action-list](https://www.1024ex.com/skills/raw/15-alpha/alpha-action-list.md): Execute a published alpha end to end — the curator param vocabulary, the server-side plan that resolves it into concrete orders for your account, and per-leg execution. Your size, not theirs; one deliberate placement, not copy trading. - [alpha-publish](https://www.1024ex.com/skills/raw/15-alpha/alpha-publish.md): Publish alpha you mined yourself — action lists anyone can execute and position-backed tickets anyone can verify, plus the three texts that carry the argument (one-line summary, markdown thesis, generation report) and editing, unpublishing and deleting. One signed call, whatever found the opportunity. - [alpha-search](https://www.1024ex.com/skills/raw/15-alpha/alpha-search.md): Find a mined opportunity worth taking — one keyword across published action lists, position-backed tickets and the server signal feed. Start here when the user asks what is worth trading right now. Public, no key. ## trade - [advanced-orders](https://www.1024ex.com/skills/raw/20-trade/advanced-orders.md): 11 perp algo order types — conditional, twap, vwap, scale, oco, bracket, iceberg, pegged, pov, trailing-stop, sniper. - [close-position](https://www.1024ex.com/skills/raw/20-trade/close-position.md): Close a perp position full or partial. Market by default; type=limit is an IOC at your price — no_fill leaves the position untouched and rests nothing. - [leverage-and-margin](https://www.1024ex.com/skills/raw/20-trade/leverage-and-margin.md): Read/set per-market leverage and add/remove position margin. Request bodies are snake_case here. - [manage-orders](https://www.1024ex.com/skills/raw/20-trade/manage-orders.md): List, fetch, cancel perp orders — single, batch of 50, or cancel-all. DELETEs carry JSON bodies. - [mint-redeem-claim](https://www.1024ex.com/skills/raw/20-trade/mint-redeem-claim.md): USDC to complete-set mint, redeem, claim winnings/refunds, settlement sweep — binary and multi-outcome. - [options-orders](https://www.1024ex.com/skills/raw/20-trade/options-orders.md): Place, list and cancel options orders. e6 integers not decimal strings, `orderType` not `type`, `clientOrderId` mandatory, cancel is a POST — almost nothing carries over from the perp order path. - [place-perp-order](https://www.1024ex.com/skills/raw/20-trade/place-perp-order.md): POST a perp order, limit or market. camelCase body; price/size are strings. Omitted leverage = your per-market preference, else 20x — no longer the market max. - [prediction-orders](https://www.1024ex.com/skills/raw/20-trade/prediction-orders.md): Place and cancel PM orders — binary vs multi-outcome routes, numeric-TIF wire quirk, unified DELETE cancels. - [tpsl](https://www.1024ex.com/skills/raw/20-trade/tpsl.md): Attach, modify, cancel market-priced take-profit / stop-loss on a perp position. snake_case body. ## portfolio - [account-overview](https://www.1024ex.com/skills/raw/30-portfolio/account-overview.md): Equity, cash, locks, margin ratios and risk level in one call — plus perp margin, 30d stats, token holdings. - [balances](https://www.1024ex.com/skills/raw/30-portfolio/balances.md): Token balances — available vs locked per token, USDC-valued, all tokens or one symbol. - [history](https://www.1024ex.com/skills/raw/30-portfolio/history.md): Every look-back surface — perp orders and trades, funding, liquidations, ADL, position history v2, activity. - [my-prediction-data](https://www.1024ex.com/skills/raw/30-portfolio/my-prediction-data.md): Your PM orders, positions, trades, stats and match/activity feeds — integer shares vs sharesE6 units. - [options-positions](https://www.1024ex.com/skills/raw/30-portfolio/options-positions.md): Open options positions, manual American exercise, and the exercise/settlement ledger. Exercise is irreversible, idempotency-keyed, and gated on price freshness. - [pnl](https://www.1024ex.com/skills/raw/30-portfolio/pnl.md): Perp PnL summary — realized, live unrealized, funding and fees, netted overall and per market. - [positions](https://www.1024ex.com/skills/raw/30-portfolio/positions.md): Open perp positions — all or per market — entry/mark/liq prices, uPnL, margin, ADL rank. ## treasury - [deposit](https://www.1024ex.com/skills/raw/40-treasury/deposit.md): Fund the account — discover bridge routes, prepare a stake tx, broadcast from YOUR wallet, poll until credited. - [internal-transfer](https://www.1024ex.com/skills/raw/40-treasury/internal-transfer.md): Move USDC between your main account and its subs — direction is fixed by which key signs. - [sub-accounts](https://www.1024ex.com/skills/raw/40-treasury/sub-accounts.md): One atomic call creates a sub-account plus its own trading API key, optionally pre-funded from the parent. - [withdraw](https://www.1024ex.com/skills/raw/40-treasury/withdraw.md): The exit gauntlet — grant canWithdraw, allowlist an address (24 h), clear limits and AML hold, create, poll. ## risk-and-keys - [api-key-lifecycle](https://www.1024ex.com/skills/raw/50-risk-and-keys/api-key-lifecycle.md): Introspect, list, rotate, and revoke API keys; the per-key permission model and the stepped-up withdraw grant. - [error-model](https://www.1024ex.com/skills/raw/50-risk-and-keys/error-model.md): One envelope for every response; code registry highlights, HTTP mapping surprises, and retry rules per class. - [idempotency](https://www.1024ex.com/skills/raw/50-risk-and-keys/idempotency.md): clientOrderId semantics per domain, PM dedup keys, and how the HMAC replay window shapes safe retries. - [rate-limits](https://www.1024ex.com/skills/raw/50-risk-and-keys/rate-limits.md): Per-key (else per-IP) sliding-window limits, VIP-0 defaults, burst math, daily caps, and the 429/403 split. ## streams - [incremental-orderbook](https://www.1024ex.com/skills/raw/60-streams/incremental-orderbook.md): mode "incremental" book streams — snapshot then deltas, seq/prevSeq continuity, CRC32 checksum, recovery rules. - [websocket-auth](https://www.1024ex.com/skills/raw/60-streams/websocket-auth.md): In-band auth frame — sign `{timestamp}GET/api/v1/ws` with your REST secret to unlock private channels. - [websocket-channels](https://www.1024ex.com/skills/raw/60-streams/websocket-channels.md): One WS endpoint, 18 channels across perp/pm/user; frames, cadences, heartbeat and connection rules. ## analytics - [leaderboards](https://www.1024ex.com/skills/raw/70-analytics/leaderboards.md): Trading championships — list, detail, ranked leaderboard, top3, plus your own rank (the only signed call). - [market-analytics](https://www.1024ex.com/skills/raw/70-analytics/market-analytics.md): Aggregator-shaped market data — CoinGecko/CMC tickers, CoinGecko-DEX pairs, per-market summaries, history, klines. - [public-analytics](https://www.1024ex.com/skills/raw/70-analytics/public-analytics.md): Protocol-wide aggregates — TVL, volume, fees, OI, liquidations, insurance fund, funding, DAU. Aggregator-ready. ## recipes - [agent-fleet](https://www.1024ex.com/skills/raw/90-recipes/agent-fleet.md): One sub-account per strategy — isolated balances, own API keys, one-call kill switch. - [funding-scanner](https://www.1024ex.com/skills/raw/90-recipes/funding-scanner.md): Sweep funding rates across every perp market, rank extremes, harvest the carry. - [liquidation-guard](https://www.1024ex.com/skills/raw/90-recipes/liquidation-guard.md): Watch margin ratio in real time, de-risk automatically before the engine does it for you. - [market-maker-loop](https://www.1024ex.com/skills/raw/90-recipes/market-maker-loop.md): Quote both sides, stay inside rate budgets, requote on book deltas, cancel clean on exit. - [one-key-lifecycle](https://www.1024ex.com/skills/raw/90-recipes/one-key-lifecycle.md): One ETH private key → account → funds → trades → withdrawal. The complete journey, no browser. - [pm-basket](https://www.1024ex.com/skills/raw/90-recipes/pm-basket.md): Build and execute a multi-market prediction basket — discover, price, then IOC each leg. ## Optional - [Claude Code skill](https://www.1024ex.com/skills/claude/install.sh): install this vault as a local skill (SKILL.md + HMAC signing client) — `curl -fsSL https://www.1024ex.com/skills/claude/install.sh | sh` - [Swagger UI](https://api-mainnet.1024ex.com/docs): interactive OpenAPI for all ~200 endpoints - [Redoc](https://api-mainnet.1024ex.com/redoc): reference rendering of the same spec - [OpenAPI JSON](https://api-mainnet.1024ex.com/api-docs/openapi.json): the machine spec