The Challenge
Risk managers need a unified view of exposure across all trading platforms. Each platform reports margin, equity, and positions differently, making real-time aggregation complex.
Aggregate risk exposure across MetaTrader 4, MetaTrader 5, cTrader, and B2Trader. Monitor margin levels, track open positions, and receive streaming alerts through a single API.
Get StartedRisk managers need a unified view of exposure across all trading platforms. Each platform reports margin, equity, and positions differently, making real-time aggregation complex.
WebAPI normalizes margin level data, position details, and account metrics into a consistent schema. The Realtime Service provides streaming updates for immediate risk monitoring.
// Monitor margin levels across all platforms in real-time
const accounts = await webapi.accountService.ReadBatchMarginLevel({
items: [
{ platform: Platform.MT4, login: 10001 },
{ platform: Platform.MT5, login: 20001 },
{ platform: Platform.CTRADER, login: 30001 },
{ platform: Platform.B2TRADER, login: 40001 },
]
});
for (const acc of accounts.items) {
if (acc.marginLevel < 150) {
console.warn(`⚠️ Low margin: ${acc.login} at ${acc.marginLevel}%`);
// Trigger risk alert
await alertService.notify({
level: 'WARNING',
account: acc.login,
platform: acc.platform,
marginLevel: acc.marginLevel
});
}
}(Equity / Margin) × 100%Monitor across all platforms in real-time
Configurable per group, typically 50-100%WebAPI reports via GroupService
Equity - MarginAvailable for new positions
// Subscribe to account updates for margin monitoring
const stream = webapi.realtimeService.Subscribe({
subject: Subject.ACCOUNTS,
selectors: [Selector.UPDATE],
});
for await (const event of stream) {
const account = event.account;
if (account.marginLevel > 0 && account.marginLevel < threshold) {
triggerAlert(account);
}
}| Data Point | Description | Update Frequency |
|---|---|---|
| Margin Level | Equity/Margin ratio | Real-time |
| Free Margin | Available margin | Real-time |
| Equity | Account equity | Real-time |
| Balance | Account balance | On change |
| Open P&L | Unrealized profit/loss | Real-time |
| Open Positions | Count of open positions | On change |
| Pending Orders | Count of pending orders | On change |
| Used Margin | Margin in use | Real-time |
ReadMarginLevel, ReadBatchMarginLevel
open positions across platforms
streaming position and account updates
pending order monitoring
Risk management systems can aggregate exposure from 1,000+ accounts across 4 platforms with sub-second latency.
Monitor risk exposure across MT4, MT5, cTrader, and B2Trader from a single dashboard with real-time streaming.
Get Started