Overview
Storyprovides RPC APIs for interacting with the blockchain through multiple protocols:URI over HTTP
RESTful API endpoints for simple requests
JSONRPC over HTTP
Standard JSON-RPC 2.0 over HTTP POST
JSONRPC over WebSocket
Real-time subscriptions and notifications
Base URL
Rate Limiting
To handle rate limits properly:- Implement exponential backoff
- Cache frequently requested data
- Batch requests when possible
- Monitor rate limit headers in responses
Authentication
No authentication is required for public RPC endpoints. However, we recommend:- Using secure connections (HTTPS)
- Following best practices for key management
- Implementing request signing for sensitive operations
Request Format
Response Format
All responses follow standard JSON-RPC 2.0 format:Error Codes
Best Practices
Performance Optimization
Performance Optimization
- Cache responses when appropriate
- Use pagination for large result sets
- Subscribe to WebSocket events instead of polling
Error Handling
Error Handling
- Implement proper error handling
- Use exponential backoff for retries
- Monitor response status codes
Security
Security
- Use HTTPS for all requests
- Validate all responses
- Implement request signing when needed
SDKs & Tools
Story.js
Official JavaScript SDK for Story
Story CLI
Command-line interface for interacting with Story
Need help? Join our Discord for support or
check out the GitHub repository for
examples.
