Documentation Index
Fetch the complete documentation index at: https://docs.b1nary.app/llms.txt
Use this file to discover all available pages before exploring further.
Environments
b1nary runs on two environments. Use testnet for development and testing, production for real trading.Production (Base mainnet + Solana mainnet)
| Chains | Base (chain ID 8453) and Solana mainnet |
| API | https://api.b1nary.app |
| App | https://b1nary.app |
| Explorers | https://basescan.org, https://solscan.io |
| Assets | ETH, cbBTC, SOL, TSLAx. Puts are collateralized with USDC. Covered calls use WETH/cbBTC on Base or wSOL/TSLAx on Solana. |
| Base USDC | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
| Solana USDC | 4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU |
Solana production programs
| Program / Account | Address |
|---|---|
| b1nary Batch Settler | GpR6id2cHu5fUGsFm7NUKkB4NzfuEDa6brPzkSrgAzvS |
| Solana Margin Pool | FH3z4BYRZMFU8YzpJoFXUbrdoYksdERnWbZvDAEc3qcC |
| CCTP V2 Token Messenger Minter | CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe |
| CCTP V2 Message Transmitter | CCTPV2Sm4AdWt5296sk4P66VBZ7bEhcARwFaaS9YPbeC |
| wSOL Mint | So11111111111111111111111111111111111111112 |
| TSLAx Mint | XsDoVfqeBukxuZHWhdvWHBhgEHjGNst4MLodqsJHzoB |
Testnet (Base Sepolia)
| Chain | Base Sepolia (chain ID 84532) |
| API | https://optionsprotocolbackend-staging.up.railway.app |
| App | https://staging.b1nary.app |
| Block explorer | https://sepolia.basescan.org |
| RPC | https://sepolia.base.org |
| Assets | ETH, BTC (mock tokens). No real money. |
Account model
b1nary groups wallets under a product-level account.- Base trading uses a gas-sponsored smart trading account.
- Solana trading uses a gas-sponsored embedded trading account.
- External wallets like Rabby, MetaMask, and Phantom are funding wallets for deposits and withdrawals.
- Agents should treat verified trading wallets as the canonical source for balances and positions.
- USDC can be consolidated across Base and Solana with Circle CCTP V2 before a trade or withdrawal.
GET /b1nary-account?privy_user_id=...GET /b1nary-account/by-wallet?chain=base&address=0x...GET /b1nary-account/by-wallet?chain=solana&address=...GET /b1nary-account/positions?privy_user_id=...
Integration paths
App users sign in with wallet/Privy. b1nary creates and manages gas-sponsored trading accounts on Base and Solana. Agents and integrators can either use the app account model or interact directly with the contracts/programs. For cross-chain UX, prefer the account model and bridge endpoints.Setup for agents
Get test tokens (testnet only)
Call
POST /faucet with {"address": "0xYourWallet"}. You receive 0.005 ETH (gas), 50 LETH (test WETH), and 100,000 LUSD (test USDC). One claim per wallet.Approve collateral to MarginPool
On Base, call
approve(MarginPool, max) on the collateral token. For puts: approve USDC. For calls: approve WETH or cbBTC. On Solana, b1nary prepares sponsored setup transactions for token accounts, approvals, and wSOL wrapping when needed.Read prices and execute
GET /prices returns the live option price sheet with signed quotes for Base and Solana. Pick an option, calculate collateral, and either execute directly on the target chain or use bridge-and-trade if USDC is on the other chain. See the Integration Guide for examples.Decimal reference
| Type | Decimals | Example |
|---|---|---|
| oToken amounts | 8 | 100000000 = 1 ETH notional |
| Strike prices (on-chain) | 8 | 240000000000 = $2,400 |
| USDC | 6 | 5000000 = 5 USDC |
| WETH | 18 | 1000000000000000000 = 1 WETH |
| cbBTC | 8 | 100000000 = 1 cbBTC |
| SOL / wSOL | 9 | 1000000000 = 1 SOL |
| TSLAx | 8 | 100000000 = 1 TSLAx |