↗

主题清单

全部可订阅的主题;带 Key 时标注是否可读。

GEThttps://api.tokenearly.com/v1/topics

无需 Key,不计入限频。新接入的交易所、新闻源或信号源会自动出现在这里;推特主题是我们精选的 KOL 账号,名单会增减,以这里为准。带上 Key 时,每个主题多一个 accessible 字段,表示你的 Key 是否有权限读取。

公开接口,无需 Key(带 Key 时返回更多信息)

参数

没有参数。

在线调试
申请试用 Key

填入你的 API Key(正式 Key,或在控制台申请的试用 Key)即可调用真实接口;Key 只保存在你的浏览器里。

响应

错误

错误码HTTP说明
invalid_api_key401Key 不存在,或已被重置 / 吊销。
key_expired401试用 Key 已到期。重新申请试用 Key,或开通后创建正式 Key。
ip_not_allowed403这把 Key 设置了 IP 白名单,请求来源 IP 不在其中。
plan_required403当前套餐不含开发者 API,或不含该项能力。
curl "https://api.tokenearly.com/v1/topics"
import requests

resp = requests.get("https://api.tokenearly.com/v1/topics", timeout=10)
resp.raise_for_status()
print(resp.json())
// Node 18+ (built-in fetch)
async function main() {
  const resp = await fetch("https://api.tokenearly.com/v1/topics");
  console.log(await resp.json());
}

main().catch((err) => {
  console.error(err);
  process.exit(1);
});
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.tokenearly.com/v1/topics", nil)
	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(resp.Status, string(body))
}
示例响应
{
  "spec_version": "1.0",
  "topics": [
    {
      "id": "announcement.binance",
      "type": "announcement",
      "source_id": "binance",
      "names": {
        "zh": "币安",
        "en": "Binance",
        "ko": "바이낸스"
      },
      "accessible": true
    },
    {
      "id": "announcement.okx",
      "type": "announcement",
      "source_id": "okx",
      "names": {
        "zh": "欧易",
        "en": "OKX",
        "ko": "OKX"
      },
      "accessible": false
    },
    {
      "id": "announcement.mexc",
      "type": "announcement",
      "source_id": "mexc",
      "names": {
        "zh": "抹茶",
        "en": "MEXC",
        "ko": "MEXC"
      },
      "accessible": false
    }
  ]
}