---
name: tetrac
description: AI-native multi-exchange trading platform. Index/directory for the Tetrac skill pack — registration, market data, trading across every supported perps venue, and pay-per-request data via x402 or MPP. Start here, then follow the link to the sub-skill that matches your task.
license: Proprietary
compatibility: Designed for Claude Code (or similar products)
metadata:
  author: Tetrac
  version: "0.4.1"
  homepage: "https://www.tetrac.xyz"
  emoji: "📊"
  category: "index"
  api_base: "https://www.tetrac.xyz/api/v1"
---

## What this file is

This is the **root directory** for the Tetrac skill pack. It does not contain the API examples — each sub-skill does. Pick the skill that matches your task, fetch it, and follow it.

## Skill Directory

Fetch any of these directly:

| Skill                   | Purpose                                                                                                                                                                                                                              | URL                                                          |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------ |
| **onboarding**          | Register (email + passkey challenge flow), log in for a 24 h session token, and make a first authenticated call.                                                                                                                     | `https://www.tetrac.xyz/skills/onboarding/SKILL.md`          |
| **market-data**         | Read tickers, funding rates, open interest, volume snapshots, Tetrac scanner (TA signals), news, economic calendar, insights, listings, and quakes.                                                                                  | `https://www.tetrac.xyz/skills/market-data/SKILL.md`         |
| **trading**             | Place and cancel orders, manage positions, set leverage and hedge mode, read balances across every supported perps venue.                                                                                                            | `https://www.tetrac.xyz/skills/trading/SKILL.md`             |
| **x402-agent-payments** | Pay per call on the paid market-data and exchange endpoints (from $0.05; $0.50 for the full-market scanner snapshot) directly on Solana mainnet. No API key, no facilitator — you submit the transfer, the server verifies on-chain. | `https://www.tetrac.xyz/skills/x402-agent-payments/SKILL.md` |
| **mpp-payments**        | Pay per call on the paid market-data and exchange endpoints (from $0.05; $0.50 for the full-market scanner snapshot) via the Machine Payments Protocol on Solana using standard HTTP 402 challenges and an `mppx`-compatible client. | `https://www.tetrac.xyz/skills/mpp-payments/skill.md`        |

**Install locally:**

```bash
mkdir -p ~/.Tetrac/skills
curl -s https://www.tetrac.xyz/SKILL.md > ~/.Tetrac/skills/SKILL.md
```

Re-fetch any of the URLs above at any time to pick up updates.

---

## How to choose a skill

| If you need to...                                   | Go to                   |
| --------------------------------------------------- | ----------------------- |
| Get set up (register, auth token, first request)    | **onboarding**          |
| Read prices, funding, scanner signals, news         | **market-data**         |
| Place/cancel orders, manage positions, set leverage | **trading**             |
| Pay per request with a Solana wallet (no API key)   | **x402-agent-payments** |
| Pay per request via an MPP client (Solana)          | **mpp-payments**        |

Typical agent path: `onboarding` → `market-data` → `trading`. If you want to skip registration entirely and pay as you go, use `x402-agent-payments` or `mpp-payments`.

---

## Authentication modes

Tetrac accepts three authentication modes. Pick one:

1. **Registered session** — register once and log in with a signed challenge (see `onboarding`), then send two headers on every `/api/v1/*` call:
   - `ttc-auth-token: <authToken returned from register/login, valid for 24h>`
   - `ttc-public-key: <publicKey returned from register/login — your identity key>`
2. **x402 payment** — no registration. Pay USDC on Solana per call ($0.05 standard, $0.50 for the full-market scanner snapshot) and attach the `x-x402-payment` header (or the x402 v2 `PAYMENT-SIGNATURE` header). See the `x402-agent-payments` skill.
3. **MPP payment** — no registration. POST to `/api/v1/mpp` on Solana, settle the 402 challenge, retry with the payment credential. See the `mpp-payments` skill.

> **Do not** fabricate a registration or login request from this file — both use a challenge signed with keys derived from your passkey, and the passkey itself is never sent. Fetch the `onboarding` skill and follow it.

---

## Supported exchanges

The supported-venue roster changes as venues are added, suspended, or delisted, so it is not reproduced here. See the live list on the home page (https://www.tetrac.xyz), or read the `supportedExchanges` array returned by `GET /api/v1/exchanges`.

See the `trading` skill for the method list.

---

## Response envelope

Most `/api/v1/*` endpoints return:

```json
{ "success": true, "data": {}, "timestamp": 1738435234567 }
```

A few return their payload under other top-level fields (for example `items` from `markets/news`) — each sub-skill shows the exact shape.

Errors return a non-2xx status with an `error` field, for example:

```json
{
  "success": false,
  "status": 402,
  "error": "Payment Required - X402 payment header required"
}
```

The error body's shape varies by endpoint, so branch on the HTTP status. Status codes used: `400` bad input, `401` unauthenticated (session-only routes, and any route when the session headers you sent are expired or were replaced by a newer login: log in again, never pay to work around it), `402` payment required (x402/MPP — paid routes answer a request with no session headers this way, with the payment terms), `403` forbidden, `409` conflict, `429` rate-limited (check `Retry-After`), `500` server error.

---

## Rate limits

Limits are per identity (your `ttc-public-key`, or the paying wallet for x402) and scale with your subscription tier. x402 pay-per-call requests use the Free limit. MPP calls share one gateway-wide ceiling of 600 forwarded calls per minute across all MPP callers; when it is full, the gateway answers `429` with `Retry-After` before charging.

| Endpoint                                      | Free   | Pro    | Elite   |
| --------------------------------------------- | ------ | ------ | ------- |
| `/api/v1/markets/*`, `/api/v1/solana-perps/*` | 30/min | 90/min | 300/min |
| `/api/v1/exchanges` (trading)                 | 20/min | 60/min | 200/min |

---

## Web UI (for humans)

| Path                 | Description                         |
| -------------------- | ----------------------------------- |
| `/`                  | Main dashboard                      |
| `/trading`           | Multi-venue trading terminal        |
| `/trading/dashboard` | Portfolio management                |
| `/dao`               | DAO monitoring and insights (Elite) |
| `/agents`            | AI conversation interface           |
| `/crypto/privac`     | PrivaC encryption system overview   |
| `/crypto/x402`       | x402 payment protocol               |
| `/skills`            | Agent skills browser                |

---

## Health Check

Free with a registered session:

```bash
curl https://www.tetrac.xyz/api/v1/exchanges \
  -H "ttc-auth-token: YOUR_AUTH_TOKEN" \
  -H "ttc-public-key: YOUR_PUBLIC_KEY"
```

Returns `200` with the venue roster (`supportedExchanges`) when the session is valid, or `401` when it expired or was replaced by a newer login (log in again).

---

## Getting Help

- Product Documentation: https://www.tetrac.xyz/docs
- API contract (machine-readable, linted): https://www.tetrac.xyz/openapi.json
- API documentation for humans: https://www.tetrac.xyz/docs/api

---

_Built for agents, by agents. Humans welcome to trade._
