How to connect to Binance with API Keys

To allow your bot to interact with Binance, you will need to create an API Key. This key acts as a connection between Microgain and the exchange, enabling your bot to perform tasks such as placing automated orders and accessing your balance for its calculations. Essentially, the API Key serves as a way for your bot to communicate with the exchange and execute the actions necessary for automated trading.

You might encounter an error in Microgain's onboarding process when connecting to Binance, even if your API Keys are correct. The most common reasons include having no funds in your exchange account, having no funds in your trading account (as some crypto exchanges differentiate between funding and trading accounts), or not being a verified exchange user (KYC). In this case, please click on 'Continue without testing'. You can always check your API Keys later in your Base config.

Step One

If you haven't already, go to Binance's website and create an account.

Step Two

Verify your account and get started on the API by navigating to API Management.

Step Three

Click on “Create API”, select “System generated API Key” and click on Next.

Step Four

Start by naming the API something memorable such as "Microgain API".

Step Five

To complete the puzzle, slide the puzzle piece into place. Afterwards, you must verify your API Keys by using all of the following methods: phone number verification code, email verification code, and authenticator code.

Step Six

Your API Key and secret are now created, but they cannot be used for trading yet. To enhance the security of your funds on Binance, you must whitelist the IP addresses of Microgain's servers in your API Key settings. This will allow only Microgain's servers to perform actions on your Binance account, preventing any unauthorized third parties from accessing it, even if your API Keys are compromised. By following this step, you can ensure that your funds remain safe while trading on Binance.

Navigate to the Base config in Microgain and select "Exchange" then "Binance." Click on "Generate IP Addresses" and copy the displayed IP addresses.

Step Seven

Next, go back to Binance and paste the IP addresses into the "Restrict access to trusted Ips Only" field, as shown in the screenshot above. To enable trading, click on "Edit" and check the box next to "Enable spot & Margin Trading." No other API restrictions need to be enabled, and Microgain will never ask for "Withdrawal" or "Universal Transfer" rights. Do not click "Save" yet, as there is one more step to complete.

Step Eight

Copy the API Keys shown on Binance and paste them into Microgain. Then, save the changes on both Binance and Microgain. Allow a moment for the bot to link everything together, and your balance should become visible.

Leveraged tokens

On Binance, you can trade leveraged tokens, but you must first complete a short questionnaire about the risks involved. After completing the questionnaire, these tokens can be traded like regular tokens.

Unable to see exchange balance

If you are unable to see your exchange balance, there may be a few issues preventing your bot from synchronizing with your exchange. One common cause is "auto-fill" being enabled in your browser. To fix this, you can try disabling auto-fill, using incognito mode, using a different browser, or disabling your password manager. For more information, you can watch our Microgain Academy video on this subject or check our troubleshooting article.

Converting dust positions to BNB

When using Binance, we recommend using the "convert dust to BNB" setting instead of the Walletscrubber. Dust positions are positions that are too small to trade on the exchange.

Binance minimum trade amounts

Click here to see the minimum trade amounts on Binance.

Binance status

If you are experiencing issues with trading on Binance, you can check the current exchange status by clicking here.

© Microgain - All Rights Reserved.