Open source · MIT · v0.1.0

Zora Coins SDKs

Typed clients for the Zora Coins API in Python, TypeScript, Go, Rust, C#, Java and C++. All 30 endpoints, one set of documented types, and an indexer for the rewards Zora pays creators and referrers on Base. Free and MIT licensed.

Install

Each package is on its language's own registry.

Python

pip install zora-coins

TypeScript

npm install zora-coins

Go

go get github.com/pgalyen1987/zora-coins-sdks/go

Rust

cargo add zora-coins

C#

dotnet add package Zora.Coins

Java

implementation("io.github.pgalyen1987:zora-coins:0.1.0")

C++

FetchContent_Declare(zora_coins
  GIT_REPOSITORY https://github.com/pgalyen1987/zora-coins-sdks
  GIT_TAG v0.1.0
  SOURCE_SUBDIR cpp)
FetchContent_MakeAvailable(zora_coins)

GraphQL

go run github.com/pgalyen1987/zora-coins-sdks/graphql/cmd/zora-graphql@latest

The same call in each language

Look up a coin by address. Every SDK reads ZORA_API_KEY from the environment; without one Zora applies lower rate limits.

Python

from zora_coins import ZoraCoins

coin = ZoraCoins().get_coin("0x0b85…")   # None if missing
print(coin.name, coin.market_cap)

TypeScript

import { ZoraCoins } from "zora-coins";

const coin = await new ZoraCoins().coin("0x0b85…");  // null if missing
console.log(coin?.name, coin?.marketCap);

Go

coin, err := zora.NewClient().Coin(ctx, "0x0b85…", nil)
if errors.Is(err, zora.ErrNotFound) { /* no such coin */ }

Rust

let coin = Client::new().coin("0x0b85…", None).await?;  // Option<Zora20Token>

C#

var coin = await new ZoraCoinsClient().GetCoinAsync("0x0b85…");  // null if missing

Java

Optional<Zora20Token> coin = ZoraCoins.builder().build().getCoin("0x0b85…", null);

C++

std::optional<zora::Zora20Token> coin = zora::Client().coin("0x0b85…");

What every SDK gives you

All 30 endpoints
Coins, holders, swaps, comments, price history, Explore lists, search, profiles, balances, trade activity, leaderboards, live streams, pool configs, trade quotes and coin creation.
117 documented types
Every field says its unit. marketCap is a USD decimal string; balance is an 18-decimal integer string. The API itself doesn't say which.
Pagination two ways
One page at a time, or an iterator, stream or callback that fetches the next page as you reach it and stops when you do.
Retries and typed errors
Backoff that honours Retry-After on rate limits and server errors. A failed quote tells you when the pool simply doesn't have the liquidity.
Trading without custody
Quotes and coin creation return the transaction for your wallet to sign. Nothing here holds keys. Set a referrer to earn the trade referral reward.
REST and GraphQL
A GraphQL client for the gateway below, decoding into the same types as REST, so a screen's worth of data can be one request.

What did an address earn?

Every trade of a Zora coin pays the coin's creator, the platform that launched it, and the interface that routed the trade. On V4 coins those payouts are CoinMarketRewardsV4 events, and none of their fields are indexed, so you can't ask a node for "rewards paid to my address". You have to read every reward event in a block range and filter them yourself.

Each SDK does that: it scans Base in chunks, keeps what pays the addresses you care about, remembers which ranges it has already scanned, and reports earnings per role and token at current prices. The Python, TypeScript, Go and Rust packages ship it as a command-line tool too.

How it works underneath, with code you can run without the SDK: Reading Zora creator rewards on Base when nothing is indexed.

$ zora-rewards --days 0.25 0x55c88bb05602da94fce8feadc1cbebf5b72c2453
Zora rewards for 0x55c88bb05602da94fce8feadc1cbebf5b72c2453
334 reward events, blocks 51460584–51471286
  Platform referral           81.2423 ZORA                $0.64  (14 payouts)
  Platform referral       0.000199321 WETH                $0.50  (50 payouts)
  Platform referral          0.589797 USDC                $0.59  (82 payouts)
  Trade referral              45.8290 ZORA                $0.36  (125 payouts)
  Trade referral          0.000167845 WETH                $0.42  (61 payouts)
  Total (current prices)                                      $2.58

One request with GraphQL

The gateway serves the whole API as one GraphQL schema, plus a rewards query the REST API can't answer. It forwards each caller's own Zora API key and stores nothing.

{
  coin(address: "0x0b8590d3c0b1ee6c797e184a4afbb15f8f58a46b") { name symbol marketCap uniqueHolders creatorProfile { handle } }
  explore(listType: TOP_GAINERS, pageSize: 5) { edges { node { symbol marketCapDelta24h } } }
  rewards(addresses: ["0x…"], hours: 6) { totalUsd lines { role symbol usd } }
}

Why seven languages agree

Zora's REST API sits on a GraphQL backend, and its OpenAPI spec writes every response out inline: 427 unnamed object schemas, up to 29 levels deep. A generator turns that into 117 named types (every coin is one Zora20Token, whichever endpoint returned it) and emits all seven SDKs, the GraphQL schema and the endpoint reference from that one model. So a name, a type or a doc string can't differ between languages.

Where the live API and its spec disagree, the SDKs follow the API. Each SDK's tests decode the same recorded responses, and a live suite calls all 30 endpoints against production.

Questions

Is this an official Zora SDK?

No. It's community-maintained by Rebel Studios and not affiliated with Zora. Zora's official SDK, @zoralabs/coins-sdk, is TypeScript only; these cover the same API in six more languages and add a rewards indexer and a GraphQL gateway.

Is there a Python SDK for the Zora API?

Yes: pip install zora-coins. It has typed pydantic models for every response, sync and async clients, iterators for every paginated endpoint, and the zora-rewards command.

Do I need a Zora API key?

No, but Zora applies much lower rate limits without one. Create a key in your Zora developer settings and set ZORA_API_KEY; every SDK reads it.

Can it buy, sell or create coins?

It gets trade quotes and builds coin-creation calls, and returns the transaction for your wallet to sign and send. It never holds or asks for private keys.

How do I see the creator and referral rewards an address earned?

Run zora-rewards --days 7 0xYourAddress (Python, TypeScript, Go or Rust), or call the rewards module from code. It reads the reward events from Base and prices them at current rates.

What does it cost?

Nothing. It's MIT licensed. Zora's own API terms still apply to the data you fetch with it.

Get the code

Source, docs and issues are on GitHub. If something's missing or wrong, open an issue; it's the fastest way to get it fixed.