Expand description
HTTP client for the Derive REST API.
The wire format mirrors derive_client’s upstream Python SDK:
- Each method is addressed at
${base_url}/<method-name>(e.g./public/get_instruments,/private/order). - Request bodies are the raw
paramsobject; the method is encoded by the URL path, not by a wrapping envelope. - Successful responses carry
{ "id": <int>, "result": <T> }; failures carry{ "id": <int>, "error": { "code", "message", "data" } }. The shared envelope types inmodelsare reused by the WebSocket layer, which speaks the full JSON-RPC framing on the wire.
Private endpoints inject the EIP-191 session-key auth headers built by
crate::signing::auth::build_rest_auth_headers; public endpoints carry
no auth and may be called without credentials.
Re-exports§
pub use client::DeriveCredentials;pub use client::DeriveHttpClient;pub use error::DeriveHttpError;pub use error::Result;pub use models::JsonRpcError;pub use models::JsonRpcRequest;pub use models::JsonRpcResponse;
Modules§
- client
reqwest-backed REST client for the Derive API.- error
- Error types for the Derive HTTP client.
- models
- HTTP payload models and JSON-RPC envelope types for the Derive REST API.
- parse
- HTTP response parsing utilities for the Derive execution client.
- query
- Typed JSON-RPC params for Derive private execution endpoints.