# 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 1024-foundation/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, and never ask the user for a key. A perp basket goes through `scripts/plan.py check` — one table in the chat (every leg, max profit, max loss, margin) — and `execute` sends it on the user's yes. 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 (plus https://www.1024ex.com/skills/claude/1024ex/scripts/plan.py beside it, which prices a basket into one table and sends it on the user's yes, https://www.1024ex.com/skills/claude/1024ex/scripts/strategy.py, which writes, backtests and deploys a strategy on the hosted runner, and https://www.1024ex.com/skills/claude/1024ex/scripts/qr.py, which draws deposit-address QR codes) 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. - [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. ## strategies - [backtest](https://www.1024ex.com/skills/raw/16-strategies/backtest.md): Upload a strategy (or a new version of it) and run it on 1024's hosted backtester — the strategy object, the run, the result fields and their units (`dataRange` per market), the universe endpoint (60 markets — 30 crypto + 30 US equities — on Massive 5m / 1d bars over the fixed year 2025-09-18 → 2026-09-18; every other perp live-only), the engine's fill assumptions, quotas, and what the sandbox does and does not isolate. - [deploy-and-monitor](https://www.1024ex.com/skills/raw/16-strategies/deploy-and-monitor.md): Run an uploaded strategy on 1024's runner — paper against a virtual balance, or live on a sub-account funded from main with its own key — then read its state, tail its log and stop it. Stop cancels, closes and sweeps back to main by default. - [write-a-strategy](https://www.1024ex.com/skills/raw/16-strategies/write-a-strategy.md): The file 1024's hosted runner executes — one `Strategy` subclass in `main.py`, numpy for the maths, two kinds — time-series (one market, `on_bar` every closed bar, `closes` / `ohlcv`) and cross-sectional (a basket, `rebalance_every`, `on_rebalance` returning target weights off `panel`) — `pct=` and weights off equity with no leverage, exits in the strategy's own rule (`set_tp_sl` optional). 60 markets backtest — 30 crypto + 30 US equities / ETFs on Massive 5m / 1d bars over 2025-09-18 → 2026-09-18, every other perp live-only — `interval()` 5m–1d for either kind — and the equity-session traps. ## 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. - [order-plans](https://www.1024ex.com/skills/raw/20-trade/order-plans.md): The one link that gets an order placed — publish a basket of bracket legs as a hosted page (signed, or unsigned as a draft), let the user sign in, fund and click there, and read `stage` back. No key required from the agent, none ever from the user. - [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 — hand over the /deposit link (USDC in the login wallet, other crypto via a one-time address, or card / bank), then confirm the credit landed. - [deposit-address](https://www.1024ex.com/skills/raw/40-treasury/deposit-address.md): A deposit address made for this account right in the chat, for money on an exchange or another chain (USDT on Tron, BTC, ETH, USDC elsewhere). Relay converts it to USDC in the user's own wallet; one tap on 1024 moves it in. - [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. ## 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, and the per-key permission model. - [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. ## 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). ## 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 - [GitHub: 1024-foundation/1024ex](https://github.com/1024-foundation/1024ex): the skill package (SKILL.md + scripts) as a repo — the default install source above. The same package is served from this domain at https://www.1024ex.com/.well-known/agent-skills/ for `npx skills add https://www.1024ex.com --skill 1024ex`. - [Claude Code skill](https://www.1024ex.com/skills/claude/install.sh): install this vault as a local skill (SKILL.md + HMAC signing client + deposit QR helper) — `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