nautilus_dydx/common/
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//! Common functionality shared across the dYdX adapter.
17//!
18//! This module provides core utilities, constants, and data structures used throughout
19//! the dYdX integration, including:
20//!
21//! - **Authentication**: Wallet credential storage and message signing for dYdX v4.
22//! - **Common enumerations**: dYdX-specific enums mirrored from REST/WebSocket payloads.
23//! - **Constants**: Venue identifiers, broker IDs, and scaling factors.
24//! - **Parsing utilities**: Helpers for converting dYdX data to Nautilus types.
25//! - **URL management**: Environment-aware base URL resolvers for testnet and mainnet.
26//! - **Common models**: Shared data structures used across HTTP and WebSocket layers.
27//! - **Testing helpers**: Fixtures and utilities for unit tests.
28
29pub mod consts;
30pub mod credential;
31pub mod enums;
32pub mod models;
33pub mod parse;
34pub mod urls;
35
36#[cfg(test)]
37pub(crate) mod testing;