User Guide

ODATANO exposes Cardano blockchain data through three OData V4 services.
This guide covers the read service (/odata/v4/cardano-odata/).
For building / signing / submitting transactions, see Transaction Workflow.

Base URLhttp://localhost:4004/odata/v4/cardano-odata
MetadataGET $metadata for full schema
Networksmainnet, preview, preprod
Query options$filter, $select, $expand, $top, $skip, $count, $orderby
Auth (prod)authenticated-user JWT - see Security

Endpoints by Topic

TopicEntity (GET /…)Action (POST /…)
NetworkNetworkInformationGetNetworkInformation
BlocksBlocksGetBlockByHash, GetLatestBlock
EpochsEpochsGetEpochByNumber, GetLatestEpoch
TransactionsTransactionsGetTransactionByHash, GetMetadataByTxHash
AddressesAddressesGetAddressByBech32, GetUTxOsByAddress, GetAssetsByAddress, GetLatestTransactionsByAddress
PoolsPoolsGetPoolById
AccountsAccountsGetAccountByStakeAddress
DRepsDrepsGetDrepById
ProtocolLedgerProtocolParametersGetLedgerProtocolParameters
CBOR utility-ParseTransactionCbor

Full parameter list: API Reference.

Example Request

curl -X POST http://localhost:4004/odata/v4/cardano-odata/GetTransactionByHash \
  -H "Content-Type: application/json" \
  -d '{"hash": "2b8216b428b5292a4b13075cf37b26434f890a4ffcce1f75da1f85d2297efe83"}'

Sample response:

{
  "hash": "2b82…7efe83",
  "blockHash": "cb08…ab39",
  "blockHeight": 1234567,
  "blockTime": 1716969300,
  "slot": 12345678,
  "txIndex": 3,
  "fee": "200000",
  "deposit": "0",
  "size": 450,
  "hasMetadata": false,
  "hasInputs": true,
  "hasOutputs": true
}

Use ?$expand=inputs,outputs,metadata to include related entities. Validity-window fields are not on the read entity. Call ParseTransactionCbor if you need them.

OData Query Patterns

# Latest block
GET /Blocks?$orderby=height desc&$top=1

# Filter
GET /Transactions?$filter=slot gt 12345678&$top=10

# Select columns
GET /Addresses?$select=address,totalLovelace,stakeAddress

# Expand related entities
GET /Transactions('<hash>')?$expand=inputs,outputs

Errors

All errors return a structured { code, message, target? } body. Branch on code (e.g. ODATANO_NOT_FOUND, ODATANO_INVALID_INPUT, ODATANO_PROVIDER_UNAVAILABLE), not HTTP status. Full error map: Error Handling.


Version: v1.7.8 · Repository · Issues