Appearance
Artisan commands
The platform adds its own php artisan commands to Laravel's. Most run on their own through the scheduler or PM2. This page lists all of them, so you know what each one does before running it by hand.
Run commands in the project folder, as the web server user, so that files they create keep the right owner:
bash
cd /var/www/exchange
sudo -u www-data php artisan <command>Commands marked ⏱ run automatically from the scheduler, and ▶ run permanently under PM2. You only run those by hand to test or to catch up.
Accounts and roles
| Command | What it does |
|---|---|
role:manage {user} {role} {set|remove} | Give or remove a role. user is the ID or email. Roles: user, admin, content_editor, p2p_appeal_judge, user_editor, assets_editor, finance_manager, superadmin. Example: role:manage [email protected] superadmin set |
user-balance:update {email} {currency} {amount} | Change a user's available balance directly. A positive amount adds, a negative amount subtracts, and 0 sets the balance to zero. No transaction record is created, so prefer the admin panel. |
users:backfill-first-deposit [--userId=] [--dry-run] ⏱ | Record the USD value of users' first confirmed deposit |
reset-admin | Demo mode only: removes extra roles from demo accounts after 60 minutes |
Processes and monitoring
| Command | What it does |
|---|---|
pm:watcher [--dry-run] ⏱ | Keep PM2 in line with config/pm.php: start missing services, keep admin-stopped ones off, recreate changed ones, restart stuck workers. --dry-run only prints |
pm:ecosystem [--print] | Write the PM2 file storage/app/pm2/ecosystem.json (pm2w start it to start everything) |
pm:market-watcher ⏱ | Per-market liquidity processes (LIQ-<market>), only with PM_LIQUIDITY_MODE=per-market |
liquidity:binance [--shard=1/2] [--only=BTC-USDT,...] [--seconds=N] ▶ | Provider liquidity for every provider-backed market over one Binance connection |
liquidity:custom [--only=...] [--seconds=N] ▶ | Simulated liquidity for every custom-token market |
orders:trigger-stops --worker ▶ | Stop-limit / OCO stop / trailing-stop / TP/SL trigger (PM2 stop-trigger); also moves trailing stops with the price. Without --worker it's the scheduler's safety net and does nothing while the worker runs |
system-monitor:test [--alert] ⏱ | Check every service. With --alert, email the admin when something is offline. |
horizon ▶ | The queue workers |
market:order-process [--once] ▶ | Fills resting spot orders that the liquidity provider's moving prices now cross (at the maker fee) |
notifications:prune ⏱ | Deletes Notification Center items older than 90 days (daily 03:40) |
statements:prune ⏱ | Deletes account statement files older than 30 days, re-queues stuck ones (daily 03:40) |
bots:run [--once] ▶ | Runs users' Spot Grid and DCA trading bots every 2 seconds. --once = one pass |
market-watcher:stats-persistent ▶ | Market price tracker, with a persistent WebSocket connection |
futures:mark-price [--once] ▶ | Futures index and mark prices from Binance / OKX / Bybit / MEXC (plan 5). --once prints one update |
market-watcher:liquidation ▶ | Futures liquidations at the mark price: Isolated positions at their liquidation price, Cross positions by account equity; results go to the insurance fund (plan 5) |
futures:limit-order-process ▶ | Futures limit orders (plan 5) |
futures:tpsl-process ▶ | Futures take profit / stop loss (plan 5) |
peer-order:watcher ▶ | Cancel expired P2P orders (plan 5) |
options-watcher:process ▶ | Settle binary options (plan 5) |
market:run-liquidity {market} | Liquidity for one provider-backed market (per-market mode) |
market:custom-token-liquidity {market} | Liquidity for one custom-token market (per-market mode) |
market:run-liquidity-persistent {market} | Liquidity bot variant with a persistent WebSocket connection |
market-watcher:stats, market-watcher:stats-mexc | Older price trackers (Binance, MEXC). pm:watcher uses stats-persistent. |
Markets and charts
| Command | What it does |
|---|---|
markets:sparklines ⏱ | Rebuild the 24h mini-charts on the Markets page |
markets:sparklines-seed | Fill the mini-charts now with real 24h prices from Binance, MEXC or Bybit. Run once after installing. |
chart:warm-cache [--all] [--symbol=BTCUSDT] [--exchange=binance|mexc|bybit] ⏱ | Refresh cached external candles |
market-monitor:stats ⏱ | Save daily statistics to each market |
market:last-price-update ⏱ | Set liquidity markets' last price to Binance's previous close |
market:seed-prev | The same for every market |
market:fiat-currency-rates ⏱ | Update fiat exchange rates |
market:volume-generate {market} | Generate trading volume on a market (asks questions when run without a market) |
market:seed, market:demo-seed | Deletes all currencies and markets, then creates a sample set. Only for a fresh test install. |
market:seed and market:demo-seed erase data
Both commands start by emptying the currencies and markets tables. Never run them on a live exchange.
Matching engine
| Command | What it does |
|---|---|
matching-engine:status | Can the platform reach the Rust engine? |
matching-engine:check-sync ⏱ | Sync the engine if its books are empty but the database has orders |
matching-engine:sync [--market=] [--force] [--dry-run] | Load open orders from the database into the engine |
See Matching engine.
Deposits, withdrawals and hot wallets
| Command | What it does |
|---|---|
deposits:scan [networks...] ⏱ | Detect and credit deposits on every network with a scanner (ETH, ERC-20, BNB, BEP-20, Polygon, MATIC-20, TRX, TRC-20), or the given ones (slug or id). Scheduled once per network |
deposits:sweep [networks...] [--pause=5] [--retry] ⏱ | Move confirmed deposits to the hot wallet on every network with a sweeper (EVM chains, Tron, Solana). --retry also retries sweeps the bridge marked failed / fee_error (after topping up the hot wallet). Scheduled once per network |
withdrawals:sync [networks...] ⏱ | Finish withdrawals the bridges confirmed (paid out) or marked failed (refunded once) |
solana:monitor-sol-deposits, solana:monitor-spl-deposits ⏱ | Detect Solana deposits |
ripple:monitor-xrp-deposits | Detect XRP deposits. Not scheduled by default. |
ton:monitor-ton-deposits | Detect TON deposits by memo. Not scheduled by default. |
btc:monitor-custom-btc-deposits | Detect deposits on a custom Bitcoin node |
customtoken:handle-deposit, customtoken:handle-token-deposit, customtoken:token-transfer-pending, customtoken:handle-withdrawal, customtoken:sweep, customtoken:sync-system | Deposits, withdrawals, sweeps and hot-wallet sync for the custom chain. Not scheduled by default: uncomment them in app/Console/Kernel.php when you use a custom chain |
btc:brc-deposits-inscribing, btc:brc-deposits-inscribed, btc:brc-withdrawals-inscribing, btc:brc-withdrawals-inscribed | BRC-20 deposits and withdrawals on Bitcoin. Not scheduled by default (commented out in Kernel.php) |
withdrawal:automate ⏱ | Auto-approve covered withdrawals (needs ENABLE_AUTO_WITHDRAWALS=true) |
withdrawal:revert-approval {id} | Put a withdrawal that is stuck in Waiting provider approval back to Waiting approval, so it can be approved again. id is the withdrawal's withdrawal_id. Check on the block explorer first that nothing was sent. |
wallets:*-wallet-balance, wallets:fireblocks-balance ⏱ | Refresh hot-wallet balances (one per network) |
wallets:payeer-wallet-withdraw-automate, wallets:perfect-money-wallet-withdraw-automate ⏱ | Automatic Payeer and Perfect Money payouts |
wallets:retrieve-wallet-access {address} [json] | Print the private key of a user deposit address, to recover funds sent there by mistake. Treat the output as a secret. |
ripple:system-wallet-generate, ton:system-wallet-generate | Create a new XRP / TON hot wallet and save it. Overwrites the current key. |
ripple:refresh-system-wallet, ton:refresh-system-wallet | Create a new hot wallet and delete every user's memo. Overwrites the current key. |
bonus:process-deposits ⏱ | Award deposit bonuses (needs DEPOSIT_BONUS_ENABLED=true) |
Earn, futures, lending, P2P
| Command | What it does |
|---|---|
staking:rewards-calculate ⏱ | Add the day's reward to active stakes |
staking:status ⏱ | Complete matured stakes, return principal plus rewards |
launchpad:state-monitor ⏱ | Open and close sales by date and cap |
launchpad:claim-release {launchpad} | Release purchased tokens to every buyer of one launchpad (by ID) |
transaction:referral-credits ⏱ | Record multi-level referral commissions from new trades and credit them |
airdrops:distribute ⏱ | Pay airdrops whose payout time has passed (--id=ID for one campaign) |
referrals:evaluate ⏱ | Recalculate referral tiers (--all for everyone, --user=ID for one user) |
account-levels:evaluate ⏱ | Recalculate VIP levels of recently active users (--all for everyone, --user=ID for some users, --quiet-push to skip level-up pushes) |
copy-trading:watch [--once] [--max-time=0] ▶ | Copy trading watcher: mirrors imported lead traders, enforces whole-copy stop-losses, refreshes stats. Run it under PM2 yourself; it isn't in the automatic process list |
futures:funding-fees ⏱ | Charge or pay funding on due positions |
margin:interest ⏱ | One hour of interest on every open margin loan |
margin:monitor [--loop] [--sleep=10] ⏱ | Margin levels, margin calls and liquidations of margin accounts |
orders:trigger-stops [--seconds=55] [--every=3] ⏱ | Safety net: trigger stop-limit orders (spot and margin), trailing stops and TP/SL orders whose stop price has been reached, only while the stop-trigger worker isn't running |
futures:scheduled | Activate scheduled futures and close them when their time frame ends |
lending:interest-taker ⏱ | Charge loan interest |
lending:liquidation-watcher ⏱ | Liquidate under-collateralised loans |
peer-order-appeal:watcher ⏱ | Notify the admin about new P2P appeals |
peer-order:profile-stats ⏱ | Update P2P merchant statistics |
Merchant payments
| Command | What it does |
|---|---|
merchant:monitor-deposits [--network=] ⏱ | Check invoice payments with the shared deposit scanners (EVM chains, Tron, Solana); --network takes an id or slug |
merchant:monitor-btc-deposits ⏱ | Check Bitcoin invoice payments (TON / XRP invoices are found by the TON / XRP deposit monitors) |
merchant:sync-transfers ⏱ | Finish payouts, refunds and collections from bridge results; flag ones with no result for 2 hours as Needs review |
merchant:collect-funds [--network=] [--dry-run] ⏱ | Collect paid invoice funds with the shared sweepers |
merchant:process-webhooks [--pending] [--retry] ⏱ | Send and retry merchant webhooks |
merchant:retry-dead-letters | Retry webhooks that failed every attempt |
merchant:process-payouts [--limit=] ⏱ | Send approved merchant payouts (every 2 minutes, 10 at a time) |
merchant:process-refunds [--limit=] ⏱ | Send approved refunds (every 2 minutes, 10 at a time) |
Integrations and languages
| Command | What it does |
|---|---|
unlimit:sync-config ⏱ | Refresh the Unlimit (GateFi) configuration |
language:translation-seeder {language} | Load all texts from resources/lang/default.json into a language (by ID). Adds rows, so run it once per language. |
Seeders
php artisan db:seed --force runs DatabaseSeeder, which calls these in order. To run one alone, use its full class name:
| Seeder | Full class name | Adds |
|---|---|---|
| CoinTypeSeeder | Database\Seeders\Currency\CoinTypeSeeder | Coin types |
| RolesSeeder | Database\Seeders\Roles\RolesSeeder | The eight roles |
| CountriesSeeder | Database\Seeders\Countries\CountriesSeeder | Country list |
| LanguageSeeder | Database\Seeders\Language\LanguageSeeder | English plus 10 languages |
| DefaultSettingSeeder | Database\Seeders\Settings\DefaultSettingSeeder | Default settings |
| AccountLevelSeeder | Database\Seeders\Levels\AccountLevelSeeder | VIP 0–8 account levels |
| ReferralTierSeeder | Database\Seeders\Levels\ReferralTierSeeder | Referral tiers Starter–Diamond |
| MarginSeeder | Database\Seeders\Margin\MarginSeeder | Margin coins and pairs (margin trading stays off) |
| PagesSeeder | Database\Seeders\Pages\PagesSeeder | Starter pages (terms, privacy, fees…) |
| DerivNetworkSeeder | Database\Seeders\DerivNetworkSeeder | Networks |
| PayeerNetworkSeeder | Database\Seeders\PayeerNetworkSeeder | Payeer network |
| StakingLaunchpadSeeder | Database\Seeders\Demo\StakingLaunchpadSeeder | Demo staking products and launchpad sales |
PerfectMoneyNetworkSeeder (Database\Seeders\PerfectMoneyNetworkSeeder) isn't called by default. Run it if you offer Perfect Money:
bash
php artisan db:seed --class="Database\Seeders\PerfectMoneyNetworkSeeder" --forceEveryday maintenance
| Command | Use it to |
|---|---|
php artisan optimize:clear | Clear cached config, routes, views and events after an update |
php artisan config:clear | Apply .env changes |
php artisan horizon:terminate | Restart queue workers with new code or settings |
php artisan horizon:status | Check the workers |
php artisan queue:failed, queue:retry all | List and retry failed jobs |
php artisan schedule:list | See every scheduled task and its next run |
php artisan migrate --force | Apply database updates |
php artisan storage:link | Recreate the public/storage link |
php artisan ziggy:generate [file] | Regenerate a front-end route file (Building assets) |
php artisan down / up | Laravel's own maintenance page, which also blocks admins. Prefer the admin maintenance switch. |
