Skip to main content

Partner Integration API

The Partner Integration API follows a float model: a partner β€” a casino, a bookmaker, or an app β€” funds a float account at Intotes and, with an API key, places bets on behalf of its own users in Intotes prediction markets.

Each partner user is identified by an external_user_id and is automatically mapped to an Intotes sub-account. The stake of every bet is funded from the float, and the resulting positions go into the shared LMSR AMM pool.

How It Works​

  1. The partner funds the float. The float account holds the partner's undistributed funds.
  2. A bet arrives with an external_user_id. The identifier is resolved to an Intotes sub-account, which is created on the user's first bet.
  3. The stake is debited from the float. The trade is then executed for that sub-account.
  4. The position goes into the shared LMSR pool. See Positions and Markets for what a position in a market is.
  5. A sale credits the payout to the sub-account. The payout stays there and can fund further bets, or be read through Get User State.

Onboarding​

  1. Registration. Intotes registers the partner and links a float account to it.
  2. Funding. The partner tops the float account up with a normal deposit (crypto or card).
  3. Key issue. The partner receives access to the B2B bot and issues an API key once with /gen_key. The key is shown a single time and is never reissued β€” keep it secret.
  4. Integration. The partner integrates the endpoints listed below.

Authentication​

Every request requires the X-Partner-Key header:

X-Partner-Key: pk_xxxxxxxxxxxxxxxxxxxxxxxx
StatusCodeDescription
401NO_PARTNER_KEYThe X-Partner-Key header is missing.
401INVALID_PARTNER_KEYThe key is wrong, or the partner is disabled.

Base URL​

https://api.intotes.com

Confirm the host for your environment. It is not the platform base URL used by the rest of the API Reference.

Units and Concepts​

FieldDescription
*_kopecksKopecks. 1 RUB = 100 kopecks.
sharesPosition shares. 100 = 1 token.
avg_price_bpsEntry price in basis points. 10000 = 1 RUB.
fee_bpsFee in basis points.
side"yes" or "no".
external_user_idIdentifier of the user in the partner's own system.
client_bet_idThe partner's unique idempotency key.

Monetary fields on these endpoints are integers. See Money Format for the platform-wide money conventions.

The rest of the docs name these scales differently: what this page calls shares is the integer those pages call shares in cents, and both count 100 units to one whole share or token. Prices there run on the same 0–10000 range, described as probability rather than in basis points β€” see Prices and Probability.

Idempotency​

The pair (partner, client_bet_id) is unique. After a network error or a timeout, repeat the request with the same client_bet_id:

  • If the bet already went through, the response is already_accepted β€” no second trade is executed and the float is not debited a second time.
  • If the previous attempt never executed, the reservation was released and the retry proceeds normally.

Error Format​

All endpoints share one error envelope:

{
"error": {
"code": "BET_LIMIT",
"message": "amount_kopecks 500000 exceeds partner max bet 100000"
}
}

See Error Handling for the full list of partner error codes.

Endpoints​

EndpointPathDescription
Place BetPOST /api/v1/partner/betsPlace a bet for a partner user, funded from the float.
Sell PositionPOST /api/v1/partner/sellSell shares of a position and credit the payout to the sub-account.
Get Float BalanceGET /api/v1/partner/balanceRead the float balance and the total balance of all sub-accounts.
Get User StateGET /api/v1/partner/users/{external_user_id}Read a partner user's balance and open positions.

The rest of the platform API is documented in the API Reference.