{"id":10911,"date":"2026-04-23T18:28:57","date_gmt":"2026-04-23T10:28:57","guid":{"rendered":"https:\/\/blog.alltick.co\/zh-CN\/?p=10911"},"modified":"2026-04-23T18:28:57","modified_gmt":"2026-04-23T10:28:57","slug":"%e5%a6%82%e4%bd%95%e7%94%a8%e4%b8%80%e4%b8%aa-api-%e8%a6%86%e7%9b%96%e8%82%a1%e7%a5%a8%e3%80%81%e5%a4%96%e6%b1%87%e3%80%81%e5%8a%a0%e5%af%86%e8%b4%a7%e5%b8%81%e7%ad%89%e5%a4%9a%e8%b5%84%e4%ba%a7","status":"publish","type":"post","link":"https:\/\/blog.alltick.co\/zh-CN\/%e5%a6%82%e4%bd%95%e7%94%a8%e4%b8%80%e4%b8%aa-api-%e8%a6%86%e7%9b%96%e8%82%a1%e7%a5%a8%e3%80%81%e5%a4%96%e6%b1%87%e3%80%81%e5%8a%a0%e5%af%86%e8%b4%a7%e5%b8%81%e7%ad%89%e5%a4%9a%e8%b5%84%e4%ba%a7\/","title":{"rendered":"\u5982\u4f55\u7528\u4e00\u4e2a API \u8986\u76d6\u80a1\u7968\u3001\u5916\u6c47\u3001\u52a0\u5bc6\u8d27\u5e01\u7b49\u591a\u8d44\u4ea7\u884c\u60c5\uff1f"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" width=\"800\" height=\"416\" src=\"https:\/\/i0.wp.com\/blog.alltick.co\/zh-CN\/wp-content\/uploads\/2026\/04\/%E8%B7%A8%E5%B8%82%E5%9C%BA%E9%87%8F%E5%8C%96%E4%BA%A4%E6%98%93%E5%B0%81%E9%9D%A2%E5%9B%BE-1.png?resize=800%2C416&#038;ssl=1\" alt=\"\" class=\"wp-image-10912\" srcset=\"https:\/\/i0.wp.com\/blog.alltick.co\/zh-CN\/wp-content\/uploads\/2026\/04\/%E8%B7%A8%E5%B8%82%E5%9C%BA%E9%87%8F%E5%8C%96%E4%BA%A4%E6%98%93%E5%B0%81%E9%9D%A2%E5%9B%BE-1-scaled.png?resize=1024%2C532&amp;ssl=1 1024w, https:\/\/i0.wp.com\/blog.alltick.co\/zh-CN\/wp-content\/uploads\/2026\/04\/%E8%B7%A8%E5%B8%82%E5%9C%BA%E9%87%8F%E5%8C%96%E4%BA%A4%E6%98%93%E5%B0%81%E9%9D%A2%E5%9B%BE-1-scaled.png?resize=300%2C156&amp;ssl=1 300w, https:\/\/i0.wp.com\/blog.alltick.co\/zh-CN\/wp-content\/uploads\/2026\/04\/%E8%B7%A8%E5%B8%82%E5%9C%BA%E9%87%8F%E5%8C%96%E4%BA%A4%E6%98%93%E5%B0%81%E9%9D%A2%E5%9B%BE-1-scaled.png?resize=768%2C399&amp;ssl=1 768w, https:\/\/i0.wp.com\/blog.alltick.co\/zh-CN\/wp-content\/uploads\/2026\/04\/%E8%B7%A8%E5%B8%82%E5%9C%BA%E9%87%8F%E5%8C%96%E4%BA%A4%E6%98%93%E5%B0%81%E9%9D%A2%E5%9B%BE-1-scaled.png?resize=1536%2C798&amp;ssl=1 1536w, https:\/\/i0.wp.com\/blog.alltick.co\/zh-CN\/wp-content\/uploads\/2026\/04\/%E8%B7%A8%E5%B8%82%E5%9C%BA%E9%87%8F%E5%8C%96%E4%BA%A4%E6%98%93%E5%B0%81%E9%9D%A2%E5%9B%BE-1-scaled.png?resize=2048%2C1064&amp;ssl=1 2048w, https:\/\/i0.wp.com\/blog.alltick.co\/zh-CN\/wp-content\/uploads\/2026\/04\/%E8%B7%A8%E5%B8%82%E5%9C%BA%E9%87%8F%E5%8C%96%E4%BA%A4%E6%98%93%E5%B0%81%E9%9D%A2%E5%9B%BE-1-scaled.png?w=1600&amp;ssl=1 1600w, https:\/\/i0.wp.com\/blog.alltick.co\/zh-CN\/wp-content\/uploads\/2026\/04\/%E8%B7%A8%E5%B8%82%E5%9C%BA%E9%87%8F%E5%8C%96%E4%BA%A4%E6%98%93%E5%B0%81%E9%9D%A2%E5%9B%BE-1-scaled.png?w=2400&amp;ssl=1 2400w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>\u5728\u91d1\u878d\u6570\u636e\u5f00\u53d1\u548c\u91cf\u5316\u4ea4\u6613\u4e2d\uff0c\u6570\u636e\u63a5\u53e3\u7684\u8986\u76d6\u9762\u548c\u7a33\u5b9a\u6027\u81f3\u5173\u91cd\u8981\u3002\u4e0d\u540c\u5e02\u573a\u3001\u4e0d\u540c\u8d44\u4ea7\u7c7b\u578b\u5f80\u5f80\u610f\u5473\u7740\u591a\u5957\u6570\u636e\u6e90\u3001\u4e0d\u540c\u7684\u8c03\u7528\u65b9\u5f0f\u548c\u590d\u6742\u7684\u6574\u5408\u5de5\u4f5c\u3002AllTick \u63d0\u4f9b\u4e86\u4e00\u5957\u7edf\u4e00\u7684 API\uff0c\u80fd\u591f\u540c\u65f6\u8986\u76d6\u80a1\u7968\u3001\u5916\u6c47\u548c\u52a0\u5bc6\u8d27\u5e01\u884c\u60c5\uff0c\u4e3a\u5f00\u53d1\u8005\u5e26\u6765\u6781\u5927\u7684\u4fbf\u5229\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e3a\u4ec0\u4e48\u9009\u62e9 AllTick API\uff1f<\/strong><\/h2>\n\n\n\n<p>AllTick \u7684\u4f18\u52bf\u5728\u4e8e\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u591a\u5e02\u573a\u8986\u76d6<\/strong>\uff1a\u80a1\u7968\u3001\u5916\u6c47\u3001\u52a0\u5bc6\u8d27\u5e01\u7edf\u4e00\u63a5\u53e3\uff0c\u65e0\u9700\u4e3a\u4e0d\u540c\u8d44\u4ea7\u5207\u6362 API\u3002<\/li>\n\n\n\n<li><strong>\u5b9e\u65f6\u4e0e\u5386\u53f2\u6570\u636e\u517c\u987e<\/strong>\uff1a\u652f\u6301\u9010\u7b14\u6210\u4ea4\u3001\u8ba2\u5355\u7c3f\u548c K \u7ebf\u6570\u636e\u3002<\/li>\n\n\n\n<li><strong>\u7edf\u4e00\u6807\u51c6<\/strong>\uff1a\u63a5\u53e3\u8fd4\u56de JSON \u683c\u5f0f\uff0c\u7ed3\u6784\u5316\u4e14\u6613\u89e3\u6790\u3002<\/li>\n\n\n\n<li><strong>\u4f4e\u95e8\u69db<\/strong>\uff1a\u63d0\u4f9b\u514d\u8d39 API Key\uff0c\u9002\u5408\u6d4b\u8bd5\u548c\u5feb\u901f\u9a8c\u8bc1\u7b56\u7565\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u7edf\u4e00\u63a5\u53e3\u4e0d\u4ec5\u51cf\u5c11\u4e86\u7ef4\u62a4\u6210\u672c\uff0c\u8fd8\u80fd\u8ba9\u6570\u636e\u5904\u7406\u903b\u8f91\u66f4\u52a0\u96c6\u4e2d\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u6570\u636e\u7c7b\u578b\u548c\u63a5\u53e3\u7279\u70b9<\/strong><\/h2>\n\n\n\n<p>AllTick API \u6309\u8d44\u4ea7\u7c7b\u522b\u63d0\u4f9b\u4e0d\u540c\u7684\u6570\u636e\u63a5\u53e3\uff0c\u4f46\u8c03\u7528\u65b9\u5f0f\u4e00\u81f4\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>\u6570\u636e\u7c7b\u578b<\/strong><\/td><td><strong>\u63a5\u53e3\u65b9\u5f0f<\/strong><\/td><td><strong>\u6570\u636e\u5185\u5bb9<\/strong><\/td><\/tr><tr><td>\u80a1\u7968<\/td><td>REST \/ WebSocket<\/td><td>\u5386\u53f2K\u7ebf\u3001\u9010\u7b14\u6210\u4ea4tick\u3001\u5b9e\u65f6\u9010\u7b14\u6df1\u5ea6<\/td><\/tr><tr><td>\u5916\u6c47<\/td><td>REST \/ WebSocket<\/td><td>\u5386\u53f2K\u7ebf\u3001\u9010\u7b14\u6210\u4ea4tick\u3001\u5b9e\u65f6\u9010\u7b14\u6df1\u5ea6<\/td><\/tr><tr><td>\u52a0\u5bc6\u8d27\u5e01<\/td><td>REST \/ WebSocket<\/td><td>\u5386\u53f2K\u7ebf\u3001\u9010\u7b14\u6210\u4ea4tick\u3001\u5b9e\u65f6\u9010\u7b14\u6df1\u5ea6<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>REST \u7528\u4e8e\u83b7\u53d6\u5386\u53f2\u6570\u636e\u548c\u8d26\u6237\u4fe1\u606f\uff0c\u9002\u5408\u6279\u91cf\u5206\u6790\u548c\u56de\u6d4b\u3002WebSocket \u7528\u4e8e\u5b9e\u65f6\u884c\u60c5\u548c\u4e8b\u4ef6\u9a71\u52a8\u7684\u4ea4\u6613\u7b56\u7565\uff0c\u5ef6\u8fdf\u6781\u4f4e\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u5b9e\u73b0\u7edf\u4e00\u6570\u636e\u83b7\u53d6\u7684\u7b56\u7565<\/strong><\/h2>\n\n\n\n<p><strong>\u8d26\u53f7\u548c API Key \u7ba1\u7406<\/strong><strong><br><\/strong>\u6ce8\u518c AllTick \u8d26\u53f7\u5e76\u83b7\u53d6 API Key\u3002\u514d\u8d39\u7248\u5373\u53ef\u6d4b\u8bd5\u5927\u90e8\u5206\u529f\u80fd\u3002<br><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>Dashboard \u2192 Retrieve API Key<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Token \u7528\u4e8e\u6240\u6709\u63a5\u53e3\u8bf7\u6c42\uff0c\u4f46\u9700\u8981\u4e3a\u4e0d\u540c\u5e02\u573a\u7533\u8bf7\u4e0d\u540ckey\u3002<\/li>\n<\/ol>\n\n\n\n<p><strong>REST \u83b7\u53d6\u5386\u53f2\u57fa\u51c6\u6570\u636e<\/strong><strong><br><\/strong>\u83b7\u53d6 K \u7ebf\u6216\u6536\u76d8\u4ef7\u7b49\u5386\u53f2\u6570\u636e\u3002\u793a\u4f8b\uff1a<br><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>GET https:\/\/quote.alltick.co\/quote-b-api\/kline?symbol=AAPL&amp;token=\u4f60\u7684Token<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li>REST \u8bf7\u6c42\u72ec\u7acb\u4e14\u5b89\u5168\uff0c\u9002\u5408\u4e00\u6b21\u6027\u6570\u636e\u62c9\u53d6\u6216\u6279\u91cf\u5206\u6790\u3002<\/li>\n<\/ol>\n\n\n\n<p><strong>WebSocket \u5b9e\u65f6\u884c\u60c5<br><\/strong>\u5efa\u7acb\u957f\u8fde\u63a5\u540e\uff0c\u670d\u52a1\u5668\u4f1a\u4e3b\u52a8\u63a8\u9001\u66f4\u65b0\u3002\u793a\u4f8b\uff1a<br><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>const ws = new WebSocket(&#8220;wss:\/\/quote.alltick.co\/quote-stock-b-ws-api?token=testtoken&#8221;);<br>ws.onmessage = (msg) =&gt; console.log(JSON.parse(msg.data));<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>\u5b9e\u65f6\u63a8\u9001\u53ef\u8986\u76d6\u80a1\u7968\u9010\u7b14\u6210\u4ea4\u3001\u5916\u6c47\u6c47\u7387\u6ce2\u52a8\u4ee5\u53ca\u52a0\u5bc6\u8d27\u5e01\u8ba2\u5355\u7c3f\u53d8\u5316\u3002<\/li>\n\n\n\n<li><strong>\u7edf\u4e00\u5904\u7406\u4e0e\u89e3\u6790<\/strong><strong><br><\/strong>\u6240\u6709\u6570\u636e\u90fd\u8fd4\u56de JSON\u3002\u524d\u7aef\u6216\u7b56\u7565\u5f15\u64ce\u53ef\u4ee5\u7edf\u4e00\u89e3\u6790\uff0c\u51cf\u5c11\u591a\u5e02\u573a\u6570\u636e\u5904\u7406\u590d\u6742\u5ea6\u3002<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u6ce8\u610f\u4e8b\u9879<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u8c03\u7528\u9891\u7387\u9650\u5236<\/strong>\uff1a\u514d\u8d39\u7248\u6bcf\u5206\u949f\u6709\u9650\u5236\uff0c\u91cf\u5316\u7b56\u7565\u6d4b\u8bd5\u8bf7\u5408\u7406\u5b89\u6392\u8bf7\u6c42\u3002<\/li>\n\n\n\n<li><strong>\u6570\u636e\u5ef6\u8fdf<\/strong>\uff1aREST \u8bf7\u6c42\u53d7\u7f51\u7edc\u5f00\u9500\u5f71\u54cd\uff0cWebSocket \u5ef6\u8fdf\u6781\u4f4e\uff08\u7ea6 170ms\uff09\u3002<\/li>\n\n\n\n<li><strong>\u8d44\u4ea7\u5dee\u5f02<\/strong>\uff1a\u4e0d\u540c\u5e02\u573a\u4ea4\u6613\u65f6\u95f4\u4e0d\u540c\uff0c\u9700\u8981\u5728\u7b56\u7565\u4e2d\u5904\u7406\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u5c0f\u8d34\u58eb<\/strong><\/h2>\n\n\n\n<p>\u4f7f\u7528 AllTick API\uff0c\u53ef\u4ee5\u7528\u4e00\u4e2a\u63a5\u53e3\u540c\u65f6\u8986\u76d6\u80a1\u7968\u3001\u5916\u6c47\u548c\u52a0\u5bc6\u8d27\u5e01\u884c\u60c5\u3002REST \u7528\u4e8e\u5386\u53f2\u548c\u8d26\u6237\u6570\u636e\uff0cWebSocket \u7528\u4e8e\u5b9e\u65f6\u6570\u636e\u3002\u7edf\u4e00\u63a5\u53e3\u8ba9\u6570\u636e\u7ba1\u7406\u66f4\u7b80\u5355\uff0c\u7b56\u7565\u5f00\u53d1\u66f4\u9ad8\u6548\u3002<\/p>\n\n\n\n<p>\u5bf9\u4e8e\u4e2a\u4eba\u5f00\u53d1\u8005\u3001\u91cf\u5316\u4ea4\u6613\u5165\u95e8\u8005\u6216\u8de8\u5e02\u573a\u7b56\u7565\u6d4b\u8bd5\u8005\uff0cAllTick \u63d0\u4f9b\u4e86\u4f4e\u6210\u672c\u3001\u9ad8\u8986\u76d6\u7684\u89e3\u51b3\u65b9\u6848\u3002\u53ea\u9700\u4e00\u6761 API Key\uff0c\u5c31\u80fd\u638c\u63e1\u591a\u8d44\u4ea7\u5e02\u573a\u6570\u636e\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u91d1\u878d\u6570\u636e\u5f00\u53d1\u548c\u91cf\u5316\u4ea4\u6613\u4e2d\uff0c\u6570\u636e\u63a5\u53e3\u7684\u8986\u76d6\u9762\u548c\u7a33\u5b9a\u6027\u81f3\u5173\u91cd\u8981\u3002\u4e0d\u540c\u5e02\u573a\u3001\u4e0d\u540c\u8d44\u4ea7\u7c7b\u578b\u5f80\u5f80\u610f\u5473\u7740\u591a\u5957\u6570\u636e\u6e90\u3001\u4e0d\u540c&#8230;<\/p>\n","protected":false},"author":5,"featured_media":10912,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[8],"tags":[],"class_list":["post-10911","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tick-data-wiki"],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.alltick.co\/zh-CN\/wp-json\/wp\/v2\/posts\/10911","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.alltick.co\/zh-CN\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.alltick.co\/zh-CN\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.alltick.co\/zh-CN\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.alltick.co\/zh-CN\/wp-json\/wp\/v2\/comments?post=10911"}],"version-history":[{"count":1,"href":"https:\/\/blog.alltick.co\/zh-CN\/wp-json\/wp\/v2\/posts\/10911\/revisions"}],"predecessor-version":[{"id":10913,"href":"https:\/\/blog.alltick.co\/zh-CN\/wp-json\/wp\/v2\/posts\/10911\/revisions\/10913"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.alltick.co\/zh-CN\/wp-json\/wp\/v2\/media\/10912"}],"wp:attachment":[{"href":"https:\/\/blog.alltick.co\/zh-CN\/wp-json\/wp\/v2\/media?parent=10911"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.alltick.co\/zh-CN\/wp-json\/wp\/v2\/categories?post=10911"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.alltick.co\/zh-CN\/wp-json\/wp\/v2\/tags?post=10911"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}