InferLane Trading API

Build on top of InferLane's compute price indices and order book. Access real-time pricing data, place orders, trade futures, and integrate compute cost hedging into your platform.

Price Indices

Real-time IL-FRONTIER, IL-STANDARD, IL-ECONOMY, IL-OPENWEIGHT, IL-DECODE, IL-MEMORY indices.

Order Book

LIMIT and MARKET orders with price-time priority matching across quality tiers.

Futures & Options

Forwards, calls, puts on compute pricing. Hedge your inference costs.

Base URL: https://inferlane.dev/api — All endpoints require HTTPS.

Authentication

All trading endpoints require a ilt_ prefixed API key. Create one from the Trading dashboard under the API Keys tab.

curl -H "Authorization: Bearer ilt_your_key_here" \
  https://inferlane.dev/api/trading/indices

Key Permissions

read

View indices, order book, contracts

trade

Place and cancel orders, create futures

settle

Trigger settlement operations

Indices

Compute price indices represent VWAP (Volume-Weighted Average Price) from order fills within each quality tier. Updated hourly via cron.

GET/api/trading/indices

Returns current values for all 6 compute price indices.

Response

{
  "indices": [
    { "name": "IL-FRONTIER", "value": 0.95, "updatedAt": "..." },
    { "name": "IL-STANDARD", "value": 0.75, "updatedAt": "..." },
    { "name": "IL-ECONOMY", "value": 0.50, "updatedAt": "..." },
    { "name": "IL-OPENWEIGHT", "value": 0.35, "updatedAt": "..." },
    { "name": "IL-DECODE", "value": 0.15, "updatedAt": "..." },
    { "name": "IL-MEMORY", "value": 0.08, "updatedAt": "..." }
  ]
}
GET/api/trading/indices?history=IL-FRONTIER&days=30

Historical index snapshots for charting and analysis.

Parameters

historystringrequiredIndex name (e.g. IL-FRONTIER)
daysnumberNumber of days (default: 30, max: 365)

Orders

Place LIMIT or MARKET orders on the compute order book. Orders are matched with price-time priority within each quality tier. Trading fee: 2.5% on fills (split between buyer and seller).

GET/api/trading/orders

View the order book and your open orders.

Parameters

tierstringFilter by quality tier (FRONTIER, STANDARD, ECONOMY, OPEN_WEIGHT)
minebooleanShow only your orders
POST/api/trading/orders

Place a new order. BUY orders require sufficient credit balance.

Parameters

sidestringrequiredBUY or SELL
orderTypestringrequiredLIMIT or MARKET
qualityTierstringrequiredFRONTIER, STANDARD, ECONOMY, or OPEN_WEIGHT
quantitynumberrequiredNumber of compute units (1-100,000)
pricePerUnitnumberPrice per unit ($0.05-$2.00). Required for LIMIT orders.

Response

{
  "orderId": "clo1a2b3c...",
  "side": "BUY",
  "orderType": "LIMIT",
  "qualityTier": "FRONTIER",
  "quantity": 500,
  "pricePerUnit": 0.90,
  "status": "OPEN",
  "fills": []
}
DELETE/api/trading/orders?orderId=xxx

Cancel an open or partially filled order. Returns unfilled quantity to your balance.

Parameters

orderIdstringrequiredID of the order to cancel

Futures & Options

Create forward contracts and options on compute pricing. Contracts settle against IL index values at delivery date. 10% margin required.

GET/api/trading/futures

List your open and settled contracts.

POST/api/trading/futures

Create a new forward contract or option.

Parameters

contractTypestringrequiredFORWARD, OPTION_CALL, OPTION_PUT, DECODE_FORWARD, MEMORY_FORWARD, DECODE_OPTION_CALL, MEMORY_OPTION_PUT
qualityTierstringRequired for standard contracts. Not needed for memory/decode types.
quantitynumberrequiredContract size (100-1,000,000)
strikePricenumberrequiredStrike price per unit
deliveryDatestringrequiredISO date string (1-180 days out)

Response

{
  "contractId": "clo1a2b3c...",
  "marginRequired": 50.00,
  "message": "Contract created. Margin reserved."
}

API Keys

Manage trading API keys programmatically. Keys use the ilt_ prefix and support granular permissions. Maximum 10 keys per account.

GET/api/trading/keys

List your active trading API keys.

POST/api/trading/keys

Create a new trading API key.

Parameters

namestringrequiredDescriptive name (e.g. "prod-trading-bot")
permissionsstring[]requiredArray of: read, trade, settle

Response

{
  "keyId": "clo1a2b3c...",
  "key": "ilt_abc123...",
  "name": "prod-trading-bot",
  "permissions": ["read", "trade"],
  "message": "Store this key securely. It cannot be retrieved again."
}

Rate Limits

Rate limits are per API key and enforced per minute. Exceeding limits returns HTTP 429.

EndpointLimitWindow
GET /trading/indices60 req1 min
GET /trading/orders60 req1 min
POST /trading/orders20 req1 min
DELETE /trading/orders20 req1 min
GET /trading/futures30 req1 min
POST /trading/futures10 req1 min
GET /trading/keys30 req1 min
POST /trading/keys5 req1 min

Code Examples

curl

# Get current indices
curl -s -H "Authorization: Bearer ilt_your_key" \
  https://inferlane.dev/api/trading/indices | jq

# Place a limit buy order
curl -X POST -H "Authorization: Bearer ilt_your_key" \
  -H "Content-Type: application/json" \
  -d '{"side":"BUY","orderType":"LIMIT","qualityTier":"FRONTIER","quantity":100,"pricePerUnit":0.90}' \
  https://inferlane.dev/api/trading/orders

# Cancel an order
curl -X DELETE -H "Authorization: Bearer ilt_your_key" \
  "https://inferlane.dev/api/trading/orders?orderId=clo1a2b3c"

Python

import requests

API_KEY = "ilt_your_key"
BASE = "https://inferlane.dev/api"
headers = {"Authorization": f"Bearer {API_KEY}"}

# Fetch indices
indices = requests.get(f"{BASE}/trading/indices", headers=headers).json()
for idx in indices["indices"]:
    print(f"{idx['name']}: ${idx['value']:.4f}")

# Place a limit order
order = requests.post(f"{BASE}/trading/orders", headers=headers, json={
    "side": "BUY",
    "orderType": "LIMIT",
    "qualityTier": "STANDARD",
    "quantity": 250,
    "pricePerUnit": 0.70,
}).json()
print(f"Order {order['orderId']} placed: {order['status']}")

TypeScript

const API_KEY = "ilt_your_key";
const BASE = "https://inferlane.dev/api";
const headers = { Authorization: `Bearer ${API_KEY}` };

// Fetch indices
const res = await fetch(`${BASE}/trading/indices`, { headers });
const { indices } = await res.json();
indices.forEach((idx: { name: string; value: number }) =>
  console.log(`${idx.name}: $${idx.value.toFixed(4)}`)
);

// Create a forward contract
const future = await fetch(`${BASE}/trading/futures`, {
  method: "POST",
  headers: { ...headers, "Content-Type": "application/json" },
  body: JSON.stringify({
    contractType: "FORWARD",
    qualityTier: "FRONTIER",
    quantity: 1000,
    strikePrice: 0.92,
    deliveryDate: "2026-06-01",
  }),
}).then((r) => r.json());
console.log(`Contract ${future.contractId}, margin: $${future.marginRequired}`);

Webhooks

COMING SOON

Webhook notifications for real-time events: order fills, settlement completions, index threshold alerts, and contract expiry warnings. Register a webhook URL from the Trading dashboard to receive POST callbacks with signed payloads.

Planned Events

order.filledorder.cancelledsettlement.completedindex.alertfuture.settledfuture.expiring

Questions? Reach us at dev@inferlane.dev