Install and enable

Installing the Forex & Multi-Asset Trading addon, adding a market-data key, importing the instrument catalog, enabling instruments and switching on live trading — in the order that actually works.

8 min readUpdated 3 August 2026install, setup, providers, catalog, cron

The addon installs like every other Bicrypto extension: buy it, activate the licence, let the updater unpack it, restart. What follows that is the part worth reading, because the order matters. Instruments cannot be activated before a provider is active, a provider cannot be activated before its credentials are in .env, and live trading cannot be switched on before either of those exist.

Nothing here touches ScyllaDB. This addon stores everything in MySQL and uses Redis for provider cool-offs, the chart cache and the engine lease.

Before you start

    • A working Bicrypto install — see Core install
    • Shell access to the app server, because credentials go in .env and the backend has to be restarted to read them
    • A market-data provider account whose plan includes WebSocket streaming
    • Decided which countries you will refuse — the geo-block list defaults to US, CA and applies the moment the extension is live

1. Install and activate the extension

Buy the product, then activate it under Admin → System → Extensions, or run the updater from the shell. On the next backend boot the extension's models sync and its tables appear:

fx_provider              market-data vendors (one active at a time)
fx_execution_provider    A-book hedge venues (many may be enabled)
fx_instrument            the tradable catalog
fx_symbol_group          dealing-desk config per group of symbols
fx_session_calendar      trading-hours calendars
fx_account_group         account tiers (margin call, stop out, NBP)
fx_account               customer trading accounts
fx_order                 orders, market and pending
fx_position              open and closed positions
fx_deal                  the immutable money ledger
fx_routing_rule          A-book placement-time routing overrides
fx_execution_alert       the operator alert inbox
fx_economic_event        economic calendar
fx_market_news           terminal news feed

The addon's admin lives at /admin/forex-trading and its customer terminal at /forex-trading/trade. Both appear under Admin → Extensions once the extension row is active.

Every screen is permission-gated on keys of the form view.forex_trading.*, edit.forex_trading.* and so on. Roles ship with no grants at all, so an Admin-role user will get a 403 on every page until you assign them under Users → Roles & Permissions. The full list is in the settings reference.

2. Add a market-data credential

The A-book execution keys are pre-listed in .env.example. The market-data keys are not — you add them by hand. If you copy the file expecting to find APP_TWELVEDATA_API_KEY and it is absent, that is normal.

Pick one provider and add its variables to .env:

APP_TWELVEDATA_API_KEY=
APP_FINNHUB_API_KEY=
APP_TRADERMADE_API_KEY=
APP_POLYGON_API_KEY=

Restart the backend afterwards — the provider manager reads process.env and nothing reloads it.

Which one to choose, what each plan actually includes, and how to validate a key before you write it into .env is covered in Market data providers. Read that page before you pay anyone: four of the five vendors paywall the WebSocket, and without a WebSocket this addon cannot quote a tradable price.

3. Activate the provider

Go to Admin → Forex Trading → Market Data → Providers (/admin/forex-trading/provider).

Activates a provider, deactivating all others

Activation is single-active by design: one feed owns the marks that fills are priced against, so turning one on turns every other one off. Before it commits, the endpoint does three things:

  1. Refuses if the adapter is not implemented in this release.
  2. Refuses if the credentials are absent from the environment.
  3. Runs a live credential check, then probes the quote stream for up to 12 seconds.

The stream probe does not block activation — a socket can be transiently down — but its verdict rides out on the response. If you see "WARNING: the quote stream did not connect", stop and fix that before going further. Everything downstream will look like it is working and will refuse every order.

4. Import the instrument catalog

On the same page, press Import Instrument Catalog.

Seeds the curated catalog and links provider symbols

Two separate things happen:

Seeding. The addon creates its curated catalog if it is missing — three session calendars (FX 24/5, US Stocks RTH, CME Metals & Energy), seven symbol groups (FX Majors, FX Crosses, Metals, Energy, US Stocks, Indices (ETF), Crypto CFDs) and around 86 instruments: 7 FX majors, 21 crosses, gold, silver, WTI, Brent, 50 US large caps, 4 index ETFs and 2 crypto CFDs. Everything is created INACTIVE with correct contract specifications. Existing rows are never modified, so re-running this is safe and never overwrites your tuning.

Linking. It then pulls the active provider's instrument list and writes the matching provider-side symbol onto each catalog row. Matching is keyed by asset class and pair, deliberately: matching on the pair alone once linked the WTI crude contract to a same-named US penny stock and quoted crude at $3.66 forever.

The response tells you what did not match. Pay attention to strandedActive — those are instruments already live for customers that this provider cannot quote. They will go silent.

5. Enable the instruments you want to offer

Admin → Forex Trading → Market Data → Instruments. Everything is INACTIVE until you promote it.

Moves an instrument through its lifecycle

The lifecycle is deliberately one-way in places, so that you cannot strand a customer holding an open position:

From Allowed next
INACTIVE ACTIVE
ACTIVE CLOSE_ONLY, HALTED, INACTIVE
CLOSE_ONLY ACTIVE, HALTED, DELISTED
HALTED ACTIVE, CLOSE_ONLY
DELISTED nothing — terminal

Activation is refused unless the instrument carries a symbol mapping for the currently active provider. A mapping for some other, now-inactive vendor does not count; that check exists because such instruments activate cleanly and then either stream nothing or fall through to a heuristic guess.

INACTIVE and DELISTED are refused while open positions exist. Take a market away through CLOSE_ONLY and wait for it to empty.

Start small. Ten liquid FX pairs plus gold is a complete product; 86 instruments is a wide surface to watch on day one.

6. Review the desk configuration

Market Data → Symbol Groups carries your economics. The seed defaults are conservative but they are defaults, not recommendations:

Group Leverage Spread markup Commission Calendar
FX Majors 100 1.0 pip 0 FX 24/5
FX Crosses 50 1.8 pips 0 FX 24/5
Metals 50 3.0 pips 0 CME Metals & Energy
Energy 20 4.0 pips 0 CME Metals & Energy
US Stocks 5 0 0.02 / lot US Stocks RTH
Indices (ETF) 20 1.0 pip 0 US Stocks RTH
Crypto CFDs 10 10 pips 0 none (24/7)

There are no account groups seeded. Without one, accounts fall back to a margin-call level of 100% and a stop-out level of 50%. If you want ESMA-style tiers, offshore leverage, or negative-balance protection turned off, create account groups before you take a live customer — see Instruments, groups and sessions.

7. Switch on live trading

Admin → Forex Trading → Settings (/admin/forex-trading/settings).

Master switch for live order placement and LIVE account creation. Demo trading works without it.

Until this is on, customers can still get a demo account and trade paper money — that is the funnel and it works out of the box. Live accounts cannot be created, funded or traded.

While you are on this screen, check the other tabs:

  • Risk & Data — quote staleness thresholds (10s for FX, 30s for stocks).
  • Accounts — which account currencies customers may pick. Defaults to USD, EUR. The currency is fixed for the account's lifetime.
  • Compliance — the geo-block list (US, CA by default) and the leveraged trading risk disclosure.

Full definitions are in the settings reference.

8. Confirm the scheduled jobs are running

Admin → System → Cron. Six jobs are registered under the forex_trading category. Two of them move money:

Job Every What breaks if it stops
processFxSwaps 1 hour Overnight financing is never charged. Unsettled rollovers expire uncharged after 7 days.
reconcileFxAccounts 5 minutes Expired pending orders linger, ledger drift goes undetected, equity and margin go stale.
runFxExecutionReconciler 60 seconds A-book only. Broker fills stop being replayed; orphans go unnoticed.
runFxHedgeMonitor 60 seconds A-book only. Hedge account margin is never checked.
processFxAffiliateRebates 10 minutes IB rebates are not awarded. Silent no-op if you run none.
syncFxCalendarAndNews 15 minutes Economic calendar and news stop refreshing.

The tick engine, the risk engine, the external execution engine and the reconciler are all single-owner and are arbitrated by a Redis lease named forex-trading. In a clustered or multi-process deployment only the lease holder streams quotes and evaluates stop-out. Other processes serve forex data from the database only. If the leader dies, an operator has to restart the loser — there is no automatic promotion, because tearing down the quote stream on a still-serving process would make it refuse every open and close.

9. Smoke test on demo

Do this before you tell anyone the desk is open.

  1. Open the terminal as an ordinary user at /forex-trading/trade. A demo account is provisioned automatically on first visit with 10,000 units of paper money in the first configured account currency.

  2. Check the markets rail. Instruments should show live prices that move. A symbol showing a badge other than a live price is telling you its quoting state — see Troubleshooting.

  3. Place a market buy of the minimum size on EUR/USD. It should fill instantly. Confirm the fill price is worse than the mid — that is your spread markup arriving.

  4. Attach a stop loss and a take profit, then move them. Both are validated against the instrument's stops level, so a level too close to the market is refused with the exact distance required.

  5. Close the position and open Admin → Forex Trading → Finance → Deals Ledger. You should see an OPEN deal and a CLOSE deal, each carrying the executed price, the raw feed bid and ask, and the balance the account was left with.

  6. Leave a position open past 17:00 New York and confirm a SWAP deal appears within the hour. If it does not, the swap cron is not running or a currency conversion leg is missing.

Production checklist

    • Provider activated and the stream probe reported success
    • Catalog imported; strandedActive empty
    • Only the instruments you intend to support are ACTIVE
    • Symbol groups reviewed — spread markup, leverage, commission, swap policy
    • At least one account group exists, with a defaultForType for LIVE
    • Geo-block list saved deliberately (an empty saved list blocks nobody; a deleted row resurrects the US, CA default)
    • Risk disclosure decision made
    • All six cron jobs green
    • fxTradingDelayedStocksTradable left off unless your plan genuinely streams real-time equities
    • Notification templates reviewed under Admin → System → Notifications: FxTradingDepositConfirmation, FxTradingWithdrawalStatus, FxTradingMarginCall, FxTradingStopOut
    • A Super Admin user exists with a working email — every execution alert fans out to Super Admin holders only
    • Then, and only then, fxTradingEnabled on

Next