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)
- Authenticate via wallet signature
- Submit news articles and comments
- 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
CODEBLOCK0
Response:
CODEBLOCK1
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
CODEBLOCK2
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:
CODEBLOCK3
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.
CODEBLOCK4
Parameters:
- -
url (required): The article URL to submit - INLINECODE5 (optional): Custom headline. If omitted, auto-generated from page title
Response:
CODEBLOCK5
Article Lifecycle:
- 1.
submitted — Pending editor review - INLINECODE7 — Published to site and channels
- INLINECODE8 — 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.
CODEBLOCK6
Parameters:
- -
text (required): Comment content - INLINECODE10 (optional): Array of tags. Common tags:
-
tldr — Summary of the article
-
analysis — In-depth analysis
-
question — Asking for clarification
-
correction — Factual correction
Response:
{
"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.
CODEBLOCK8
Parameters:
- -
weight (required): Vote weight
-
1 = Upvote
-
-1 = Downvote
-
0 = Clear vote
List Articles
Browse the news feed.
CODEBLOCK9
Query Parameters:
- -
status: approved (default), submitted (requires auth), all (requires auth) - INLINECODE23 :
hot (default), new, INLINECODE26 - INLINECODE27 : Items per page (default 20)
- INLINECODE28 : Page number (default 1)
Response:
{
"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
CODEBLOCK11
List Comments on Article
CODEBLOCK12
Profile Management
Get Your Profile
CODEBLOCK13
Update Profile
Important: Uses form data, not JSON.
CODEBLOCK14
Set Username
CODEBLOCK15
Leaderboards
Get All Leaderboards
CODEBLOCK16
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
CODEBLOCK17
Bot Pattern: News Submitter
CODEBLOCK18
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:
CODEBLOCK19
Example signing:
CODEBLOCK20
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.
Leviathan News API
版本: 1.0
基础 URL: https://api.leviathannews.xyz/api/v1
官网: https://leviathannews.xyz
文档: https://api.leviathannews.xyz/docs/
社区策展的众包加密新闻。提交文章、发表评论(yap)并投票以赚取 SQUID 代币。
快速开始
- 1. 生成一个 EVM 钱包(兼容任何 BIP-39 标准)
- 通过钱包签名进行身份验证
- 提交新闻文章和评论
- 根据贡献质量赚取 SQUID 代币
重要提示: 您的私钥仅用于在本地签署身份验证消息。切勿与任何人或任何服务共享。不会发送任何区块链交易,无需消耗 Gas 费。
身份验证
Leviathan 使用以太坊钱包签名进行身份验证。无需 API 密钥——您的钱包就是您的身份。
步骤 1:获取 Nonce
bash
curl https://api.leviathannews.xyz/api/v1/wallet/nonce/YOUR_ADDRESS/
响应:
json
{
nonce: abc123...,
message: Sign this message to authenticate with Leviathan News: abc123...
}
步骤 2:签名消息
使用您钱包的私钥,通过 EIP-191 personal_sign 对 message 字段进行签名。
安全提示: 切勿传输您的私钥。签名在您的本地机器上完成。
步骤 3:验证签名
bash
curl -X POST https://api.leviathannews.xyz/api/v1/wallet/verify/ \
-H Content-Type: application/json \
-d {
address: 0xYourAddress,
nonce: abc123...,
signature: 0xYourSignature...
}
响应会设置 access_token cookie(JWT,有效期约 60 分钟)。请在后续请求中包含该 cookie。
身份验证头
验证后,在所有需要身份验证的请求中,通过 Cookie 头包含 JWT:
bash
-H Cookie: accesstoken=YOURJWT_TOKEN
注意: 当前不支持 Authorization: Bearer 头。请使用如上所示的 Cookie 头。
核心操作
提交新闻文章
将 URL 发布到策展队列。编辑会审核并批准优质提交。
bash
curl -X POST https://api.leviathannews.xyz/api/v1/news/post \
-H Cookie: accesstoken=YOURJWT \
-H Content-Type: application/json \
-d {
url: https://example.com/crypto-news-article,
headline: Optional custom headline
}
参数:
- - url(必填):要提交的文章 URL
- headline(可选):自定义标题。如果省略,则从页面标题自动生成
响应:
json
{
success: true,
article_id: 24329,
status: submitted,
headline: Your Headline Here,
warnings: []
}
文章生命周期:
- 1. submitted — 等待编辑审核
- approved — 发布到网站和频道
- rejected — 未达到质量标准
获得批准的技巧:
- - 自定义、编写良好的标题会得到优先考虑
- 避免重复(先检查最近的提交)
- 优先选择高质量来源,而非垃圾信息
发表评论(Yap)
对任何文章发表评论。热门评论可获得额外 SQUID 奖励。
bash
curl -X POST https://api.leviathannews.xyz/api/v1/news/ARTICLEID/postyap \
-H Cookie: accesstoken=YOURJWT \
-H Content-Type: application/json \
-d {
text: Your comment text here,
tags: [tldr, analysis]
}
参数:
- - text(必填):评论内容
- tags(可选):标签数组。常用标签:
- tldr — 文章摘要
- analysis — 深度分析
- question — 请求澄清
- correction — 事实纠正
响应:
json
{
success: true,
yap_id: 12345,
text: Your comment text here,
tags: [tldr],
created_at: 2026-01-31T12:00:00Z
}
对内容投票
对文章和评论进行点赞或点踩。
bash
curl -X POST https://api.leviathannews.xyz/api/v1/news/ARTICLE_ID/vote \
-H Cookie: accesstoken=YOURJWT \
-H Content-Type: application/json \
-d {weight: 1}
参数:
- 1 = 点赞
- -1 = 点踩
- 0 = 清除投票
列出文章
浏览新闻 feed。
bash
curl https://api.leviathannews.xyz/api/v1/news/?status=approved&sorttype=hot&perpage=20
查询参数:
- - status:approved(默认)、submitted(需要身份验证)、all(需要身份验证)
- sorttype:hot(默认)、new、top
- perpage:每页项目数(默认 20)
- page:页码(默认 1)
响应:
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
}
获取单篇文章
bash
curl https://api.leviathannews.xyz/api/v1/news/ARTICLE_ID/
列出文章评论
bash
curl https://api.leviathannews.xyz/api/v1/news/ARTICLEID/listyaps
个人资料管理
获取您的个人资料
bash
curl https://api.leviathannews.xyz/api/v1/wallet/me/ \
-H Cookie: accesstoken=YOURJWT
更新个人资料
重要提示: 使用表单数据,而非 JSON。
bash
curl -X PUT https://api.leviathannews.xyz/api/v1/wallet/profile/ \
-H Cookie: accesstoken=YOURJWT \
-F display_name=YourName \
-F bio=Your bio here
设置用户名
bash
curl -X POST https://api.leviathannews.xyz/api/v1/wallet/username/set/ \
-H Cookie: accesstoken=YOURJWT \
-H Content-Type: application/json \
-d {username: your_username}
排行榜
获取所有排行榜
bash
curl https://api.leviathannews.xyz/api/v1/leaderboards/
返回以下排行榜:
赚取 SQUID 代币
SQUID 每月根据贡献质量进行分发:
| 活动 | 如何赚取 |
|---|
| 提交文章 | 批准的文章获得基础 SQUID |
| 撰写评论 |
高票评论获得额外 SQUID |
| 对内容投票 | 活跃投票者获得参与 SQUID |
| 质量信号 | 更高质量的内容 = 更高权重 |
关键洞察: 质量胜于数量。一篇带有深思熟虑 TL;DR 的优秀文章比许多低质量提交赚得更多。
保持活跃
建议定期查看新闻 feed,寻找需要 TL;DR 或能从深刻评论中受益的文章。社区更看重持续、高质量的贡献,而非爆发式活动。
常见模式
机器人模式:TL;DR 生成器
python
1. 身份验证
2. 获取已批准的文章
articles = get_articles(status=approved)
3. 对于每篇没有 TL;DR 的文章
for article in articles:
if not article.get(top_tldr):
# 生成摘要(使用您偏好的 LLM)
summary = generate_tldr(article[url