Prime Trading Bot - FAQ

📚 Frequently Asked Questions

1️⃣ How to obtain Binance API keys (Mainnet & Testnet)

Mainnet (Live Trading)

  1. Log into Binance → Dashboard → API Management.
  2. Create a new API key (e.g., PrimeBot).
  3. Set Permissions:
    • Enable Spot Trading
    • Disable withdrawals
    • (Optional) Enable Read Only
  4. Copy and securely save your API Key and Secret Key.

Testnet (Sandbox Trading)

  1. Go to Binance Testnet.
  2. Register or log in and create a Testnet API Key.
  3. Use endpoint https://testnet.binance.vision/api.
  4. Paste keys into PrimeTradingBot config.

⚠️ Note: Make sure you use the correct environment (Mainnet vs Testnet).

2️⃣ How to use FileZilla for file transfer (instead of command-line)

If you prefer a GUI over command-line tools (scp, sftp), you can connect to your EC2 instance using FileZilla with your PEM key file.

Steps to connect with FileZilla (EC2 + Key File)

  1. Install FileZilla Client.
  2. Open FileZilla → File → Site Manager → New Site.
  3. Set:
    • Protocol: SFTP – SSH File Transfer Protocol
    • Host: your EC2 IPv4 (e.g., 18.222.33.44)
    • Port: 22
    • Logon Type: Key file
    • User: ubuntu (or your AMI default user)
    • Key file: your .pem file from EC2 setup

Refer to:

Once connected, use the left panel for local files and the right panel for EC2 files. Drag & drop to upload or download.

💡 Tip: Ensure your EC2 instance is running. If FileZilla rejects your key, set the PEM file to read-only.

3️⃣ GUI Connects but the bot does not start after pressing “Start Bot”

If you connected successfully in the GUI (via the Connect button) but the bot does not start when you press Start Bot — or the GUI shows no activity even though the server is running — this likely means the trading service is not active.

✅ To fix this, restart the bot service manually:

sudo systemctl restart trading_bot

Alternatively, you can run the Auto Script and choose option 8 (Restart Bot).

This will restart the background process and re-sync the GUI connection.

4️⃣ How can I find the IP address of my server?

There are two easy ways to find your server's public IP address:

Method 1 — Check the autoscript log

When you run the Auto Script during EC2 setup, it writes connection details into the log file. Open the autoscript log and look for a line showing your public IPv4 address, for example:

Server public IP: 18.222.33.44

Method 2 — EC2 Console

  1. Sign in to the AWS Management Console and open the EC2 Console.
  2. In the left menu, choose Instances.
  3. Select your instance; the Public IPv4 address appears in the details pane.
5️⃣ I see the bot is holding a very small amount of an asset (shown in the Status panel), and it cannot place any new buy/sell orders for that coin. Why?

In rare cases, the bot may not be able to sell an asset completely due to the order matching process on Binance. As a result, a very small remaining balance — commonly referred to as dust — may remain in your account.

If such dust remains, the bot will not be able to place a new buy order (and it also cannot sell the remaining amount, since it is below Binance’s minimum trade limit).

Although the bot includes an automatic process to detect and remove dust, in some situations — particularly when trading pairs with low liquidity or low volume — a small amount of dust may still persist in the bot’s internal state (estimated probability below 0.5%).

👉 If this occurs, please use the “Panic Sell” command in the client application for that specific trading pair to release the asset state and allow the bot to continue trading normally.

6️⃣ How should I configure the bot for the best balance between profit and safety?

🎯 Objective

Optimize profit by buying during small dips and taking small but frequent profits. This setup focuses on balance — maximizing gain while keeping capital risk low.

⚙️ Suggested Configuration

  • Trading Pairs: Choose 1–3 pairs (e.g., BTC/USDT, ETH/USDT, BNB/USDT). Profit is taken in USDT.
  • Base Order Size: 50–100 USDT (about 5–10 % of total capital).
  • Safety Order Volume Scale: 1.5 – 2 × (each safety order increases in volume to lower the average entry faster).
  • Safety Order Step Scale: 2.0 (spacing between safety orders doubles, e.g., 0.5 % → 1 % → 2 %).
  • Max Safety Orders: 3–5 (controls risk and total capital usage).
    👉 If the bot has used all SOs and price continues dropping, you may increase this limit manually when conditions are favorable.
  • Target Profit: 1–2 % per deal — small but frequent profits (scalping).

⚙️ Optional Settings

  • Stop Loss: ~ 5 % (below the last Safety Order, e.g., –5.5 % if the last SO is at –3.5 %).
    You may disable Stop Loss for a near-zero-risk DCA strategy — fewer trades but higher safety for your funds.
  • Take Profit Options: Use TP1 (100 % sell) or enable Trailing Take Profit to capture extra profit if price keeps rising.

📈 Deal Start Conditions

  • MACD: MACD line < 0 and crossing above Signal line (for Long entries).
  • RSI: RSI-14 < 30 (oversold zone).
  • ADX: Optional confirmation for trend strength.
  • etc.

Max Active Deals: 1–2 (to limit simultaneous positions and manage capital efficiently).

💡 Why This Works

  • Smart DCA: Safety Orders take advantage of pullbacks to reduce the average entry price.
  • Frequent Small Gains: 1–2 % targets fit short-term volatility and allow quick turnover.
  • Risk Control: Stop Loss and Max SO settings limit exposure in deep downtrends.
  • Technical Entry: MACD and RSI signals help catch likely reversal zones.

⚠️ Notes

Monitor performance and adjust Target Profit or Stop Loss as market volatility changes.

If you trade on small timeframes (e.g., 5 m – 15 m candles), expect smaller price swings — keep profit targets around 0.5 – 2 %.

7️⃣ I accidentally lost my .pem key file. How can I reconnect to my EC2 server (SSH or FileZilla)?

Unfortunately, if you have lost the .pem key file that was created when you launched your EC2 instance, you cannot recover it. AWS does not store or back up private keys for security reasons — the key file is only available once when the key pair is created.

🔒 1. Why the key file cannot be recovered

When you create a key pair in AWS, the private key (.pem) is generated once and immediately downloaded. AWS never keeps a copy of it. Without that file, SSH or SFTP (FileZilla) access to the current instance will no longer work — unless you had a backup.

🛠️ 2. How to regain access

You can create a new key pair and attach it to your instance using one of the methods below.

Option 1 — Create a new key pair and launch a replacement instance
  1. Create a new key pair:
    Go to AWS Console → EC2 → Key Pairs → Create key pair.
    Name it and download the new .pem file securely.
  2. Stop your current instance:
    EC2 → Instances → Select your instance → Stop instance.
    (Do not terminate it.)
  3. Create a snapshot and AMI:
    From the instance’s root volume, create a snapshot.
    Then create a new AMI (Amazon Machine Image) from that snapshot.
  4. Launch a new instance:
    Use that AMI to launch a new instance.
    When prompted, select your new key pair.
  5. Connect using the new key:
    ssh -i new-key.pem ubuntu@<public-ip>
    *(Replace ubuntu with ec2-user or your AMI’s default username.)*
  6. Optional: After confirming the new instance works, you may terminate the old one to avoid additional costs.
Option 2 — Use EC2 Instance Connect (if available)

If your instance supports EC2 Instance Connect or has the SSM Agent enabled, you can log in directly from the AWS Console without the .pem file, then manually add a new public key to ~/.ssh/authorized_keys.

⚙️ 3. Using AutoScript after creating a new key

If you are using the AutoScript to manage or connect to your instance (as described in Quick Start GUI), you need to update your configuration before running it again:

  • Rename the newly created .pem key file to trading-bot-key.pem (the default name expected by the script).
  • Edit the file instance_info.txt in your AutoScript folder and update:
    • The .pem key name (should match the renamed file).
    • The Public IP of your new EC2 instance.
  • After saving the changes, you can run AutoScript normally to connect, deploy, or restart the bot on the new server.

⚠️ Best Practice

Always back up your .pem key file securely — store it in an encrypted folder, password-protected cloud drive, or external device. Once lost, AWS cannot recreate or resend it.