Skip to main content

01 Exchange

01 Exchange uses session-based authentication instead of raw private keys. You generate a temporary trading session using your wallet key, and only the session credentials are shared with the bot. Your main wallet private key never leaves your machine.

How It Works

  1. You run a setup script locally with your wallet key
  2. The script creates a session keypair on 01's servers
  3. You get back a Session ID + Session Key (not your wallet key)
  4. Paste those into the Connections page -- the bot trades using the session
  5. Sessions expire every 24 hours -- come back to renew

Step 1: Download the Setup Script

Download zo_session_setup.py from the Connections page on the platform.

Step 2: Install Dependencies

You need Python 3.8+ and these packages:

pip install requests cryptography base58

Step 3: Run the Script

Run with your 01 Exchange wallet private key. The key is only used locally to sign the session creation request -- it is never sent anywhere.

# Option A: Environment variable (base58 key from 01.xyz)
export ZO_PRIVATE_KEY="your_base58_private_key"
python3 zo_session_setup.py

# Option B: JSON key file (Solana format)
python3 zo_session_setup.py --key-file ~/id.json

# Option C: Hex key
python3 zo_session_setup.py --hex-key "your_hex_private_key"

Step 4: Copy the Output

The script prints three values you need:

============================================================
SESSION CREATED SUCCESSFULLY
============================================================
Session ID: 1045238
Session Private Key: 8ee0ce50...648acd6f
Wallet (base58): 63cBZUxz...SiyTkP32
Expires: 2026-02-22 18:30:00 UTC
============================================================

Step 5: Paste into Connections Page

Go to the Connections page, find 01 Exchange, and paste the three values:

FieldValueWhere to Find
Session IDNumeric ID (e.g. 1045238)Script output line "Session ID"
Session Key64-character hex stringScript output line "Session Private Key"
Wallet PubkeyBase58 public keyScript output line "Wallet (base58)"

Renewing Sessions

Sessions Expire Every 24 Hours

01 Exchange enforces a 24-hour session expiry. When your session expires, your bot will stop placing orders. To renew:

  1. Run zo_session_setup.py again (same command as before)
  2. Paste the new Session ID and Session Key on the Connections page
  3. Your bot will pick up the new credentials on its next restart cycle

Security

  • Your main wallet private key is never shared or uploaded
  • The session key can only trade -- it cannot withdraw funds
  • Sessions auto-expire after 24 hours even if not revoked
  • You can revoke a session anytime from your 01.xyz account settings