Skip to content

TradeX

TradeX (Lo TradeX / Lo Crypto) is a trading app for lb-phone. Your players invest in cryptocurrencies and company stocks straight from their phone: buy, sell, track their portfolio live and watch price charts. Turn your server into a real Wall Street.

Overview

The app is downloaded from the phone's App Store (or auto-installed) and gives access to two markets: a fully customizable crypto market and a stock market tied either to volatility or to companies' weekly revenue. Each player has a dedicated trading balance funded from their bank, and tracks the value of their positions in real time.

Features

Crypto market

  • Fully customizable coins (symbol, name, starting price, icon).
  • Real-time price simulation recalculated on a configurable interval.
  • Volatility and trend per coin: swing amplitude and bullish/bearish bias.
  • Floor and ceiling per coin: the price never drops below or rises above the bounds.
  • Transaction fees applied on every buy/sell.

Stock market

  • Company stocks traded just like cryptos.
  • Two pricing modes: volatility (random, default) or revenue (tied to weekly turnover).
  • Per-company sensitivity in revenue mode: how strongly the price reacts to revenue.
  • Dedicated transaction fees for stocks.

Portfolio

  • Live P&L (unrealized gains/losses).
  • Average buy price per asset.
  • 24h change and total holdings value.
  • Portfolio value history.

Charts

  • Price history over 1h / 24h / 7d / 30d.
  • Interactive charts for cryptos, stocks and the portfolio.
  • Watchlist: keep your favorite coins and stocks at quick reach.

Wallet

  • Deposit and withdraw between the player's bank and trading balance.
  • Full transaction history: crypto, stocks and bank operations.

Stock pricing modes

TradeX offers two ways to move stock prices, chosen via Config.StockPriceMode:

ModeBehaviorDependency
volatility (default)Prices fluctuate randomly, exactly like cryptos (per-stock volatility + trend).None — recommended.
revenuePrices are calculated from each company's actual weekly revenue, read from a banking script. More immersive.A compatible banking script.

NOTE

If revenue is selected but no banking script is detected, TradeX automatically falls back to volatility mode. In revenue mode, the stock symbol must match the in-game job name.

Compatibility & dependencies

The framework is auto-detected on startup — no manual switch.

FrameworkStatus
QBCore (qb-core)Supported
QBox (qbx_core)Supported
ESX (es_extended)Supported
DependencyStatusRole
lb-phoneRequiredHost phone for the app
ox_libRequiredCallbacks and utilities
oxmysqlRequiredData persistence
A frameworkRequiredqb-core, qbx_core or es_extended

Supported banking scripts (only for the stock revenue mode, otherwise optional):

BankingDetection
lo_bankingAuto
esx_societyAuto
qb-bankingAuto
qb-managementAuto
Renewed-BankingAuto

TIP

In volatility mode (the default), no banking script is required: TradeX runs with just lb-phone, ox_lib, oxmysql and a framework.

Technical overview

ItemDetail
FrontendPre-built interface served to the phone (ui/dist/)
BackendLua (client + server)
Persistenceoxmysql — phone_trade_* tables created automatically on startup
Languages2 locales/*.json files (en, fr)
ExtrasMigration from an old crypto app, automatic history cleanup, dark theme

The server recalculates prices on a regular interval, periodically saves price and portfolio snapshots to draw the charts, then automatically prunes data older than Config.MaxHistoryDays.

Next steps