Skip to main content
This guide is for server-side integrators such as wallets, cross-chain routers, and meta-aggregators. AKKA is an exact-input, same-chain EVM liquidity source. Use GET /partner/v1/{chainId}/quote as the integration contract: it combines exact pricing, executable calldata, payer checks, approval information, and lifecycle metadata in one response.

Integration contract

Partner discovery

Use these endpoints instead of hardcoding availability:
  • GET /partner/v1/chains returns active chains that have a deployed AKKA Router.
  • GET /partner/v1/{chainId}/sources returns protocol and pool-type coverage derived from active pools.
  • GET /{chainId}/tokens?verified=true returns current verified token metadata.

One-call executable quote

payer is the address that sends tx and supplies the input tokens. recipient receives the output and defaults to payer. This supports partner executor contracts without forcing output to remain in the executor. The response includes quoteId, quotedAtBlock, generatedAt, expiresAt, validForSeconds, validitySource, buyAmount, minAmountOut, allowanceTarget, structured simulation and validation, issues, and the ready-to-broadcast tx. An HTTP 200 with non-empty issues is a valid quote that requires payer action before execution. A validation status of UNKNOWN means an RPC check failed and the partner must validate independently.

Transaction fee model

Inspect tx.type before submitting:
Do not submit both legacy gasPrice and EIP-1559 fields in one transaction.

Contract executor integration

When a partner contract calls AKKA, that contract—not the end user—is the API payer and the router’s msg.sender. It must hold the input tokens and approve the AKKA Router. The end user may remain the recipient. See the public Partner Executor Contract for a complete, copyable Solidity reference. It demonstrates exact per-call approval, ERC-20 input collection, native-value forwarding, reentrancy protection, router allowlisting, and delivery to the recipient already encoded in tx.data. Partners must audit, adapt, deploy, and operate their own version; AKKA does not deploy it for partners.

RFQ calldata safety

Executable quotes may contain signed Bebop, Hashflow, Native, or other RFQ calldata. Treat every response as short-lived and single-use:
  • Never cache or persist executable calldata for later execution.
  • Never broadcast the same response concurrently from multiple workers.
  • Never automatically retry a reverted transaction with the old calldata.
  • Refresh after user delay, expiresAt, failed simulation, or nonce replacement.
  • Do not edit RFQ targets, offsets, amounts, signatures, or nested route data.
  • Use quoteId for logs and support correlation, not as an idempotency key.
validitySource=ADVISORY means the API refresh window is conservative metadata rather than a universal on-chain deadline. Route-specific signatures may expire earlier; execute immediately or refresh. Keep the API key on your backend. Contact the AKKA team for a partner key and production rate limit.
1

Discover support

Read GET /partner/v1/chains and GET /partner/v1/{chainId}/sources. Fetch token metadata from GET /{chainId}/tokens?verified=true. Cache discovery data, never executable quotes.
2

Request the partner quote

Call GET /partner/v1/{chainId}/quote with payer, recipient, and exact-input amount. Use buyAmount for ranking and keep the complete response together as one executable unit.
3

Resolve payer issues

Block execution on non-empty issues. For INSUFFICIENT_ALLOWANCE, approve the response’s allowanceTarget, wait for confirmation, then request a new quote. Independently verify validation checks marked UNKNOWN.
4

Validate and broadcast immediately

Verify the chain, payer, recipient, expiry, and router allowlist. Simulate where supported, then broadcast tx without changing to, data, or value. Never reuse or retry old calldata.
5

Report the receipt

Send SUBMITTED, followed by CONFIRMED or REVERTED, to POST /partner/v1/executions. On-chain receipts remain the source of truth.

Minimal server-side adapter

akka-source.ts

Production behavior

  • Set a client timeout and treat timeouts, 429, and 5xx as retryable for quote discovery. Use exponential backoff with jitter and do not retry a signed or broadcast transaction automatically.
  • Refresh the executable swap response after a user delay. Do not cache executable calldata.
  • Compare integer amounts with bigint; never use floating-point values for token quantities.
  • A successful HTTP response may include payer problems in issues or UNKNOWN validation states. Resolve or independently verify them before broadcast.
  • Simulate the returned transaction when your execution stack supports it. A simulation can still become stale as pool state changes.
  • Log partner ID, quote ID, chain ID, token addresses, input amount, returned output, latency, simulation status, issue codes, and transaction hash. Never log API keys, private keys, or full signed RFQ calldata.
  • After broadcasting, send POST /partner/v1/executions with the quote ID, chain ID, transaction hash, and SUBMITTED; follow with CONFIRMED or REVERTED. Reporting is best-effort telemetry and never replaces checking the chain receipt.

Versioning contract

/partner/v1 is additive-only. AKKA may add optional fields or enum values but will not remove fields, change units, or change existing field meaning within v1. Breaking changes require a new versioned path, a migration guide, and advance notice under the partner agreement. Integrators must ignore unknown response fields and enum values safely.

Current limitations

AKKA currently exposes exact-input, same-chain swaps. There is no exact-output quote, cross-chain status lifecycle, Permit2 flow, gasless transaction, integrator-fee parameter, source allow/deny filter, webhook, or trade-history endpoint. If your integration requires one of these, coordinate the adapter behavior with the AKKA team before launch.

Launch checklist

  • Obtain a dedicated partner API key and agreed production limits.
  • Test native-to-ERC-20, ERC-20-to-native, and ERC-20-to-ERC-20 swaps on each enabled chain.
  • Confirm approval, insufficient-balance, no-route, timeout, rate-limit, stale-price, and on-chain-revert behavior.
  • Allowlist the active router contracts from Smart Contracts, while still executing against tx.to returned by the API.
  • Agree on monitoring, incident escalation, and how AKKA should be named and displayed as a liquidity source.