Skip to main content

GET /api/v1/partner/users/{external_user_id}

Returns the state of one partner user's sub-account: its balance, the value of its open positions, and the list of positions it holds.

Authentication​

Required. Partner API key in X-Partner-Key header.

Request​

Path Parameters​

ParameterTypeRequiredDescription
external_user_idstringYesIdentifier of the user in the partner's own system. URL-encode the value.

Example​

curl https://api.intotes.com/api/v1/partner/users/user_42 \
-H "X-Partner-Key: <partner_key>"

Response​

200 OK​

Monetary fields are integers in kopecks (100 kopecks = 1 RUB). See Money Format.

{
"external_user_id": "user_42",
"exists": true,
"user_id": 987654,
"balance_kopecks": 12000,
"open_positions_kopecks": 48000,
"positions": [
{
"market_id": 12345,
"side": "yes",
"shares": 91234,
"avg_price_bps": 5480,
"value_kopecks": 48000
}
]
}

When exists is false, the user has never placed a bet and no sub-account has been created for them yet. The sub-account is created automatically on the user's first bet through Place Bet.

The balance_kopecks figure includes payouts from Sell Position, which stay on the sub-account and can fund further bets.

Response Fields​

FieldTypeDescription
external_user_idstringIdentifier of the user in the partner's own system, echoed from the path.
existsboolWhether a sub-account exists for this user.
user_idint64ID of the Intotes sub-account mapped to external_user_id.
balance_kopecksintBalance held on the sub-account, in kopecks.
open_positions_kopecksintCurrent value of all open positions, in kopecks.
positionsarrayOpen positions held by the sub-account.
positions[].market_idint64Market the position is in.
positions[].sidestringPosition side: "yes" or "no".
positions[].sharesintShares held. 100 shares = 1 token.
positions[].avg_price_bpsintAverage entry price in basis points. 10000 = 1 RUB.
positions[].value_kopecksintCurrent value of the position, in kopecks.

For the meaning of shares, entry price, and position value, see Positions.

Errors​

No endpoint-specific error codes are documented for this endpoint. The authentication errors shared by every partner endpoint are listed in the Overview, and the full catalogue is in Error Handling.