Integrate OpenBell into any Solana stock-pair platform
OpenBell is an issuer-agnostic settlement layer. Any token with a Pyth equity feed can have a book, and any platform (StonkFun, pump.fun Custom Pairs, Terminal, wallets) can route orders into it and tag them with an integrator account.
Four steps
- 1.Call register_integrator(name, referral_bps) once from your platform wallet.
- 2.For a stock: register_asset(feed_id, issuer, symbol) if it is unregistered, then create_book(premium_bps, backstop_secs, house).
- 3.Route user orders with place_order(side, amount), passing your integrator account.
- 4.The public keeper settles every print and delivers fills straight to users' wallets.
Program addresses
- asset
- ["asset", mint]
- integrator
- ["integrator", authority]
- book
- ["book", base_mint, quote_mint]
- order
- ["order", book, order_count_le_u64]
- round
- ["round", book, round_count_le_u64]
Run a bot
The reference bot at sdk/openbell-bot.ts keeps one resting order on a book. It reads the live board from /api/board and the program interface from /api/idl, so it needs no local copy of the protocol. Each tick it checks whether your wallet already has an open order on the book: if it does, it waits for the keeper to deliver the fill at the next print, and otherwise it places a fresh order.
SYMBOL=AAPLx SIDE=ask AMOUNT=0.05 KEYPAIR=~/.config/solana/id.json DRY_RUN=0 bun run sdk/openbell-bot.ts
Integrator leaderboard
Every fill routed with your integrator account pays you a share of the premium. Updated each minute from settled prints.
No routed fills yet.
Register your platform
Creates an integrator account owned by your connected wallet. Orders routed with it are tagged on-chain.