GeminiGemini
SandboxGet API key
  • Crypto Trading
  • Prediction Markets
  • SDKs & Tools
Changelog
Gemini Crypto Exchange LogoGemini Crypto Exchange Logo

© 2026 Gemini Space Station, Inc.

Overview
TypeScript SDK
    QuickstartAuthenticationWebSocketError HandlingPatterns & Recipes
    API Reference
      Overview
      Market Data
      Trading
      Prediction Markets
        Events & DiscoveryOrder ManagementPositions & TermsCombosVolume & MetricsRewards & Rebates
      Account Services
      Clearing & Instant
      PerpetualsMarginWebSocket
    Deep Dives
Prediction Markets

TypeScript SDK — Predictions: Positions & Terms

Query open and settled positions, and manage prediction markets terms acceptance. All methods are on client.predictions. See the patterns guide for the recommended terms-acceptance flow.

getPositions

POST /v1/prediction-markets/positions · Authenticated

Retrieve your current open prediction market positions. Despite being a POST endpoint, parameters are passed as query params. Returns a PositionsResponse with a .positions array and .total count.

Code
// All positions const result = await client.predictions.getPositions(); // Filter by event with pagination and sort const filtered = await client.predictions.getPositions({ eventTicker: "FEDJAN26", limit: 50, offset: 0, sort: "-positionValue", }); for (const pos of filtered.positions ?? []) { console.log(pos.symbol, pos.totalQuantity, pos.avgPrice, pos.outcome); } console.log(filtered.total); // total position count

Sort options: "positionValue", "+positionValue", "-positionValue", "unrealizedPnl", "+unrealizedPnl", "-unrealizedPnl", "expiryDate", "+expiryDate", "-expiryDate". Prefix + for ascending, - for descending.

Note — Although this uses POST on the wire, the SDK passes eventTicker, limit, offset, and sort as query parameters, not a request body. POST endpoints are never automatically retried by the SDK.

getSettledPositions

POST /v1/prediction-markets/positions/settled · Authenticated

Retrieve your settled (resolved) prediction market positions. Despite being a POST endpoint, parameters are query params. Returns a SettledPositionsResponse with a .positions array and .total count.

Code
const settled = await client.predictions.getSettledPositions({ eventTicker: "FEDJAN26", limit: 20, sort: "-date", withCashOuts: true, }); for (const pos of settled.positions) { console.log(pos.instrumentSymbol, pos.payout, pos.resolutionSide, pos.netProfit); } // Cash-outs (only present when withCashOuts: true) if (settled.cashOuts) { for (const co of settled.cashOuts) { console.log(co.instrumentSymbol, co.proceeds, co.netProfit); } }

Sort options: "date", "-date", "payout", "+payout", "-payout". A bare field name defaults to descending.

Note — Although this uses POST on the wire, the SDK passes parameters as query parameters. POST endpoints are never automatically retried by the SDK.

acceptPredictionMarketsTerms

POST /v1/prediction-markets/terms/accept · Authenticated

Accept the latest prediction markets terms of service. This is a POST mutation — never automatically retried. You must call this before placing orders if you haven't already accepted.

Code
const result = await client.predictions.acceptPredictionMarketsTerms(); console.log(result.success); // true

getPredictionMarketsTerms

GET /v1/prediction-markets/terms · Public

Retrieve the current prediction markets terms of service. Returns a PredictionMarketsTerms object with termsType, version, content, and updatedAt fields.

Code
const terms = await client.predictions.getPredictionMarketsTerms(); console.log(terms.version); // e.g. 3 console.log(terms.content); // terms text console.log(terms.updatedAt); // ISO 8601 timestamp

Auto-retry — This GET endpoint automatically retries on 429/502/503/504 status codes.

getPredictionMarketsTermsStatus

GET /v1/prediction-markets/terms/status · Authenticated

Check whether the authenticated account has accepted the latest terms. Returns a PredictionMarketsTermsStatus object. This is the same check the SDK runs automatically before placeOrder and placeOrderBatch.

Code
const status = await client.predictions.getPredictionMarketsTermsStatus(); console.log(status.hasAcceptedLatest); // boolean console.log(status.acceptedVersion); // number | null console.log(status.latestVersion); // number | null if (!status.hasAcceptedLatest) { await client.predictions.acceptPredictionMarketsTerms(); }

Auto-retry — This GET endpoint automatically retries on transient failures.

Tip — You don't normally need to call this directly. placeOrder and placeOrderBatch check terms automatically and throw AcceptTermsRequired if not accepted. See the patterns guide for the recommended flow.

What's next

  • Events & Discovery — browse and search prediction market events
  • Order Management — place, cancel, and query orders
  • Combos — multi-leg combo instruments
  • Volume & Metrics — daily/hourly volume and per-event share metrics
  • Request Validation — how client-side validation works
Last modified on August 14, 2026
Order ManagementCombos
On this page
  • What's next
TypeScript
TypeScript
TypeScript
TypeScript
TypeScript