API Reference
API Reference
StoryRPC API documentation
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
All API endpoints are rate limited to 15 requests per second per IP address. Exceeding this limit will result in HTTP 429 (Too Many Requests) responses.
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
SDKs & Tools
Need help? Join our Discord for support or check out the GitHub repository for examples.