REST API Reference
Complete REST API documentation for fXYZ Network services including Fixies, Bridge, Prices, and more.
REST API Reference
In addition to the GraphQL API, fXYZ Network provides REST endpoints for specific services that benefit from traditional HTTP semantics.
Base URL: https://api.fxyz.network/api
Most endpoints require authentication via Privy JWT token in the Authorization header.
Authentication
All authenticated endpoints require:
Authorization: Bearer <privy-jwt-token>Some endpoints also support:
x-persona-id: <persona-id> # For multi-persona usersFixie AI Agents
AI agent management via Letta integration.
List Agents
GET /api/fixieResponse:
{
"agents": [
{
"id": "agent-xxx",
"name": "Florin",
"tier": "standard",
"ownerType": "network",
"created_at": "2026-01-01T00:00:00Z"
}
]
}Create Agent
POST /api/fixie
Content-Type: application/json
{
"name": "My Agent",
"tier": "free|standard|premium",
"ownerType": "member|project|network",
"memberId": "member-id",
"projectId": "project-id"
}Get Agent Details
GET /api/fixie/{agentId}Chat with Agent (Streaming)
POST /api/fixie/{agentId}/stream
Content-Type: application/json
{
"message": "What is the current price of SOL?"
}Returns Server-Sent Events with streaming response.
Agent Tools
GET /api/fixie/tools/graphiti-search?query=<search-query>
GET /api/fixie/tools/query-memory?agentId=<agent-id>&query=<query>
POST /api/fixie/tools/neo4j-queryPrices & Market Data
Real-time pricing from multiple sources.
Get All Prices
GET /api/pricesResponse:
{
"assets": [
{
"symbol": "BTC",
"name": "Bitcoin",
"price": 98500,
"change24h": 2.5,
"type": "crypto"
}
],
"lastUpdated": "2026-01-19T12:00:00Z"
}FX Rates
GET /api/fx
GET /api/fx/bis # Bank for International Settlements dataBIS Response includes:
- Daily turnover data ($14.8T total)
- Currency market shares
- Historical trends
Real World Assets (RWA)
Tokenized asset data from RWA.xyz.
RWA Overview
GET /api/rwa/overviewResponse:
{
"total_value": 1750000000,
"categories": {
"stablecoins": 1350000000,
"public_equity": 144000000,
"treasury_bonds": 120000000
},
"protocols": [...],
"lastUpdated": "2026-01-19T00:00:00Z"
}RWA Protocols
GET /api/rwa/protocolsRWA Assets
GET /api/rwa/assets?protocol=<protocol-name>Bridge (Fiat On/Off Ramps)
Fiat-to-crypto infrastructure via Bridge.xyz.
KYC Links
POST /api/bridge/kyc-links
Content-Type: application/json
{
"full_name": "John Doe",
"email": "[email protected]",
"type": "individual|business",
"personaId": "persona-id",
"redirect_uri": "https://app.fxyz.network/kyc-complete"
}GET /api/bridge/kyc-links?id={linkId}
GET /api/bridge/customers/{customerId}/kyc-linkVirtual Accounts
Create virtual bank accounts for receiving fiat.
GET /api/bridge/virtual-accounts
POST /api/bridge/virtual-accounts
Content-Type: application/json
{
"bridgeCustomerId": "customer-id",
"destinationWalletAddress": "Solana-wallet-address",
"currency": "USD",
"destinationPaymentRail": "solana",
"destinationCurrency": "usdc"
}External Accounts (Bank Linking)
GET /api/bridge/external-accounts
POST /api/bridge/external-accounts
DELETE /api/bridge/external-accounts?bridgeCustomerId=...&accountId=...Create Bank Account:
{
"bridgeCustomerId": "customer-id",
"account_type": "us|iban|...",
"currency": "USD",
"bank_name": "Chase",
"account_number": "...",
"routing_number": "..."
}Transfers (Pay-ins)
GET /api/bridge/transfers
GET /api/bridge/transfers/{transferId}
POST /api/bridge/transfers
Content-Type: application/json
{
"bridgeCustomerId": "customer-id",
"amount": "100.00",
"destinationAddress": "wallet-address",
"currency": "USD",
"sourceRail": "ach"
}Liquidations (Off-ramps)
GET /api/bridge/liquidations
POST /api/bridge/liquidation
Content-Type: application/json
{
"bridgeCustomerId": "customer-id",
"amount": "100",
"destinationAccountId": "bank-account-id",
"sourceCurrency": "usdc",
"destinationCurrency": "USD"
}Exchange Rates
GET /api/bridge/exchange-rates?from=USD&to=USDC&amount=100Solana Blockchain
Direct Solana blockchain queries.
Wallet Balance
GET /api/solana/balance?address={walletAddress}NFT Holdings
GET /api/solana/nfts?address={walletAddress}Token Balances
GET /api/solana/tokens?address={walletAddress}Membership Proof
GET /api/membership-proof?memberId={memberId}
POST /api/membership-proof/verifyDocuments (R2 Storage)
Document management via Cloudflare R2.
List Documents
GET /api/documents
GET /api/documents?category=research&status=publishedGet Document
GET /api/documents/{documentId}Upload Document (Admin)
POST /api/documents/upload
Content-Type: multipart/form-data
file: <file>
title: "Document Title"
category: "research|legal|technical"
authors: ["Author 1", "Author 2"]
year: 2026Update Document
PATCH /api/documents/{documentId}
Content-Type: application/json
{
"title": "Updated Title",
"status": "published"
}Seed Bibliography
POST /api/documents/seed-bibliographyTelegram Integration
Telegram bot webhook and management.
Webhook Handler
POST /api/telegram/webhook
X-Telegram-Bot-Api-Secret-Token: <webhook-secret>
{
"message": {...},
"callback_query": {...}
}Setup Webhook
POST /api/telegram/setup
Content-Type: application/json
{
"action": "set|delete|info",
"url": "https://api.fxyz.network/api/telegram/webhook"
}Bot Commands
/start- Initialize bot conversation/help- Show available commands/agents- List available Fixie agents/agent <id>- Select an agent to chat with
Neo4j Graph Database
Direct graph queries and stats.
Database Stats
GET /api/neo4j/statsResponse:
{
"nodeCount": 4277,
"relationshipCount": 10946,
"nodeTypes": {
"Member": 150,
"Persona": 320,
"Party": 450,
"Circle": 12
}
}Webhooks
The API receives webhooks from external services.
Helius (Solana)
POST /api/webhooks/helius
Authorization: <helius-webhook-secret>Handles:
- Transaction confirmations
- NFT mints
- Token transfers
Bridge (Payments)
POST /api/webhooks/bridge
X-Webhook-Signature: <signature>Handles:
- Payment status updates
- KYC completion events
- Transfer confirmations
Privy (Authentication)
POST /api/webhooks/privyHandles:
- User creation events
- Account linking
Cron Jobs
Scheduled data synchronization (internal).
| Endpoint | Schedule | Purpose |
|---|---|---|
/api/cron/rwa-sync | Daily 00:00 | Sync RWA.xyz data |
/api/cron/fx-rates | Hourly | Update FX rates |
/api/cron/bis-data | Daily | BIS market data |
/api/cron/crypto-prices | Every 5 min | Crypto prices |
/api/cron/defillama | Daily | DeFi protocols |
/api/cron/keepalive | Every 5 min | Health check |
Error Responses
All endpoints return consistent error format:
{
"error": "Error message",
"code": "ERROR_CODE",
"details": {}
}Common Status Codes
| Code | Meaning |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Rate Limited |
| 500 | Server Error |
Rate Limits
| Endpoint Type | Limit |
|---|---|
| Authenticated | 1000/hour |
| Unauthenticated | 100/hour |
| Streaming | 100/hour |
| Webhooks | No limit |
CORS Configuration
The API allows requests from:
https://app.fxyz.networkhttps://fxyz.networkhttps://docs.fxyz.networkhttp://localhost:*(development)
Environment Variables
For local development, configure:
# Required
PRIVY_APP_ID=your-app-id
PRIVY_APP_SECRET=your-secret
NEO4J_URI=bolt://localhost:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=password
# Optional services
BRIDGE_API_KEY=bridge-key
LETTA_BASE_URL=http://localhost:8283
HELIUS_API_KEY=helius-key
R2_ACCESS_KEY_ID=r2-key
R2_SECRET_ACCESS_KEY=r2-secretSDK Examples
Fetch Prices (JavaScript)
const response = await fetch('https://api.fxyz.network/api/prices');
const { assets } = await response.json();
const btcPrice = assets.find(a => a.symbol === 'BTC')?.price;Create Fixie Agent (TypeScript)
const response = await fetch('https://api.fxyz.network/api/fixie', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'My Assistant',
tier: 'free',
ownerType: 'member',
memberId: 'my-member-id',
}),
});
const { agent } = await response.json();Stream Chat Response
const eventSource = new EventSource(
`https://api.fxyz.network/api/fixie/${agentId}/stream?message=${encodeURIComponent(message)}`,
{ headers: { 'Authorization': `Bearer ${token}` } }
);
eventSource.onmessage = (event) => {
const data = JSON.parse(event.data);
console.log(data.content);
};