docs
Get startedTroubleshootingPaymentsWebhooksAgent paymentsSwop MCPOviIdentity (swop.id)SwivyRPC (preview)API reference
Tool reference

Trading

Perps and prediction-market orders in the user’s own wallet, within their caps.

4 tools. Generated from the Swop MCP server’s own tools/list (server version 0.2.2), so names, inputs and limits match what your client sees.

swop_perps_order

Open or close a perps position · Sign-in: perps.trade · /mcp only · Preview, then confirm · Changes or moves things

Open or close a Hyperliquid perpetual position for the linked user, within their margin and leverage caps set in the Swop app. The cap is MARGIN per position (e.g. $25) with a leverage ceiling (e.g. 5x) — so $25 at 5x controls ~$125 of exposure. TWO-STEP like swop_send: call WITHOUT confirm to preview (coin, direction, margin, leverage, resulting exposure, mark price); ALWAYS show the user the leverage and exposure and get explicit confirmation; then call again with previewId and confirm: true. reduceOnly:true closes/reduces an existing position. Over-cap or no delegation returns a Swop-app approval link. Perps are leveraged and can be liquidated — make the risk clear to the user.

InputTypeRequiredDescription
coinstringYesPerp market symbol, e.g. "BTC", "ETH", "SOL" (min length 1)
direction"long" | "short"Yeslong = buy/up, short = sell/down
marginUsdnumberYesMargin (collateral) in USD to commit (max 500; > 0)
leveragenumberYesLeverage multiplier (capped by the user's setting and the market max) (min 1; max 20)
reduceOnlybooleanNotrue to close/reduce an existing position instead of opening
previewIdstringNoFrom the preview step
confirmbooleanNotrue ONLY after the user confirmed the preview (with leverage + exposure shown)

swop_get_my_predictions

See my prediction bets · Sign-in: wallet.read · /mcp only · Read-only

The linked user's prediction-market (Polymarket) positions with live marks, their open limit orders, and their pUSD betting balance. Use it before selling (gives each position's tokenId and shares) or cancelling (gives orderId). To find new markets use swop_search_markets.

No inputs.

swop_prediction_order

Buy or sell a prediction outcome · Sign-in: predictions.trade · /mcp only · Preview, then confirm · Changes or moves things

Buy or sell a prediction-market outcome (Polymarket) from the linked user's wallet. TWO-STEP like swop_send: call WITHOUT confirm to preview (live-book price, shares, cost, worst price, payout, caps and limits that apply); show the user that summary and get an explicit yes; then call again with only previewId and confirm: true. Pick the outcome by tokenId — the clobTokenIds entry at the same index as the outcome in swop_search_markets / swop_get_event_markets results — or by eventSlug + outcome name. Size with amountUsd OR shares: each share pays $1 if the outcome wins. Omit limitPrice for a market order (fills now, never worse than maxSlippageCents); set limitPrice (0-1) for a resting limit order. BUYs obey the user's AI spending caps and their Goldman prediction limits; a refusal names the limit. To sell, pass side SELL and the position's tokenId from swop_get_my_predictions.

InputTypeRequiredDescription
side"BUY" | "SELL"NoBUY to open/add, SELL to close/reduce. Required for a preview
tokenIdstringNoOutcome token id: one entry of clobTokenIds
eventSlugstringNoInstead of tokenId: the eventSlug of a market result
outcomestringNoWith eventSlug: outcome name, e.g. "Steelers" or "Yes"
marketSlugstringNoWith eventSlug: the market slug, when several markets share outcome names (moneyline vs spread)
amountUsdnumberNoDollar size: spend (BUY) or raise (SELL) (max 1000; > 0)
sharesnumberNoShare size instead of amountUsd (> 0)
limitPricenumberNoLimit price as a probability, e.g. 0.42 = 42¢. Omit for a market order (> 0; < 1)
maxSlippageCentsintegerNoMarket orders: cents past the quoted price to accept, default 2 (min 0; max 5)
previewIdstringNoFrom the preview step
confirmbooleanNotrue ONLY after the user explicitly confirmed the preview

swop_cancel_prediction_order

Cancel a prediction limit order · Sign-in: predictions.trade · /mcp only · Changes or moves things

Cancel one of the linked user's open prediction-market limit orders. Takes an orderId from swop_get_my_predictions; shares already filled stay filled. Confirm which order with the user first.

InputTypeRequiredDescription
orderIdstringYesOrder id from swop_get_my_predictions openOrders (pattern ^0x[a-fA-F0-9]\{64\}$)

On this page