nautilus_dydx/http/
mod.rs

1// -------------------------------------------------------------------------------------------------
2//  Copyright (C) 2015-2025 Nautech Systems Pty Ltd. All rights reserved.
3//  https://nautechsystems.io
4//
5//  Licensed under the GNU Lesser General Public License Version 3.0 (the "License");
6//  You may not use this file except in compliance with the License.
7//  You may obtain a copy of the License at https://www.gnu.org/licenses/lgpl-3.0.en.html
8//
9//  Unless required by applicable law or agreed to in writing, software
10//  distributed under the License is distributed on an "AS IS" BASIS,
11//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12//  See the License for the specific language governing permissions and
13//  limitations under the License.
14// -------------------------------------------------------------------------------------------------
15
16//! HTTP/REST client implementation for the dYdX v4 Indexer API.
17//!
18//! This module provides an HTTP client for interacting with dYdX's Indexer REST endpoints,
19//! supporting:
20//!
21//! - **Market data queries**: Perpetual markets, historical trades, OHLCV candles, order books.
22//! - **Account information**: Subaccounts, positions, fills, transfers, and funding payments.
23//! - **Order queries**: Historical orders and order status.
24//! - **Rate limiting**: Automatic rate limiting and retry logic via `nautilus_network::http::HttpClient`.
25//!
26//! # Architecture
27//!
28//! The HTTP client follows a two-layer architecture:
29//!
30//! - **Raw client** ([`client::DydxRawHttpClient`]): Low-level API methods matching Indexer endpoints.
31//! - **Domain client** ([`client::DydxHttpClient`]): High-level methods using Nautilus domain types,
32//!   wraps raw client in `Arc` for efficient cloning (required for Python bindings).
33//!
34//! # Authentication
35//!
36//! The dYdX v4 Indexer REST API is **publicly accessible** and does NOT require
37//! authentication or request signing. All endpoints use wallet addresses and subaccount
38//! numbers as query parameters.
39//!
40//! Order submission and trading operations use gRPC with blockchain transaction signing,
41//! not the REST API (handled separately in the execution module).
42//!
43//! # References
44//!
45//! - dYdX v4 Indexer API: <https://docs.dydx.trade/developers/indexer/indexer_api>
46//!
47//! # Official documentation
48//!
49//! See: <https://docs.dydx.exchange/api_integration-indexer/indexer_api>
50
51pub mod client;
52pub mod error;
53pub mod models;
54pub mod parse;
55pub mod query;