Learn OCEAN-SDK with Real Code Examples
Updated Nov 25, 2025
Explain
Ocean SDK provides tools to publish, discover, and consume datasets on-chain or off-chain with privacy-preserving techniques.
It integrates with Ethereum, Polygon, and other EVM-compatible networks for tokenized data access.
Supports AI/ML workflows by allowing compute-to-data and data marketplace interactions.
Includes libraries, smart contracts, and APIs for data access control.
Used in DeFi, data marketplaces, and AI-data monetization platforms.
Core Features
Ocean Market smart contracts
DDO (Decentralized Data Object) metadata format
Compute-to-data module
Access management via tokens
Event tracking for dataset consumption
Basic Concepts Overview
DDO (Decentralized Data Object) defines dataset metadata
ERC-20 or ERC-721 tokens control dataset access
Compute-to-data allows private computation on data
Market contract handles publishing, buying, and consuming data
SDK exposes APIs for dataset lifecycle management
Project Structure
ocean-sdk/ - SDK library
scripts/ - dataset publishing scripts
tests/ - unit tests for integration
config/ - network and wallet configs
examples/ - reference dataset workflows
Building Workflow
Define dataset metadata and DDO
Tokenize dataset using Ocean tokens
Publish dataset to marketplace
Enable compute-to-data if needed
Monitor consumption and earnings via blockchain events
Difficulty Use Cases
Beginner: publish public dataset
Intermediate: tokenized dataset access
Advanced: compute-to-data integration
Expert: build full data marketplace
Auditor: verify smart contract interactions and compliance
Comparisons
Ocean SDK vs traditional data APIs: Ocean is decentralized and tokenized.
Ocean SDK vs Dataverse: Ocean supports blockchain monetization and compute-to-data.
Ocean SDK vs IPFS only: Ocean integrates access control and marketplace features.
Ocean SDK vs Substrate-based marketplaces: Ocean targets EVM chains.
Ocean SDK vs Filecoin: Filecoin stores data, Ocean enables monetization and computation.
Versioning Timeline
2017 – Ocean Protocol founded
2018 – Initial Ocean SDK release
2019 – Compute-to-data support
2020 – Marketplace enhancements and Aquarius indexer
2021–2025 – Continuous SDK improvements and ecosystem growth
Glossary
DDO: Decentralized Data Object
Brizo: compute-to-data service
Aquarius: metadata discovery service
Tokenization: assigning tokens for access
Marketplace: platform for dataset publishing