Skip to main content

Module traits

Module traits 

Source
Expand description

§V5 Core Traits

§Architecture

CoreConnector<C>           - universal methods (Identity + MarketData + Trading + Account + Positions)
     │
     └── BinanceConnector  - core + all Binance-specific directly
     └── KuCoinConnector   - core + all KuCoin-specific directly

§Principles

  1. Core traits are minimal — only what 100% of exchanges support
  2. No UnsupportedOperation in core — all core methods work everywhere
  3. Extensions in exchange connectors — directly as struct methods

§Core traits

TraitMethodsDescription
ExchangeIdentity5Basic identification
MarketData5Public data (price, orderbook, klines, ticker, ping)
Trading5Trading (place_order, cancel_order, get_order, get_open_orders, get_order_history)
Account3Account (balance, account_info, fees)
Positions3Futures (positions, funding_rate, modify_position)

§Optional operation traits (part of CoreConnector)

  • CancelAll - native cancel-all endpoint
  • AmendOrder - native amend/modify order
  • BatchOrders - native batch placement/cancellation
  • AccountTransfers - internal account transfers
  • CustodialFunds - deposits and withdrawals
  • SubAccounts - sub-account management
  • FundingHistory - historical funding payments
  • AccountLedger - full account ledger
  • Authenticated - credential-aware connectors

Re-exports§

pub use crate::core::websocket::CapabilityProvider;

Modules§

has_capabilities_stubs
HasCapabilities impls for non-crypto connectors (stocks, forex, data feeds, brokers).

Structs§

AuthRequest
Request structure for signing.
Credentials
Simple API key + secret credentials.

Enums§

CredentialKind
Enum of all authentication scheme kinds across 24 exchanges.
SignatureLocation
Where the signature goes.

Traits§

Account
Core account — 24/24 exchanges.
AccountLedger
Full account ledger — chronological log of all balance changes.
AccountTransfers
Internal transfers between account types (Spot ↔ Futures ↔ Margin).
AmendOrder
Amend (modify) a live order in-place without cancel+replace.
Authenticated
Marks a connector as credential-aware and capable of authenticated requests.
BatchOrders
Native batch order placement and cancellation.
CancelAll
Cancel all open orders — optionally scoped to a symbol.
CoreConnector
Full core connector
CustodialFunds
Deposit and withdrawal management for custodial exchanges.
ExchangeAuth
Exchange auth trait — each exchange implements its own signing logic.
ExchangeIdentity
Базовая идентификация биржи
FundingHistory
Historical funding payment records for perpetual futures positions.
HasCapabilities
Declare the full capability surface of a connector.
MarketData
Минимальные публичные рыночные данные
MarketDataPublic
Extended public market data — derivatives analytics, liquidations, OI, funding history.
Positions
Positions — 22/24 exchanges.
SubAccounts
Sub-account management — create, list, transfer, get balances.
Trading
Core trading — 24/24 exchanges.
WebSocketConnector
Core WebSocket коннектор
WebSocketExt
Удобные методы подписки