Products

The Datai enrichment layer, four ways in.

Wallet-level data, chain-level context, agent tooling and transaction classification — all from the same indexed and labelled dataset, all returned as JSON.

User Insights

Everything a wallet holds, has held, and has done — decoded and valued in USD.

What it returns

Two families of data for any wallet address:

Financial data. DeFi positions per protocol and chain, open and closed, each with its module type (Liquidity Pool, Lending, Staked, Farming, Leveraged Farming, Yield, Locked, Vesting, Perpetuals, Options, Insurance, Governance, NFT Staked, NFT Lending and more), the tokens supplied, borrowed, earned and claimable, and totals for supply, debt, fees and NAV in USD. For P&L-supported protocols, a yieldAndPnl object adds overall and realised P&L, yield, fees, transaction count and the position's event history; Uniswap V3 positions get pool analytics, and Uniswap V2/V3 positions have a separate daily-analytics endpoint. Wallet balances come as native, token and NFT holdings per chain or aggregated across all chains, with DeFi exposure included in the overall figure. Historical and current USD prices for LP tokens are available by block or timestamp.

Behavioural analytics (beta). A wallet-analytics object built from the wallet's full transaction history: activity breakdown, chains and protocols touched, monthly transaction counts, DeFi investment activity, bridging, DEX swap pairs, wrapped tokens, wallet-to-wallet transfers, NFT activity and categories, and general analytics — net worth, incoming and outgoing volume, average transaction value, fees paid, and counts of valid, failed and potential-scam transactions. Analysis can be scoped to a time window. Current limits per the docs: the wallet must be provisioned first, analysis covers the latest 10,000 transactions, and the result is a snapshot as of provisioning.

Integration method

REST, API key in the Authorization header. Endpoint families: userDeFiPositions (all chains / by chain / multi-chain / by protocol / single position, each with a WithPnl variant), balances (all / by chain / native / token / NFT / per-protocol), uniswapLpTokenAnalytics and lpTokenAnalyticsByDay, lp-token/price, v2/userTx/analytics with v2/userTx/provision, plus chains and protocols catalogue calls. Each call consumes credits; a units-balance endpoint returns your balance and daily usage.

Concrete data points

  1. total.navUSD, total.supplyUSD, total.debtUSD, total.txFeeUSD, total.active per position
  2. detailed.supply[], detailed.borrow[], detailed.rewards[], detailed.supplyClaimable[] with tokenAddress, balanceDecimal, usdRate
  3. yieldAndPnl.pnlUSD, pnlUSDRealised, yieldUSD, txCount, deFiEvents[]
  4. fullCoverage / hasSupportedPnlAndYield flags telling you whether a protocol has P&L analytics or NAV only
  5. generalAnalytics.netWorthUsd, nbOfTransactions, nbOfTransactionsScam, firstTxTimestamp, lastTxTimestamp

Used by

DeFi Funds, Traders & Staking Services · Wallet Providers · Crypto Accounting Software · DeFi Fund Administrators · Custodians & MPC Wallets · Data Providers · AI Agents

Illustrative request / response

GET{API_BASE_URL}/api/merlin/public/userDeFiPositionsWithPnl/all/{userAddress}
Authorization: {API_KEY}
[
  {
    "chain": "eth",
    "name": "aave3",
    "commonName": "Aave V3",
    "fullCoverage": true,
    "portfolio": [
      {
        "module": "Lending",
        "total": { "supplyUSD": 152340.18, "debtUSD": 61200.00, "txFeeUSD": 84.12, "navUSD": 91140.18, "active": true },
        "detailed": {
          "supply": [ { "tokenSymbol": "WETH", "balanceDecimal": 42.5, "usdRate": 3584.47 } ],
          "borrow": [ { "tokenSymbol": "USDC", "balanceDecimal": 61200, "usdRate": 1.0 } ],
          "rewards": []
        },
        "yieldAndPnl": { "pnlUSD": 6412.55, "pnlUSDRealised": 0, "yieldUSD": 1288.30, "txFeeUSD": 84.12, "txCount": 7 }
      }
    ]
  }
]
Illustrative — values are examples; field names follow the Positions Object documentation.

Chain Insights

The context layer behind the labels: which contract is which, and what it belongs to.

What it returns

The dataset that makes transaction classification possible — 4.5M labelled smart contracts across 25+ chains, each tied to the protocol or platform it belongs to, its purpose, and its associated tokens, covering DeFi, NFT and bridge protocols. Through the API today (beta) this surfaces as: the catalogue of supported chains and protocols (with per-protocol P&L coverage flags) and a smart-contract catalogue lookup that tells you whether an address belongs to a centralised exchange, which one, and whether it is an inbound (user deposit) or outbound (hot wallet) address. Bulk delivery of the full labelled-contract dataset is arranged through sales.

Integration method

REST: v2/insights/catalog/cex/{address} (beta), chains, protocols?chain=, v2/userTx/tx/supportedChains. Dataset delivery for compliance and data-provider integrations is arranged through sales.

Concrete data points

  1. cex (boolean), name (exchange), type (to / from) for any address
  2. Protocol catalogue: chain, name, commonName, site, hasSupportedPnlAndYield
  3. Chain catalogue: id, name, wrappedTokenId; advanced-transactions chains with currency and explorerUrl
  4. Contract labels as they appear in transaction records: contractName, functionName, protocol
  5. Labelled protocol categories: DeFi, NFT, bridge

Used by

Compliance & AML · Data Providers · Crypto Accounting Software · AI Agents

Illustrative request / response

GET{API_BASE_URL}/api/merlin/public/v2/insights/catalog/cex/0xc1921072db5266d950acc8e721507f7542445ba5
Authorization: {API_KEY}
{
  "address": "0xc1921072db5266d950acc8e721507f7542445ba5",
  "name": "Binance",
  "type": "to",
  "cex": true
}
Illustrative — response shape taken from the Catalog Endpoints documentation.

MCP layer

Give your agent a wallet's DeFi positions and balances as tools, not prompts.

What it returns

A TypeScript MCP server, open source under MIT, that wraps the User Insights positions and balances endpoints as eight tools any MCP-compatible client can call — Cursor, Claude Desktop, Eliza OS or your own agent stack. The agent passes a wallet address (and optionally a chain or protocol) and receives the same JSON the REST API returns: positions grouped by protocol with USD totals and underlying tokens, or token balances per chain. Chains exposed by the server today: Ethereum, Arbitrum, Polygon, Avalanche, BSC, Base, Optimism. A debug-truncation mode returns structure-preserving summaries so you can develop against heavy wallets without blowing the context window. Transaction history and wallet analytics are not exposed as MCP tools today — agents that need them call the REST endpoints directly.

Integration method

Clone github.com/Datai-Network/datai-mcp-server, npm install && npm run build, add the server to your client's MCP config with DATAI_API_KEY (same key as the REST API), optional DATAI_LIMIT, DATAI_DEBUG_TRUNCATE and timeout variables. NPX distribution is listed as coming soon in the README; use the local build.

Tools exposed

  1. get_all_defi_positions(wallet) — all positions, all supported chains
  2. get_defi_by_chain(wallet, chain) · get_defi_multi_chains(wallet, chains[]) · get_defi_by_protocol(wallet, protocol)
  3. get_defi_balances_by_chain(wallet, chain)
  4. get_overall_balance_all_c(wallet) · get_overall_balance_by_chain(wallet, chain)
  5. get_wallet_balances_by_chain(wallet, chain)

Used by

AI Agents · Wallet Providers · Custodians & MPC Wallets

Illustrative configuration / tool call

{
  "mcpServers": {
    "datai": {
      "command": "node",
      "args": ["/path/to/datai-mcp-server/dist/index.js"],
      "env": { "DATAI_API_KEY": "{API_KEY}", "DATAI_LIMIT": "10" }
    }
  }
}
// tool call from the agent
{ "tool": "get_defi_by_chain", "arguments": { "wallet": "0x…", "chain": "arb" } }
// → same positions array as GET /userDeFiPositions/{userAddress}?chain=arb
Illustrative — configuration keys follow the repository README.

Transaction classification

Every transaction, labelled with what it was, where it went, and what it was worth.

What it returns

A wallet's complete transaction history across every supported chain it is active on, each record carrying three layers of context on top of the raw data. Movement type (txType): Deposited, Withdrew, Borrowed, Repaid, Liquidation, Claim, Exchange, Send, Receive, Wrap, Unwrap, Bridge In, Bridge Out, Distribute Rewards, Migration, Harvest, Airdrop, Mint, Burn — or, for contracts outside the P&L-supported set, the actual function name. DeFi action (txAction): Liquidity Pool, Lending, Staked, Farming, Leveraged Farming, Yield, Locked, Wrap, Bridge, Transfer, NFT, Vesting, Options, Insurance, Investment, Governance. Classification (txClassification): a Datai-assigned label derived from the two above plus the assets and counterparties involved — LP Deposit, Staking Rewards, Lend Withdraw, Borrow, Repay, Liquidation, Collect Reward, Exchange, Bridge In/Out, Transfer In/Out, Airdrop, NFT Mint, Scam and others. Every record also carries the counterparty protocol, contractName and functionName, a walletToWallet flag, a blacklisted flag for potential scam tokens and contracts, successful (reverted transactions are flagged, not dropped), the fee in native units and USD, who paid it, and a balances[] array of every inner asset movement with sign, USD value, token standard (ERC20, ERC721, ERC1155, native) and NFT details where relevant. For P&L-supported positions, transactions also carry pnlUsd and yield fields, and every position's transactions can be fetched by position ID.

The engine behind it is the same ML labelling that produced the 4.5M-contract catalogue: contracts and functions are identified and categorised, and the classification is derived from indexed events rather than heuristics on transfer patterns. The docs recommend building your own accounting or tax classification on the raw context fields (txType, txAction, protocol, walletToWallet, blacklisted) rather than on txClassification alone — the raw fields are what make jurisdiction-specific rules possible.

Integration method

REST. History endpoints return the latest 20 / 100 / 400 transactions across all chains or per chain, paginated backwards from an optional startTime; period endpoints return transactions inside a startTimeendTime window; byHash returns one full transaction or only its transfers; userTx/position returns all transactions for a DeFi position; userTx/overview lists the chains a wallet is active on with counts. "Extended" variants include token USD valuations; "rawlabel" variants exclude them for cheaper bulk pulls. Solana wallets use dedicated Solana history endpoints; on Solana, txAction classification is currently limited to Liquidity Pool, Staked, NFT, Transfer and Governance per the docs.

Concrete data points

  1. txClassification, txType, txAction
  2. protocol, contractName, functionName, encodingFunction
  3. walletToWallet, blacklisted, successful, userPaidFees
  4. txFee, txFeeUsd, timeStamp, block, hash, chain
  5. balances[]from, to, balance, balanceUSD, tokenAddress, tokenSymbol, standard, nftDetails

Used by

Crypto Accounting Software · Compliance & AML · DeFi Fund Administrators · DeFi Funds, Traders & Staking Services · Data Providers

Illustrative request / response

GET{API_BASE_URL}/api/merlin/public/v2/userTx/history/chain/extended/{userAddress}?chain=eth
Authorization: {API_KEY}
[
  {
    "hash": "0x9f3c…e21a",
    "chain": "eth",
    "block": 20412233,
    "timeStamp": 1722470400,
    "txClassification": "LP Deposit",
    "txType": "Deposited",
    "txAction": "Liquidity Pool",
    "protocol": "uniswap3",
    "contractName": "NonfungiblePositionManager",
    "functionName": "mint",
    "walletToWallet": false,
    "blacklisted": false,
    "successful": true,
    "txFee": 0.0031,
    "txFeeUsd": 10.94,
    "userPaidFees": true,
    "balances": [
      { "tokenSymbol": "WETH", "balance": -2.0, "balanceUSD": -7168.94, "standard": "ERC20", "from": "0x…", "to": "0x…" },
      { "tokenSymbol": "USDC", "balance": -7150.0, "balanceUSD": -7150.00, "standard": "ERC20", "from": "0x…", "to": "0x…" }
    ]
  }
]
Illustrative — values are examples; field names follow the Transactions Object documentation.

Start with 4,000 free credits