Skip to content

Inventory Management

Market makers quote against the Openfish CLOB. In the current meme/off-chain deployment, fills update the Openfish ledger rather than requiring traders to mint, merge, or redeem on-chain outcome tokens.

The inventory problem is still the same: keep enough platform meme balance available for bids, keep outcome exposure within limits, and rebalance after fills.


InventoryMeaning
Available memeLedger balance that can be committed to new BUY orders
Reserved memeBalance locked by live BUY orders
Outcome sharesYES/NO exposure created by matched trades
Reserved sharesShares locked by live SELL orders
Claimable payoutLedger credit created after a resolved market is settled

You do not need a separate token-splitting step before quoting. The CLOB validates available balances when orders are placed and reserves the required amount while orders remain live.


  1. Deposit platform meme through the Bridge.
  2. Confirm your available ledger balance through the CLOB API.
  3. Fetch market metadata, outcome token IDs, tick size, minimum order size, and fee rate.
  4. Set per-market and portfolio-level exposure limits.

Example checks:

let balance = client.balance().await?;
let market = client.market(condition_id).await?;
println!("available meme: {}", balance.available);
println!("tick size: {}", market.minimum_tick_size);

Use order placement and cancellation to control inventory:

SituationAction
Too much YES exposureLower YES bids, improve YES asks, or cancel additional YES bids
Too much NO exposureLower NO bids, improve NO asks, or cancel additional NO bids
Low available memeCancel low-priority bids or reduce order sizes
Low available sharesCancel asks that exceed available sellable inventory
Volatility spikeWiden spreads and reduce max order size

The matching engine updates balances and positions on every fill. Your bot should treat the API balance and position endpoints as the source of truth.


When a market resolves, the system credits winning positions according to the final outcome and market payout rules.

Operational flow:

  1. Stop quoting the market once resolution is detected.
  2. Cancel remaining live orders for that market.
  3. Wait for the market status and winner fields to update.
  4. Reconcile ledger balances, resolved positions, and claimable payout records.
  5. Reallocate available meme to other live markets.

There is no user-facing manual redemption transaction in the current deployment.


Batching is done at the API and bot layer:

NeedRecommended action
Enter many marketsFetch market metadata in batches, then place bounded orders per market
Exit a risk segmentCancel orders by market, event, or strategy tag
Emergency stopCancel all orders for the API key or wallet
Daily rebalancePull positions, calculate target exposure, then cancel/replace quotes

Keep batch jobs idempotent. A retry should not double-submit unintended exposure.