Based MiniApp
Introduction to Based.One MiniApps
Welcome to the Based.One MiniApp ecosystem! This guide will introduce you to the concepts, capabilities, and possibilities of building mini-applications for the Based.One trading terminal.
The API specification will evolve rapidly as we work with developers to figure out what APIs they need, and remove redundant ones to limit scope.
What Are MiniApps?
MiniApps are lightweight, focused applications that run directly within the Based.One trading terminal. They extend the platform's functionality by providing specialized tools, custom interfaces, and automated trading strategies - all while maintaining seamless integration with the core trading experience.
Think of MiniApps as plugins for traders - small, powerful applications that solve specific problems or provide unique functionality without leaving the trading environment.
The north-star for MiniApps is to enhance the experience within the Based.One trading terminal:
Enhance Based traders' edge
Increase Based terminal screen time and stickiness
Provide an out-of-this-world experience; create something never seen before
Why Build MiniApps?
Focused Solutions
Instead of building a complete trading platform, create targeted tools that solve specific problems. Some example ideas:
A position sizing calculator
A market scanner for specific strategies
A risk management dashboard
An automated DCA (Dollar Cost Averaging) bot
Price alerts
AI agent chatbot with trade recommendations
Liquidation heatmaps
Data-analysis tools for traders
Grid-trading bots
Native Integration
MiniApps have direct access to:
Trading functions - Place orders, manage positions, cancel trades
Real-time market data - Live prices, order books, trade feeds (feel free to plug your own data instead)
Account information - Balances, positions, trading history
Instant Deployment
No separate infrastructure needed
Built-in security and permissions
Automatic updates and distribution
Cross-platform compatibility
What Can You Build?
Trading Automation
Grid Trading Bots - Automated buy/sell grids for ranging markets
DCA Bots - Dollar cost averaging with custom schedules
Arbitrage Tools - Cross-exchange price difference monitoring
Stop Loss Managers - Advanced stop loss and take profit systems
Analytics and Insights
Portfolio Analyzers - Advanced portfolio tracking and reporting
P&L Calculators - Real-time profit/loss analysis with projections
Risk Meters - Position sizing and portfolio risk assessment
Performance Trackers - Trading statistics and improvement metrics
Market Tools
Custom Scanners - Find trading opportunities based on technical patterns
Alert Systems - Price, volume, and technical indicator alerts
Correlation Analyzers - Asset correlation tracking and visualization
Market Sentiment - Social sentiment and on-chain data aggregation
Educational and Utility
Trading Simulators - Paper trading with real market data
Strategy Backtesting - Test strategies against historical data
Learning Tools - Interactive tutorials and trading guides
Calculators - Position size, leverage, and risk calculators
Games and Entertainment
Video Streaming - Livestream FED meetings for trade execution, or simply videos for entertainment
Idle Games - Simple games while waiting for trade execution
How MiniApps Work
Architecture Overview
Communication Flow
Security Model
MiniApps run in a sandboxed environment with permission-based access. Users maintain full control and can revoke permissions at any time.
Permission-based access - Users explicitly grant capabilities
Sandboxed execution - MiniApps run in isolated environments
Secure communication - All data exchange is validated
User control - Users can revoke permissions at any time
Development Approaches
We provide three different approaches to building MiniApps, each suited for different skill levels and requirements:
Simple API (Recommended for Beginners)
Perfect for getting started quickly:
Pros:
Minimal setup and configuration
Strongly-typed TypeScript APIs
Automatic permission handling
Built-in error handling and retries
Best for: Simple trading bots, basic market tools, learning projects
React Integration (Recommended for UI-Rich Apps)
Great for building interactive interfaces:
Pros:
Ready-to-use React components
Automatic state management
Real-time data binding
Professional UI components
Best for: Dashboards, portfolio analyzers, complex trading interfaces
Full SDK (Advanced Use Cases)
Maximum control and customization:
Pros:
Complete control over all functionality
Access to advanced features
Custom event handling
Maximum performance
Best for: Professional trading systems, complex algorithms
Real-World Example: Market Scanner
Here's a simple market scanner that alerts when prices move beyond certain thresholds:
This example shows how just a few lines of code can create a useful trading tool!
Last updated