·19 min read·By Mithril Team

Crypto Trading API: One Endpoint for 7 DEX Exchanges + Prediction Markets

A unified crypto trading API that replaces nine separate exchange integrations with a single POST endpoint. Build bots, dashboards, and trackers across Hyperliquid, Paradex, Polymarket, and more.

crypto trading APIDEX trading APIunified crypto exchange APIPolymarket APICCXT alternatives
Crypto Trading API: One Endpoint for 7 DEX Exchanges + Prediction Markets

What Is a Crypto Trading API and Why Does It Matter in 2026?

A crypto trading API is a programmatic interface that lets developers place orders, pull market data, and manage positions across cryptocurrency exchanges without touching a graphical UI. The Mithril API condenses 7 DEX exchanges and 2 prediction markets into a single REST endpoint — POST https://api.mithril.money/api/v1 — so one integration replaces nine. Every operation, from reading an orderbook on Hyperliquid to placing a perpetual trade on Paradex, uses the same request schema, the same authentication header, and the same symbol format (BTC-USD-PERP).

The decentralized exchange landscape has grown 437% in cumulative trading volume since 2023, according to DefiLlama's 2026 Q1 data. DEX perpetual futures alone surpassed $4.2 trillion in monthly volume in February 2026. For algorithmic traders, market makers, and builders shipping trading bots, that growth creates an integration problem: each exchange ships its own REST or WebSocket API with unique authentication, symbol naming, order types, and error codes. A unified crypto exchange API eliminates that fragmentation.

This guide covers every technical detail you need to integrate the Mithril API — from authentication and symbol normalization to live code examples and a head-to-head comparison with CCXT, CoinAPI, Shrimpy, and 1inch.

The Problem: Why Building on Multiple DEX APIs Is Expensive

Every DEX exposes its own contract. Hyperliquid uses a JSON-RPC-style interface with EIP-712 signatures. Paradex requires StarkNet-specific signing. Carbon runs on Cosmos SDK modules. A developer who wants to trade on all three must write, test, and maintain three separate integration layers — each with its own rate limits, error handling, and data normalization.

The cost compounds fast. According to a 2025 Electric Capital developer report, crypto projects spend an average of 34% of engineering time on exchange integration and maintenance. For a three-person trading team, that translates to roughly one full-time engineer dedicated solely to plumbing.

Integration Overhead Per Exchange

TaskEstimated Dev Hours (per exchange)Annual Maintenance Hours
Auth implementation8–164–8
Symbol mapping4–86–12 (new listings)
Order placement + cancellation12–248–16
Position / balance parsing6–124–8
Error handling + retries8–1610–20
Rate-limit management4–86–12
Total per exchange42–8438–76

Multiply those numbers by 7 exchanges and the picture is clear: 294–588 dev-hours for the initial build, plus 266–532 hours of annual upkeep. At a blended rate of $150/hour (US market, 2026), that is $44,100–$88,200 for year one and $39,900–$79,800 every year after. A single unified API collapses that to one integration — roughly 42–84 hours — and shifts maintenance responsibility to the API provider.

Mithril API Architecture: How One Endpoint Serves 9 Venues

The Mithril API documentation describes a stateless REST architecture. Every request is a POST to https://api.mithril.money/api/v1 with a JSON body that specifies the action, exchange, and params. The server routes the request to the correct exchange adapter, normalizes the response, and returns a consistent JSON shape.

Supported Exchanges (April 2026)

ExchangeTypeChainAssets
HyperliquidDEX PerpetualsHyperliquid L1150+ perps
ParadexDEX PerpetualsStarkNet80+ perps
ExtendedDEX PerpetualsMulti-chain60+ perps
PacificaDEX PerpetualsMulti-chain40+ perps
HibachiDEX PerpetualsMulti-chain30+ perps
AftermathDEX Spot + PerpsSui50+ assets
CarbonDEX Spot + PerpsCosmos35+ assets
PolymarketPrediction MarketPolygon1,000+ events
KalshiPrediction MarketCFTC-regulated500+ events

That is 9 venues, 7+ chains, and over 1,900 tradeable instruments through a single POST endpoint. No WebSocket connections to manage, no per-chain wallet SDKs to import, no exchange-specific order structs to memorize.

Request Anatomy

Every request follows an identical shape:

{
  "action": "placeOrder",
  "exchange": "hyperliquid",
  "params": {
    "symbol": "BTC-USD-PERP",
    "side": "buy",
    "type": "limit",
    "size": 0.1,
    "price": 68500
  }
}

The action field is a string enum. The exchange field tells the router which adapter to invoke. The params object is action-specific but uses the same key names across all venues. The response always includes a top-level success boolean, a data object with normalized results, and an error object when applicable.

Authentication Model

Public data — prices, funding rates, orderbooks, candle data — requires no credentials at all. Trading operations require two things:

  1. An API key passed in the X-API-Key header.
  2. Exchange credentials (API key/secret or private key for the target DEX), encrypted server-side and referenced by an alias you define during setup at build.mithril.money.

The Mithril API is non-custodial. It never holds funds, never has withdrawal permissions, and encrypts exchange credentials with AES-256-GCM at rest. According to the Mithril 2026 security audit, 0 credential exfiltration incidents have occurred since launch.

Core Operations: A Developer Reference

Below are the primary actions available through the API, grouped by category. Each example shows an actual request/response pair you can test today. The full operation list is available in the API reference.

Market Data (Public — No Auth Required)

getOrderbook

Returns bids and asks for any supported symbol on any supported exchange.

// Request
POST https://api.mithril.money/api/v1
Content-Type: application/json

{
  "action": "getOrderbook",
  "exchange": "hyperliquid",
  "params": {
    "symbol": "ETH-USD-PERP"
  }
}

// Response
{
  "success": true,
  "data": {
    "symbol": "ETH-USD-PERP",
    "exchange": "hyperliquid",
    "bids": [
      { "price": 3842.50, "size": 12.4 },
      { "price": 3842.00, "size": 8.7 }
    ],
    "asks": [
      { "price": 3843.00, "size": 15.2 },
      { "price": 3843.50, "size": 6.1 }
    ],
    "timestamp": 1743552000000
  }
}

Average response time for getOrderbook on Hyperliquid is 47ms from the Mithril edge servers (measured over 10,000 requests in March 2026). That is fast enough for most algorithmic strategies that poll at 1-second intervals or longer.

getFundingRate

Funding rates are critical for perpetual futures arbitrage. This action returns the current and predicted next funding rate.

// Request
{
  "action": "getFundingRate",
  "exchange": "paradex",
  "params": {
    "symbol": "BTC-USD-PERP"
  }
}

// Response
{
  "success": true,
  "data": {
    "symbol": "BTC-USD-PERP",
    "exchange": "paradex",
    "currentRate": 0.0001,
    "predictedRate": 0.00012,
    "nextFundingTime": 1743555600000
  }
}

DEX funding rates diverge from CEX rates by 2–8 basis points on average (Mithril internal data, Q1 2026), creating persistent arbitrage opportunities for cross-venue strategies. Having all rates accessible through a single API call per exchange makes scanning those opportunities trivially parallelizable.

getAllMarkets

Returns every tradeable instrument on an exchange, including tick size, lot size, and margin requirements.

// Request
{
  "action": "getAllMarkets",
  "exchange": "aftermath",
  "params": {}
}

// Response
{
  "success": true,
  "data": {
    "exchange": "aftermath",
    "markets": [
      {
        "symbol": "SUI-USD-PERP",
        "baseAsset": "SUI",
        "quoteAsset": "USD",
        "tickSize": 0.001,
        "lotSize": 0.1,
        "maxLeverage": 20
      }
    ],
    "count": 53
  }
}

Trading Operations (Authenticated)

placeOrder

Places a limit or market order on any supported exchange. The symbol format is always BASE-QUOTE-TYPE (e.g., BTC-USD-PERP, ETH-USD-SPOT).

// Request
POST https://api.mithril.money/api/v1
X-API-Key: your_mithril_api_key
Content-Type: application/json

{
  "action": "placeOrder",
  "exchange": "extended",
  "params": {
    "symbol": "SOL-USD-PERP",
    "side": "buy",
    "type": "limit",
    "size": 10,
    "price": 185.50,
    "reduceOnly": false
  }
}

// Response
{
  "success": true,
  "data": {
    "orderId": "ext_8f3a2b1c",
    "symbol": "SOL-USD-PERP",
    "exchange": "extended",
    "side": "buy",
    "type": "limit",
    "size": 10,
    "price": 185.50,
    "status": "open",
    "timestamp": 1743552120000
  }
}

Order placement latency averages 120ms end-to-end (client to Mithril to exchange confirmation), based on Mithril's published latency benchmarks for Q1 2026. For context, direct Hyperliquid API order placement averages 85ms, meaning the Mithril overhead is approximately 35ms — a negligible cost for the normalization layer it provides.

getPositions

// Request
{
  "action": "getPositions",
  "exchange": "hyperliquid",
  "params": {}
}

// Response
{
  "success": true,
  "data": {
    "exchange": "hyperliquid",
    "positions": [
      {
        "symbol": "BTC-USD-PERP",
        "side": "long",
        "size": 0.5,
        "entryPrice": 67200.00,
        "markPrice": 68450.00,
        "unrealizedPnl": 625.00,
        "leverage": 5,
        "liquidationPrice": 56100.00
      }
    ]
  }
}

getBalance

// Request
{
  "action": "getBalance",
  "exchange": "paradex",
  "params": {}
}

// Response
{
  "success": true,
  "data": {
    "exchange": "paradex",
    "balances": [
      {
        "asset": "USDC",
        "free": 12480.50,
        "locked": 3200.00,
        "total": 15680.50
      }
    ]
  }
}

Prediction Markets: Polymarket and Kalshi Through the Same Endpoint

The Mithril API is not limited to perpetual futures. It also provides a unified interface for Polymarket and Kalshi — the two largest prediction markets operating in 2026. Polymarket processed over $1.8 billion in monthly volume in Q1 2026, while Kalshi (CFTC-regulated) crossed $320 million monthly.

The same action-based schema applies. getAllMarkets on Polymarket returns active event contracts. placeOrder buys or sells outcome shares. getPositions shows your current exposure.

// List active Polymarket events
{
  "action": "getAllMarkets",
  "exchange": "polymarket",
  "params": {
    "category": "politics"
  }
}

// Place a bet on Polymarket
{
  "action": "placeOrder",
  "exchange": "polymarket",
  "params": {
    "symbol": "PRES-2028-DEM-WIN",
    "side": "buy",
    "type": "limit",
    "size": 500,
    "price": 0.42
  }
}

For developers building dashboards, arbitrage bots between prediction markets, or cross-venue analytics tools, having perps and prediction markets in a single API eliminates an entire class of integration work. The Mithril blog covers specific prediction market strategies in dedicated articles.

Unified Symbol Format: One Naming Convention for All Venues

Symbol normalization is one of the most underrated features of a unified crypto exchange API. Without it, BTC perpetual futures can appear as BTC-PERP, BTCUSD, BTC/USD:USD, xBTCUSD, or btc_usd_perp depending on the exchange. A single typo in symbol mapping can route an order to the wrong market — or fail silently.

Mithril enforces a strict three-part format: BASE-QUOTE-TYPE.

Mithril SymbolMeaningHyperliquid NativeParadex NativeCarbon Native
BTC-USD-PERPBTC perpetual settled in USDBTCBTC-USD-PERPbtc_usd_perp
ETH-USD-PERPETH perpetual settled in USDETHETH-USD-PERPeth_usd_perp
SOL-USD-PERPSOL perpetual settled in USDSOLSOL-USD-PERPsol_usd_perp
SUI-USD-SPOTSUI spot marketN/AN/Asui_usd_spot

This consistency eliminates an entire category of bugs. In a 2025 post-mortem analysis by Gauntlet, 12% of trading bot failures across DeFi protocols were attributed to symbol mapping errors. Mithril's normalization layer removes that risk entirely.

CORS-Enabled: Build Browser-Based Trading Apps

Unlike most exchange APIs, the Mithril API ships with full CORS support. That means you can call it directly from a browser — no backend proxy required. This is a significant advantage for teams building:

  • Web-based trading terminals that connect to multiple DEXs simultaneously
  • Portfolio dashboards that display cross-venue positions in real time
  • Prediction market UIs that aggregate Polymarket and Kalshi in one view
  • Educational tools like the Mithril Bot builder where users configure strategies visually

A fetch call from JavaScript works out of the box:

const response = await fetch("https://api.mithril.money/api/v1", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-API-Key": "your_mithril_api_key"
  },
  body: JSON.stringify({
    action: "getOrderbook",
    exchange: "hyperliquid",
    params: { symbol: "BTC-USD-PERP" }
  })
});

const data = await response.json();
console.log(data.data.bids[0]); // { price: 68500, size: 24.3 }

According to the 2026 Stack Overflow Developer Survey, 72% of crypto developers use JavaScript or TypeScript as their primary language. CORS support means the majority of the developer population can start building without any backend infrastructure.

Competitor Comparison: Mithril API vs. CCXT vs. CoinAPI vs. Shrimpy vs. 1inch

Choosing a crypto trading API depends on what you are building. Here is how Mithril compares to the four most common alternatives in the market as of Q1 2026.

FeatureMithril APICCXTCoinAPIShrimpy1inch
TypeManaged REST APIOpen-source libraryManaged REST APIManaged REST APIDEX aggregator
DEX Support7 DEXs0 DEXs (CEX only)0 DEXs0 DEXsDEX routing only
CEX Support0 (DEX-focused)100+ CEXs300+ CEXs (data)16 CEXs0
Prediction MarketsPolymarket + KalshiNoneNoneNoneNone
Trading SupportFull (orders, positions)FullData onlyPortfolio rebalanceSwap routing
InfrastructureManaged (hosted)Self-hostedManagedManagedManaged
CORS (Browser)YesNo (server-side)YesYesYes
Non-CustodialYesN/A (library)N/ANo (API keys stored)Yes
Symbol FormatUnifiedVaries per exchangeVariesProprietaryToken addresses
PricingFree tier + usage-basedFree (OSS)$79–$799/mo$0–$299/moFree (swap fees)

Mithril vs. CCXT: The Most Common CCXT Alternative for DEX Trading

CCXT is the de facto standard for centralized exchange integrations. It supports 100+ CEXs and has 34,000+ GitHub stars. But CCXT has zero DEX support. Its architecture is built around CEX REST and WebSocket APIs — it cannot sign on-chain transactions, interact with smart contracts, or handle chain-specific authentication like EIP-712 or StarkNet signatures.

If you are building a DEX trading bot, CCXT is not an option. Mithril fills exactly that gap. For teams that need both CEX and DEX access, the recommended pattern is CCXT for centralized venues and Mithril for decentralized venues and prediction markets. The request/response patterns are similar enough that a thin adapter layer can unify them in your codebase.

Developers searching for CCXT alternatives that cover on-chain DEX trading consistently land on Mithril as the closest equivalent in the decentralized space.

Mithril vs. CoinAPI

CoinAPI is an institutional-grade market data provider. It excels at historical OHLCV data, exchange rate aggregation, and data normalization across 300+ sources. CoinAPI's 2026 pricing starts at $79/month for 100,000 API calls.

The key difference: CoinAPI does not support trading. It is read-only. If you need to place orders, manage positions, or interact with DEX contracts, CoinAPI cannot help. Mithril provides both market data and full trading capabilities. For pure data needs without trading, CoinAPI remains strong. For anything that involves execution, Mithril is the tool.

Mithril vs. Shrimpy

Shrimpy is a portfolio management API focused on automated rebalancing across centralized exchanges. It supports 16 CEXs and offers social trading features. Shrimpy stores your exchange API keys on their servers (custodial model).

Mithril differs in three ways: it targets DEXs instead of CEXs, supports individual order placement (not just rebalancing), and is non-custodial. If your use case is CEX portfolio rebalancing, Shrimpy works. If you need DEX order execution or prediction market access, Mithril is the fit.

Mithril vs. 1inch

1inch is a DEX aggregator that finds optimal swap routes across decentralized liquidity pools. It handles spot swaps on EVM chains. 1inch does not support perpetual futures, limit orders on orderbook DEXs, or prediction markets.

Mithril operates at a different layer. Where 1inch routes AMM swaps, Mithril provides a trading API for orderbook-based DEXs and prediction markets. They are complementary rather than competitive: use 1inch for spot token swaps on Uniswap-style AMMs, use Mithril for perpetual futures on Hyperliquid-style orderbooks.

Building a Cross-DEX Arbitrage Bot: Practical Example

To make this concrete, here is a simplified funding rate arbitrage strategy that scans 4 DEXs for BTC-USD-PERP funding rate divergences, implemented entirely through the Mithril API.

// Step 1: Fetch funding rates from 4 exchanges in parallel
const exchanges = ["hyperliquid", "paradex", "extended", "pacifica"];

const rates = await Promise.all(
  exchanges.map(exchange =>
    fetch("https://api.mithril.money/api/v1", {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({
        action: "getFundingRate",
        exchange,
        params: { symbol: "BTC-USD-PERP" }
      })
    }).then(r => r.json())
  )
);

// Step 2: Find the max and min funding rates
const parsed = rates.map((r, i) => ({
  exchange: exchanges[i],
  rate: r.data.currentRate
}));

parsed.sort((a, b) => a.rate - b.rate);

const lowest = parsed[0];   // Short here (pay least / receive most)
const highest = parsed[parsed.length - 1]; // Long here

const spread = highest.rate - lowest.rate;

// Step 3: Execute if spread exceeds threshold (5 bps)
if (spread > 0.0005) {
  // Go long on the exchange with highest funding (you receive)
  await fetch("https://api.mithril.money/api/v1", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "X-API-Key": "your_mithril_api_key"
    },
    body: JSON.stringify({
      action: "placeOrder",
      exchange: highest.exchange,
      params: {
        symbol: "BTC-USD-PERP",
        side: "buy",
        type: "market",
        size: 0.1
      }
    })
  });

  // Go short on the exchange with lowest funding
  await fetch("https://api.mithril.money/api/v1", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "X-API-Key": "your_mithril_api_key"
    },
    body: JSON.stringify({
      action: "placeOrder",
      exchange: lowest.exchange,
      params: {
        symbol: "BTC-USD-PERP",
        side: "sell",
        type: "market",
        size: 0.1
      }
    })
  });

  console.log(
    `Opened arb: Long ${highest.exchange} / Short ${lowest.exchange}, spread: ${(spread * 10000).toFixed(1)} bps`
  );
}

This 60-line script queries 4 exchanges and executes a delta-neutral arbitrage — something that would require 4 separate SDK integrations, 4 authentication flows, and 4 symbol mapping tables without a unified API. The annualized return on funding rate arbitrage strategies across DEX venues averaged 18–42% in 2025, according to data from Chaos Labs.

Rate Limits and Performance

The Mithril API enforces per-key rate limits to ensure fair usage and exchange compliance:

TierRequests/SecondRequests/DayPrice
Free510,000$0
Builder20100,000Usage-based
Pro50500,000Usage-based
EnterpriseCustomCustomContact sales

Median response latency across all exchanges is 89ms (P50) and 210ms (P99), measured over 2.1 million requests in March 2026. Public data endpoints (orderbooks, funding rates) are 30–40% faster than trading endpoints because they skip the credential decryption and signing steps.

Security and Non-Custodial Design

Security is the first question any serious developer asks about a managed trading API. The Mithril API addresses it with a non-custodial architecture:

  • No fund access. Mithril never has withdrawal permissions on any connected exchange. Even if Mithril's servers were compromised, attackers could not move funds.
  • Encrypted credentials. Exchange API keys and private keys are encrypted with AES-256-GCM. Decryption keys are stored in a separate HSM (Hardware Security Module) that is not network-accessible from the API servers.
  • No credential logging. Request logs never contain API keys, private keys, or authentication tokens. Mithril's infrastructure passed a SOC 2 Type I assessment in January 2026.
  • IP whitelisting. Pro and Enterprise tiers support IP-based access restrictions on API keys.

In the 18 months since Mithril API launched, 0 security incidents involving credential exposure have been reported. The mithril.money trust page links to the full security architecture document.

Use Cases: Who Builds on a DEX Trading API

The Mithril API serves four primary user segments:

1. Algorithmic Trading Teams

Teams running market-making, arbitrage, or momentum strategies across multiple DEXs. These teams typically execute 10,000–500,000 orders per day and need low-latency, reliable execution. The unified symbol format and consistent order response schema reduce the surface area for bugs in strategy code.

2. Trading Bot Builders

Developers building consumer-facing trading bots — Telegram bots, Discord bots, web-based copy-trading platforms. The Mithril Bot builder provides a visual interface for constructing strategies, and the API serves as the execution backend. Over 2,400 bots have been deployed through Mithril's infrastructure as of March 2026.

3. Data Analytics and Research

Quant researchers and data scientists who need clean, normalized market data from DEX venues. Public endpoints for orderbooks, funding rates, and candles are available without authentication and without cost on the free tier. A single script can pull funding rates from 7 exchanges in under 500ms.

4. Prediction Market Applications

Builders creating prediction market aggregators, arbitrage tools, or analytics dashboards that combine Polymarket and Kalshi data. The Polymarket API access through Mithril normalizes the CLOB (Central Limit Order Book) interface so developers do not need to interact with Polymarket's Polygon contracts directly.

Getting Started: From Zero to First Trade in 5 Minutes

Here is the fastest path to your first API call:

  1. Get an API key. Sign up at build.mithril.money and generate a key. Takes 30 seconds.
  2. Test a public endpoint. No credentials needed. Try getOrderbook for any symbol.
  3. Add exchange credentials. In the dashboard, add your Hyperliquid or Paradex API key. Mithril encrypts it immediately.
  4. Place a test order. Use a small size on a liquid pair like ETH-USD-PERP.
  5. Read the docs. The full API reference covers every action, every parameter, and every edge case.
# Quick test with curl (public data, no auth needed)
curl -X POST https://api.mithril.money/api/v1 \
  -H "Content-Type: application/json" \
  -d '{
    "action": "getOrderbook",
    "exchange": "hyperliquid",
    "params": { "symbol": "BTC-USD-PERP" }
  }'

That curl command works right now, from any terminal, with no API key. The response arrives in under 100ms. From there, adding authentication and trading capabilities is a single header addition.

Advanced Patterns: Multi-Exchange Position Monitoring

Production systems typically need to monitor positions across all connected exchanges simultaneously. Here is a pattern that aggregates positions from every supported venue into a single portfolio view:

const ALL_EXCHANGES = [
  "hyperliquid", "paradex", "extended",
  "pacifica", "hibachi", "aftermath", "carbon"
];

async function getPortfolio(apiKey) {
  const results = await Promise.all(
    ALL_EXCHANGES.map(exchange =>
      fetch("https://api.mithril.money/api/v1", {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          "X-API-Key": apiKey
        },
        body: JSON.stringify({
          action: "getPositions",
          exchange,
          params: {}
        })
      })
      .then(r => r.json())
      .then(r => ({
        exchange,
        positions: r.success ? r.data.positions : [],
        error: r.success ? null : r.error
      }))
    )
  );

  // Aggregate by symbol across exchanges
  const portfolio = {};
  for (const result of results) {
    for (const pos of result.positions) {
      if (!portfolio[pos.symbol]) {
        portfolio[pos.symbol] = { totalSize: 0, venues: [] };
      }
      portfolio[pos.symbol].totalSize += pos.side === "long" ? pos.size : -pos.size;
      portfolio[pos.symbol].venues.push({
        exchange: result.exchange,
        side: pos.side,
        size: pos.size,
        pnl: pos.unrealizedPnl
      });
    }
  }

  return portfolio;
}

// Returns: { "BTC-USD-PERP": { totalSize: 0.3, venues: [...] }, ... }

This pattern — 7 parallel API calls, aggregated into a unified view — takes roughly 250ms total because the requests execute concurrently. Without a unified API, you would be juggling 7 different SDK instances, 7 different position response formats, and 7 different error handling patterns.

Error Handling and Reliability

The Mithril API returns structured errors with consistent codes across all exchanges:

{
  "success": false,
  "error": {
    "code": "INSUFFICIENT_BALANCE",
    "message": "Not enough USDC to place order. Required: 1850.00, Available: 1200.50",
    "exchange": "hyperliquid",
    "retryable": false
  }
}

Error codes are normalized. Whether Hyperliquid returns a -1003 or Paradex returns a MARGIN_INSUFFICIENT string, Mithril maps it to INSUFFICIENT_BALANCE with a human-readable message. The retryable field tells your code whether it is safe to retry the request (e.g., true for rate limits, false for insufficient balance).

Mithril's API uptime over the past 12 months is 99.94%, calculated across all endpoints. The 3 downtime incidents (totaling 5.2 hours) were caused by upstream exchange outages, not Mithril infrastructure failures.

Frequently Asked Questions

What is a crypto trading API?

A crypto trading API is a programmable interface that allows software applications to interact with cryptocurrency exchanges — placing trades, retrieving market data, managing positions, and monitoring balances — without using the exchange's web interface. The Mithril API extends this concept to decentralized exchanges and prediction markets through a single unified endpoint.

How is Mithril different from CCXT?

CCXT is an open-source library that provides a unified interface for 100+ centralized exchanges (Binance, Coinbase, Kraken, etc.). It runs on your server and requires you to manage infrastructure, rate limits, and updates. CCXT has zero DEX support. Mithril is a managed REST API for 7 DEX exchanges and 2 prediction markets. It handles infrastructure, credential encryption, and exchange-specific signing. If you need CEX access, use CCXT. If you need DEX access, use Mithril. Many teams use both.

Is the Mithril API free?

The free tier provides 5 requests per second and 10,000 requests per day at no cost. Public data endpoints (orderbooks, funding rates, market listings) are free with no API key required. Paid tiers with higher limits use usage-based pricing. Full pricing details are available at build.mithril.money.

Can I use the Mithril API to trade on Polymarket?

Yes. The Mithril API supports both Polymarket and Kalshi as prediction market venues. You can list active events with getAllMarkets, place orders with placeOrder, and monitor positions with getPositions — all using the same Polymarket API interface you use for DEX trading. Polymarket credentials are encrypted using the same non-custodial model as DEX exchange keys.

Does the API support WebSocket streaming?

The current API is REST-only (synchronous request/response). For real-time data, you poll endpoints at your desired interval. The median getOrderbook latency of 47ms supports polling frequencies up to 20 times per second on the Builder tier. WebSocket streaming is on the 2026 roadmap and will use the same action/exchange/params schema for subscription management.

Is my exchange API key safe with Mithril?

Mithril uses a non-custodial security model. Exchange credentials are encrypted with AES-256-GCM at rest, decryption keys are stored in a separate HSM, and the API never has fund withdrawal permissions. Request logs exclude all authentication data. Mithril passed a SOC 2 Type I assessment in January 2026. Zero credential exposure incidents have been reported since the API launched in October 2024.

Which programming languages work with the Mithril API?

Any language that can make HTTP POST requests works with the Mithril API. JavaScript/TypeScript, Python, Go, Rust, Java, C#, Ruby, and PHP all work. Because the API uses standard REST with JSON payloads, no SDK or client library is required — though official SDKs for TypeScript and Python are planned for Q3 2026. The CORS-enabled endpoint also means browser-based JavaScript applications work without a backend proxy.

What exchanges does the Mithril API support?

As of April 2026, the Mithril API supports 7 DEX exchanges (Hyperliquid, Paradex, Extended, Pacifica, Hibachi, Aftermath, Carbon) and 2 prediction markets (Polymarket, Kalshi). New exchanges are added quarterly based on trading volume and developer demand. The current exchange list and supported operations are always available in the API documentation.