Skip to content
The Mog guide

Build on Mog

An integration is your own interface on top of Mog’s venue. Your users trade the same markets, with the same positions, payouts and risks, as traders in the Mog app. Every order your interface signs can name your address as its builder. When those positions settle a win, you earn a share of the settlement fee.

  1. Your user connects a wallet in your interface.
  2. The wallet signs once to grant a session key. The session key can trade for the account, but it can never withdraw.
  3. Your interface signs each order with the session key and puts your builder address in the order.
  4. The signed order goes to Mog’s relay, which pays the network fee, or straight to the chain. Today the relay accepts browser requests only from Mog’s own sites. Send to it from your server, which sends no browser origin, or have your users’ wallets send the order to the chain.
  5. The order fills at the next attested price, the same as an order from the Mog app. See Positions and leverage.

The builder address is part of what the user signs. Nobody can add it, change it or remove it later.

NeedWhere
How builder earnings work and how to collect themBuilder codes
How builder codes relate to the app’s referral linksBuilder codes and referrals
Endpoints, the CLI and error codesAPI
Who may call each part of the venuePermissions
  • Test on Robinhood Chain testnet first. Its markets and endpoints mirror mainnet. See API.
  • Your users carry the same risks as any Mog trader. Link them to Risk.
  • Launch values on these pages can change by governance. The app and the venue read the live values.