SDKs & Tooling
Last updated
Beyond the raw REST API, Arenas offers tooling to make integration faster — typed helpers, agent-native access, and the shared contract ABIs.
The API serves the current contract ABI map so you don’t hardcode fragments:
curl -H "X-Arena-Key: $ARENA_KEY" "$ARENAS_API/abis/current"
# => { "FinancingMarket": [...], "FinancingMarketAdapter": [...], "ERC20": [...] }The map is keyed by contract name and matches the current tx-engine version. Use it to encode calldata for writes (requestFinancing, receiveFinancing, repay, adapter deposit, …).
When moving between the API and contracts, remember:
Amounts — API values are normalized decimals; contracts expect raw uint256. parseUnits(value, assetToken.decimals).
Rates — API is annualized APR (decimal); contracts use per-second 1e18. maxRate = floor(aprFraction * 1e18 / 31_536_000).
Durations — API is milliseconds; contract duration is seconds.
Timestamps — API is milliseconds; on-chain is seconds.
Arenas ships a Model Context Protocol server at mcp.atomica.org — agent-native access to the same domain knowledge used to build the app. Point any MCP-capable client (Claude Code, Cursor, etc.) at it:
It exposes skills (end-to-end flow recipes), primitives (exact API endpoints and contract calls), entity views, fixtures, and integration bundles — so an agent can scaffold a borrower, LP, or approver flow from an authoritative source rather than guessing.
A typed SDK (calldata builders, unit conversion, and contract reads on top of the API and ABIs) is planned to sit above these surfaces. Until it ships, the recommended path is the REST API + abis/current + a standard EVM library (viem/ethers) for writes, with the MCP as the source of flow logic.
For scripting and automation from a terminal or CI, see the CLI.
Last updated
// .mcp.json
{
"mcpServers": {
"atomica": { "type": "http", "url": "https://mcp.atomica.org/mcp" }
}
}