Agent keys & permissions
An AI agent never needs your wallet’s private key. Inside the app, the agent acts through your connected wallet session and only after you confirm; for an external agent or bot, create a Bitnxs API key with only the permission flags it needs. Bitnxs API keys have no withdrawal permission at all.
Which credentials does the in-app agent use?
Section titled “Which credentials does the in-app agent use?”| Credential | Where it lives | What it can do |
|---|---|---|
| Your LLM API key (e.g. OpenAI) | Saved in your browser only (localStorage) | Lets the page call your LLM. Bitnxs does not need it. |
| Your wallet session | Created when you connect your wallet | Places the limit orders you confirm in the agent panel. |
The in-app agent does not use a separate “agent key”.
How do I create a trade-only API key for an external agent?
Section titled “How do I create a trade-only API key for an external agent?”- In the app open More → API Keys and name the key (e.g.
claude-agent-1; letters, digits,_and-, up to 32 characters). - Tick only the permissions the agent needs (see below).
- Sign the derivation message once in your wallet. The key is derived in your browser and shown once; copy it to your agent’s secret store.
- Your agent signs sessions with this key and passes your main wallet address as the user. See Authentication.
- Revoke it any time from More → API Keys; revoking ends that key’s sessions.
What do the four permission flags allow?
Section titled “What do the four permission flags allow?”| Flag | Allows | Give it to an agent that… |
|---|---|---|
place_orders | POST /session/order, /session/batchOrder | places entries |
cancel_orders | POST /session/cancel, /session/modify | manages or reprices orders |
change_leverage | POST /session/leverage | usually leave off; set leverage yourself |
set_triggers | POST /session/trigger, /session/cancel_trigger | manages TP/SL |
There is no withdraw, transfer or key-management flag. An API key cannot withdraw funds or create other keys. A disabled flag returns api-key-permission-denied.
Safety best practices
Section titled “Safety best practices”- One key per agent, with a clear label, so you can revoke one without affecting others.
- Least privilege: start with
place_orders(+set_triggersif it manages TP/SL). Leavechange_leverageoff; the in-app agent is also designed never to touch leverage. - Keep keys out of prompts. Never paste an API key or seed phrase into a chat with an LLM. Load it from an environment variable or secret manager.
- Fund a separate wallet with only what you are willing to let an agent trade.
- Set leverage low yourself before letting an agent trade; it sizes positions by size, not leverage.
- Respect rate limits: about 20 write requests/second per signer (50 burst);
/infoand/wsare not rate-limited. - Watch it: stream
executionReportsover WebSocket and revoke the key if anything looks wrong. - The app stores your LLM API key in browser storage; use a key with a spending limit and don’t use the agent on shared computers.