All Collections
3Commas API for Developers and 3Commas Apps
3Commas API
3Commas API: how to create 3Commas API access token and apply Whitelisting
3Commas API: how to create 3Commas API access token and apply Whitelisting

Learn how to apply IP whitelisting when creating 3Commas API keys

Updated over a week ago

If you want to write your own apps or scripts to access your 3Commas account via our API interface, you've found the right guide!

The process is incredibly simple; head to the API Settings page, and let's learn how to create an access token.

Also, there is an IP whitelisting feature that lets you fortify your account security even more!

Do you execute your 3Commas bot strategies using our public API? Now you can add an additional layer of account security by whitelisting one or more IP addresses. It has a similar benefit to IP whitelisting your API keys on an exchange (a feature we offer for almost every exchange 3Commas works with). 3Commas won’t recognize commands for your account given via API if they don’t come from one of the IP addresses you’ve added to your approved whitelist.

IMPORTANT NOTES!

  1. System-generated API tokens will require IP whitelisting (System-generated type is covered in this article) - we do not recommend this approach and strongly recommend the use of Self-generated or RSA API tokens which do not require IP whitelisting (although this is available as an option for the highest level of security).

  2. If you want to connect an exchange to your 3Commas account using 3Commas API, you may need to find the relevant list of the whitelisted IP addresses by using this endpoint: Supported exchanges IP whitelist endpoint.
    If you started to connect the exchange and didn't finish it for some reason, the IP addresses may become outdated, so you will need to take another set of IP addresses (currently works only for Binance).

How to create API token with IP whitelisting?

1. Open the page to create new 3Commas API keys and choose the type of the token

In this article, we will use System generated type (which we do not recommend).

To learn more about the recommended and more secure "Self generated" type of token, please head to this article:

2. Name this API access token

3. Add Trusted IPs

It is mandatory to whitelist all the IP addresses which you use your API keys with.

IP address/addresses should be entered only from those machines/servers that will send the requests to 3Commas.

PLEASE PAY ATTENTION!

You need to enter your "Public" IP address and not your home/private address. You can find the public IP address of your internet connection (if you are running or developing your app with your Home PC/Server) using the free website: https://www.whatsmyip.org

If you are running your app or program from a cloud-based service provider, you will need to refer to their help guides for the Public IP Addresses to whitelist, or contact the service provider's support team to find the addresses to use.

Add as many addresses as you need dividing with a comma. To avoid any possible errors, please enter all IP addresses you might send the requests from.

Also, you can enter the mask if you operate from several servers, clusters, subnets, etc. The maximum is 16 for IPV4 and 128 for IPV6.

4. Enable any permissions needed for your purpose

5. Click Create

It's active if all fields are filled.

6. Enter 2FA code

That's it! Now you have added extra security to your API token and nobody else but you will have access to your trading on 3Commas!

Did this answer your question?