CAI Terminal — User Guide

Version: 1.0.1

Platform: Windows Desktop

Exchange: Bybit (Linear Perpetual Futures)

Website: caiterminalapp.com

Back to CAI Terminal main page


Table of Contents

  1. Overview
  2. System Requirements
  3. Installation & First Launch
  4. Login
  5. Main Interface Overview
  6. Settings
  7. Creating Orders
  8. Managing Active Positions
  9. Managing Limit Orders
  10. Risk Management System
  11. Analytics (Trade History)
  12. Statistics Panel
  13. Sub-Accounts Selection
  14. Auto-Refresh & Status Bar
  15. Automatic Updates
  16. Security
  17. Configuration File Reference
  18. Troubleshooting
  19. Glossary

1. Overview

CAI Terminal is a desktop trading terminal for the Bybit cryptocurrency exchange. It allows you to:


2. System Requirements

RequirementMinimum
Operating SystemWindows 10 / 11 (x64)
Runtime.NET 8 Desktop Runtime
InternetRequired (connects to Bybit API)
Screen Resolution1920 × 1080 recommended

3. Installation & First Launch

  1. Download the latest release from the CAI Terminal website.
  2. Extract the archive to any folder (e.g., C:\CAITerminal).
  3. Ensure appsettings.json is present in the same directory as the executable.
  4. Double-click CAITerminal.exe to launch.

On first launch you will be prompted to log in (see Login).


4. Login

When the application starts, a Login dialog appears:

FieldDescription
Telegram IDYour Telegram user ID used for authentication. Saved automatically after the first login so you don't need to re-enter it.
PINYour personal access PIN. Required every time you launch the application.
Note: The PIN is also used to encrypt/decrypt your API keys stored in appsettings.json. Never share your PIN.

5. Main Interface Overview

After login, the main window opens with the following layout:

Main Tabs

TabDescription
Active PositionsAll open positions across all sub-accounts.
Limit OrdersAll pending limit/conditional orders.
AnalyticsClosed trade history for a selected sub-account and date range.

Menu Bar

Menu ItemDescription
SettingsOpens the Settings dialog.
RefreshManually refreshes positions, limit orders, and statistics.
Check for UpdatesChecks for a newer version of the application.
User GuideOpens the online user guide in your browser.
Close TerminalExits the application.

6. Settings

Open settings via the menu bar → Settings.

6.1 General & Trading Settings

SettingDescriptionDefault
CategoryTrading category. Currently only linear (USDT perpetual futures).linear
Settle CoinSettlement currency: USDT or USDC.USDT
Time In ForceOrder TIF policy: IOC, GTC, FOK.IOC
SL/TP TriggerPrice type for SL/TP triggers: MarkPrice, LastPrice, or IndexPrice.MarkPrice
LeverageDefault leverage for all new orders (1–125×).10
Risk PercentsSelectable risk multipliers for order sizing (e.g., 100%, 75%, 50%, 25%).100, 75, 50, 25
Use Market as LimitWhen enabled, market orders are sent as limit orders with a price offset to reduce fees.false
Tick Size For Limit OrderNumber of tick-size increments to offset price when "Use Market as Limit" is on.3
Set Main TP On All PositionsBroadcast main Take Profit to the same symbol on all sub-accounts.false
Set Main SL On All PositionsBroadcast main Stop Loss to the same symbol on all sub-accounts.false
Add Partial TP On All PositionsBroadcast partial TP across all sub-accounts (only % and price shown).true
Cancel Limit Orders On Position CloseWhen cancelling a limit order, also cancel all limit orders for that symbol across sub-accounts.true
Positions Refresh Interval (sec)Auto-refresh interval in seconds. Range: 5–3600.300

Click Save to persist. Settings are written to appsettings.json.

6.2 Sub-Accounts

Navigate to the Sub-Accounts tab in Settings. Each sub-account represents one Bybit API key pair.

Add a Sub-Account

  1. Click Add.
  2. Fill in the fields:
FieldDescription
Exchange NameCurrently only Bybit.
Environmentlive (real trading) or demo (testnet).
Use In New OrderIf checked, this account participates when you place a new order.
NameA short identifier (e.g., "Main Account", "Strategy A").
DescriptionOptional longer description.
API KeyYour Bybit API key.
API SecretYour Bybit API secret.
Order Amount (USDT)Base order size (see Order Sizing).
Use Amount as SL AmountTreat Order Amount as risk (max loss) amount — see Order Sizing.
Max Trades Per DayMaximum number of trades (open + closed) allowed per day.
  1. Click Save. API keys are encrypted with your PIN before being stored.

Edit / Delete a Sub-Account

6.3 Risk Management (Per Sub-Account)

Each sub-account has its own risk management configuration inside the RiskManagement section. This is configured in appsettings.json directly or through the Sub-Account editor. See Risk Management System for full details.


7. Creating Orders

  1. Click the Create New Order button on the right side.
  2. Risk management checks run automatically for all sub-accounts before the order form opens. Accounts that fail are unchecked and a summary is shown.
  3. The order creation panel appears.

7.1 Market Orders

If Use Market as Limit is enabled, the market order is sent as a limit order offset by the configured tick size to reduce fees while still ensuring execution.

7.2 Limit Orders

7.3 Direction (Long / Short)

7.4 Risk Percent

Select a Risk Percent from the dropdown. This scales the sub-account's Order Amount:

Only percentages enabled in Settings appear.

7.5 Stop Loss & Take Profit on Order Creation

Optionally set Stop Loss and Take Profit directly on the order.

Validation:

7.6 Order Sizing: Standard vs. SL-Based

There are two modes per sub-account, controlled by UseOrderAmountAsStopLossAmount.

Standard Mode (UseOrderAmountAsStopLossAmount = false)

The Order Amount is used directly as the notional value.

SL-Based (Risk) Mode (UseOrderAmountAsStopLossAmount = true)

This ensures that if Stop Loss is hit, the maximum loss equals the Risk Amount. Requires a Stop Loss to be set.

If Auto-Adjust Risk to Remaining Daily Limit is enabled, the Risk Amount is further capped at the remaining daily risk budget (see section 10.4).

Placing the Order

Click Place Order. The order broadcasts to all checked sub-accounts.

Important: If no sub-accounts are checked, you'll see a warning.

8. Managing Active Positions

8.1 Positions Grid

The Active Positions tab displays all open positions grouped by sub-account:

ColumnDescription
+/−Expand/collapse to see partial Take Profit orders.
SubaccountSub-account name (group header). Hover to see balance.
SymbolTrading pair (e.g., BTCUSDT).
DirectionLong (green) or Short (red).
QtyPosition size.
Entry PriceAverage entry price.
Stop LossCurrent SL price (or "−").
Take ProfitCurrent main TP price (or "−").
Projected PnLEstimated PnL if main TP is hit.
PnLCurrent unrealized P&L (green = profit, red = loss).
CloseButton to open the Close Position panel.

Right-click on any position row to open the context menu:

Menu ItemAction
Add Take ProfitOpen the Partial TP panel.
Main Take ProfitSet/change the main TP.
Main Stop LossSet/change the main SL.
Close PositionOpen the Close Position panel.

8.2 Set Main Take Profit

  1. Right-click → Main Take Profit.
  2. Enter the TP price.
  3. Click Set Take Profit.

If Set Main TP On All Positions is enabled, the TP is applied to the same symbol/direction on all sub-accounts.

8.3 Set Main Stop Loss

  1. Right-click → Main Stop Loss.
  2. Enter the SL price.
  3. Click Set Stop Loss.

Same broadcast logic as TP when "Set Main SL On All Positions" is enabled.

8.4 Add Partial Take Profit

Partial TPs close a portion of your position at a specified price.

  1. Right-click → Add Take Profit.
  2. The panel shows:
  1. Click Set Partial TP.

Validation:

If Add Partial TP On All Positions is enabled, only the % slider and TP price are shown; quantity is calculated per sub-account individually.

8.5 Close Position

  1. Right-click → Close Position, or click the Close button in the grid.
  2. Adjust the quantity via slider (0–100%) or manual entry.
  3. Estimated PnL is shown based on last price.
  4. Click Close Position → confirm with Yes.

A market close order is placed for the specified quantity.

8.6 Expand Position Details

Click + on a position row to query all partial Take Profit orders:

ColumnDescription
TP #Sequential number.
QtyQuantity for this TP.
PriceTrigger price.
ProfitProjected profit.
DeleteCancel this partial TP order.

Click to collapse.

8.7 Sub-Account Balance Tooltip

Hover over a sub-account header row. After ~250ms, a tooltip shows:

Fetched live from Bybit.


9. Managing Limit Orders

9.1 Limit Orders Grid

ColumnDescription
SubaccountSub-account name.
SymbolTrading pair.
DirectionBuy or Sell.
QtyOrder quantity.
Trigger %Distance from current price to trigger (%).
Entry PriceLimit/trigger price.
Stop LossSL on order (or "−").
Take ProfitTP on order (or "−").
CancelButton to cancel the order.

9.2 Set TP / SL on Limit Orders

  1. Right-click → Take Profit or Stop Loss.
  2. Enter the price → click the button.

This modifies the existing order on Bybit.

9.3 Cancel a Limit Order

Click Cancel on the row, or right-click → Cancel Order.

If Cancel Limit Orders On Position Close is enabled and multiple limit orders exist for the same symbol, you'll be prompted to cancel all of them at once.


10. Risk Management System

CAI Terminal includes a comprehensive per-sub-account risk management system that runs automatically before every order creation. When you click "Create New Order", the system checks each sub-account and disables (unchecks) any that violate the rules.

10.1 Daily Loss Limit

Controls how much you can lose in a single trading day.

SettingDescription
DailyLoss.EnabledEnable/disable daily loss checking. Default: true.
DailyLoss.Type"Amount" — fixed dollar limit. "Percent" — percentage of wallet balance.
DailyLoss.AmountMaximum daily loss in USDT (when Type = Amount). Default: 100.
DailyLoss.PercentOfBalanceMaximum daily loss as % of wallet (when Type = Percent). Default: 1.
DailyLoss.MaxLosingTradesPerDayMax number of losing trades allowed per day. Default: 3.

Example: If Type = "Amount" and Amount = 100, and your closed PnL today is −$105, the account is disabled.

10.2 Maximum Trades Per Day

SettingDescription
MaxTradesPerDayTotal trades allowed per day (closed + open positions + open limit orders). Default: 5.

Example: If you have 2 closed trades, 2 open positions, and 1 open limit order = 5 total. No more orders can be placed.

10.3 Losing Days Protection

Prevents trading after consecutive losing days.

SettingDescription
LosingDaysProtection.EnabledEnable/disable. Default: true.
MaxConsecutiveLosingDaysTrigger after this many consecutive losing days. Default: 3.
CooldownDaysDays to wait before trading resumes. Default: 2.

10.4 Auto-Adjust Risk to Remaining Daily Limit

SettingDescription
AutoAdjustRiskToRemainingDailyLimitWhen enabled, the risk amount per trade is automatically reduced if the remaining daily budget is less than the configured order amount. Default: true.

How it works:

  1. The system calculates: Remaining Risk = Allowed Daily Loss − |Today's Realized Loss|
  2. If Remaining Risk < Risk Amount, the Risk Amount is capped to Remaining Risk
  3. If Remaining Risk ≤ 0, the order is blocked entirely

10.5 How Risk Checks Work

When you click Create New Order:

  1. Daily Loss check — Has today's PnL exceeded the limit?
  2. Max Losing Trades — Have you hit the max losing trades for today?
  3. Max Trades Per Day — Have you reached the total trade cap (closed + open + limit)?
  4. Losing Days Protection — Are you in a consecutive-loss cooldown period?

If any check fails for a sub-account:

Tip: Accounts disabled by risk management can be manually re-enabled in the Sub-Accounts list or Settings. However, they will be disabled again on the next order creation if conditions haven't changed.

11. Analytics (Trade History)

  1. Switch to the Analytics tab.
  2. Select a sub-account (only one at a time).
  3. Set From and To dates.
  4. Click Get Trades.

The grid shows closed trades grouped by Symbol + Entry Price:

ColumnDescription
SymbolTrading pair.
Created DateWhen opened.
Closed DateWhen closed.
DirectionLong or Short.
Order QtyTotal closed quantity.
Avg Entry PriceAverage entry.
PnLRealized P&L (green/red).

Statistics update to show:


12. Statistics Panel

Located on the right side, always visible:

LabelDescription
Open Positions PnLTotal unrealized PnL across all positions/sub-accounts.
Positions #Number of open positions.
Weekly PnLTotal realized PnL this week (Monday–now).
Monthly PnLTotal realized PnL this month.

Click any label to manually refresh.

When the Analytics tab is active, statistics reflect the filtered trade history instead.

13. Sub-Accounts Selection

On the right panel, the Sub-Accounts tab shows a checklist:

Header shows count: Sub-Accounts (3/5) = 3 of 5 selected.

Changes are saved to appsettings.json immediately.

Accounts may be automatically unchecked by the risk management system when risk limits are breached.

14. Auto-Refresh & Status Bar

Auto-Refresh

Positions, limit orders, and statistics refresh automatically at the configured interval (default: 300 seconds).

Status Bar


15. Automatic Updates

On startup, the application checks for a newer version. If found:

Manual check: menu → Check for Updates.


16. Security

Never share your appsettings.json file — it contains encrypted API credentials.

17. Configuration File Reference

All settings are in appsettings.json.

Full Settings Reference

PathTypeDescription
PositionsRefreshIntervalSecondsintAuto-refresh interval (5–3600).
Trading.CategorystringProduct category (linear).
Trading.SettleCoinstringUSDT or USDC.
Trading.TimeInForcestringIOC, GTC, or FOK.
Trading.SLTPTriggerstringMarkPrice, LastPrice, IndexPrice.
Trading.LeverageintDefault leverage (1–125).
Trading.RiskPercentsint[]Available risk multipliers.
Trading.UseMarketOrderAsLimitOrderboolSend market as limit with offset.
Trading.TickSizeForLimitOrderintTick offset for market-as-limit.
Trading.SetMainTPOnAllPositionsboolBroadcast main TP to all sub-accounts.
Trading.SetMainSLOnAllPositionsboolBroadcast main SL to all sub-accounts.
Trading.AddPartialTPOnAllPositionsboolBroadcast partial TP to all sub-accounts.
Trading.CancelLimitOrdersOnPositionCloseboolBatch-cancel same-symbol limit orders.
SubAccounts[].Environmentstringlive or demo.
SubAccounts[].UseInNewOrderboolInclude in order broadcast.
SubAccounts[].RiskManagement.OrderAmountdecimalBase order/risk amount (USDT).
SubAccounts[].RiskManagement.UseOrderAmountAsStopLossAmountboolSL-based sizing mode.
SubAccounts[].RiskManagement.AutoAdjustRiskToRemainingDailyLimitboolCap risk to daily budget.
SubAccounts[].RiskManagement.MaxTradesPerDayintMax trades per day.
SubAccounts[].RiskManagement.DailyLoss.EnabledboolEnable daily loss limit.
SubAccounts[].RiskManagement.DailyLoss.TypestringAmount or Percent.
SubAccounts[].RiskManagement.DailyLoss.AmountdecimalFixed daily loss limit ($).
SubAccounts[].RiskManagement.DailyLoss.PercentOfBalancedecimalDaily loss as % of wallet.
SubAccounts[].RiskManagement.DailyLoss.MaxLosingTradesPerDayintMax losing trades per day.
SubAccounts[].RiskManagement.LosingDaysProtection.EnabledboolEnable losing-days cooldown.
SubAccounts[].RiskManagement.LosingDaysProtection.MaxConsecutiveLosingDaysintTrigger threshold.
SubAccounts[].RiskManagement.LosingDaysProtection.CooldownDaysintCooldown period.
Security.TelegramIdstringTelegram user ID for auth.

18. Troubleshooting

ProblemSolution
Login failsVerify Telegram ID and PIN. Check internet connectivity.
"Failed to get positions/orders"Check API keys, permissions (Trade, Read), and Environment (live vs demo).
"Set leverage failed"Symbol may not support the configured leverage. Reduce in Settings.
"Order quantity is TOO SMALL"Increase Order Amount in Sub-Account settings.
"Stop Loss Required"Account uses SL-based sizing. Set a Stop Loss before placing the order.
"No remaining daily risk budget"Daily loss limit reached. Wait until tomorrow or increase the limit in settings.
Sub-account keeps getting uncheckedRisk management rules are blocking it. Check Daily Loss, Max Trades, and Losing Days settings.
"Trades today reached limit"Max Trades Per Day includes open positions + open limit orders + closed trades.
Positions not updatingCheck countdown in status bar. Click PnL label to force refresh.
API keys appear garbledKeys are encrypted. Re-enter in Sub-Account editor if PIN changed.
Application won't startEnsure .NET 8 Desktop Runtime is installed. Verify appsettings.json is valid JSON.

19. Glossary

TermDefinition
Linear PerpetualA futures contract settled in USDT/USDC with no expiry date.
LongA position that profits when price rises.
ShortA position that profits when price falls.
Take Profit (TP)Auto-closes position at a profitable price.
Stop Loss (SL)Auto-closes position to limit losses.
Partial Take ProfitCloses only a portion of the position at a price.
PnLProfit and Loss.
LeverageMultiplier amplifying gains and losses.
Mark PriceFair-value price calculated by exchange, prevents manipulation.
IOCImmediate-Or-Cancel: fill what you can, cancel the rest.
GTCGood-Till-Cancel: stays active until filled or cancelled.
FOKFill-Or-Kill: must fill entirely or not at all.
Trigger/Conditional OrderActivates only when price reaches a trigger level.
Tick SizeMinimum price increment for a trading pair.
Daily Loss LimitMax allowed realized loss per day before trading is blocked.
CooldownForced waiting period after consecutive losing days.
Risk BudgetRemaining daily loss allowance = Daily Limit − Today's Losses.

Back to CAI Terminal main page