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
| Code | Description |
|---|---|
| -32700 | Parse error |
| -32600 | Invalid request |
| -32601 | Method not found |
| -32602 | Invalid params |
| -32603 | Internal error |
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
Need help? Join our Discord for support or
check out the GitHub repository for
examples.
