Quick Start
Up and running in 60 seconds.
1. Install the SDK
bash
npm install @0xfox/sdk
2. Create an identity and swap
typescript
import { FoxClient } from "@0xfox/sdk";
const fox = new FoxClient({
apiKey: process.env.FOX_API_KEY!,
baseUrl: "https://api.0xfox.org",
});
// Create an identity
const identity = await fox.identity.create({
walletAddress: "0xAbC...123",
chain: "ethereum",
});
// Submit a swap intent
const intent = await fox.intent.create({
from: { chain: "ethereum", token: "USDC", amount: "1000" },
to: { chain: "arbitrum", token: "USDC" },
});
console.log(intent.status); // "matched"API Reference
Every endpoint, documented.
Identity
| Method | Path |
|---|---|
| POST | /v1/identity |
| GET | /v1/identity/:id |
Swap
| Method | Path |
|---|---|
| POST | /v1/intent |
Balances
| Method | Path |
|---|---|
| GET | /v1/identity/:id/balances |
Status
| Method | Path |
|---|---|
| GET | /v1/status |
Sentiment
| Method | Path |
|---|---|
| GET | /v1/sentiment |
| GET | /v1/sentiment/:asset |
Swarm
| Method | Path |
|---|---|
| GET | /v1/swarm/bias |
Predictions
| Method | Path |
|---|---|
| GET | /v1/prediction/recent |
Genome
| Method | Path |
|---|---|
| GET | /v1/genome/status |
SGX (Copy-Trading)
| Method | Path |
|---|---|
| POST | /v1/sgx/:strategy_id/auction |
TypeScript SDK
Typed. Ergonomic. Batteries included.
typescript
// Check balances
const balances = await fox.balances.get(identity.id);
// Get system status
const status = await fox.status();
// Fetch sentiment for ETH
const sentiment = await fox.sentiment.get("ETH");
// Get recent predictions
const predictions = await fox.predictions.recent();
// Swarm bias
const bias = await fox.swarm.bias();foxclaw CLI
Power user? Use the terminal.
bash
# Install the CLI cargo install foxclaw-cli # Check system status foxclaw status # Submit a swap intent foxclaw swap \ --from ethereum:USDC:1000 \ --to arbitrum:USDC # View your balances foxclaw balances --identity <ID> # Get recent predictions foxclaw predictions recent # Launch the TUI dashboard foxclaw tui
MCP Server
Give your AI agent cross-chain powers.
jsonc
// fox-mcp-server exposes 0xFOX as an MCP tool server.
// Any MCP-compatible AI agent can call 0xFOX endpoints.
// 1. Start the server
// foxclaw mcp-server --port 3100
// 2. Register in your MCP client config:
{
"mcpServers": {
"0xfox": {
"url": "http://localhost:3100/sse"
}
}
}
// 3. The agent can now call tools like:
// fox_swap, fox_balances, fox_sentiment,
// fox_predictions, fox_swarm_bias, fox_statusAbout 0xFOX