Authorize a Trading Agent
Give an AI agent a revocable trading identity without giving it the Bitcoin account key.
Delegation separates money authority from trading authority. The account owner keeps the UniSat key. The agent creates a different local key that may place and cancel orders for the account.
The delegated key cannot unlock Bitcoin, authorize another agent, or revoke an agent. Both the SDK and exchange enforce that boundary.
1. Prepare the public client
Clone the official repository with its protocol submodule and run the local tests:
git clone --recurse-submodules https://github.com/sidepit/Public-API
cd Public-API
python3 -m venv python-client/.venv
python-client/.venv/bin/pip install -r python-client/requirements.txt
python-client/.venv/bin/python -m pytest python-client/tests -qStop if any test fails.
2. Mint the agent identity locally
Only after the owner requests it, the agent runs one mint using the owner's complete public Sidepit ID:
cd python-client
.venv/bin/python -m sidepit_trader.agent_key new \
--account "$SIDEPIT_ACCOUNT_ID"
cd ..Set SIDEPIT_ACCOUNT_ID to the owner's complete public bc1q address. Never shorten it for a command, log, or approval screen.
The command writes one new 0600, write-once agent file and prints public facts only. It must produce:
a 66-character compressed public key beginning
02or03;a derived
bc1qagent ID different from the account ID; andthe protected file path without displaying the private key.
Never source, print, paste, upload, overwrite, or transmit the contents of that file.
3. The owner authorizes the public key
In app.sidepit.com:
Connect the owner account in UniSat.
Under Sidepit Account, choose Authorize trading agent.
Paste the agent's 66-character public key.
Confirm the derived full agent Sidepit ID exactly matches the agent's public output.
Sign the authorization in UniSat.

The account key remains inside the extension. The submitted receipt is not yet proof that the agent is active.
4. Verify ACTIVE
The agent checks settled server state with its protected path:
Do not trade until the result is ACTIVE. If it is PENDING, wait and check again rather than resubmitting.
On the wire, an authorized agent signs orders with the owner's sidepit_id and its own agent_id.
Revoke or recover an agent
The owner can revoke an active agent from the same web interface. Revocation prevents future trading by that identity but does not erase existing positions or orders.
Losing the agent file does not lose the owner's Bitcoin. Revoke the lost agent ID and authorize a replacement. Any surviving copy can continue trading until the revocation becomes active.
Last updated
Was this helpful?