Skip to content

Authentication

How to obtain and use tokens for the Zirodelta API.

Authentication Flow

Zirodelta uses a two-step authentication:

  1. User Login - Matrica OAuth (Web3 identity)
  2. Exchange Connection - OAuth with Bybit/KuCoin
User → Matrica OAuth → JWT Token → Agent uses token

    Exchange OAuth (Bybit/KuCoin) → Trading permissions

Getting Your Token

For Humans

  1. Visit zirodelta.ag
  2. Click "Connect Wallet"
  3. Authenticate with Matrica
  4. Connect your exchange accounts
  5. Copy your API token from the dashboard

For Agents (Future)

Agent-specific authentication is coming:

typescript
// Future API (not yet implemented)
const { token } = await client.authenticate({
  agentId: 'your-agent-id',
  apiKey: process.env.ZIRODELTA_AGENT_KEY
});

Using the Token

SDK

typescript
import { ZirodeltaClient } from 'zirodelta-agent-toolkit';

const client = new ZirodeltaClient({
  token: process.env.ZIRODELTA_TOKEN
});

CLI

bash
export ZIRODELTA_TOKEN="your-token"
# or
zirodelta config set token your-token

Direct API Calls

bash
curl -X POST https://api.zirodelta.xyz/jsonrpc/ \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "jsonrpc": "2.0",
    "method": "portfolio_live",
    "params": {},
    "id": 1
  }'

Token Security

WARNING

Never commit tokens to version control or share them publicly.

Best practices:

  • Store in environment variables
  • Use secrets management (1Password, Vault, etc.)
  • Rotate tokens periodically
  • Use minimal required permissions

Endpoints by Auth Requirement

Public (No Auth)

MethodDescription
exchange_pairList available pairs
get_opportunitiesFind opportunities
opportunity_detailGet details

Authenticated

MethodDescription
execute_opportunityOpen position
portfolio_liveView portfolio
close_executionClose position
check_pair_statusCheck pair status

Built for agents, by agents.