๐Ÿค– How To Use AI Trading Bot

Complete guide to setting up and running your automated OKX trading bot

๐Ÿ“– Table of Contents

  1. Prerequisites
  2. Getting OKX API Keys
  3. Connecting the Bot
  4. Configuring Trading Settings
  5. Starting the Bot
  6. Monitoring Your Trades
  7. Understanding the Interface
  8. Troubleshooting
  9. Best Practices
  10. Important Risks
  11. Legal Disclaimer

โœ… 1. Prerequisites

Before you start, make sure you have:

๐Ÿ’ฐ About OKX fees: OKX charges 0.10% per side (Taker), which is 0.20% per trade (buy + sell). This is significantly lower than Kraken's 0.80% per side.

โš ๏ธ Never trade more than you can afford to lose. Cryptocurrency trading is high risk.

๐Ÿ”‘ 2. Getting OKX API Keys

Step 2.1 โ€” Create API Key on OKX

  1. Log in to your OKX account
  2. Click your profile icon (top right) โ†’ API
  3. Click "Create V5 API Key"
  4. Give your key a name (e.g., "AI Trading Bot")
  5. Set the following permissions:
Permission Required? Purpose
Read Required Read account balance
Trade Required Place buy/sell orders
Withdraw NOT needed โš ๏ธ Never enable for a bot

Step 2.2 โ€” Set Passphrase

OKX requires a Passphrase in addition to API Key and Secret Key. This is a password you create yourself.

Rules:

๐Ÿšจ Save the Passphrase immediately! OKX cannot recover it. If you lose it, you must create a new API key.

Step 2.3 โ€” Add Trusted IP (Recommended)

Add your server's IP address to the whitelist. This prevents anyone else from using your API key even if it leaks.

๐Ÿ”’ Why this matters: Without IP restriction, OKX will automatically delete your API key after 14 days of inactivity if it has Trade permissions. With IP restriction, the key stays permanent.

Step 2.4 โ€” Copy Your Keys

After creating, you'll see three values:

๐Ÿšจ Save all three immediately! OKX shows the Secret Key only once. If you lose it, you must create a new API key.

๐Ÿ”Œ 3. Connecting the Bot

Step 3.1 โ€” Open the dashboard at /dashboard.php
Step 3.2 โ€” Locate the "OKX API" panel on the left side
Step 3.3 โ€” Click the โš™๏ธ gear icon to open the API form
Step 3.4 โ€” Paste your API Key, Secret Key, and Passphrase
Step 3.5 โ€” Click Save

You should now see:

โœ… Connected โ€” green indicator next to "OKX API"

โš™๏ธ 4. Configuring Trading Settings

๐ŸŽฏ Take Profit %

Auto-sell when profit reaches this percentage net after fees. Lower = more trades, quicker wins. Higher = fewer trades, bigger gains.

Recommended: 3.0% โ€” accounts for OKX's 0.20% round-trip fee.

๐Ÿ›‘ Stop Loss %

Auto-sell when loss reaches this percentage net after fees. Protects capital from large drawdowns.

๐Ÿ’ฐ Trade Size (USD)

How much USD to spend on each trade.

๐Ÿ“Š Max Trades

Maximum number of positions open at the same time.

๐ŸŽฏ Threshold %

Minimum price movement to trigger a trade signal.

โฑ๏ธ Max Hold (min)

Auto-close a position if TP/SL is not hit within this time. Prevents capital from getting stuck.

Recommended: 240 min (4 hours)

Save Your Settings

Click the Save settings button at the bottom of the Trading Settings panel.

๐Ÿš€ 5. Starting the Bot

โš ๏ธ You must have BOTH tabs open for the bot to work:

  1. Open index.php in a new tab
  2. Wait for the AI to load (30-60 seconds)
  3. Return to dashboard.php
  4. Select a symbol from the dropdown in the navbar
  5. Click the green Start button

You should see:

๐Ÿ“Š 6. Monitoring Your Trades

Top Stats Bar

StatMeaning
Bot StatusActive (running) or Stopped
Current PriceLive price of selected symbol
Open PositionsNumber of active trades
24h PnLProfit/loss in last 24 hours
Total PnLCumulative profit/loss

Open Positions

Each card shows:

Trading History

Shows closed positions with:

๐Ÿง  7. Understanding the Interface

Signal Flow

  1. index.php runs the LSTM neural network
  2. AI generates a strong buy signal (only BUY signals โ€” SELL is handled by auto-sell)
  3. Signal is saved to the database
  4. dashboard.php reads the signal
  5. Trade is executed via OKX API
  6. Position appears in Open Positions
  7. Auto-sell monitors TP/SL every 15 seconds
  8. When closed, moves to Trading History

Bot Behavior

๐Ÿ”ง 8. Troubleshooting

โŒ "OKX API: Not configured"

Fix: Add your API keys via the โš™๏ธ icon in the OKX API panel. All three fields required: API Key, Secret Key, Passphrase.

โŒ "50119 โ€” API key doesn't exist"

Fix: Your server is trying to reach the wrong OKX domain. For EEA (Europe), it must use eea.okx.com, not www.okx.com. Contact support if this persists.

โŒ "50113 โ€” Invalid sign"

Fix: Your Secret Key or Passphrase is wrong. Re-paste both from OKX. Ensure there are no extra spaces.

โŒ "50111 โ€” Invalid API key"

Fix: The API Key is wrong. Re-copy it from OKX.

โŒ "51008 โ€” Insufficient balance"

Fix: Deposit more USDT on OKX. Minimum required = Trade Size + fees.

โŒ "51000 โ€” Parameter error"

Fix: Order parameters are wrong. Check that the symbol exists on OKX and trade size is valid.

โŒ Bot doesn't open trades

Check:

โŒ Trades not closing

Check:

๐Ÿ’Ž 9. Best Practices

โš ๏ธ 10. Important Risks

๐Ÿšจ Trading involves risk of loss. Never trade more than you can afford to lose.

Bot Limitations

Market Risks

๐Ÿ’ก Fee calculation example:
Trade size: $7 USDT
Buy fee: $7 ร— 0.10% = $0.007
Sell fee: $7 ร— 0.10% = $0.007
Total fee per trade: ~$0.014 (0.20%)

AI-Specific Risks

๐Ÿ’ก Remember: This is an educational tool. For serious trading, always consult a financial advisor and consider professional risk management.

๐Ÿ“Œ Important โ€” please read carefully

Our Role

This website and its software ("the Tool") is provided for educational and informational purposes only. We provide a software tool that generates AI-based trading signals. We are NOT:

Your Responsibility

All trading decisions and all orders are made by you, using your own account at a third-party exchange (e.g., OKX), with your own funds. You are solely responsible for:

No Crypto-Asset Services

We do NOT provide crypto-asset services within the meaning of MiCA. Specifically, we do NOT:

All users trade for their own account, using their own exchange accounts. We do not act as agent, counterparty, or intermediary in any transaction.

No Financial Advice

Nothing on this website constitutes financial, investment, legal, or tax advice. All signals, predictions, and analyses are automatically generated and should be treated as informational only. Always do your own research before making any trading decision.

Third-Party Services

This Tool interacts with third-party exchanges (e.g., OKX) via API. We are not affiliated with, owned by, or endorsed by OKX or any other exchange. All trades are executed by the exchange under the exchange's own terms and conditions. You are responsible for reading and complying with those terms.

Limitation of Liability

To the fullest extent permitted by law, we disclaim all liability for any direct, indirect, incidental, or consequential losses arising from your use of this Tool, including but not limited to trading losses, missed opportunities, data loss, or service interruptions.

No Warranty

This Tool is provided "as is" and "as available", without any warranty of any kind, express or implied, including but not limited to fitness for a particular purpose or non-infringement.

Changes to This Disclaimer

We may update this disclaimer at any time. Continued use of the Tool after changes constitutes acceptance of the updated terms.

โš ๏ธ By using this Tool, you acknowledge that you have read, understood, and agreed to this disclaimer.