Skip to content

Trading on Openfish

Openfish runs a Central Limit Order Book (CLOB) for prediction markets. In the current meme deployment, matched trades update the Openfish off-chain ledger.

LayerCurrent behavior
Collateral unitPlatform meme ledger balance.
MatchingIn-memory CLOB, restored from database on service startup.
SettlementOff-chain ledger updates persisted by the CLOB server.
DepositsBSC platform meme through the Bridge service.
WithdrawalsBSC platform meme through the Bridge service.
Market dataREST and WebSocket APIs.

Openfish separates credential derivation from day-to-day trading access.

TierMechanismRole
L1Wallet signatureDerive or recover API credentials.
L2HMAC-SHA256 API credentialsPlace orders, cancel orders, query private trading data.

L2 requests include the wallet address, timestamp, API key, passphrase, and HMAC signature. The HMAC message is the concatenation of timestamp, HTTP method, request path, and request body.

  1. Client creates an order for a market outcome token ID.
  2. Client signs the order and submits it to POST /order.
  3. CLOB validates authentication, market status, tick size, order amount, and ledger balance.
  4. Matching engine fills against resting liquidity by price-time priority.
  5. Fills are persisted as trades.
  6. Ledger balances and positions update immediately.
  7. Market and user WebSocket subscribers receive updates.
  8. Any remaining quantity stays live, expires, or is cancelled according to order type.
TypeBehavior
GTCGood Till Cancelled. Rests until filled or cancelled.
GTDGood Till Date. Expires at a specified timestamp.
FOKFill Or Kill. Must fill entirely or cancel immediately.
FAKFill And Kill. Fills available quantity and cancels the remainder.

The current deployment distinguishes chain balances from Openfish ledger balances.

BalanceWhere it livesUsed for
BSC wallet balanceUser wallet on BSCDepositing and receiving withdrawals.
Openfish ledger balanceCLOB databaseTrading and reserving order collateral.
Bridge gas funder balanceSystem wallet on BSCFunding withdrawals and BSC gas.

Bridge deposits credit ledger balance. Bridge withdrawals debit ledger balance and send the supported BSC platform meme token.

Fees are charged in platform meme terms. Market-level fee rates may be set by the agent/auction workflow. Fee accounting should be read as platform meme ledger accounting unless a page explicitly says otherwise.

The Bridge only supports the configured BSC platform meme token. Other assets are outside the current deposit and withdrawal flow.