Black Friday: a whole free December, until 27 November. See the offer →
SonarSignal
Guide5 min read

Blofin API key: create it safely and connect it to SonarSignal

How to create a Blofin API key with read and trade rights only, why the key has to be bound to SonarSignal, and what the common Blofin API errors mean.

Share:XTelegramWhatsAppRedditFacebookLinkedIn

An API key lets an app trade on your exchange account without knowing your password. For SonarSignal on Blofin, the key needs exactly two rights: Read and Trade. Nothing that moves money out of your account. This guide shows how to create such a key on Blofin, how to connect it to SonarSignal, and what the error messages mean when something goes wrong.

Before you start

– You need a Blofin account with two-factor authentication. Blofin asks for an email code and a Google Authenticator code when you create the key.

– Have a safe place ready for three values: the API key, the secret key and a passphrase you choose yourself. The secret is shown only once.

– If you do not have a Blofin account yet, the exchange connection guide shows the sign-up link from inside the app.

Step 1: Create the API key on Blofin

– Log in on blofin.com, open your profile menu and choose API, then Create API Key.

– Under API Key Usage choose Connect to Third-Party Applications and select SonarSignal from the list. This step is mandatory for SonarSignal, more on that below.

– Give the key a name, for example "SonarSignal".

– Rights: Read is usually preselected. Tick Trade. Leave Transfer and anything that sounds like withdrawal off.

– Choose a passphrase and write it down. You will need it in SonarSignal, and you cannot look it up later.

– Confirm with the email code and the Google Authenticator code.

– Copy the API key and the secret key right away. The secret is only shown once.

Step 2: Connect the key in SonarSignal

– In the app, open the exchange tiles at the top of the page and click Enter API next to Blofin. This opens Sonaris AI with the Blofin dialog.

– Paste the API Key, the API Secret and your Passphrase.

– Tick the two security boxes: Withdrawal rights are DISABLED on the exchange and The key is bound to the SonarSignal application (Connect to Third-Party Applications). Without the second tick, the dialog does not save.

– Accept the risk notice and click Save Connection. The Blofin tile then shows that the connection is active.

Why the key must be bound to SonarSignal

On Blofin, SonarSignal works only with a key that is bound to the SonarSignal application. A normal key with an IP whitelist does not work here: Blofin rejects every order SonarSignal sends with it. That is why the dialog does not show a server IP for Blofin, unlike for other exchanges. The binding replaces the IP step.

Security: what the key can do, and what you decide

– With Read and Trade, the key can see your account and place or cancel orders. It does not need Transfer, and SonarSignal never asks for it.

– SonarSignal does not check the rights of your key automatically. The ticks in the dialog are your confirmation. Check on Blofin that only Read and Trade are active.

– Treat the secret and the passphrase like a password. Nobody from SonarSignal will ask you for them in a chat or by email.

– If you think a key has leaked, delete it on Blofin and create a new one. The safest way when you have lost the passphrase is the same: delete the key and create a new one.

– Blofin's API documentation describes a withdrawal whitelist for addresses. If your account offers it, it adds one more layer of protection.

Common Blofin API errors

The codes come from Blofin's API documentation.

– 152401: the access key does not exist. Usually copied incompletely or deleted.

– 152402: the access key has expired. Blofin lets keys without an IP binding expire after 90 days.

– 152404: the operation is not allowed with this key. Usually the Trade right is missing.

– 152406: your IP is not on the key's whitelist.

– 152408: wrong passphrase.

– 152409: invalid signature. Usually a wrong secret key.

For developers: limits and documentation

– Documentation: docs.blofin.com.

– Rate limits per IP: 500 requests per minute (exceeding it blocks for 5 minutes) and 1,500 requests per 5 minutes (exceeding it blocks for 1 hour). Trading endpoints: 30 requests per 10 seconds per user. Over the limit you get code 429.

– WebSocket: at most one new connection per second per IP; send a ping within 30 seconds, or the connection is closed.

– Each request carries the passphrase in the header ACCESS-PASSPHRASE. A key can be bound to up to 20 IP addresses; without an IP binding it expires after 90 days.

FAQ

– How do I create a Blofin API key? Profile menu, API, Create API Key. For SonarSignal choose "Connect to Third-Party Applications" and SonarSignal, tick Read and Trade, set a passphrase, confirm with your codes.

– Can SonarSignal withdraw my money? SonarSignal only needs Read and Trade and never asks for Transfer or withdrawal rights. Whether the key has more rights is decided on Blofin, so check it there.

– Where is the Blofin API documentation? At docs.blofin.com.

– What is the Blofin API rate limit? 500 requests per minute and 1,500 per 5 minutes per IP; 30 trading requests per 10 seconds per user.

– Why does my Blofin API key expire after 90 days? Blofin lets keys without an IP binding expire after 90 days. Create a new key and enter it again.

– I forgot my passphrase. What now? Delete the key on Blofin and create a new one.

– What a trading bot really does, and what it cannot do

– Trading Desk: draw a box and arm it

– Stop-loss on Bitcoin: how far price pierces below obvious lows

Risk notice

This guide explains a technical setup and is not financial advice. Trading futures can lead to the total loss of your capital. An API key gives an app access to your exchange account; only grant the rights you need.

Not investment advice. This post is for information and education. It is not investment advice and not a recommendation to buy or sell. Trading cryptocurrencies and leveraged products can lead to the total loss of the capital employed.
Share:XTelegramWhatsAppRedditFacebookLinkedIn

More posts