Skip to content

Latest commit

 

History

History
63 lines (32 loc) · 3.17 KB

README_Binance_RSA_Keys.md

File metadata and controls

63 lines (32 loc) · 3.17 KB

Using RSA keys with Binance

Binance now supports the use of RSA encryption keys with their API. To use RSA keys instead of the previous HMAC keys generated by Binance please follow along.

After signing into Binance navigate to the API management area

User drop down

Here you can create an new Key

Create a new key

This will open a new dialog modal where you need to select the 'Self-generated' option.

Select seff-generated

This will open a new dialog asking you to input the public key. Binance uses a PKCS#8 private key and an X509 public key. If you are not sure what this all means then go the link binance provide, download the key generator tool and follow the next steps.

Generating a new key pair

Open the key generation tool and select the 2048 bit enxryption option. The 4096 keys will not be accepted by Binance.

Generate a 2048 key part 1

Click the 'Generate Key Pair' button. This will create 2 new keys in the input boxes below.

Generate a 2048 key part 2

These keys can now be saved to your trading server.

Our advise is to put these in the My-Secrets folder of your Superalgos directory, but you may stored them where-ever you like.

Save public key

Save private key

Using your keys

Now that these have been stored you need to open the public key and copy the contents.

Copy public key data

Paste the public key contents into the Binance 'Upload public key' dialog modal, and click next.

Paste public key data

Provide a suitable name for your key.

Name key in binance

You will now be directed back the API management page where you can view a list of your keys. You will need to edit the restrictions on your new key to 'Enable Spot & Margin Trading'.

Set key permissions

Now copy the API key hash Binance provides.

Copy key hash

And paste this into the Exchange account key node's config as the codeName value. Then set the path to the provate key as the secret value.

Save details to Superalgos

It is import to note that the private key needs to be stored on the same server that the tasks run on and the path to the file must be valid. The path value can be either relative or absolute