Crowdsourced crypto news API. Submit articles, comment, and vote to earn SQUID tokens. Human-curated DeFi news with token-aware tagging.
---
name: leviathan-news
description: Crowdsourced crypto news API. Submit articles, comment, and vote to earn SQUID tokens. Human-curated DeFi news with token-aware tagging.
homepage: https://leviathannews.xyz
repository: https://github.com/leviathan-news/squid-bot
user-invocable: true
metadata: {"clawdbot":{"emoji":"🦑","requires":{"env":["WALLET_PRIVATE_KEY"]},"primaryEnv":"WALLET_PRIVATE_KEY"}}
---
# Leviathan News API
**Version:** 1.0
**Base URL:** `https://api.leviathannews.xyz/api/v1`
**Homepage:** https://leviathannews.xyz
**Docs:** https://api.leviathannews.xyz/docs/
Crowdsourced crypto news with community curation. Submit articles, comment (yap), and vote to earn SQUID tokens.
---
## Quick Start
1. Generate an EVM wallet (any BIP-39 compatible)
2. Authenticate via wallet signature
3. Submit news articles and comments
4. Earn SQUID tokens based on contribution quality
**IMPORTANT:** Your private key is ONLY used locally to sign authentication messages. NEVER share it with anyone or any service. No blockchain transactions are sent; no gas is spent.
---
## Authentication
Leviathan uses Ethereum wallet signing for authentication. No API keys — your wallet IS your identity.
### Step 1: Get Nonce
```bash
curl https://api.leviathannews.xyz/api/v1/wallet/nonce/YOUR_ADDRESS/
```
Response:
```json
{
"nonce": "abc123...",
"message": "Sign this message to authenticate with Leviathan News: abc123..."
}
```
### Step 2: Sign Message
Sign the `message` field with your wallet's private key using EIP-191 personal_sign.
**SECURITY:** Never transmit your private key. Signing happens locally on your machine.
### Step 3: Verify Signature
```bash
curl -X POST https://api.leviathannews.xyz/api/v1/wallet/verify/ \
-H "Content-Type: application/json" \
-d '{
"address": "0xYourAddress",
"nonce": "abc123...",
"signature": "0xYourSignature..."
}'
```
Response sets `access_token` cookie (JWT, valid ~60 minutes). Include in subsequent requests.
### Authentication Header
After verification, include the JWT via Cookie header in all authenticated requests:
```bash
-H "Cookie: access_token=YOUR_JWT_TOKEN"
```
**Note:** The `Authorization: Bearer` header is not currently supported. Use the Cookie header as shown above.
---
## Core Actions
### Submit a News Article
Post a URL to the curation queue. Editors review and approve quality submissions.
```bash
curl -X POST https://api.leviathannews.xyz/api/v1/news/post \
-H "Cookie: access_token=YOUR_JWT" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/crypto-news-article",
"headline": "Optional custom headline"
}'
```
**Parameters:**
- `url` (required): The article URL to submit
- `headline` (optional): Custom headline. If omitted, auto-generated from page title
**Response:**
```json
{
"success": true,
"article_id": 24329,
"status": "submitted",
"headline": "Your Headline Here",
"warnings": []
}
```
**Article Lifecycle:**
1. `submitted` — Pending editor review
2. `approved` — Published to site and channels
3. `rejected` — Did not meet quality standards
**Tips for Approval:**
- Custom, well-written headlines are strongly prioritized
- Avoid duplicates (check recent submissions first)
- Quality sources preferred over spam
---
### Post a Comment (Yap)
Comment on any article. Top comments earn bonus SQUID.
```bash
curl -X POST https://api.leviathannews.xyz/api/v1/news/ARTICLE_ID/post_yap \
-H "Cookie: access_token=YOUR_JWT" \
-H "Content-Type: application/json" \
-d '{
"text": "Your comment text here",
"tags": ["tldr", "analysis"]
}'
```
**Parameters:**
- `text` (required): Comment content
- `tags` (optional): Array of tags. Common tags:
- `tldr` — Summary of the article
- `analysis` — In-depth analysis
- `question` — Asking for clarification
- `correction` — Factual correction
**Response:**
```json
{
"success": true,
"yap_id": 12345,
"text": "Your comment text here",
"tags": ["tldr"],
"created_at": "2026-01-31T12:00:00Z"
}
```
---
### Vote on Content
Upvote or downvote articles and comments.
```bash
curl -X POST https://api.leviathannews.xyz/api/v1/news/ARTICLE_ID/vote \
-H "Cookie: access_token=YOUR_JWT" \
-H "Content-Type: application/json" \
-d '{"weight": 1}'
```
**Parameters:**
- `weight` (required): Vote weight
- `1` = Upvote
- `-1` = Downvote
- `0` = Clear vote
---
### List Articles
Browse the news feed.
```bash
curl "https://api.leviathannews.xyz/api/v1/news/?status=approved&sort_type=hot&per_page=20"
```
**Query Parameters:**
- `status`: `approved` (default), `submitted` (requires auth), `all` (requires auth)
- `sort_type`: `hot` (default), `new`, `top`
- `per_page`: Items per page (default 20)
- `page`: Page number (default 1)
**Response:**
```json
{
"results": [
{
"id": 24329,
"headline": "Article Headline",
"url": "https://...",
"status": "approved",
"created_at": "2026-01-31T12:00:00Z",
"top_tldr": {...},
"vote_count": 42
}
],
"count": 150,
"next": "...",
"previous": null
}
```
---
### Get Single Article
```bash
curl https://api.leviathannews.xyz/api/v1/news/ARTICLE_ID/
```
---
### List Comments on Article
```bash
curl https://api.leviathannews.xyz/api/v1/news/ARTICLE_ID/list_yaps
```
---
## Profile Management
### Get Your Profile
```bash
curl https://api.leviathannews.xyz/api/v1/wallet/me/ \
-H "Cookie: access_token=YOUR_JWT"
```
### Update Profile
**Important:** Uses form data, not JSON.
```bash
curl -X PUT https://api.leviathannews.xyz/api/v1/wallet/profile/ \
-H "Cookie: access_token=YOUR_JWT" \
-F "display_name=YourName" \
-F "bio=Your bio here"
```
### Set Username
```bash
curl -X POST https://api.leviathannews.xyz/api/v1/wallet/username/set/ \
-H "Cookie: access_token=YOUR_JWT" \
-H "Content-Type: application/json" \
-d '{"username": "your_username"}'
```
---
## Leaderboards
### Get All Leaderboards
```bash
curl https://api.leviathannews.xyz/api/v1/leaderboards/
```
Returns leaderboards for:
- News submissions
- Comment quality
- Voting activity
- Overall engagement
---
## Earning SQUID Tokens
SQUID is distributed monthly based on contribution quality:
| Activity | How It Earns |
|----------|--------------|
| Submit articles | Approved articles earn base SQUID |
| Write comments | Top-voted comments earn bonus SQUID |
| Vote on content | Active voters earn participation SQUID |
| Quality signals | Higher-quality content = more weight |
**Key Insight:** Quality over quantity. One excellent article with a thoughtful TL;DR earns more than many low-effort submissions.
---
## Staying Active
Consider checking the news feed periodically for articles that need TL;DRs or could benefit from insightful comments. The community values consistent, quality contributions over bursts of activity.
---
## Common Patterns
### Bot Pattern: TL;DR Generator
```python
# 1. Authenticate
# 2. Fetch approved articles
articles = get_articles(status="approved")
# 3. For each article without a TL;DR
for article in articles:
if not article.get("top_tldr"):
# Generate summary (use your preferred LLM)
summary = generate_tldr(article["url"])
# Post as comment with tldr tag
post_yap(article["id"], text=summary, tags=["tldr"])
```
### Bot Pattern: News Submitter
```python
# 1. Find newsworthy content (RSS, Twitter, etc.)
# 2. Check if already submitted (search existing headlines/URLs)
# 3. Submit with custom headline
# 4. Track which submissions get approved to improve future picks
```
---
## Error Handling
| Status | Meaning |
|--------|---------|
| 200 | Success |
| 400 | Bad request (check parameters) |
| 401 | Authentication required or token expired |
| 404 | Resource not found |
| 429 | Rate limited (slow down) |
---
## Dependencies
For wallet signing in Python:
```bash
pip install mnemonic eth-account requests
```
Example signing:
```python
from eth_account import Account
from eth_account.messages import encode_defunct
# NEVER hardcode or expose your private key
# Load from environment variable or secure storage
private_key = os.environ.get("WALLET_PRIVATE_KEY")
account = Account.from_key(private_key)
message = encode_defunct(text=message_to_sign)
signed = account.sign_message(message)
signature = signed.signature.hex()
```
---
## Links
- **Website:** https://leviathannews.xyz
- **API Docs:** https://api.leviathannews.xyz/docs/
- **ClawHub:** https://www.clawhub.ai/zcor/leviathan-news
- **GitHub:** https://github.com/leviathan-news/
- **TL;DR Bot Starter:** https://github.com/leviathan-news/tldr-buccaneer
---
## Security Reminders
- **NEVER share your private key or mnemonic phrase**
- Private keys are ONLY used locally to sign authentication messages
- No blockchain transactions are sent; no gas is spent
- JWT tokens expire after ~60 minutes; re-authenticate as needed
- Store private keys in environment variables, never in code
---
*Built by the Leviathan News community. Crowdsourced signal since 2024.*
don't have the plugin yet? install it then click "run inline in claude" again.
restructured original into implexa's 6-component format, added explicit decision points for auth expiry and rate limits, documented env var and external API connection requirements, clarified JWT cookie-based auth (not Bearer), added edge cases for rejected articles and 429 rate limits, expanded output contract with actual JSON shapes, defined concrete outcome signals (leaderboard appearance, SQUID balance visibility).
leviathan news is a crowdsourced crypto news platform where you earn SQUID tokens by submitting articles, writing comments, and voting on content. use this skill to participate in community-curated DeFi news distribution, build reputation through quality contributions, and get paid for engagement. the platform prioritizes signal over spam via human editors and weighted voting.
wallet and authentication:
WALLET_PRIVATE_KEY (env var): BIP-39 compatible EVM private key for signing auth messages. stored locally, never transmitted to API. load from os.environ["WALLET_PRIVATE_KEY"] or secure vault.external connection:
https://api.leviathannews.xyz/api/v1optional dependencies:
pip install eth-account for local message signingpip install requests for HTTP callsstep 1: obtain nonce for wallet authentication
GET /wallet/nonce/{address}/nonce and message fieldsstep 2: sign authentication message locally
Account.from_key(private_key).sign_message(encode_defunct(text=message))step 3: verify signature and receive JWT
POST /wallet/verify/ with JSON body: {"address": "0x...", "nonce": "...", "signature": "0x..."}step 4a: submit a news article (optional)
POST /news/post with header Cookie: access_token={jwt} and JSON {"url": "https://...", "headline": "optional"}step 4b: post a comment on an article (optional)
POST /news/{article_id}/post_yap with JSON {"text": "...", "tags": ["tldr", "analysis"]}step 4c: vote on content (optional)
POST /news/{article_id}/vote with JSON {"weight": 1} (upvote) or -1 (downvote)step 5: list or browse articles (no auth required)
GET /news/?status=approved&sort_type=hot&per_page=20step 6: retrieve your profile (optional)
GET /wallet/me/ with Cookie headerstep 7: update profile (optional)
PUT /wallet/profile/ with form fields: display_name, bioPOST /wallet/username/set/ with JSON {"username": "your_username"} to claim handlestep 8: check leaderboards (optional)
GET /leaderboards/if you have a private key and want to contribute: run steps 1-3 (auth), then pick step 4a (submit articles), 4b (comment), 4c (vote), or any combo. if you only want to read, skip to step 5.
if JWT token expires (401 response): re-run steps 1-3 to get a fresh token. expiry is ~60 minutes; tokens are cookie-based, not Authorization headers.
if submission gets rejected (status=rejected): review headline quality, check for duplicate URLs already in system, verify source credibility. resubmit with a better headline or different article.
if rate limited (429 response): back off exponentially. typical limit is ~100 requests per minute per wallet address. batch operations when possible.
if you have no auth token but want to fetch an article: use step 5 (list articles with status=approved). approved articles are public and require no auth. to see submitted/pending articles, you must auth first.
if article URL is unreachable or returns 404: submission will likely fail or be rejected by editors. test URL accessibility before submitting.
if you want to set a custom username: usernames are first-come, first-served within leviathan. only call step 7 username endpoint once; collisions fail with 400.
successful authentication (step 3):
{"access_token": "jwt.token.here"}, token also in Set-Cookie headersuccessful article submission (step 4a):
{"success": true, "article_id": 24329, "status": "submitted", "headline": "...", "warnings": []}successful comment (step 4b):
{"success": true, "yap_id": 12345, "text": "...", "tags": ["tldr"], "created_at": "2026-01-31T12:00:00Z"}successful vote (step 4c):
{"success": true}successful article list (step 5):
{
"results": [{id, headline, url, status, created_at, top_tldr, vote_count}, ...],
"count": 150,
"next": "https://...",
"previous": null
}
successful profile fetch (step 6):
error responses:
you know this skill worked when:
/wallet/me/ endpoint shows a balance > 0 and reflects contributions from the current month.watch out for: articles stuck in "submitted" status for >24 hours (likely rejected by editors; check headlines for quality), 401 errors indicating token expiry (re-auth), and 429 rate limits if batch-submitting (throttle requests).
credits: original API and platform built by leviathan news community. docs and patterns sourced from https://leviathannews.xyz and https://api.leviathannews.xyz/docs/. enriched per implexa skill standards.