{"id":36438880,"url":"https://github.com/alwqx/sec","last_synced_at":"2026-04-22T02:05:37.066Z","repository":{"id":257820227,"uuid":"865111102","full_name":"alwqx/sec","owner":"alwqx","description":"stock info cli","archived":false,"fork":false,"pushed_at":"2025-07-10T16:22:02.000Z","size":255,"stargazers_count":7,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-10T20:41:24.148Z","etag":null,"topics":["cli","quote","stock"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alwqx.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-09-30T01:49:17.000Z","updated_at":"2025-07-10T16:21:51.000Z","dependencies_parsed_at":"2024-10-10T07:29:26.805Z","dependency_job_id":"3b6f7962-5d2f-4b36-9203-73b8b2453bc4","html_url":"https://github.com/alwqx/sec","commit_stats":null,"previous_names":["alwqx/sec"],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/alwqx/sec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alwqx%2Fsec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alwqx%2Fsec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alwqx%2Fsec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alwqx%2Fsec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alwqx","download_url":"https://codeload.github.com/alwqx/sec/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alwqx%2Fsec/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28323591,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T18:42:50.174Z","status":"ssl_error","status_checked_at":"2026-01-11T18:39:13.842Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","quote","stock"],"created_at":"2026-01-11T20:53:45.530Z","updated_at":"2026-01-11T20:53:46.142Z","avatar_url":"https://github.com/alwqx.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sec\n\nsecurity info CLI\n\n![](https://github.com/alwqx/picx-images-hosting/raw/master/common/github/sec_quote.3k7zp33ifg.gif)\n\n## 命令\n\n### 帮助信息\n\n```shell\n$ sec --help\nSecutiry Information Client\n\nUsage:\n  sec [flags]\n  sec [command]\n\nAvailable Commands:\n  help          Help about any command\n  info          Print basic information of a secutiry/stock\n  quote         Secutiry quote root Command\n  quote-history Print quote history of sec\n  search        Search code and name of a secutiry/stock\n\nFlags:\n  -D, --debug     Enable debug mode\n  -h, --help      help for sec\n  -v, --version   Show version information\n\nUse \"sec [command] --help\" for more information about a command.\n```\n\n### 查看行情历史\n\n```shell\n$ sec quote-history lxjm --begin 20250601 --end 20250630\n日期       | 名称     | 收盘               | 开盘  | 最高  | 最低  | 成交额  | 成交量   | 振幅 | 换手率 | 证券代码\n2025-06-03 | 立讯精密 | 30.32 -0.08 -0.26% | 30.19 | 30.46 | 30.12 | 17.89 亿 | 59.00 万  | 1.12 | 0.82   | SZ002475\n2025-06-04 | 立讯精密 | 30.8 0.48 1.6%     | 30.38 | 30.98 | 30.3  | 25.79 亿 | 83.92 万  | 2.24 | 1.16   | SZ002475\n2025-06-05 | 立讯精密 | 31.63 0.83 2.7%    | 30.85 | 31.86 | 30.83 | 44.55 亿 | 142.09 万 | 3.34 | 1.96   | SZ002475\n2025-06-06 | 立讯精密 | 31.32 -0.31 -0.98% | 31.41 | 31.55 | 31.17 | 26.73 亿 | 85.34 万  | 1.2  | 1.18   | SZ002475\n2025-06-09 | 立讯精密 | 31.93 0.61 1.9%    | 31.7  | 32.08 | 31.53 | 30.58 亿 | 96.01 万  | 1.76 | 1.33   | SZ002475\n2025-06-10 | 立讯精密 | 31.78 -0.15 -0.47% | 31.79 | 32.2  | 31.35 | 38.11 亿 | 119.82 万 | 2.66 | 1.66   | SZ002475\n2025-06-11 | 立讯精密 | 31.97 0.19 0.6%    | 31.9  | 32.54 | 31.8  | 31.79 亿 | 98.95 万  | 2.33 | 1.37   | SZ002475\n2025-06-12 | 立讯精密 | 31.84 -0.13 -0.41% | 31.65 | 32.16 | 31.55 | 22.92 亿 | 71.83 万  | 1.91 | 0.99   | SZ002475\n2025-06-13 | 立讯精密 | 31.25 -0.59 -1.9%  | 31.6  | 31.98 | 31.2  | 25.17 亿 | 80.06 万  | 2.45 | 1.11   | SZ002475\n2025-06-16 | 立讯精密 | 31.91 0.66 2.1%    | 31.05 | 32.05 | 31.02 | 30.52 亿 | 96.10 万  | 3.3  | 1.33   | SZ002475\n2025-06-17 | 立讯精密 | 32.67 0.76 2.4%    | 31.91 | 32.8  | 31.83 | 49.98 亿 | 153.61 万 | 3.04 | 2.12   | SZ002475\n2025-06-18 | 立讯精密 | 32.94 0.27 0.83%   | 32.41 | 33.05 | 32.4  | 38.87 亿 | 118.32 万 | 1.99 | 1.64   | SZ002475\n2025-06-19 | 立讯精密 | 32.72 -0.22 -0.67% | 32.96 | 33.34 | 32.62 | 34.97 亿 | 106.17 万 | 2.19 | 1.47   | SZ002475\n2025-06-20 | 立讯精密 | 33.21 0.49 1.5%    | 32.65 | 33.49 | 32.59 | 39.50 亿 | 119.14 万 | 2.75 | 1.65   | SZ002475\n2025-06-23 | 立讯精密 | 33.19 -0.02 -0.06% | 32.99 | 33.77 | 32.88 | 31.22 亿 | 93.65 万  | 2.68 | 1.29   | SZ002475\n2025-06-24 | 立讯精密 | 33.23 0.04 0.12%   | 33.3  | 33.56 | 33.01 | 33.37 亿 | 100.54 万 | 1.66 | 1.39   | SZ002475\n2025-06-25 | 立讯精密 | 33.24 0.01 0.03%   | 33.26 | 33.28 | 32.77 | 34.61 亿 | 104.90 万 | 1.53 | 1.45   | SZ002475\n2025-06-26 | 立讯精密 | 32.97 -0.27 -0.81% | 33.24 | 33.55 | 32.95 | 27.86 亿 | 83.77 万  | 1.81 | 1.16   | SZ002475\n2025-06-27 | 立讯精密 | 33.87 0.9 2.7%     | 32.98 | 34.1  | 32.69 | 52.18 亿 | 154.94 万 | 4.28 | 2.14   | SZ002475\n2025-06-30 | 立讯精密 | 34.69 0.82 2.4%    | 33.95 | 34.78 | 33.95 | 43.77 亿 | 126.69 万 | 2.45 | 1.75   | SZ002475\n```\n\n### 查看证券基本信息\n\n```shell\n$ sec info lxjm -d\n证券代码\tSZ002475\n简称历史\t立讯精密\n公司名称\t立讯精密工业股份有限公司\n上市日期\t2010-09-15\n发行价格\t28.80\n行业分类\t消费电子\n主营业务\t公司专注于连接器的研发、生产和销售，产品主要应用于 3C（电脑、通讯、消费电子）、汽车和通讯设备等领域。\n办公地址\t广东省东莞市清溪镇北环路 313 号\n公司网址\thttp://www.luxshare-ict.com\n当前价格\t35.77\n市净率 PB\t3.60\n市盈率 TTM\t85.22\n总市值  \t2593.82 亿\n流通市值\t2589.12 亿\n\n公告日期   \t分红送配           \t除权除息日 \t股权登记日\n2025-04-26\t10 派 2.00 元        \t--        \t--\n2024-07-05\t10 派 2.99 元        \t2024-07-11\t2024-07-10\n2023-06-09\t10 派 1.30 元        \t2023-06-15\t2023-06-14\n2022-07-07\t10 派 1.10 元        \t2022-07-13\t2022-07-12\n2021-06-30\t10 派 1.10 元        \t2021-07-08\t2021-07-07\n2020-06-10\t10 转 3.00 股派 1.20 元\t2020-06-17\t2020-06-16\n2019-06-28\t10 转 3.00 股派 0.50 元\t2019-07-05\t2019-07-04\n2018-07-10\t10 转 3.00 股派 0.60 元\t2018-07-17\t2018-07-16\n2017-06-28\t10 转 5.00 股派 0.80 元\t2017-07-06\t2017-07-05\n2016-06-03\t10 转 5.00 股派 0.90 元\t2016-06-13\t2016-06-08\n2015-06-12\t10 转 5.00 股派 0.80 元\t2015-06-19\t2015-06-18\n2014-05-15\t10 转 4.00 股派 0.70 元\t2014-05-21\t2014-05-20\n2013-06-15\t10 转 5.00 股派 1.00 元\t2013-06-21\t2013-06-20\n2012-06-02\t10 转 4.00 股派 2.00 元\t2012-06-08\t2012-06-07\n2011-05-20\t10 转 5.00 股派 3.00 元\t2011-05-26\t2011-05-25\n```\n\n### 搜索证券\n\n```shell\n$ sec search lxzk\n证券代码 \t证券名称 \t证券类型 \t交易所\nSH688047\t龙芯中科\tstock   \tsh\nSZ300112\t万讯自控\tstock   \tsz\nHK02186 \t绿叶制药\tstock   \thk\n```\n\n### 查看行情信息\n\n```shell\n$ sec quote lxzk\n时间                \t当前价格   \t昨收  \t今开 \t最高   \t最低  \t成交量   \t成交额 \t名称     \t证券代码\n2024-09-30 15:00:01\t119.62 20%\t99.68\t106 \t119.62\t104.5\t825.67 万\t9.38 亿\t龙芯中科\tSH688047\n$ sec quote lxzk,lxjm,SH600036\n时间                \t当前价格   \t昨收  \t今开  \t最高   \t最低  \t成交量   \t成交额  \t名称     \t证券代码\n2024-09-30 15:00:00\t43.46 7.4%\t40.48\t42   \t43.95 \t41.01\t1.60 亿  \t68.42 亿\t立讯精密\tSZ002475\n2024-09-30 15:00:01\t119.62 20%\t99.68\t106  \t119.62\t104.5\t825.67 万\t9.38 亿 \t龙芯中科\tSH688047\n2024-09-30 15:00:00\t37.61 5.6%\t35.63\t36.35\t38    \t35.92\t2.56 亿  \t94.43 亿\t招商银行\tSH600036\n```\n\n## 安装\n\n进入 [releases](https://github.com/alwqx/sec/releases) 页面，下载指定操作系统的二进制文件。\n\nMac/Linux 要把二进制文件放在 `PATH` 路径下。\n\nWindows 要把二进制文件放在 `系统环境变量` 下。\n\n## 开发计划\n\n- [ ] 基本信息支持打印股东结构\n- [x] 行情信息打印对齐\n- [x] 行情信息实时更新\n- [ ] 行情信息蜡烛图\n\n## 致谢\n\n- [efinance](https://efinance.readthedocs.io/)\n- [akshare](https://github.com/akfamily/akshare)\n- [rains](https://github.com/rookie0/rains)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falwqx%2Fsec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falwqx%2Fsec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falwqx%2Fsec/lists"}