{"id":8,"date":"2026-11-25T22:07:08","date_gmt":"2026-11-25T22:07:08","guid":{"rendered":"http:\/\/rulemancer-blog-trade-only-api-keys"},"modified":"2026-11-25T22:07:08","modified_gmt":"2026-11-25T22:07:08","slug":"trade-only-api-keys","status":"publish","type":"post","link":"https:\/\/rulemancer.com\/blog\/trade-only-api-keys\/","title":{"rendered":"Trade-only API keys: connect an exchange without handing over your funds"},"content":{"rendered":"<p><strong>An exchange API key is a password for a program.<\/strong> When you connect an exchange to a trading bot, the bot needs a key that can read balances and place orders \u2014 and, ideally, nothing else. The permission set you choose at creation time, not the bot&#8217;s code, decides whether a mistake can drain an account. Getting that set right takes two minutes and is the single most useful security step in automated trading.<\/p>\n<h2>What a key is allowed to do<\/h2>\n<p>Exchanges split API permissions into a few switches. The names differ slightly, the intent does not:<\/p>\n<table>\n<thead>\n<tr>\n<th>Permission<\/th>\n<th>What it enables<\/th>\n<th>Needed for a bot?<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Read<\/td>\n<td>Balances, open orders, trade history<\/td>\n<td>Yes \u2014 the bot must know what it holds<\/td>\n<\/tr>\n<tr>\n<td>Spot trade<\/td>\n<td>Placing and cancelling orders<\/td>\n<td>Yes \u2014 this is the whole point<\/td>\n<\/tr>\n<tr>\n<td>Withdraw<\/td>\n<td>Moving funds off the exchange<\/td>\n<td>No<\/td>\n<\/tr>\n<tr>\n<td>Transfer \/ internal<\/td>\n<td>Moving funds between wallets<\/td>\n<td>No<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>A key that cannot withdraw cannot empty your account, whatever happens to the bot, the server or the key itself. That single restriction turns a catastrophic risk into an inconvenience.<\/p>\n<h2>Three checks before you save the key<\/h2>\n<ol>\n<li><strong>Withdrawals off.<\/strong> Create the key with trading enabled and withdrawals disabled. If your exchange asks for a separate &#8220;enable withdrawals&#8221; step with extra verification, leave it alone.<\/li>\n<li><strong>IP allowlist on.<\/strong> Most exchanges let you bind a key to one or a few IP addresses. Bind it to the server that runs your bots; a stolen key used from anywhere else simply fails.<\/li>\n<li><strong>Label it.<\/strong> Name the key after the platform and the date, so a future you can tell which key belongs where before revoking it.<\/li>\n<\/ol>\n<p>Rulemancer refuses keys that can withdraw, and it verifies each key against the exchange&#8217;s real API before storing it. The check exists because a bot that never needs to move money should never be able to.<\/p>\n<h2>Rotation is not paranoia<\/h2>\n<p>Keys live longer than projects do. A rotation every few months costs one minute and removes the entire class of &#8220;old key I forgot about&#8221; incidents. The routine is the same everywhere: create the new key, add it to the bot, confirm the next trade fills, then delete the old one. Deleting first and creating later leaves you with a bot that silently cannot trade.<\/p>\n<p>Do the same whenever a laptop, a password manager or a hosting account changes hands. A key is only as secret as the least protected place it was ever pasted.<\/p>\n<h2>If a key leaks, act in this order<\/h2>\n<ol>\n<li><strong>Revoke on the exchange first<\/strong>, not in the bot. Revocation at the source is immediate; everything else is tidying up.<\/li>\n<li>Cancel open orders that the key placed, if the exchange still shows any.<\/li>\n<li>Disconnect the key in the platform so the bot stops retrying.<\/li>\n<li>Check the trade history for orders you did not write.<\/li>\n<li>Create a new key with the same restricted permissions and reconnect.<\/li>\n<\/ol>\n<p>Because the key could not withdraw, the worst case is unwanted trades inside the balance you had allocated \u2014 bad, bounded, and recoverable. That bound is exactly what the permission set buys you.<\/p>\n<h2>What the platform stores<\/h2>\n<p>Keys are encrypted at rest, never displayed again after saving, and never written to logs. The bot uses them to read balances and place orders, which is why the encryption key of the installation matters: changing it makes stored keys unreadable and forces every user to reconnect. Treat that value as part of your security perimeter, not as a configuration detail.<\/p>\n<p>For the wider picture on API security, the <a href=\"https:\/\/owasp.org\/www-project-api-security\/\" rel=\"nofollow noopener\" target=\"_blank\">OWASP API Security project<\/a> is a good plain-language reference; exchange-specific key settings are documented in each venue&#8217;s API guide, such as the <a href=\"https:\/\/developers.binance.com\/docs\/binance-spot-api-docs\" rel=\"nofollow noopener\" target=\"_blank\">Binance Spot API documentation<\/a>.<\/p>\n<h2>Frequently asked questions<\/h2>\n<h3>Can a trade-only key lose money?<\/h3>\n<p>Yes \u2014 it can place bad trades within the balance you leave on the exchange. It cannot move funds out to another address. Keeping only your working balance on an exchange limits that exposure further.<\/p>\n<h3>Do I need a separate key per bot?<\/h3>\n<p>One key per exchange is usually enough, because the limits live in the bot&#8217;s risk settings rather than in the key. Separate keys per bot make revocation more surgical if you run very different strategies.<\/p>\n<h3>What happens if I disable the key on the exchange?<\/h3>\n<p>Live orders fail immediately and the bot reports the error; paper bots keep running because they use public data. Reconnect a valid key to resume live trading.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A key that can trade but cannot withdraw limits every worst case to bad trades. Permissions, IP allowlists, rotation and what to do when a key leaks.<\/p>\n","protected":false},"author":1,"featured_media":15,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-8","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-guides"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Trade-only API keys for crypto bots<\/title>\n<meta name=\"description\" content=\"How to connect an exchange to a trading bot with a key that can trade but cannot withdraw: permissions, IP allowlists, rotation and a leak checklist.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/rulemancer.com\/blog\/trade-only-api-keys\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Trade-only API keys for crypto bots\" \/>\n<meta property=\"og:description\" content=\"How to connect an exchange to a trading bot with a key that can trade but cannot withdraw: permissions, IP allowlists, rotation and a leak checklist.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rulemancer.com\/blog\/trade-only-api-keys\/\" \/>\n<meta property=\"og:site_name\" content=\"Rulemancer Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-25T22:07:08+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/rulemancer.com\\\/blog\\\/trade-only-api-keys\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rulemancer.com\\\/blog\\\/trade-only-api-keys\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/rulemancer.com\\\/blog\\\/#\\\/schema\\\/person\\\/1b4857e650cf4ad9abcd061ba92da58c\"},\"headline\":\"Trade-only API keys: connect an exchange without handing over your funds\",\"datePublished\":\"2026-11-25T22:07:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/rulemancer.com\\\/blog\\\/trade-only-api-keys\\\/\"},\"wordCount\":744,\"image\":{\"@id\":\"https:\\\/\\\/rulemancer.com\\\/blog\\\/trade-only-api-keys\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/rulemancer.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/trade-only-api-keys.jpg\",\"articleSection\":[\"Guides\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/rulemancer.com\\\/blog\\\/trade-only-api-keys\\\/\",\"url\":\"https:\\\/\\\/rulemancer.com\\\/blog\\\/trade-only-api-keys\\\/\",\"name\":\"Trade-only API keys for crypto bots\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rulemancer.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/rulemancer.com\\\/blog\\\/trade-only-api-keys\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/rulemancer.com\\\/blog\\\/trade-only-api-keys\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/rulemancer.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/trade-only-api-keys.jpg\",\"datePublished\":\"2026-11-25T22:07:08+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/rulemancer.com\\\/blog\\\/#\\\/schema\\\/person\\\/1b4857e650cf4ad9abcd061ba92da58c\"},\"description\":\"How to connect an exchange to a trading bot with a key that can trade but cannot withdraw: permissions, IP allowlists, rotation and a leak checklist.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/rulemancer.com\\\/blog\\\/trade-only-api-keys\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/rulemancer.com\\\/blog\\\/trade-only-api-keys\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/rulemancer.com\\\/blog\\\/trade-only-api-keys\\\/#primaryimage\",\"url\":\"https:\\\/\\\/rulemancer.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/trade-only-api-keys.jpg\",\"contentUrl\":\"https:\\\/\\\/rulemancer.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/trade-only-api-keys.jpg\",\"width\":1200,\"height\":630,\"caption\":\"Trade-only API keys: connect an exchange without handing over your funds\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/rulemancer.com\\\/blog\\\/trade-only-api-keys\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Anasayfa\",\"item\":\"https:\\\/\\\/rulemancer.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Trade-only API keys: connect an exchange without handing over your funds\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/rulemancer.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/rulemancer.com\\\/blog\\\/\",\"name\":\"Rulemancer Blog\",\"description\":\"Guides for rule-based crypto trading bots\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/rulemancer.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/rulemancer.com\\\/blog\\\/#\\\/schema\\\/person\\\/1b4857e650cf4ad9abcd061ba92da58c\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7dd84c1b19de11fc5d10360db456ecbb3dac969d193b0cffa7c1764d30b18020?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7dd84c1b19de11fc5d10360db456ecbb3dac969d193b0cffa7c1764d30b18020?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7dd84c1b19de11fc5d10360db456ecbb3dac969d193b0cffa7c1764d30b18020?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\\\/\\\/rulemancer.com\\\/blog\"],\"url\":\"https:\\\/\\\/rulemancer.com\\\/blog\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Trade-only API keys for crypto bots","description":"How to connect an exchange to a trading bot with a key that can trade but cannot withdraw: permissions, IP allowlists, rotation and a leak checklist.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/rulemancer.com\/blog\/trade-only-api-keys\/","og_locale":"en_US","og_type":"article","og_title":"Trade-only API keys for crypto bots","og_description":"How to connect an exchange to a trading bot with a key that can trade but cannot withdraw: permissions, IP allowlists, rotation and a leak checklist.","og_url":"https:\/\/rulemancer.com\/blog\/trade-only-api-keys\/","og_site_name":"Rulemancer Blog","article_published_time":"2026-11-25T22:07:08+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/rulemancer.com\/blog\/trade-only-api-keys\/#article","isPartOf":{"@id":"https:\/\/rulemancer.com\/blog\/trade-only-api-keys\/"},"author":{"name":"admin","@id":"https:\/\/rulemancer.com\/blog\/#\/schema\/person\/1b4857e650cf4ad9abcd061ba92da58c"},"headline":"Trade-only API keys: connect an exchange without handing over your funds","datePublished":"2026-11-25T22:07:08+00:00","mainEntityOfPage":{"@id":"https:\/\/rulemancer.com\/blog\/trade-only-api-keys\/"},"wordCount":744,"image":{"@id":"https:\/\/rulemancer.com\/blog\/trade-only-api-keys\/#primaryimage"},"thumbnailUrl":"https:\/\/rulemancer.com\/blog\/wp-content\/uploads\/2026\/11\/trade-only-api-keys.jpg","articleSection":["Guides"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/rulemancer.com\/blog\/trade-only-api-keys\/","url":"https:\/\/rulemancer.com\/blog\/trade-only-api-keys\/","name":"Trade-only API keys for crypto bots","isPartOf":{"@id":"https:\/\/rulemancer.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rulemancer.com\/blog\/trade-only-api-keys\/#primaryimage"},"image":{"@id":"https:\/\/rulemancer.com\/blog\/trade-only-api-keys\/#primaryimage"},"thumbnailUrl":"https:\/\/rulemancer.com\/blog\/wp-content\/uploads\/2026\/11\/trade-only-api-keys.jpg","datePublished":"2026-11-25T22:07:08+00:00","author":{"@id":"https:\/\/rulemancer.com\/blog\/#\/schema\/person\/1b4857e650cf4ad9abcd061ba92da58c"},"description":"How to connect an exchange to a trading bot with a key that can trade but cannot withdraw: permissions, IP allowlists, rotation and a leak checklist.","breadcrumb":{"@id":"https:\/\/rulemancer.com\/blog\/trade-only-api-keys\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rulemancer.com\/blog\/trade-only-api-keys\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rulemancer.com\/blog\/trade-only-api-keys\/#primaryimage","url":"https:\/\/rulemancer.com\/blog\/wp-content\/uploads\/2026\/11\/trade-only-api-keys.jpg","contentUrl":"https:\/\/rulemancer.com\/blog\/wp-content\/uploads\/2026\/11\/trade-only-api-keys.jpg","width":1200,"height":630,"caption":"Trade-only API keys: connect an exchange without handing over your funds"},{"@type":"BreadcrumbList","@id":"https:\/\/rulemancer.com\/blog\/trade-only-api-keys\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Anasayfa","item":"https:\/\/rulemancer.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Trade-only API keys: connect an exchange without handing over your funds"}]},{"@type":"WebSite","@id":"https:\/\/rulemancer.com\/blog\/#website","url":"https:\/\/rulemancer.com\/blog\/","name":"Rulemancer Blog","description":"Guides for rule-based crypto trading bots","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/rulemancer.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/rulemancer.com\/blog\/#\/schema\/person\/1b4857e650cf4ad9abcd061ba92da58c","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/7dd84c1b19de11fc5d10360db456ecbb3dac969d193b0cffa7c1764d30b18020?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/7dd84c1b19de11fc5d10360db456ecbb3dac969d193b0cffa7c1764d30b18020?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7dd84c1b19de11fc5d10360db456ecbb3dac969d193b0cffa7c1764d30b18020?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/rulemancer.com\/blog"],"url":"https:\/\/rulemancer.com\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/rulemancer.com\/blog\/wp-json\/wp\/v2\/posts\/8","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rulemancer.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rulemancer.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rulemancer.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rulemancer.com\/blog\/wp-json\/wp\/v2\/comments?post=8"}],"version-history":[{"count":0,"href":"https:\/\/rulemancer.com\/blog\/wp-json\/wp\/v2\/posts\/8\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rulemancer.com\/blog\/wp-json\/wp\/v2\/media\/15"}],"wp:attachment":[{"href":"https:\/\/rulemancer.com\/blog\/wp-json\/wp\/v2\/media?parent=8"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rulemancer.com\/blog\/wp-json\/wp\/v2\/categories?post=8"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rulemancer.com\/blog\/wp-json\/wp\/v2\/tags?post=8"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}