On this page
What each exchange does to keys without an IP list
Every exchange below lets you attach a list of IP addresses to an API key. After that, the exchange rejects any signed request that comes from another address. The difference is what happens when you leave the list empty. Some exchanges only recommend the list. Others cut permissions, expire the key, or delete it.
| Exchange | Key without an IP list | Notes |
|---|---|---|
| Binance | A system-generated (HMAC) key can only read. Withdrawals need an IP restriction on every key type. | Self-generated Ed25519 or RSA keys can get other permissions without an IP list. The withdrawal rule asks for IPv4 addresses. |
| Binance.US | Reset to read-only after 90 days unused. | The reset applies to keys not secured by IP whitelisting. |
| Bybit | Invalid after 90 days. Also invalid 7 days after the account password changes. | Pass IPs as a comma-separated list. Bound keys are exempt from both rules. |
| OKX | Deleted after 14 days of inactivity if it has trade or withdraw permission. | Up to 20 IPs per key, IPv4, IPv6, or ranges. Private calls count as activity. |
| Kraken | No penalty. IP Address Restriction is an optional setting. | Listed under optional settings in Kraken's API key guide. |
| Delta Exchange India | A key with Trading permission cannot be created without whitelisted IPs. | IPv4 and IPv6 accepted, several IPs per key. |
Sources for the table are the Binance API key FAQ, Binance.US, the Bybit create key endpoint, the OKX API FAQ and OKX API docs, Kraken support, and the Delta Exchange API docs. These rules change. Binance capped trading permission on unrestricted keys at 90 days in a July 2021 announcement, and that page now says the rule stopped applying on 2023-10-24. The current Binance rule, read-only for unrestricted system-generated keys, dates from 2023-01-30.
So the premise needs one correction. IP binding is not mandatory for trading everywhere. At Binance an Ed25519 key can trade without an IP list, and Kraken never requires one. What is close to universal is that withdrawals need an IP list, and that keys without one live shorter lives. For a bot that runs for months, an IP list is the only setup that does not need a calendar reminder.
Why exchanges push keys toward fixed IPs
An API key and secret are a bearer credential. Anyone who copies them from a leaked .env, a public repo, or a compromised laptop can sign requests as you. An IP list turns that copy into something much less useful. The attacker now also needs to send traffic from one of your addresses.
That is why the rules cluster around trading and withdrawals. A read-only key that leaks exposes your balances. A trading key that leaks can be used to trade your funds into a thin market. A withdrawal key that leaks loses the funds outright, which is why Binance makes the IP list mandatory before it will enable withdrawals at all.
The expiry rules are the nudge. An exchange cannot force everyone onto fixed IPs, because many users trade from home connections whose address changes. So it lets unbound keys exist, but makes them expire or shrink. Bybit's 7-day rule after a password change follows the same logic. A password change often follows a suspected compromise, so unbound keys from before it should not live on.
An IP list is one layer, not the whole defence. Keep withdrawal permission off on any key a bot uses. Give each bot its own key, ideally on a sub-account with only the funds it trades. Binance also recommends Ed25519 keys and calls HMAC keys deprecated, because with Ed25519 the exchange only ever holds your public key.
Why a cloud bot breaks the IP list
A bot on your own VPS has one public IP, and the IP list just works. A bot on serverless functions, a PaaS container, or an autoscaling group does not. Those platforms send outbound traffic from shared address pools that change on redeploys, restarts, and scale events. The post on why serverless egress IPs change covers each platform's behaviour. You cannot list those addresses, and listing a whole cloud range would admit every other tenant on it, as the cloud IP ranges post explains.
When the bot's address is not on the list, the exchange answers with an error that often looks like an authentication problem. These are the documented messages.
| Exchange | Code | Message |
|---|---|---|
| Binance | -2015 | Invalid API-key, IP, or permissions for action. One code covers all three causes. |
| Bybit | 10010 | Unmatched IP, please check your API key's bound IP addresses. |
| Delta Exchange | ip_not_whitelisted_for_api_key | The response shows the rejected IP, so you can add it. |
| OKX | 50110 | Your IP {param0} is not included in your API key's IP whitelist. Returned with HTTP 401. |
The messages come from each exchange's error reference (Binance, Bybit, OKX, and the Delta Exchange docs). Binance's single -2015 code is the hard one, because a wrong key, a missing permission, and a wrong IP all look the same. Check the IP first. It is the cause that changes without you touching anything.
IPv6 can leave by a different door
A host with both IPv4 and IPv6 may reach the exchange over IPv6 when the API hostname has an IPv6 address. The exchange then sees your IPv6 address, which is not the IPv4 address you listed. Binance's withdrawal rule asks for IPv4 addresses specifically. Delta's docs warn about this mismatch and suggest whitelisting both protocols or turning one off. The IPv6 egress post shows how to force IPv4 in common clients.
Three ways to give the bot a fixed IP
- Run the bot on a VM with a static public IP. This is the simplest option if you are happy to patch and monitor a server. One VM is also one point of failure, and its IP leaves with it if you rebuild it carelessly.
- Keep the bot where it is and send its traffic through a cloud NAT gateway with a reserved IP. This works inside one cloud and one network, and the NAT bill can exceed the bot's own cost. The NAT gateway cost calculator shows the numbers for AWS.
- Keep the bot on any platform and send only its exchange calls through a static IP proxy. The bot keeps its host. The exchange sees the proxy's IP. This is the option that works on serverless and PaaS platforms that have no static IP of their own.
The home IP vs VPS vs proxy post compares these for Indian stock broker APIs, and most of it carries over to exchanges. Two points are specific to crypto exchanges.
First, the IP must be yours alone. A shared proxy IP means other customers' traffic also comes from an address on your key's list, so the list stops protecting you from them. Second, exchanges apply some limits per IP. Binance documents request weight as IP-based, and its -1003 error reads Way too much request weight used; IP banned until %s. On a shared IP, another user's traffic can spend your weight or get the address banned.
Use two IPs, not one, and list both. A pair on separate hosts lets the bot keep trading when one host fails. The static IP pairs post explains how that failover works. Bybit, OKX, and Delta all document lists of several IPs per key.
Route only signed calls through the proxy
Most bots talk to exchanges through ccxt. It has a httpsProxy property for REST calls and a separate wssProxy property for websocket connections. The proxy tunnels each connection with HTTP CONNECT, so TLS runs end to end from your bot to the exchange. The HTTP CONNECT post walks through that handshake.
Public market data does not need the fixed IP. Order books and trade streams are heavy, and sending them through a proxy costs bandwidth and adds a hop for nothing. A clean pattern is two exchange objects. One reads public data directly. The other holds the key and the proxy.
# pip install "ccxt>=4.5" (Python 3.11+ for an https:// proxy URL)
import asyncio
import os
import ccxt.async_support as ccxt
async def main():
# Public data goes direct: no key, no proxy.
public = ccxt.bybit()
# Signed calls leave from the fixed IPs on the key's list.
private = ccxt.bybit({
"apiKey": os.environ["BYBIT_API_KEY"],
"secret": os.environ["BYBIT_API_SECRET"],
})
private.httpsProxy = os.environ["FIXEDMARK_PROXY_URL"]
try:
ticker = await public.fetch_ticker("BTC/USDT")
balance = await private.fetch_balance()
print(ticker["last"], balance["total"].get("USDT"))
finally:
await public.close()
await private.close()
asyncio.run(main())// npm install ccxt
// For websockets through a proxy, also: npm install http-proxy-agent https-proxy-agent
import ccxt from "ccxt";
const proxy = process.env.FIXEDMARK_PROXY_URL;
// Public data goes direct.
const publicEx = new ccxt.pro.okx();
// Signed REST and private websockets leave from the fixed IPs.
const privateEx = new ccxt.pro.okx({
apiKey: process.env.OKX_API_KEY,
secret: process.env.OKX_API_SECRET,
password: process.env.OKX_API_PASSPHRASE,
});
privateEx.httpsProxy = proxy;
privateEx.wssProxy = proxy;
try {
const ticker = await publicEx.fetchTicker("BTC/USDT");
const balance = await privateEx.fetchBalance();
console.log(ticker.last, balance.total.USDT);
} finally {
await publicEx.close();
await privateEx.close();
}We ran ccxt 4.5.92 REST and websocket calls through a local CONNECT proxy and logged each tunnel. Two behaviours are worth knowing before you deploy.
- In ccxt's synchronous Python client,
httpProxyfills only thehttpkey of the requestsproxiesdict. Calls to anhttps://exchange URL then skip the proxy with no error, and the exchange sees your platform's IP. SethttpsProxy, which fills thehttpskey. The async client passes either property to aiohttp, so both work there. - In Node, ccxt sends REST calls through undici and needs nothing extra. Websockets through
wssProxyneed bothhttp-proxy-agentandhttps-proxy-agentinstalled. With only one of them,watchTickerthrew aNotSupportederror that asks you to installhttps-proxy-agent, even when that package was present.
Treat any connection that authenticates with the key as restricted. That includes private websocket logins and the REST call that creates a user data stream. If you write raw HTTP clients instead of using ccxt, the selective proxying post covers per-client proxy settings in each language, and why a global HTTPS_PROXY is riskier.
Check what the exchange sees
Do not guess the egress IP. Ask a service that echoes it, through the same proxy URL your bot uses. Then ask the exchange what it thinks of your key.
# The IP a destination sees through the proxy. Repeat it to see both IPs of a pair.
curl --proxy "$FIXEDMARK_PROXY_URL" https://fixedmark.com/api/ip
# Connection and TLS timing to an exchange through the same path.
curl -s -o /dev/null --proxy "$FIXEDMARK_PROXY_URL" \
-w 'connect=%{time_connect}s tls=%{time_appconnect}s total=%{time_total}s\n' \
https://api.bybit.com/v5/market/timeBinance has a signed endpoint, GET /sapi/v1/account/apiRestrictions, that returns ipRestrict and each permission flag. Bybit's GET /v5/user/query-api returns the bound ips, plus expiredAt and deadlineDay for keys that will expire. ccxt exposes both as implicit methods.
# pip install "ccxt>=4.5"
import os
import ccxt
proxy = os.environ["FIXEDMARK_PROXY_URL"]
binance = ccxt.binance({
"apiKey": os.environ["BINANCE_API_KEY"],
"secret": os.environ["BINANCE_API_SECRET"],
})
binance.httpsProxy = proxy # httpsProxy, not httpProxy, in sync Python
r = binance.sapiGetAccountApiRestrictions()
print("binance ipRestrict:", r["ipRestrict"],
"trading:", r["enableSpotAndMarginTrading"],
"withdrawals:", r["enableWithdrawals"])
bybit = ccxt.bybit({
"apiKey": os.environ["BYBIT_API_KEY"],
"secret": os.environ["BYBIT_API_SECRET"],
})
bybit.httpsProxy = proxy
info = bybit.privateGetV5UserQueryApi()["result"]
print("bybit ips:", info["ips"],
"expiredAt:", info["expiredAt"],
"readOnly:", info["readOnly"])Run the check from a scheduled job, not once. If ipRestrict turns false or expiredAt gets close, alert before the bot fails mid-trade. When you rotate keys, create the new key with the same IP list, deploy it, and only then delete the old one. The credential rotation post describes the overlap pattern.
A fixed IP is not a way around geoblocks
Exchanges also decide who may use them by location, and they enforce it partly by IP. Bybit's error reference lists You are using U.S IP as a cause of HTTP 403. Developers calling Binance.com from US servers report HTTP 451 with a message that begins Service unavailable from a restricted location according to 'b. Eligibility', in threads on Binance's developer forum.
This matters when you pick a region for the bot's fixed IP. Choose an egress location where the exchange operates and where you are an eligible user. Do not pick a region to make your traffic appear to come from a country the exchange restricts or where you do not live. That breaks the exchange's terms, it can freeze the account, and a fixed IP makes it easy for the exchange to see.
For traders in India, note that the static IP rules in SEBI's algo trading framework apply to stock brokers' APIs. Crypto exchange IP rules are each exchange's own policy. Delta Exchange India, for one, requires whitelisted IPs on every key with Trading permission.
Doing this with Fixedmark
Fixedmark is a static outbound IP proxy, in early access. On the Pro plan (planned at $29 a month) you get a dedicated pair of IPv4 addresses in one region. You list both on the exchange key, set FIXEDMARK_PROXY_URL to your proxy URL, and point ccxt's httpsProxy and wssProxy at it as shown above. Planned regions are Mumbai, Singapore, Newark, and Ashburn. See regions, and keep the geoblocking section in mind when you choose.
- TLS passes through end to end and is never decrypted, so the proxy never sees your API key, signatures, or order payloads. See security.
- Connection logs show the destination, SNI, egress IP, and result of each connection, which helps when an exchange returns an IP error.
- Destination allowlists, on Business and up, can limit a proxy token to hosts such as
api.bybit.com:443, so a leaked proxy token cannot reach anything else. - The trial runs on a shared IP pair. Do not put shared IPs on an exchange key. Use the trial to test your code path, then list the dedicated pair.
Per-language proxy setup is in the Python and Node.js docs, and verify your egress IP has more ways to confirm the address. If you trade Indian equities too, the algo trading static IP page covers broker registration.
Sources
Checked November 2026. Confirm current details on the vendor's site before you decide. Prices and limits change.
- Binance: How to create API keys
- Binance: Updates to API key permission rules (2021)
- Binance developers: API key types
- Binance developers: Error codes
- Binance developers: Get API key permission
- Binance.US: API key best practices
- Bybit API: Create sub UID API key
- Bybit API: Get API key information
- Bybit API: Error codes
- OKX: API FAQ
- OKX: API v5 documentation
- Kraken: How to create an API key on Kraken Pro
- Delta Exchange: API documentation
- ccxt: Manual, Proxy section
- Binance developer forum: API error 451

