TOKEN2049 Got a code? Redeem it for a free ODATANO API key. Redeem now →

Get Started

ODATANO is an OData V4 API for public blockchains. ODATANO covers Cardano, NIGHTGATE covers Midnight, ASTRA adds analytics over both. Four ways in:

WayWhat you needStart here
Hosted APIone key from the API pageHosted API
AI agentsthe same key in your MCP clientAI agents
SAP CAP pluginnpm install into your CAP appODATANO and NIGHTGATE
Standalonethe repo or the Docker imageStandalone

Hosted and self-hosted serve the same routes. Integrate against the hosted API first, move to your own instance later without changing a path.

Hosted API

ODATANO, NIGHTGATE and ASTRA run behind one key from api.odatano.dev. Calls go to api.preprod.odatano.dev for Cardano preprod and Midnight preprod, nothing to install.

1. Get a key

Sign in with a Cardano wallet on the API page. The first key comes with free calls. Codes and packs paid with ADA over x402 add more.

2. Call it

The key goes as a bearer token. Cardano:

curl https://api.preprod.odatano.dev/odata/v4/cardano/NetworkInformation \
  -H "Authorization: Bearer oda_..."

curl -X POST https://api.preprod.odatano.dev/odata/v4/cardano-transaction/BuildSimpleAdaTransaction \
  -H "Authorization: Bearer oda_..." \
  -H "Content-Type: application/json" \
  -d '{"senderAddress":"addr_test1...","recipientAddress":"addr_test1...","lovelaceAmount":10000000}'

Midnight and analytics, same key:

curl "https://api.preprod.odatano.dev/odata/v4/midnight/Blocks/latest()" \
  -H "Authorization: Bearer oda_..."

curl https://api.preprod.odatano.dev/odata/v4/analytics/ChainOverview \
  -H "Authorization: Bearer oda_..."

Every forwarded call is listed with an example response in the API reference. Routes, key lanes and limits: Hosted API.

AI agents (MCP)

Two MCP servers put both chains in front of an agent. One .mcp.json for Claude Code, Claude Desktop, Cursor or any MCP client:

{
  "mcpServers": {
    "odatano": {
      "command": "npx",
      "args": ["-y", "@odatano/core-mcp"],
      "env": { "ODATANO_ACCESS_KEY": "oda_..." }
    },
    "nightgate": {
      "command": "npx",
      "args": ["-y", "@odatano/nightgate-mcp"],
      "env": { "ODATANO_ACCESS_KEY": "oda_..." }
    }
  }
}

The gateway is the default URL. The agent reads, builds and verifies; a human, a wallet or a sponsor signs. Tools and flows: MCP servers.

ODATANO as a CAP plugin

@odatano/core is a SAP CAP plugin for Cardano. It exposes blocks, addresses, UTxOs and pools as OData entities and builds transactions as OData actions. Needs Node.js 22.5 or newer and @sap/cds 10.

Without a CAP project yet:

npm i -g @sap/cds-dk
cds init my-app && cd my-app

1. Install

npm install @odatano/core @cap-js/sqlite

2. Configure

In package.json:

{
  "cds": {
    "requires": {
      "[development]": { "auth": { "kind": "dummy" } },
      "db": { "kind": "sqlite", "credentials": { "url": "db.sqlite" } },
      "odatano-core": {
        "network": "preview",
        "backends": ["blockfrost", "koios"]
      }
    }
  }
}

The Blockfrost key goes into .env, not into package.json:

BLOCKFROST_API_KEY=preview_your_api_key

Get a free key at blockfrost.io. The [development] auth block lets cds watch accept requests without a JWT.

3. Run

cds deploy --to sqlite
cds watch

Six services register under /odata/v4/cardano-*. First request:

curl http://localhost:4004/odata/v4/cardano/NetworkInformation

Services, transactions, Plutus and configuration: ODATANO guide.

NIGHTGATE as a CAP plugin

@odatano/nightgate is the plugin for Midnight: a block indexer plus a wallet stack for ZK-aware transaction submission. Shielded transfers, Compact contracts, document anchoring and zero-knowledge attestations.

1. Install

npm install @odatano/nightgate @cap-js/sqlite

2. Configure

{
  "cds": {
    "requires": {
      "db": { "kind": "sqlite" },
      "nightgate": { "network": "preprod" }
    }
  }
}

network is the only required key. Defaults: public preprod RPC, hosted Midnight indexer, in-process proving.

3. Run

cds watch

Five services register under /api/v1/*. Write actions are async: they return a job id, you poll getJobStatus. Services, wallet sessions, proofs and configuration: NIGHTGATE guide.

Both in one app

The two plugins are independent CAP requires. One app serves Cardano and Midnight side by side:

{
  "cds": {
    "requires": {
      "db": { "kind": "sqlite" },
      "odatano-core": { "network": "preview" },
      "nightgate": { "network": "preprod" }
    }
  }
}

Standalone

Without a CAP project of your own, each repo runs as its own service on port 4004, with the same routes as the plugin.

git clone https://github.com/ODATANO/ODATANO && cd ODATANO
npm ci && cp .env.example .env      # NETWORK, BACKENDS, BLOCKFROST_API_KEY
cds deploy --to sqlite && cds serve
docker run -d --name nightgate -p 4004:4004   -e ENCRYPTION_KEY=$(openssl rand -hex 32)   -e NIGHTGATE_HTTP_PASSWORD=change-me   -v nightgate-data:/data   ghcr.io/odatano/nightgate:latest

Docker for ODATANO, the local cardano-node stack and production set-ups: ODATANO and NIGHTGATE.

Next steps