BentoSDK

How Bento works

The mental model — markets on-chain, two backends, sign-in, your managed account, and acceptance vs finality.

Five things explain almost everything about building on Bento. Read this once and the rest of the docs will click.

  your app ──HTTP──▶ Bento API ──▶ BSC (on-chain settlement)
      │                  ▲
      └── sign login ────┘  →  JWT (Bearer), sent on sdk.user calls

1. Markets live on-chain

Bento markets, parlays, and tournament vaults settle on BSC. You don't manage contracts to get started — you call HTTP methods, and for a few flows (parlay placement, vault deposits) you submit a transaction with your own wallet.

2. Two backends, one SDK

createBentoSdk() talks to two hosts:

  • Markets host (baseUrl) — bets, packs, create-market, portfolio.
  • Tournaments host (tournamentsBaseUrl) — parlays, bracket tournaments, F1, fantasy, social.

You only need the markets host to start. Add the tournaments host when you reach parlays or tournaments. → Two API hosts

3. Reads are open; actions need a login

Public reads — the catalog, prices, analytics — need no auth. To do something as a user (place a bet, create a market) you sign a message with your wallet and exchange it for a JWT, sent as a Bearer token. → Authentication

4. You sign with your key, but trade through a managed account

When you register or log in, Bento provisions a managed account whose address is different from your signing wallet. Your balances, positions, and payouts live there. → Accounts & wallets

5. Accepted ≠ settled

A write returns when the server accepted it — not when the chain finalized. Poll a read or subscribe to realtime to confirm the result. → Acceptance vs finality


Next: Quickstart for your first call, or the Glossary for the vocabulary.

On this page