Ccxt.Pro (CCXT Elixir v0.1.0-binance-pro-preview)

Copy Markdown View Source

Generated CCXT Pro runtime entrypoint.

Ccxt.Pro owns the OTP runtime used by generated CCXT Pro exchange modules. It starts one registry entry per websocket URL and one dynamically supervised connection process per active URL.

Use binance/1 to build a CCXT-style Binance Pro instance:

binance =
  Ccxt.Pro.binance(%{
    apiKey: "...",
    secret: "...",
    binanceEnv: "prod"
  })

Runtime helpers:

Generated unwatch_* methods keep CCXT Pro semantics: they send an unsubscribe message and wait for Binance ACK. They do not close the websocket process. Use close_connection/1 when the connection itself should stop.

Summary

Functions

attach_debug_logger()

@spec attach_debug_logger() :: :ok | {:error, term()}

binance(config \\ %{})

@spec binance(map() | keyword()) :: Ccxt.Pro.Binance.t()

close_connection(url)

@spec close_connection(String.t() | pid()) :: :ok | {:error, term()}

connection(url, opts \\ [])

@spec connection(
  String.t(),
  keyword()
) :: {:ok, pid()} | {:error, term()}

connection_info(url)

@spec connection_info(String.t() | pid()) :: {:ok, map()} | {:error, term()}

connections()

@spec connections() :: [%{url: String.t(), pid: pid(), alive?: boolean()}]

debug_log_event(event, measurements, metadata, config)

detach_debug_logger()

@spec detach_debug_logger() :: :ok | {:error, :not_found}

ensure_started()

@spec ensure_started() :: {:ok, pid()} | {:error, term()}