低延迟 • 高可用 • 全覆盖
tmdatahub为跨境企业提供美国商标局商标数据。
注册获取免费API Key注册无需实名认证 · 自动获得免费试用额度
支持web查询,覆盖全球美国商标局需求。
清晰易懂的开发文档,30分钟完成快速集成。
WebSocket高频推送,数据毫秒送达。
提供Tick级历史数据,为您的量化策略提供验证基础。
package org.example.ws;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class HttpExample {
public static void main(String[] args) {
try {
String apiUrl = "https://api.tmdatahub.cn/stock/batch_kline/1/10/002594.SZ%2C00285.HK%2CTSLA.US";
URL url = new URL(apiUrl);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("apiKey","yourApikey");
int responseCode = connection.getResponseCode();
System.out.println("HTTP code: " + responseCode);
BufferedReader reader;
if (responseCode == HttpURLConnection.HTTP_OK) {
reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
} else {
reader = new BufferedReader(new InputStreamReader(connection.getErrorStream()));
}
String line;
StringBuilder response = new StringBuilder();
while ((line = reader.readLine()) != null) {
response.append(line);
}
reader.close();
System.out.println("美国商标局数据: " + response);
} catch (IOException e) {
e.printStackTrace();
}
}
}
注册后自动获得API密钥,参考文档30分钟即可完成美国商标局行情接入。
提供专业,全面,准确的USPTO数据。