Official SDKs

Use our official SDKs to integrate exchange fee schedule data into your applications with strongly-typed models, automatic retries, and built-in error handling.

Why Use an SDK?

Every API response is parsed into typed models with IDE autocomplete. No more guessing field names or types — your editor knows every field on Exchange, ExchangeDetail, and all other response objects.
HTTP errors are mapped to specific exception classes. Catch NotFoundError for 404s, AuthenticationError for invalid keys, RateLimitError for 429s — all with the original response body and status code attached.
Failed requests are automatically retried with exponential backoff. Connection errors, timeouts, and server errors (5xx) are retried up to 2 times by default.
Override timeout, add extra headers, or inject query parameters on any individual request without creating a new client.

Installation

pip install rulebooksdk

Quick Comparison

from rulebook import Rulebook, NotFoundError

client = Rulebook(api_key="your-key")
exchanges = client.exchanges.list()

for ex in exchanges:
    print(f"{ex.name}: {ex.record_count} records")
    # IDE autocompletes: ex.name, ex.display_name, ex.fee_types, ex.record_count