Barfinex

How Barfinex Works

Advisor — overview and quick start

What the Advisor does, how it receives signals, how it connects to the platform, and how to get started.

What is the Advisor?

The Advisor is a separate service in the Barfinex ecosystem that:

  • Receives trading signals from the Detector
  • Optionally enriches them with context (market, risk, or AI/LLM)
  • Publishes decisions (e.g. approved or rejected) to the event bus

Other parts of the system (e.g. execution layer or Studio) can subscribe to these decisions and react—opening or closing positions, logging, or sending alerts.

The Advisor runs as its own process or container, not inside the Detector. It connects to the same event bus and registers with the Provider so that Studio and API clients can reach it through the Provider proxy.


How the Advisor receives signals

The Advisor subscribes to events on the platform bus:

  • New detector signals — When the Detector generates a signal, the Advisor is invoked automatically. It can call rules or an LLM, then publish a decision and a context snapshot.
  • Decision requests — Other services or REST calls can also send an explicit decision request; the Advisor responds with the same event types.

Payloads include symbol, side (long/short), confidence, and strategy identifier.


How the Advisor connects

  • Event bus — Required. Connection is configured with the same host/port as the rest of the stack (e.g. in Docker, same network as Provider and Detector).
  • Provider (App Registry) — On startup the Advisor registers with the Provider and sends periodic heartbeats. The Provider then proxies requests to the Advisor and shows it in Studio. Configuration uses the Provider API URL, optional API token, Advisor app key, and the Advisor’s public URL and port (default 8009).

So the Advisor is not “inside” the Detector: it’s a separate process that listens to the bus and optionally calls the Provider for context (e.g. prices via API).


Minimal setup

  1. Environment — Same event bus and network as Provider and Detector (e.g. shared Docker network). Set event bus host/port and Provider API URL; add API token if your Provider requires it.
  2. Ports — Advisor REST API is typically on port 8009.
  3. Optional — LLM and risk-related settings (max position, spread limits, feature flags) if you use those features.

After startup, the Advisor appears in the Provider app registry and is reachable via Studio and via Provider proxy (e.g. /api/advisors/<appKey>/...).


What you see in Studio and logs

  • Studio — If the front-end uses the Provider, requests to the Advisor go through the Provider proxy. Advisor decisions and context events stream to Studio in real time via the Provider WebSocket (/ws), because the Provider bridges the event bus to the browser.
  • Logs — Check the Advisor container or process logs for connection to the bus, registration with the Provider, handling of incoming events, and published decisions.

Next steps

Let’s Get in Touch

Have questions or want to explore Barfinex? Send us a message.