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.
Trading Model
Section titled “Trading Model”| Layer | Current behavior |
|---|---|
| Collateral unit | Platform meme ledger balance. |
| Matching | In-memory CLOB, restored from database on service startup. |
| Settlement | Off-chain ledger updates persisted by the CLOB server. |
| Deposits | BSC platform meme through the Bridge service. |
| Withdrawals | BSC platform meme through the Bridge service. |
| Market data | REST and WebSocket APIs. |
Authentication
Section titled “Authentication”Openfish separates credential derivation from day-to-day trading access.
| Tier | Mechanism | Role |
|---|---|---|
| L1 | Wallet signature | Derive or recover API credentials. |
| L2 | HMAC-SHA256 API credentials | Place 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.
Order Lifecycle
Section titled “Order Lifecycle”- Client creates an order for a market outcome token ID.
- Client signs the order and submits it to
POST /order. - CLOB validates authentication, market status, tick size, order amount, and ledger balance.
- Matching engine fills against resting liquidity by price-time priority.
- Fills are persisted as trades.
- Ledger balances and positions update immediately.
- Market and user WebSocket subscribers receive updates.
- Any remaining quantity stays live, expires, or is cancelled according to order type.
Order Types
Section titled “Order Types”| Type | Behavior |
|---|---|
| GTC | Good Till Cancelled. Rests until filled or cancelled. |
| GTD | Good Till Date. Expires at a specified timestamp. |
| FOK | Fill Or Kill. Must fill entirely or cancel immediately. |
| FAK | Fill And Kill. Fills available quantity and cancels the remainder. |
Balances
Section titled “Balances”The current deployment distinguishes chain balances from Openfish ledger balances.
| Balance | Where it lives | Used for |
|---|---|---|
| BSC wallet balance | User wallet on BSC | Depositing and receiving withdrawals. |
| Openfish ledger balance | CLOB database | Trading and reserving order collateral. |
| Bridge gas funder balance | System wallet on BSC | Funding 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.
Asset Scope
Section titled “Asset Scope”The Bridge only supports the configured BSC platform meme token. Other assets are outside the current deposit and withdrawal flow.