Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.generalmarket.io/llms.txt

Use this file to discover all available pages before exploring further.

Balance & Proofs

What remains. A player’s current balance within a batch — the arithmetic verdict on their predictions. In production, this endpoint also returns a BLS-signed proof that enables on-chain withdrawals.

Get Player Balance

GET /vision/balance/{batch_id}/{player} Returns the player’s current balance and stake configuration. The balance reflects all tick resolutions processed so far — wins, losses, and fees. A running tally of how well your machine understood the world.
batch_id
number
required
The batch ID to query the balance for.
player
string
required
The player’s Ethereum address (checksummed, 0x-prefixed).
curl https://generalmarket.io/api/vision/balance/1/0xAbC123def456789AbC123def456789AbC123def4

Response Fields

FieldTypeDescription
batch_idnumberThe batch ID
playerstringThe player’s Ethereum address
balancestringCurrent balance in wei. This is the total amount the player can claim or continue staking.
stake_per_tickstringThe amount risked per tick per market, in wei. Set when the player joins the batch.
In the production release, this endpoint will also return BLS signature fields for on-chain withdrawal proofs:
  • bls_signature — The oracle’s BLS signature over the balance proof message
  • oracle_id — The oracle node ID that produced the signature
  • pubkey — The oracle’s BLS public key
Players aggregate signatures from 2/3+ oracles and submit them on-chain to withdraw. See Balance Proofs for details on the verification flow.

Errors

StatusCondition
400Invalid player address format
404Batch does not exist
404Player is not registered in the specified batch