Title: get daily k line data is wrong · Issue #1007 · massive-com/client-python · GitHub
Open Graph Title: get daily k line data is wrong · Issue #1007 · massive-com/client-python
X Title: get daily k line data is wrong · Issue #1007 · massive-com/client-python
Description: from massive import RESTClient from datetime import datetime, timezone, timedelta 1. 初始化客户端 client = RESTClient("xxxxxxxx") 2. 获取数据 aggs = [] for a in client.list_aggs( "NVDA", 1, "day", "2026-02-13", "2026-03-14", limit=50000, ): aggs.a...
Open Graph Description: from massive import RESTClient from datetime import datetime, timezone, timedelta 1. 初始化客户端 client = RESTClient("xxxxxxxx") 2. 获取数据 aggs = [] for a in client.list_aggs( "NVDA", 1, "day", "2026-02-1...
X Description: from massive import RESTClient from datetime import datetime, timezone, timedelta 1. 初始化客户端 client = RESTClient("xxxxxxxx") 2. 获取数据 aggs = [] for a in client.list_aggs( "NVDA", ...
Opengraph URL: https://github.com/massive-com/client-python/issues/1007
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"get daily k line data is wrong","articleBody":"from massive import RESTClient\nfrom datetime import datetime, timezone, timedelta\n\n# 1. 初始化客户端\nclient = RESTClient(\"xxxxxxxx\")\n\n# 2. 获取数据\naggs = []\nfor a in client.list_aggs(\n \"NVDA\",\n 1,\n \"day\",\n \"2026-02-13\",\n \"2026-03-14\",\n limit=50000,\n):\n aggs.append(a)\n\n# 3. 打印每一条详细数据\nprint(f\"共获取到 {len(aggs)} 条 NVDA 1分钟K线数据 (日期: 2026-03-12)\")\nprint(\"=\" * 80)\n\nif len(aggs) \u003e 0:\n for i, agg in enumerate(aggs):\n # 将时间戳(毫秒)转换为可读的日期时间格式\n # 1. 将时间戳转换为感知型datetime对象 (UTC时区)\n dt_utc = datetime.fromtimestamp(agg.timestamp / 1000, tz=timezone.utc)\n \n # 2. 转换为北京时间 (UTC+8)\n beijing_tz = timezone(timedelta(hours=8))\n dt_beijing = dt_utc.astimezone(beijing_tz)\n \n # 3. 格式化输出\n beijing_str = dt_beijing.strftime('%Y-%m-%d %H:%M:%S')\n utc_str = dt_utc.strftime('%Y-%m-%d %H:%M:%S')\n \n print(f\"第 {i+1:3d} 条数据 | UTC时间: {utc_str} | 北京时间: {beijing_str}\")\n \n print(f\" - 开盘价 (open): {agg.open}\")\n print(f\" - 最高价 (high): {agg.high}\")\n print(f\" - 最低价 (low): {agg.low}\")\n print(f\" - 收盘价 (close): {agg.close}\")\n print(f\" - 成交量 (volume): {agg.volume}\")\n print(f\" - 成交量加权平均价 (vwap): {agg.vwap}\")\n print(f\" - 聚合窗口内交易笔数 (transactions): {agg.transactions}\")\n print(f\" - 是否为场外交易 (otc): {agg.otc}\")\n print(f\" - 原始时间戳 (timestamp, 毫秒): {agg.timestamp}\")\n print(\"-\" * 80)\nelse:\n print(\"未获取到任何数据。\")\n\n\n第 1 条数据 | UTC时间: 2026-02-13 05:00:00 | 北京时间: 2026-02-13 13:00:00\n - 开盘价 (open): 187.475\n - 最高价 (high): 187.5\n - 最低价 (low): 181.59\n - 收盘价 (close): 182.81\n - 成交量 (volume): 161888021.0\n - 成交量加权平均价 (vwap): 183.6369\n - 聚合窗口内交易笔数 (transactions): 2577092\n - 是否为场外交易 (otc): None\n - 原始时间戳 (timestamp, 毫秒): 1770958800000\n--------------------------------------------------------------------------------\n第 2 条数据 | UTC时间: 2026-02-17 05:00:00 | 北京时间: 2026-02-17 13:00:00\n - 开盘价 (open): 181.75\n - 最高价 (high): 187.15\n - 最低价 (low): 179.18\n - 收盘价 (close): 184.97\n - 成交量 (volume): 162276860.0\n - 成交量加权平均价 (vwap): 183.6291\n - 聚合窗口内交易笔数 (transactions): 2506157\n - 是否为场外交易 (otc): None\n - 原始时间戳 (timestamp, 毫秒): 1771304400000\n--------------------------------------------------------------------------------\n第 3 条数据 | UTC时间: 2026-02-18 05:00:00 | 北京时间: 2026-02-18 13:00:00\n - 开盘价 (open): 188.75\n - 最高价 (high): 190.37\n - 最低价 (low): 186.76\n - 收盘价 (close): 187.98\n - 成交量 (volume): 164749125.0\n - 成交量加权平均价 (vwap): 188.5845\n - 聚合窗口内交易笔数 (transactions): 2195118\n - 是否为场外交易 (otc): None\n - 原始时间戳 (timestamp, 毫秒): 1771390800000\n--------------------------------------------------------------------------------\n第 4 条数据 | UTC时间: 2026-02-19 05:00:00 | 北京时间: 2026-02-19 13:00:00\n - 开盘价 (open): 187.055\n - 最高价 (high): 188.43\n - 最低价 (low): 185.66\n - 收盘价 (close): 187.9\n - 成交量 (volume): 126554526.0\n - 成交量加权平均价 (vwap): 187.1171\n - 聚合窗口内交易笔数 (transactions): 1894648\n - 是否为场外交易 (otc): None\n - 原始时间戳 (timestamp, 毫秒): 1771477200000\n--------------------------------------------------------------------------------\n第 5 条数据 | UTC时间: 2026-02-20 05:00:00 | 北京时间: 2026-02-20 13:00:00\n - 开盘价 (open): 186.57\n - 最高价 (high): 190.33\n - 最低价 (low): 185.9378\n - 收盘价 (close): 189.82\n - 成交量 (volume): 178422337.0\n - 成交量加权平均价 (vwap): 188.9062\n - 聚合窗口内交易笔数 (transactions): 2393963\n - 是否为场外交易 (otc): None\n - 原始时间戳 (timestamp, 毫秒): 1771563600000\n--------------------------------------------------------------------------------\n第 6 条数据 | UTC时间: 2026-02-23 05:00:00 | 北京时间: 2026-02-23 13:00:00\n - 开盘价 (open): 191.4\n - 最高价 (high): 193.95\n - 最低价 (low): 189.575\n - 收盘价 (close): 191.55\n - 成交量 (volume): 171584839.114167\n - 成交量加权平均价 (vwap): 191.3441\n - 聚合窗口内交易笔数 (transactions): 2548773\n - 是否为场外交易 (otc): None\n - 原始时间戳 (timestamp, 毫秒): 1771822800000\n--------------------------------------------------------------------------------\n第 7 条数据 | UTC时间: 2026-02-24 05:00:00 | 北京时间: 2026-02-24 13:00:00\n - 开盘价 (open): 191.49\n - 最高价 (high): 193.77\n - 最低价 (low): 187.4\n - 收盘价 (close): 192.85\n - 成交量 (volume): 175123602.610203\n - 成交量加权平均价 (vwap): 192.054\n - 聚合窗口内交易笔数 (transactions): 2330529\n - 是否为场外交易 (otc): None\n - 原始时间戳 (timestamp, 毫秒): 1771909200000\n--------------------------------------------------------------------------------\n第 8 条数据 | UTC时间: 2026-02-25 05:00:00 | 北京时间: 2026-02-25 13:00:00\n - 开盘价 (open): 194.45\n - 最高价 (high): 197.6299\n - 最低价 (low): 193.79\n - 收盘价 (close): 195.56\n - 成交量 (volume): 250637102.653623\n - 成交量加权平均价 (vwap): 196.701\n - 聚合窗口内交易笔数 (transactions): 3175611\n - 是否为场外交易 (otc): None\n - 原始时间戳 (timestamp, 毫秒): 1771995600000\n--------------------------------------------------------------------------------\n第 9 条数据 | UTC时间: 2026-02-26 05:00:00 | 北京时间: 2026-02-26 13:00:00\n - 开盘价 (open): 194.27\n - 最高价 (high): 194.29\n - 最低价 (low): 184.315\n - 收盘价 (close): 184.89\n - 成交量 (volume): 360807907.423002\n - 成交量加权平均价 (vwap): 187.3002\n - 聚合窗口内交易笔数 (transactions): 4877577\n - 是否为场外交易 (otc): None\n - 原始时间戳 (timestamp, 毫秒): 1772082000000\n--------------------------------------------------------------------------------\n第 10 条数据 | UTC时间: 2026-02-27 05:00:00 | 北京时间: 2026-02-27 13:00:00\n - 开盘价 (open): 181.25\n - 最高价 (high): 182.59\n - 最低价 (low): 176.38\n - 收盘价 (close): 177.19\n - 成交量 (volume): 311636494.282879\n - 成交量加权平均价 (vwap): 179.3188\n - 聚合窗口内交易笔数 (transactions): 3823737\n - 是否为场外交易 (otc): None\n - 原始时间戳 (timestamp, 毫秒): 1772168400000\n--------------------------------------------------------------------------------\n第 11 条数据 | UTC时间: 2026-03-02 05:00:00 | 北京时间: 2026-03-02 13:00:00\n - 开盘价 (open): 175.01\n - 最高价 (high): 183.46\n - 最低价 (low): 174.64\n - 收盘价 (close): 182.48\n - 成交量 (volume): 209095331.206143\n - 成交量加权平均价 (vwap): 181.0113\n - 聚合窗口内交易笔数 (transactions): 3092782\n - 是否为场外交易 (otc): None\n - 原始时间戳 (timestamp, 毫秒): 1772427600000\n--------------------------------------------------------------------------------\n第 12 条数据 | UTC时间: 2026-03-03 05:00:00 | 北京时间: 2026-03-03 13:00:00\n - 开盘价 (open): 178.49\n - 最高价 (high): 180.9\n - 最低价 (low): 176.92\n - 收盘价 (close): 180.05\n - 成交量 (volume): 178099430.462249\n - 成交量加权平均价 (vwap): 179.3645\n - 聚合窗口内交易笔数 (transactions): 2507082\n - 是否为场外交易 (otc): None\n - 原始时间戳 (timestamp, 毫秒): 1772514000000\n--------------------------------------------------------------------------------\n第 13 条数据 | UTC时间: 2026-03-04 05:00:00 | 北京时间: 2026-03-04 13:00:00\n - 开盘价 (open): 180.44\n - 最高价 (high): 184.7\n - 最低价 (low): 180.06\n - 收盘价 (close): 183.04\n - 成交量 (volume): 177731198.894989\n - 成交量加权平均价 (vwap): 182.7363\n - 聚合窗口内交易笔数 (transactions): 2492262\n - 是否为场外交易 (otc): None\n - 原始时间戳 (timestamp, 毫秒): 1772600400000\n--------------------------------------------------------------------------------\n第 14 条数据 | UTC时间: 2026-03-05 05:00:00 | 北京时间: 2026-03-05 13:00:00\n - 开盘价 (open): 181.17\n - 最高价 (high): 184.06\n - 最低价 (low): 177.88\n - 收盘价 (close): 183.34\n - 成交量 (volume): 198779729.946372\n - 成交量加权平均价 (vwap): 181.6192\n - 聚合窗口内交易笔数 (transactions): 2736321\n - 是否为场外交易 (otc): None\n - 原始时间戳 (timestamp, 毫秒): 1772686800000\n--------------------------------------------------------------------------------\n第 15 条数据 | UTC时间: 2026-03-06 05:00:00 | 北京时间: 2026-03-06 13:00:00\n - 开盘价 (open): 179.84\n - 最高价 (high): 182.7561\n - 最低价 (low): 176.8201\n - 收盘价 (close): 177.82\n - 成交量 (volume): 189021949.003674\n - 成交量加权平均价 (vwap): 180.026\n - 聚合窗口内交易笔数 (transactions): 2564014\n - 是否为场外交易 (otc): None\n - 原始时间戳 (timestamp, 毫秒): 1772773200000\n--------------------------------------------------------------------------------\n第 16 条数据 | UTC时间: 2026-03-09 04:00:00 | 北京时间: 2026-03-09 12:00:00\n - 开盘价 (open): 176.83\n - 最高价 (high): 182.91\n - 最低价 (low): 175.56\n - 收盘价 (close): 182.65\n - 成交量 (volume): 177213588.107522\n - 成交量加权平均价 (vwap): 179.7808\n - 聚合窗口内交易笔数 (transactions): 2666893\n - 是否为场外交易 (otc): None\n - 原始时间戳 (timestamp, 毫秒): 1773028800000\n--------------------------------------------------------------------------------\n第 17 条数据 | UTC时间: 2026-03-10 04:00:00 | 北京时间: 2026-03-10 12:00:00\n - 开盘价 (open): 182.4\n - 最高价 (high): 186.44\n - 最低价 (low): 182.01\n - 收盘价 (close): 184.77\n - 成交量 (volume): 179118528.888813\n - 成交量加权平均价 (vwap): 184.6161\n - 聚合窗口内交易笔数 (transactions): 2418657\n - 是否为场外交易 (otc): None\n - 原始时间戳 (timestamp, 毫秒): 1773115200000\n--------------------------------------------------------------------------------\n第 18 条数据 | UTC时间: 2026-03-11 04:00:00 | 北京时间: 2026-03-11 12:00:00\n - 开盘价 (open): 185.91\n - 最高价 (high): 187.62\n - 最低价 (low): 184.45\n - 收盘价 (close): 186.03\n - 成交量 (volume): 145280386.177371\n - 成交量加权平均价 (vwap): 185.8987\n - 聚合窗口内交易笔数 (transactions): 1996629\n - 是否为场外交易 (otc): None\n - 原始时间戳 (timestamp, 毫秒): 1773201600000\n--------------------------------------------------------------------------------\n第 19 条数据 | UTC时间: 2026-03-12 04:00:00 | 北京时间: 2026-03-12 12:00:00\n - 开盘价 (open): 184.05\n - 最高价 (high): 184.94\n - 最低价 (low): 181.75\n - 收盘价 (close): 183.14\n - 成交量 (volume): 155762663.354942\n - 成交量加权平均价 (vwap): 183.3719\n - 聚合窗口内交易笔数 (transactions): 2142997\n - 是否为场外交易 (otc): None\n - 原始时间戳 (timestamp, 毫秒): 1773288000000\n--------------------------------------------------------------------------------\n第 20 条数据 | UTC时间: 2026-03-13 04:00:00 | 北京时间: 2026-03-13 12:00:00\n - 开盘价 (open): 184.92\n - 最高价 (high): 186.09\n - 最低价 (low): 179.94\n - 收盘价 (close): 180.25\n - 成交量 (volume): 160988424.757487\n - 成交量加权平均价 (vwap): 182.0558\n - 聚合窗口内交易笔数 (transactions): 2224692\n - 是否为场外交易 (otc): None\n - 原始时间戳 (timestamp, 毫秒): 1773374400000\n--------------------------------------------------------------------------------\n\n\n\n","author":{"url":"https://github.com/Damin203040","@type":"Person","name":"Damin203040"},"datePublished":"2026-03-15T02:01:00.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1007/client-python/issues/1007"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7de58d47-90e8-1b1c-5a30-e3c4980c7aec |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A860:33D2D8:ABA0E7:F0E1B0:6A4C9F20 |
| html-safe-nonce | 2679ea00aae12d1bf510093ac126b4c7ffaf6285774f3115e6e4b6ec99b68ee5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBODYwOjMzRDJEODpBQkEwRTc6RjBFMUIwOjZBNEM5RjIwIiwidmlzaXRvcl9pZCI6IjYxMDA5NjI4NDYzMTIyNzU3NDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c6a5adda5398e0823488d72b0168866a080f072f3d56d8b55fa5371f4e38096c |
| hovercard-subject-tag | issue:4077350085 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/massive-com/client-python/1007/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d33c267c75943385b83fec4bf46b4f0f706a26ea432c3c27b377cc79882ca47e/massive-com/client-python/issues/1007 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d33c267c75943385b83fec4bf46b4f0f706a26ea432c3c27b377cc79882ca47e/massive-com/client-python/issues/1007 |
| og:image:alt | from massive import RESTClient from datetime import datetime, timezone, timedelta 1. 初始化客户端 client = RESTClient("xxxxxxxx") 2. 获取数据 aggs = [] for a in client.list_aggs( "NVDA", 1, "day", "2026-02-1... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Damin203040 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| turbo-cache-control | no-preview |
| go-import | github.com/massive-com/client-python git https://github.com/massive-com/client-python.git |
| octolytics-dimension-user_id | 191946194 |
| octolytics-dimension-user_login | massive-com |
| octolytics-dimension-repository_id | 216660192 |
| octolytics-dimension-repository_nwo | massive-com/client-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 216660192 |
| octolytics-dimension-repository_network_root_nwo | massive-com/client-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ae90d426644ca15e89bacceb72e51f4e9dbf85f7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width