Crate nautilus_okx

Crate nautilus_okx 

Source
Expand description

NautilusTrader adapter for the OKX cryptocurrency exchange.

The nautilus-okx crate provides strongly-typed client bindings (HTTP & WebSocket), data models and helper utilities that wrap the official OKX v5 API.

The official OKX API reference can be found at https://www.okx.com/docs-v5/en/. All public links inside this crate reference the English version.

§Platform

NautilusTrader is an open-source, high-performance, production-grade algorithmic trading platform, providing quantitative traders with the ability to backtest portfolios of automated trading strategies on historical data with an event-driven engine, and also deploy those same strategies live, with no code changes.

NautilusTrader’s design, architecture, and implementation philosophy prioritizes software correctness and safety at the highest level, with the aim of supporting mission-critical, trading system backtesting and live deployment workloads.

§Feature flags

This crate provides feature flags to control source code inclusion during compilation, depending on the intended use case, i.e. whether to provide Python bindings for the nautilus_trader Python package, or as part of a Rust only build.

  • python: Enables Python bindings from PyO3.
  • extension-module: Builds as a Python extension module (used with python).

Re-exports§

pub use crate::common::enums::OKXInstrumentType;
pub use crate::common::enums::OKXOrderType;
pub use crate::common::enums::OKXPositionMode;
pub use crate::common::enums::OKXPositionSide;
pub use crate::common::enums::OKXSide;
pub use crate::common::models::OKXInstrument;
pub use crate::http::client::OKXHttpClient;
pub use crate::http::error::OKXHttpError;
pub use crate::websocket::client::OKXWebSocketClient;
pub use crate::websocket::error::OKXWsError;

Modules§

common
Common functionality shared across the OKX adapter.
config
Configuration structures for the OKX adapter.
http
HTTP/REST client implementation for the OKX v5 API.
python
Python bindings from pyo3.
websocket
WebSocket client implementation for the OKX v5 API.