Skip to main content

tiders-x402-server (CLI)

Sell access to your data — install the server, point this server at a database, set a price, and anyone on the internet can pay small cryptocurrency amounts to query your data instantly, with no contracts, accounts, or billing setup.

Buyers submit SQL queries over HTTP and receive results as efficient Apache Arrow IPC streams. You control what data is exposed, which tables are available, and how much each query costs — per row returned or a flat fee to access a table. Buyers interact using familiar SQL, but Tiders enforces a safe subset — blocking expensive operations like JOINs and subqueries — so your database stays protected and costs stay predictable.

Payments are handled by the x402 protocol, an open standard for HTTP-native micropayments. When a server needs payment it returns a standard 402 Payment Required response; a client with x402 support signs it, and the transaction settles in under a second using stablecoins — no accounts, no checkout pages, no minimum spend.

Under the hood, Tiders is a Rust server that connects to different databases such as DuckDB, PostgreSQL, or ClickHouse. Buyers query using familiar SQL, but Tiders enforces a safe subset — blocking expensive operations like JOINs and subqueries — so your database stays protected and costs stay predictable.

Serving raw data from your database through a paid API is the server's core job. As an optional addition — because selling data is hard without showing buyers what they're getting — the same server application can scaffold and publish interactive dashboards: fully customizable visual reports you design and your buyers explore in a browser, with a convenience button that hits the server's x402-gated APIs to download the underlying data. The server works exactly the same with or without dashboards.

Think of the dashboard feature as a vending machine for data: buyers browse the dashboard to preview what's available, then pay per request to access the full dataset. You stay in full control — what data is freely visible in the dashboard, which tables the server exposes, and how much each query costs, whether that's per row returned or a flat fee to access a table.

Full documentation: https://yulesa.github.io/tiders-x402-server/

Installation

pip install tiders-x402-server
# or
cargo install tiders-x402-server

Quick Start

Tiders-x402-server assumes you already have a database populated with the data you want to sell. If you don't, the Tiders ingestion tool can help you stand one up and load it with crypto data — see Choosing a Database for guidance on picking a backend.

  1. Install the CLI:
pip install tiders-x402-server
  1. Create a tiders-x402-server.yaml:
server:
  bind_address: "0.0.0.0:4021"
  base_url: "http://localhost:4021"

facilitator:
  url: "https://facilitator.x402.rs"

database:
  duckdb:
    path: "./data/my_data.duckdb"

tables:
  - name: my_table
    description: "My dataset"
    price_tags:
      - type: per_row
        pay_to: "0xYourWalletAddress"
        token: usdc/base_sepolia
        amount_per_item: "0.002"
        is_default: true

dashboard: # Optional
  entries:
    - slug: my_dashboard
      title: "My Dashboard"
      description: "Description text for the dashboard"
      tags: ["Tag1", "Tag2"]
  1. Start the server:
tiders-x402-server start

The CLI auto-discovers YAML config files, supports ${VAR_NAME} environment variable expansion, and hot-reloads configuration on file changes.

  1. Optional - Create the dashboards:

You can create dashboards before or after starting the server. Scaffold dashboards defined in the YAML with the CLI command:

tiders-x402-server dashboard          # scaffold all entries
tiders-x402-server dashboard <slug>   # scaffold one

This copies a minimal Evidence project template into dashboards/<slug>/. From there, edit the files, mainly dashboards/<slug>/pages/index.md, to build your reports — the Evidence docs cover the full dashboard authoring workflow.

Note: Data visible in the dashboard can be scraped freely without payment. Only expose data you are comfortable sharing publicly, and leave anything sensitive behind the paid API instead.

Once the dashboard is ready, build it into a static site:

(cd dashboards/<slug> && npm install && npm run build)

The server will pick up and serve the built files automatically. Dashboards are static — they do not update live. Rebuild whenever the underlying data changes.

HTTP API

Endpoint Description
GET /api/ Server metadata: tables, schemas, payment requirements, SQL parser rules
GET /api/table/:name Full schema and payment offers for a table. Requires payment if the table has a MetadataPrice tag
GET /api/query?query=… Execute a SQL query (SQL in the query URL parameter). Returns 402 with payment options, or 200 with an Arrow IPC stream
GET /<slug>/ Static Evidence dashboard, one per dashboards: entry

Response formats:

  • 200 OK — application/vnd.apache.arrow.stream
  • 402 Payment Required — JSON payment options; resend with X-Payment header
  • 400 Bad Request / 500 Internal Server Error — plain text error

Related packages

License

Licensed under either of Apache License 2.0 or MIT license at your option.

Release files for tiders-x402-server 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for tiders-x402-server 0.3.3
File
tiders_x402_server-0.3.3-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
tiders_x402_server-0.3.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details
tiders_x402_server-0.3.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details
tiders_x402_server-0.3.3-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
tiders_x402_server-0.3.3-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details

Total release size: 104.9 MB

Release files / tiders_x402_server-0.3.3-py3-none-win_amd64.whl

Download URL tiders_x402_server-0.3.3-py3-none-win_amd64.whl
Size 18.8 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
63be8eeef9dfd05cfbccca7b5fcc4832205d41c2b264b4893ac86b374e041149
BLAKE2b-256 checksum
How to use checksums
f66df1f08f7405cdf75045e29d8a128d4759155e22ee76db4325dc597a735ebf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.13.3

Release files / tiders_x402_server-0.3.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL tiders_x402_server-0.3.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 20.9 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
5c6165d100f8636c66901080316cc47b1825b476d5002a799eefb5e7bab28775
BLAKE2b-256 checksum
How to use checksums
edd961a267316f5800635fb920f5a3b0e534d6ff923a61d60d9185774495c7df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.13.3

Release files / tiders_x402_server-0.3.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL tiders_x402_server-0.3.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 19.3 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
824b7605b793da91994e07fd9bc3a062e40adeaac267d243f2a98e399a8e0b7c
BLAKE2b-256 checksum
How to use checksums
b938a22b8f739135257458fa70d4c78178d6dcdfeaba8789ab32067d6818903e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.13.3

Release files / tiders_x402_server-0.3.3-py3-none-macosx_11_0_arm64.whl

Download URL tiders_x402_server-0.3.3-py3-none-macosx_11_0_arm64.whl
Size 22.2 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d6ce51c793889ae4ea71d60b56a18e55af768183bddbcc673500763cca737953
BLAKE2b-256 checksum
How to use checksums
19584076d4a5935d952cbfb4e2c399d060aa1e33019e2d7717f4ca9cb19d38a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.13.3

Release files / tiders_x402_server-0.3.3-py3-none-macosx_10_12_x86_64.whl

Download URL tiders_x402_server-0.3.3-py3-none-macosx_10_12_x86_64.whl
Size 23.7 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
bc1e44b6ad524b49ad812d478ecce9e35e327c02ec18ed18da8c6b6d7d37c674
BLAKE2b-256 checksum
How to use checksums
f1f704bbd0d53cee1be1815423d16b112e0924e719522b276008cb4a20c37caf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.13.3

Release history Release notifications | RSS feed

This release

0.3.3 This release

5 release files

0.3.2

5 release files

0.3.1

5 release files

0.3.0

5 release files

0.2.0

5 release files

0.1.0

31 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page