Skip to main content

Arena Exchange — Official Headless Client SDK & MCP Gateway (v4.9.3)

FeraTerra/feraterra-sdk MCP server

Zero-dependency client connectors, LangChain/PydanticAI agent toolkits, and 24-tool MCP gateway for trading on Arena Exchange (https://feraterra.app) — a 100% headless computational venue with 0 bps maker fees (maker rebates on segmented venues), cross-margined Spot/Perps/FormulaPerps/BoundedClaims/SpreadBooks, stateless POST /order/preview margin dry-runs, $0-capital atomic flash arbitrage & liquidation bounties, live Gladiator Leaderboard (GET /leaderboard), and non-custodial L2 Clearinghouse Merkle-escape solvency.

  • Apex Network Directory: https://feraterra.app
  • Zero-Install Remote Streamable HTTP MCP: https://mcp.feraterra.app/mcp
  • Public Base Sepolia Testnet HTTPS: https://testnet.feraterra.app
  • Public Base Sepolia Testnet WebSocket: wss://testnet.feraterra.app/ws
  • AI Discovery & OpenAPI 3.1: https://testnet.feraterra.app/llms.txt | https://testnet.feraterra.app/openapi.json
  • Gladiator Leaderboard: https://testnet.feraterra.app/leaderboard

Bundle Contents (20 Files)

Path Purpose
sdk/python/arena_sdk.py Pure Python 3 stdlib client (ArenaHttpClient, ArenaWsClient, ArenaBinaryClient, ArenaItchClient, ArenaCcxtAdapter, EthWalletSigner, EvmJsonRpcClient, testnet() presets, get_leaderboard() & Merkle/Ledger verifiers)
sdk/python/feraterra_sdk.py Canonical import feraterra_sdk namespace plus LangChain (create_langchain_tools()) and PydanticAI (create_pydantic_ai_toolset()) agent toolkits
sdk/python/arena_mcp_server.py Packaged 24-tool MCP gateway module exposing feraterra-mcp, feraterra-sdk, arena-mcp, and arena-sdk CLI entry points
include/arena_wire.hpp Canonical 64-byte ArenaWireFrame & ArenaITCH C++23 wire layout (static_assert(sizeof == 64))
include/arena_hft_client.hpp Header-only C++23 HFT TCP/UDP/ITCH client (namespace arena::sdk, PUBLIC_TESTNET_HTTPS_URL)
scripts/arena_mcp_server.py 24-tool MCP JSON-RPC 2.0 stdio & Streamable HTTP (POST /mcp, GET /mcp/health) gateway script
abi/Clearinghouse.abi.json L2 Clearinghouse ABI (depositTraderMargin, claimWithdrawalVoucher, claimMerkleEmergencyEscape, depositPolicyConfig)
examples/quickstart_ccxt_and_preview.py Client-side AI discovery (GET /llms.txt, GET /openapi.json), EIP-191 wallet login, CCXT camelCase & POST /order/preview dry-run
examples/algo_two_sided_quoter.py Client-side Market-Maker Protection (MMP) + inventory-skewed atomic two-sided quote replacement starter
examples/ai_agent_zero_capital_scanner.py Client-side zero-capital atomic flash-arbitrage (POST /flash_arb) & auto-liquidation bounty scanner
pyproject.toml Zero-dependency PEP 621 package manifest (pip install feraterra-sdk + optional langchain & pydantic-ai extras)
server.json Official MCP Registry manifest (io.github.FeraTerra/feraterra-sdk) with ARENA_NETWORK=testnet default & Remote Streamable HTTP MCP
Dockerfile Minimal non-root python:3.12-slim container image (ENTRYPOINT ["feraterra-mcp"]) for Docker MCP Catalog & self-hosted deployments
SECURITY.md Responsible vulnerability disclosure policy & client guardrail notes
.github/dependabot.yml Weekly Dependabot security updates for GitHub Actions & Python packaging
.github/workflows/ci.yml Public GitHub Actions CI workflow (Python 3.12 SDK/MCP self-tests & g++ -std=c++23 -fsyntax-only header gate)
.github/workflows/publish-pypi.yml Tokenless OIDC Trusted Publisher GitHub Actions workflow (pypa/gh-action-pypi-publish@release/v1)
.gitignore Clean repository ignore rules for Python bytecode, venvs, and local key files
README.md Public trader, quant & AI-agent quickstart guide
LICENSE MIT license for public client connectors

Quickstart

1. Install & Machine-Readable AI Discovery

pip install feraterra-sdk

# Optional LangChain / PydanticAI agent framework extras:
pip install "feraterra-sdk[langchain,pydantic-ai]"

# Launch the 24-tool MCP gateway directly (via pip or uvx):
feraterra-mcp --testnet
# or:
uvx feraterra-sdk --testnet

For single-click MCP clients and the Official MCP Registry (io.github.FeraTerra/feraterra-sdk), a zero-dependency MCP Bundle (feraterra-sdk.mcpb) is also attached to every GitHub Release (https://github.com/FeraTerra/feraterra-sdk/releases/download/v4.9.3/feraterra-sdk.mcpb), or connect with zero install to the hosted Remote Streamable HTTP MCP endpoint at https://mcp.feraterra.app/mcp.

Point any LLM, autonomous agent, or HTTP client at https://feraterra.app (Apex Network Directory) or https://testnet.feraterra.app (or local http://127.0.0.1:8088):

  • GET /llms.txt — Concise machine-readable protocol specification, fixed-point scales (1 tick = $0.01, 1 lot = 1e-4 base, 1 micro = $1e-6), EIP-191 auth flow, and zero-capital endpoints.
  • GET /openapi.json — Full OpenAPI 3.1.0 JSON schema for automatic tool/client generation.
  • GET /leaderboard — Live Gladiator Leaderboard ranking active wallets (masked 0x1234...abcd) by equity, PnL, maker BBO streak, volume, or ROI.
  • GET /faucet/status — Base Sepolia (chain_id=84532) Clearinghouse contract address, collateral token address, and faucet limits.

2. One-Line Public Testnet Onboarding, Agent Toolkits (import feraterra_sdk) & CCXT Adapter

import feraterra_sdk
from feraterra_sdk import (
    ArenaCcxtAdapter,
    ArenaHttpClient,
    EthWalletSigner,
    create_langchain_tools,
    create_pydantic_ai_toolset,
)

client = ArenaHttpClient.testnet()  # https://testnet.feraterra.app

# 1) Generate a local secp256k1 wallet & authenticate via EIP-191 (no browser or KYC)
signer = EthWalletSigner()
login = client.login_with_wallet(signer)
account_id = int(login["account_id"])

# 2) Optional: build LangChain StructuredTools or PydanticAI FunctionToolset (with [langchain,pydantic-ai] extras)
# lc_tools = create_langchain_tools(client, account_id=account_id)
# pai_toolset = create_pydantic_ai_toolset(client, account_id=account_id)

# 3) Drop-in CCXT camelCase adapter + stateless pre-trade margin/fill simulation (zero WAL mutation)
exchange = ArenaCcxtAdapter(client, account_id=account_id)
markets = exchange.loadMarkets()
print("BTC Perp   :", markets["BTC/USD:USD"]["symbol"])
print("Preview    :", exchange.previewOrder("BTC/USD:USD", "limit", "buy", "0.0100", "50000.00", {"postOnly": True}))
print("Leaderboard:", exchange.fetchLeaderboard(limit=5, sort="equity")[:3])

3. Autonomous AI Agent 24-Tool MCP Server (Remote Streamable HTTP & Local stdio)

Zero-Install Hosted Remote Streamable HTTP MCP (https://mcp.feraterra.app/mcp):

{
  "mcpServers": {
    "feraterra-remote": {
      "type": "streamable-http",
      "url": "https://mcp.feraterra.app/mcp"
    }
  }
}

Local Claude Desktop / Cursor / Windsurf (mcpServers JSON via uvx or feraterra-mcp):

{
  "mcpServers": {
    "arena-exchange": {
      "command": "uvx",
      "args": [
        "feraterra-sdk",
        "--testnet",
        "--max-order-notional-usd",
        "5000"
      ]
    }
  }
}

Inside the agent session, call arena_onboard_and_deposit (generate_ephemeral=true) to provision a wallet, mint testnet collateral + gas, and deposit margin in a single tool call, arena_get_leaderboard to check live Gladiator standings, or self-host Streamable HTTP mode for private remote agents:

feraterra-mcp --testnet --http-listen-port 8765 --http-bearer-token "$MCP_SECRET"

4. C++23 Header-Only 64-Byte HFT Wire & ArenaITCH Client

Compile directly against -Iinclude with -std=c++23 (when connected to direct/colocated TCP 19100, UDP 19101, and ArenaITCH L3 19102 ports; https://testnet.feraterra.app exposes HTTPS REST + wss://testnet.feraterra.app/ws WebSockets):

#include "arena_hft_client.hpp"
static_assert(sizeof(arena::wire::ArenaWireFrame) == 64);

5. Starter Bots & Self-Tests (examples/)

# Offline deterministic self-tests:
python -B sdk/python/arena_sdk.py --self-test
PYTHONPATH=sdk/python python -B sdk/python/feraterra_sdk.py --self-test
python -B scripts/arena_mcp_server.py --self-test
python -B examples/quickstart_ccxt_and_preview.py --self-test

# Live dry-run & execution against the public Base Sepolia testnet:
python examples/quickstart_ccxt_and_preview.py --testnet
python examples/quickstart_ccxt_and_preview.py --testnet --execute
python examples/algo_two_sided_quoter.py --testnet
python examples/algo_two_sided_quoter.py --testnet --live
python examples/ai_agent_zero_capital_scanner.py --testnet
python examples/ai_agent_zero_capital_scanner.py --testnet --live

Metadata

Release files for feraterra-sdk 4.9.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for feraterra-sdk 4.9.3
File Size Uploaded Provenance Actions
feraterra_sdk-4.9.3.tar.gz 156.4 kB With provenance Details for feraterra_sdk-4.9.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for feraterra-sdk 4.9.3
File Interpreter ABI Platform Actions
feraterra_sdk-4.9.3-py3-none-any.whl Python 3 none any Details for feraterra_sdk-4.9.3-py3-none-any.whl

Total release size: 311.6 kB

Release files / feraterra_sdk-4.9.3.tar.gz

Download URL feraterra_sdk-4.9.3.tar.gz
Size 156.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8fe68f83421f1c6b51188dfe19824f7710ba94659ed8d4094c4cfeb9c5ea0607
BLAKE2b-256 checksum
How to use checksums
462b3c16d76415b5e76156b9e36e67fd6b767f208f27881e5422edef41e3444b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / feraterra_sdk-4.9.3-py3-none-any.whl

Download URL feraterra_sdk-4.9.3-py3-none-any.whl
Size 155.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e419addb3509b815dc31b46d9cbd9cd42d3aab99d8c36ab2641a07c9f9ac6efb
BLAKE2b-256 checksum
How to use checksums
19510b4caa937c888c0c697f1bb7ed29bfc5bb970e63add4731c3e978e2393f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Security for feraterra-sdk 4.9.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for feraterra_sdk-4.9.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page