Getting started
Installing and Running Barfinex Provider
Start by deploying Barfinex Provider — a market data service and extended API for working with your trading account.
🚀 Quick start of the Provider
In this section we’ll assemble a minimal stack: prepare, launch, and verify that the containers are up and the Provider API is available at the configured address.
This is the shortest path “from zero to a running service”.
💡 Requirements: Docker and Docker Compose installed, access to a terminal, and permissions to run containers.
1. What is Docker Compose and why we use it
To deploy Barfinex Provider (locally or on a server) we rely on the docker-compose.yml file.
Docker Compose is a tool that allows you to describe multiple related services (Barfinex Provider, MongoDB, Redis, Portainer, etc.) in a single YAML file and run them with one command:
docker compose up -d
The docker-compose.yml file defines:
- which containers to start (Barfinex Provider, Mongo, Redis and admin tools);
- which ports to expose;
- which environment variables to pass;
- which configs and data directories to mount into containers.
A detailed breakdown of all sections and services lives on a dedicated page:
👉 Docker Compose for Barfinex Provider
2. Get the latest docker-compose and source code
The recommended way is to pull the latest version from the public repository barfinex/app-provider.
This way you get at once:
- an up‑to‑date
docker-compose.yml; - the Barfinex Provider source code;
- configuration examples and project structure.
git clone https://github.com/barfinex/app-provider.git cd app-provider
In the repository root you’ll find the docker-compose.yml file used in the steps below.
3. Environment configuration (.env)
Create a .env file based on the example:
cp .env.example .env
Open .env in any editor and fill in the key variables:
NODE_ENV=production # MongoDB connection MONGO_HOST=mongodb://mongo:27017 # Redis connection REDIS_HOST=redis://redis:6379 # Binance access keys BINANCE_API_KEY=your_key BINANCE_API_SECRET=your_secret TESTNET_BINANCE_SPOT_KEY=your_testnet_key TESTNET_BINANCE_SPOT_SECRET=your_testnet_secret
💡 Hostnames (
mongo,redis) must match the service names indocker-compose.yml.
A detailed description of all environment variables can be found in the repository README and comments in.env.example.
4. Starting Barfinex Provider with Docker Compose
Make sure you are in the project root (app-provider), where docker-compose.yml lives:
docker compose up -d
The -d flag runs all services in the background.
5. Verify everything is running
Check container statuses:
docker compose ps
Expected result — all services are in the Up state, for example:
NAME IMAGE STATUS PORTS provider ghcr.io/barfinex/provider:latest Up 0.0.0.0:3001->3001/tcp mongo mongo:6 Up 0.0.0.0:27017->27017/tcp mongo-express mongo-express:latest Up 0.0.0.0:8081->8081/tcp redis redis:7 Up 0.0.0.0:6379->6379/tcp redis-commander rediscommander/redis-commander Up 0.0.0.0:8082->8082/tcp portainer portainer/portainer-ce Up 0.0.0.0:9000->9000/tcp postgres postgres:15 Up 0.0.0.0:5432->5432/tcp
6. Viewing Barfinex Provider logs
For quick diagnostics use:
docker compose logs -f provider
-f— stream logs in real time;- logs help you quickly see at which initialization stage a problem occurred
(HTTPS, config, Redis, Binance, WebSocket, etc.).
A detailed explanation of log messages is available here:
👉 Understanding Barfinex Provider Logs
🧩 Startup stages of Barfinex Provider
When it starts, Barfinex Provider goes through several initialization stages:
| Stage | Component | Purpose |
|---|---|---|
| 1️⃣ | HTTPS Initialization | Load SSL certificates and enable TLS |
| 2️⃣ | Configuration Load | Load and validate JSON configs |
| 3️⃣ | Dependency Graph | Initialize NestJS modules |
| 4️⃣ | Redis Connection | Connect to the event bus |
| 5️⃣ | Binance API Setup | Check keys and ping the exchange API |
| 6️⃣ | Subscriptions | Register internal channels and subscriptions |
| 7️⃣ | Application Ready | REST + WebSocket servers are active |
These stages are reflected in the logs, which simplifies debugging and CI/CD monitoring.
📊 Studio Barfinex: the next step after installing Provider
A running Barfinex Provider is a reliable backend, but by itself it remains a “black box” on a server.
Studio Barfinex solves this:
- provides visual monitoring of Provider status (online/offline, version, uptime);
- lets you see the data Provider is actually serving (quotes streams, events, errors);
- helps diagnose issues: you can quickly see whether the problem is in the exchange connection, configuration, or infrastructure;
- aggregates multiple Provider instances (testnet/prod, different exchanges) into a single control panel.
After you:
- configured
.env, - started the stack with
docker compose up -d, - made sure via logs that all initialization stages completed successfully,
we recommend registering this Provider in Studio Barfinex and monitoring it through the web interface.
Detailed connection guide:
👉 Registering Provider in Studio Barfinex
Launching Barfinex Provider is essentially your entry point into your own ecosystem of algorithmic and quantitative trading.
From this moment you have your own source of market data and a controllable API to build strategies, experiments, and production trading systems on top of.
Let Barfinex Provider become the reliable engine of your infrastructure,
and Studio Barfinex — a comfortable cockpit, where you see everything: from connection health to strategy behaviour in real time.
We wish you a stable Provider, clean logs, clear signals, and well‑reasoned trading decisions.
May every new config version and each strategy iteration bring you closer to more confident, systematic, and profitable trading.