To generate an API key in your Binance account and integrate it with the Tradegrub app, follow these instructions:
Step 1: Navigate To API Management Screen
Step 2: Create a New API Key
Step 3: Add API Key to TradeGrub
- Log in to your Binance account at https://www.binance.com.
- Click on the Profile Icon at the top right of the screen.
- Select API Management from the dropdown menu.
Please AVOID selecting the "Withdrawal" or "Transfer" options when adding an API key, as these are not needed for our app to operate.
- Click on Create API.
- Enter a Label/Name for your API key to help you identify it (e.g., "Tradegrub").
- Complete the following prerequisites:
- Enable Two-Factor Authentication (2FA).
- Make a deposit to your Spot Wallet to activate your account.
- Verify your identity if not done already.
- Select the API key type:
- System-generated: Uses HMAC encryption. You will receive an API key and Secret Key.
- Self-generated: Uses Ed25519 or RSA asymmetric encryption, where you need to provide your public key to Binance.
- Verify using your 2FA device to proceed with API key creation.
- Once the key is generated, copy and store the API Secret Key securely. This secret will be displayed only once.
- For Security, it is highly recommended to whitelist specific IP addresses to safeguard your API key.
To whitelist our IP address, refer to the guide - Add Tradegrub IP
Important: Avoid using unrestricted settings, as they significantly reduce account security.
- Define the permissions of the key (e.g., read, trade).
¶ Sandbox: Configuring Binance Testnet API Key (Optional)
- Accessing the Spot Testnet: Begin by logging in to the Binance Spot Test Network website. You can do this by clicking the Log In with GitHub button.
- GitHub Authentication: Upon clicking, you will be redirected to the GitHub website. If you have a GitHub account, log in with your credentials. If not, you can easily create one.
- Click on Authorize Binance-exchange to grant access to the Binance Spot Testnet. This step ensures that you can seamlessly use the test environment.
- API Keys Generation: Once authorized, you will return to the Spot Test Network page, where you will find your testing API Keys. If you don't have any API Keys, click on "Generate HMAC_SHA256 Key" and follow the provided instructions to create one.
Important Note: API Secret Keys are only shown once. Make sure you save them securely, as they cannot be retrieved later.