Binance Setup

To use the ByNinja bot, you must have an active Binance account. Follow these steps to set up your account and generate secure API keys.

1. Create a Binance Account

If you don't have an account yet, please register using our partner link. This gives you a discount on trading fees and supports the continuous development of the bot.

2. Go to API Management

Log in to your Binance account and navigate to the API Management section in your profile settings.

Open Binance API Management ↗

3. Create API Keys & Restrict IP

Click "Create API" (choose System generated). For maximum security, we highly recommend restricting the API key to your home's public IP address.

You can quickly find your public IP address using your terminal:

Code
curl -s https://api.ipify.org

Alternatively, you can simply search "what is my IP" in Google or use any online IP checking service.

4. Set API Permissions

By default, your API key will only have "Reading" enabled. You MUST edit restrictions and check "Enable Spot & Margin Trading". Keep "Enable Withdrawals" DISABLED for your own security.

5. Add Keys to Bot Config

Open the bot's configuration file and paste your newly generated API Key and Secret Key into the appropriate fields.

File path:

Code
byninja-trading-bot/src/trading/config/config_binance.py

Replace the following fields with your values:

Code
BINANCE_API_KEY = "your_binance_api_key"
Code
BINANCE_API_SECRET = "your_binance_api_secret"