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. 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 ↗2. 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:
curl -s https://api.ipify.orgAlternatively, you can simply search "what is my IP" in Google or use any online IP checking service.
3. 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.
4. 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:
byninja-trading-bot/src/trading/config/config_binance.pyReplace the following fields with your values:
BINANCE_API_KEY = "your_binance_api_key"BINANCE_API_SECRET = "your_binance_api_secret"