Integrations - Loren1166/NautilusTrader- GitHub Wiki

Integrations 集成

NautilusTrader is modularly designed to work with adapters, enabling connectivity to trading venues and data providers by converting their raw APIs into a unified interface.

NautilusTrader 采用模块化设计,可与适配器配合使用,通过将其原始 API 转换为统一接口来实现与交易平台和数据提供商的连接。

The following integrations are currently supported:

当前支持以下集成:

Name ID Type Status Docs
Betfair BETFAIR Sports Betting Exchange status Guide
Binance BINANCE Crypto Exchange (CEX) status Guide
Binance US BINANCE Crypto Exchange (CEX) status Guide
Binance Futures BINANCE Crypto Exchange (CEX) status Guide
Bybit BYBIT Crypto Exchange (CEX) status Guide
Databento DATABENTO Data Provider status Guide
dYdX DYDX Crypto Exchange (DEX) status Guide
Interactive Brokers INTERACTIVE_BROKERS Brokerage (multi-venue) status Guide
  • ID: The default client ID for the integrations adapter clients. ID: 集成适配器客户端的默认客户端 ID。
  • Type: The type of integration (often the venue type). 类型: 集成类型(通常是交易平台类型)。

Status 状态

  • building: Under construction and likely not in a usable state. building:正在建设中,可能处于不可用状态。
  • beta: Completed to a minimally working state and in a 'beta' testing phase. beta:已完成至最低工作状态,并处于“测试版”测试阶段。
  • stable: Stabilized feature set and API, the integration has been tested by both developers and users to a reasonable level (some bugs may still remain). stable:稳定的功能集和 API,该集成已由开发人员和用户进行了合理级别的测试(可能仍然存在一些错误)。

Implementation goals 实现目标

The primary goal of NautilusTrader is to provide a unified trading system for use with a variety of integrations. To support the widest range of trading strategies, priority will be given to 'standard' functionality:

NautilusTrader 的主要目标是提供一个统一的交易系统,以便与各种集成一起使用。为了支持最广泛的交易策略,将优先考虑“标准”功能:

  • Requesting historical market data 请求历史市场数据
  • Streaming live market data 流式传输实时市场数据
  • Reconciling execution state 协调执行状态
  • Submitting standard order types with standard execution instructions 使用标准执行指令提交标准订单类型
  • Modifying existing orders (if possible on an exchange) 修改现有订单(如果在交易所上可行)
  • Canceling orders 取消订单

The implementation of each integration aims to meet the following criteria:

每个集成的实现旨在满足以下标准:

  • Low-level client components should match the exchange API as closely as possible. 低级客户端组件应尽可能与交易所 API 匹配。
  • The full range of an exchanges functionality (where applicable to NautilusTrader), should eventually be supported. 交易所功能的全部范围(适用于 NautilusTrader 的地方)最终应得到支持。
  • Exchange specific data types will be added to support the functionality and return types which are reasonably expected by a user. 将添加特定于交易所的数据类型,以支持用户合理预期功能和返回类型。
  • Actions which are unsupported by either the exchange or NautilusTrader, will be explicitly logged as a warning or error when a user attempts to perform said action. 当用户尝试执行上述操作时,交易所或 NautilusTrader 不支持的操作将被明确记录为警告或错误。

API unification API 统一

All integrations must be compatible with the NautilusTrader API at the system boundary, this means there is some normalization and standardization needed.

所有集成都必须与系统边界处的 NautilusTrader API 兼容,这意味着需要进行一些规范化和标准化。

  • All symbols will match the raw/native/local symbol for the exchange, unless there are conflicts (such as Binance using the same symbol for both Spot and Perpetual Futures markets). 所有符号都将与交易所的原始/本地符号匹配,除非存在冲突(例如 Binance 对现货和永续期货市场使用相同的符号)。
  • All timestamps will be either normalized to UNIX nanoseconds, or clearly marked as UNIX milliseconds by appending _ms to param and property names. 所有时间戳都将被规范化为 UNIX 纳秒,或者通过在参数和属性名称后附加 _ms 清楚地标记为 UNIX 毫秒。