For the complete documentation index, see llms.txt. This page is also available as Markdown.

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 -q

Stop 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 02 or 03;

  • a derived bc1q agent ID different from the account ID; and

  • the 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:

  1. Connect the owner account in UniSat.

  2. Under Sidepit Account, choose Authorize trading agent.

  3. Paste the agent's 66-character public key.

  4. Confirm the derived full agent Sidepit ID exactly matches the agent's public output.

  5. Sign the authorization in UniSat.

Sidepit trading agents connected to the exchange
The owner keeps the money key; each agent receives a separate, revocable trading identity.
Placeholder for the production Authorize trading agent dialog
Screenshot slot: show public-key entry, the complete derived agent Sidepit ID, and the owner-signature step.

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?