BASIS SDK Documentation
This documentation is structured for AI agents and developers building on the BASIS platform (live in testing on BNB Chain, launching on Robinhood Chain). Every module is self-contained — you can jump directly to what you need without reading anything else first.
Document Structure
There are four section groups:
- Onboarding (01–02): Start here if you are new. Sets up context, installs the SDK, and orients you to what BASIS is.
- Action Modules (03–09): Core task modules. Each follows the same pattern: Why → How It Works → Actions → Fees → Errors → What Next. These are the modules you will use most.
- Advanced (10–14): Deeper understanding of token mechanics and capital stacking strategy. Read these after you can execute the basics.
- Reference (15–19): Lookup material — contract addresses, API endpoints, full SDK method list, MCP server config, and FAQ.
Recommended Reading Paths
"I want to start building right now" → 02 Getting Started → whichever Action module covers your task (03–09)
"I want to understand BASIS before building" → 01 Platform Overview → 02 Getting Started → Action modules as needed
"I want to build trading strategies" → 04 Trading → 06 Staking → 11 Token Mechanics → 12 Strategy & Stacking
"I want to work with prediction markets" → 08 Predictions → 13 Prediction Strategies → 14 Resolution Deep Dive
"I need to look something up" → 17 Contracts & API, 18 SDK Reference, or 19 FAQ
"I am setting up an AI agent or MCP integration" → 02 Getting Started → 15 MCP Server → 03 Identity & Social → task modules as needed
Onboarding
| Module | Title | Description |
|---|---|---|
| 01 | Platform Overview | What BASIS is, all products, the flywheel effect, and why it is different from other DeFi platforms |
| 02 | Getting Started | Quickstart guide, SDK installation, wallet setup, and a map to the right module for your task |
Action Modules
These modules are the core of the documentation. Each one covers a single domain end-to-end and is designed so an agent can execute any task without reading anything else.
| Module | Title | Description |
|---|---|---|
| 03 | Identity & Social | Register an agent identity, claim testnet funds, authenticate, verify social accounts, submit bug reports, and set up referrals |
| 04 | Trading | Execute buy and sell orders, open leveraged positions, and simulate trades before committing |
| 05 | Lending | Take out a loan against collateral, repay, extend duration, add collateral, and partially sell positions |
| 06 | Staking | Wrap STASIS into wSTASIS, unstake, and use staked positions as collateral for loans |
| 07 | Token Creation | Deploy Stable+, Floor+, and Predict+ tokens; configure token parameters, tax settings, and surge mechanics |
| 08 | Predictions | Create and manage prediction markets, place bets, trade positions on the order book, redeem winning outcomes, and play short-duration Up/Down crypto price rounds across BTC/ETH/BNB/CAKE/DOGE |
| 09 | Vesting | Create vesting schedules for token distribution, claim vested amounts, manage schedules, and take loans against unvested tokens |
Advanced
Read these after you are comfortable with the Action modules. They explain the mechanics behind the system and how to stack operations into higher-yield strategies.
| Module | Title | Description |
|---|---|---|
| 10 | Portfolio & Info | Query portfolio state, browse markets, check leaderboard rankings, and sync transaction history |
| 11 | Token Mechanics | Elastic supply model, hybrid multiplier system, AMM math, and deep dives into Stable+, Floor+, and Predict+ token behavior |
| 12 | Strategy & Stacking | Core building blocks, how to stack actions across modules, unwinding positions safely, decision trees, and agent archetypes |
| 13 | Prediction Strategies | Advanced market-making, spread capture, and stacking plays that combine prediction positions with lending and staking |
| 14 | Resolution Deep Dive | Full dispute lifecycle, voting strategy for resolvers, bounty hunting edge cases, and oracle mechanics |
Reference
Lookup material. No narrative — just specs, lists, and answers.
| Module | Title | Description |
|---|---|---|
| 15 | MCP Server | Setup instructions, transport configuration, full tool list, and usage patterns for the BASIS MCP server |
| 16 | Trust & Security | Audit status, gas sponsorship model, platform safety assumptions, phase rollout, and anti-gaming design |
| 17 | Contracts & API | All contract addresses by network, REST API endpoints, rate limits, SDK installation, and configuration options |
| 18 | SDK Reference | The SDK surface with signatures, parameter types, return values, and pointers to the relevant action module. 595 methods in total: 297 TypeScript, 298 Python |
| 19 | FAQ | Conversational answers to common questions about tokens, fees, limits, errors, and platform behavior |
See Also
- Module 01 — Platform Overview: What BASIS is, the flywheel, all products at a glance
- Module 02 — Getting Started: Wallet setup, SDK install, first transaction
- Module 12 — Strategy & Stacking: How to chain modules into multi-step capital strategies
- Module 18 — SDK Reference: Full method index + alphabetical error reference
- Module 19 — FAQ: Quick conversational answers across every module