HERTZ Finance Documentation
Technical reference for the first AI productivity futures exchange. Trade the output of GPT, Claude, Gemini, and Llama — built on Solana.
Quickstart
Get up and running with the HERTZ API in under 5 minutes.
1. Get API keys
Connect your Solana wallet on app.hertz.finance and generate API keys from the Settings page. You'll receive an API key and API secret.
2. Install SDK
# Python
pip install hertz-sdk
# TypeScript / Node.js
npm install @hertz/sdk3. Place your first trade
from hertz import HertzClient
client = HertzClient(
api_key="your_api_key",
api_secret="your_api_secret"
)
# Get hzCLAUDE mark price
ticker = client.get_ticker("hzCLAUDE-PERP")
print(f"hzCLAUDE: {ticker['mark_price']}")
# Place a limit long order
order = client.place_order(
market="hzCLAUDE-PERP",
side="buy",
type="limit",
price=248.50,
size=10.0,
leverage=5
)
print(f"Order placed: {order['id']}")Authentication
All private endpoints require HMAC-SHA256 signed requests. Include these headers:
| Header | Description |
|---|---|
| HZ-API-KEY | Your API key |
| HZ-TIMESTAMP | Unix timestamp in milliseconds |
| HZ-SIGNATURE | HMAC-SHA256(timestamp + method + path + body, secret) |
import hmac, hashlib, time
timestamp = str(int(time.time() * 1000))
message = timestamp + "GET" + "/v1/positions"
signature = hmac.new(
api_secret.encode(),
message.encode(),
hashlib.sha256
).hexdigest()Available Markets
HERTZ offers perpetual futures contracts on AI productivity indexes. Each index tracks the verifiable output of a major AI model family.
| Market | Underlying | Base price | Leverage | Status |
|---|---|---|---|---|
| hzCLAUDE-PERP | Anthropic Claude productivity index | ~248 | 1-20x | Live (beta) |
| hzGPT-PERP | OpenAI GPT productivity index | ~186 | 1-20x | Live (beta) |
| hzGEMINI-PERP | Google Gemini productivity index | ~124 | 1-20x | Live (beta) |
| hzLLAMA-PERP | Meta Llama productivity index | ~68 | 1-20x | Live (beta) |
| hzINDEX-PERP | Composite AI productivity index | — | 1-10x | Coming soon |
Index Methodology
Each HERTZ productivity index is a weighted composite score derived from publicly observable AI model performance metrics:
- Benchmark performance — Scores on standardized tests (MMLU, HumanEval, MATH, GPQA) weighted by recency
- API throughput — Measured inference speed (tokens/sec) from public monitoring endpoints
- Availability — Uptime percentage from distributed monitoring nodes
- Adoption signals — Developer API usage trends, integration counts, community activity
- Cost efficiency — Output quality per dollar of API cost
Index values are normalized to a base of 100 as of January 1, 2026. Current values above 100 indicate improved productivity relative to baseline. The oracle updates on-chain every ~10 minutes (1 epoch).
Oracle & TEE Verification
HERTZ uses a decentralized oracle network to publish index values on-chain. Oracle operators run inside Trusted Execution Environments (TEE) to ensure data integrity.
- Data sources are fetched inside the TEE enclave — operators cannot tamper with inputs
- Each update includes a TEE attestation proving the computation ran unmodified
- Multiple independent operators must reach consensus before an index value is published
- Operators stake $HERTZ as collateral — misbehavior results in slashing
REST API — Markets
Returns all available markets with current status, funding rate, and mark price.
{
"markets": [
{
"symbol": "hzCLAUDE-PERP",
"status": "active",
"base_currency": "hzCLAUDE",
"quote_currency": "USDC",
"mark_price": "248.62",
"index_price": "248.55",
"funding_rate": "0.0003",
"next_funding_time": "2026-03-21T08:00:00Z",
"open_interest": "18420.5",
"volume_24h": "34120.80",
"max_leverage": 20
}
]
}REST API — Orderbook
Returns current orderbook snapshot. Optional depth parameter (default 20, max 100).
{
"market": "hzCLAUDE-PERP",
"timestamp": 1711036800000,
"bids": [
["248.55", "12.4"],
["248.54", "8.7"],
["248.53", "23.1"]
],
"asks": [
["248.57", "15.2"],
["248.58", "9.8"],
["248.59", "31.6"]
]
}REST API — Candles
Historical OHLCV candles. Parameters: resolution (1m, 5m, 15m, 1H, 4H, 1D), from, to (Unix timestamps), limit (max 1000).
{
"market": "hzCLAUDE-PERP",
"resolution": "15m",
"candles": [
{
"time": 1711036800,
"open": "247.80",
"high": "248.65",
"low": "247.55",
"close": "248.40",
"volume": "142.5"
}
]
}REST API — Place Order
Place a new order. Requires authentication.
| Parameter | Type | Required | Description |
|---|---|---|---|
| market | string | Yes | e.g. "hzCLAUDE-PERP" |
| side | string | Yes | "buy" or "sell" |
| type | string | Yes | "limit", "market", or "stop" |
| price | string | Limit/Stop | Order price in USDC |
| size | string | Yes | Order size in base units |
| leverage | integer | No | 1-20 (default: account setting) |
| reduce_only | boolean | No | Only reduce existing position |
| client_id | string | No | Custom order ID for tracking |
{
"market": "hzCLAUDE-PERP",
"side": "buy",
"type": "limit",
"price": "248.50",
"size": "10.0",
"leverage": 5
}REST API — Positions
Returns all open positions for the authenticated account.
{
"positions": [
{
"market": "hzCLAUDE-PERP",
"side": "long",
"size": "24.5",
"entry_price": "245.30",
"mark_price": "248.62",
"liquidation_price": "198.24",
"leverage": 5,
"unrealized_pnl": "81.34",
"margin": "1201.47"
}
]
}REST API — Cancel Order
Cancel an open order by ID. Returns the cancelled order object. Use DELETE /v1/orders (no ID) to cancel all open orders.
WebSocket — Connection
Connect to the real-time data feed:
wss://ws.hertz.finance/v1/streamSubscribe to channels by sending a JSON message after connecting:
{
"op": "subscribe",
"channel": "orderbook",
"market": "hzCLAUDE-PERP"
}WebSocket — Orderbook
Real-time orderbook updates. First message is a full snapshot, subsequent messages are incremental deltas.
{
"channel": "orderbook",
"market": "hzCLAUDE-PERP",
"type": "delta",
"bids": [["248.52", "0"], ["248.50", "18.3"]],
"asks": [["248.58", "22.1"]],
"timestamp": 1711036800123
}A size of "0" means the price level has been removed.
WebSocket — Trades
{
"channel": "trades",
"market": "hzCLAUDE-PERP",
"trades": [
{
"id": "t_8a3f2e",
"price": "248.56",
"size": "5.2",
"side": "buy",
"timestamp": 1711036800456
}
]
}WebSocket — Candles
{
"op": "subscribe",
"channel": "candles",
"market": "hzCLAUDE-PERP",
"resolution": "15m"
}Python SDK
pip install hertz-sdkfrom hertz import HertzClient, HertzWebSocket
# REST client
client = HertzClient(api_key="...", api_secret="...")
# Get all markets
markets = client.get_markets()
# Stream real-time trades
def on_trade(msg):
print(f"{msg['market']}: {msg['price']} x {msg['size']}")
ws = HertzWebSocket()
ws.subscribe_trades("hzCLAUDE-PERP", callback=on_trade)
ws.run()TypeScript SDK
npm install @hertz/sdkimport { HertzClient, HertzWS } from '@hertz/sdk';
const client = new HertzClient({
apiKey: '...',
apiSecret: '...'
});
// Get mark price
const ticker = await client.getTicker('hzCLAUDE-PERP');
console.log(`Mark: ${ticker.markPrice}`);
// Stream orderbook
const ws = new HertzWS();
ws.subscribeOrderbook('hzCLAUDE-PERP', (data) => {
console.log(`Best bid: ${data.bids[0][0]}`);
});Program Addresses
| Contract | Address |
|---|---|
| Exchange Program | HZex...TBA (deploying to mainnet) |
| Oracle Program | HZor...TBA |
| $HERTZ Token | TBA — announced on launch day via @hertzxfinance |
| USDC (Solana) | EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v |
Fee Structure
| Fee type | Rate | Notes |
|---|---|---|
| Taker fee | 0.050% | Charged on order fill |
| Maker fee | 0.020% | Rebate possible for top-tier |
| Liquidation penalty | 1.000% | Of position notional value |
| Funding rate | Variable | Settled every 8 hours |
Fee tiers based on 30-day trading volume are planned for mainnet. Market makers can apply for custom fee schedules.
Liquidation Engine
Positions are liquidated when the margin ratio falls below the maintenance margin requirement:
- Maintenance margin: 2.5% of position notional
- Liquidation price is calculated at order placement and shown in the UI
- Partial liquidation is used when possible to minimize impact
- An insurance fund covers socialized losses — no auto-deleveraging in normal conditions
Register an Agent
AI agent operators can contribute productivity data to HERTZ indexes. Registered agents earn a share of oracle rewards.
# Register your agent via CLI
hertz-cli agent register \
--name "my-code-agent" \
--category "code" \
--endpoint "https://my-agent.example.com/metrics" \
--wallet <SOLANA_PUBKEY>Your agent endpoint must expose a /metrics JSON endpoint returning:
{
"agent_id": "ag_7x8k2m",
"category": "code",
"tasks_completed_24h": 1847,
"avg_quality_score": 0.92,
"avg_latency_ms": 340,
"uptime_pct": 99.8
}Run an Oracle Node
Oracle operators validate agent data and publish index updates on-chain. Requirements:
- Stake: Minimum 10,000 $HERTZ
- Hardware: TEE-capable CPU (Intel SGX or AMD SEV), 8GB RAM, 100Mbps connection
- Rewards: Share of trading fees proportional to stake weight
- Slashing: 5% of stake for downtime > 1 hour, 100% for provably false data
# Run oracle node
docker pull hertzfinance/oracle-node:latest
docker run -d \
--device /dev/sgx_enclave \
-e WALLET_KEY=<path_to_key> \
-e RPC_URL=https://api.mainnet-beta.solana.com \
hertzfinance/oracle-node:latest