For the complete documentation index, see llms.txt. This page is also available as Markdown.

Quickstart

The six-step integration path. Authenticate, list markets, quote, open, monitor, close.

Start in sandbox. Same API, same contract, test pUSD. Swap api.dimes.fi for api-sandbox.dimes.fi and use a dm_sbx_skey_... key — every example below works as-is. Working reference: dimes-demo-ui.

Using the SDK? Install it: npm install @dimes-dot-fi/sdk. See SDK Installation for setup and peer dependencies. Every SDK snippet below has a runnable, type-checked counterpart in examples/ — start with 01-quickstart.ts.


1. Authenticate

curl -X POST https://api.dimes.fi/v1/prediction-markets/tokens \
  -H "Authorization: Api-Key dm_live_skey_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{ "wallet_address": "0x1234...abcd" }'
{
  "token": "eyJhbGciOiJIUzI1NiIs...",
  "expires_at": "2026-04-16T11:00:00.000Z"
}

JWTs expire in 1 hour. Full details: Authentication.


2. List markets

curl https://api.dimes.fi/v1/prediction-markets/markets

Each market includes leverage.min_bps, max_bps, and step_bps — clamp input to those. Full shape: API Reference — Markets.


3. Request a quote

The response carries pricing, fees, liquidation parameters, and a contract_signature for the on-chain call. Full shape and signature verification: API Reference — Quotes.

Draft + promote: Quotes expire in 15 seconds. Call /draft-quotes first (no expiry), let the user review, then /promoted-quotes/{draft_quote_id} when they're ready. See API Reference — Promote draft quote.


4. Open the position

Two on-chain calls: pUSD.approve(vault, total_user_amount) then vault.createPosition(...) with the quote parameters. After the tx confirms, Multiply acquires tokens, finalizes on-chain, and emits position.opened.

Code examples for Polymarket Safe, Proxy, and Deposit Wallet patterns: On-Chain Integration.


5. Monitor positions

Each position carries P&L, mark price, margin health, liquidation price, and accrued fees. Display rules: UI Guidelines.


6. Close

The owner calls vault.requestClose(position_key). Multiply sells tokens, distributes proceeds, emits position.closed. If the market resolves first, settlement is automatic.


What's next

Need help? Telegram link at dimes.fi.

Last updated