掘金量化 掘金3 sdk
Project description
掘金量化
A股实盘量化 中国期货量化 程序化交易 仿真 中国量化第一 掘金3 sdk
Changelog
Version v3.0.171
- fix: 退订后再次订阅数据context.data数据异常
- fix: 同时存在waitgroup=true和waitgroup=false的订阅时触发on_bar会导致程序崩溃
Version v3.0.170
- fix: 订阅多标的、多频率情况下出现context.data缓存异常
Version v3.0.169
- fix: 当历史bar数量少于订阅行情时设置的订阅数据滑窗大小时,context.data会出现重复数据。
- feat: 增加账号连接状态枚举值
- feat: 增加wheel依赖,避免新python环境安装出错
- other: 升级capi到3.7.8。
- fix: 修正回测下单时交易事件错误时序问题
- fix: 回测时委托回报添加待报和已报状态
Version v3.0.168
- fix: option_calculate_ivsurface 接口调用出错
- refactor: 优化对接实时行情服务的兼容性
- feat: 支持
pandas2
、numpy2
Version 3.0.167
- feat: 支持多源行情
- feat: 支持ctp行情直连, 可通过
set_option
接口设置ctp_md_info参数来配置ctp行情连接信息 - feat: 行情连接、断开回调触发时可通过 context.message 来获取描述信息
- feat: 回测模式下在策略代码中提前订阅行情再调用current,会根据订阅频度(tick,分钟bar,日线)取回测当前时刻的最新价格返回,超出历史行情权限会报错中止回测;不订阅current会取回测当前时刻最近的日线收盘价返回
Version 3.0.166
- fix: current 没有返回"0"值字段
- fix: get_instruments、get_history_instruments 查询参数fields包含 is_adjusted 时,is_adjusted字段没有返回
- feat: 新增期货每日成交持仓排名接口(多标的多指标)
Version 3.0.165
- fix: 单独订阅 3600s 与 同时订阅 tick 和 3600s 所产生的 3600s 数据 open 和 high 不一致
- fix: context.data在回测模式下盘中可以取到当天的日线数据(未来数据)
- feat: 支持
Python 3.12
Version 3.0.164
- 修复 context.data 函数bug
- 移除 arrow 库依赖, 改为使用 Python 原生日期库
Version 3.0.163
- context.data 优化, 增加两种新的返回类型
- 新增龙虎榜和北向资金接口
- 增加 get_cash 和 get_position 接口
Version 3.0.162
- 添加新的回调函数, on_customized_message - 定制消息推送事件
- 修改回测时间错误提示文案
- 日内回测行情提取逻辑调整, 匹配单次33000条记录限制
- 修正回测内存过大问题
- 优化 history 和 history_n 速度
- 增加 tzdata 依赖, 解决 tick 和 bar 转换为 pandas DataFrame 时过慢问题
Version 3.0.161
- current 函数添加 include_call_auction 入参
Version 3.0.160
- SDK 支持 Python 3.11 版本
- 对不常用到的依赖库设置为可选依赖项, 现在默认移除 scipy 库的依赖, 要下载所有依赖可使用
pip install gm[all]
命令 - Pandas 的默认精度改为8位小数
- 修复 tick 回测模式 created_at 字段毫秒数错误问题
- 添加新枚举值, 委托类型 OrderType 相关
Version 3.0.159
- 修复context.data报错问题
Version 3.0.158
- 修复context.data取日线数据少了最近一天的问题
- 修复回测模式下,订阅用了wait_group=True,导致定时任务处理时间不对问题
- Tick增加iopv字段
- 交易所增加广期所
Version 3.0.157
- 修正 Order 对象被错误过滤掉 order_business 和 position_src 字段的问题
Version 3.0.156
- 新增做市API
- 新增10个财务接口
- 修复get_history_instruments接口conversion_price字段取数错误问题
- get_symbols增加股转作市业务相关字段
- 修正回测错误时,返回错误码与扩展信息不一致问题
- 增加枚举常量 OrderBusiness_MARKET_MAKING
Version 3.0.155
- 两融API改造, 补全头寸来源 position_src, 负债合约编号 debtsno 和还款方式 repay_type 三个字段
- 修复 context.data 获取日线bar时有重复数据的bug
- current 接口支持 field 过滤
- 修复 stk_get_index_constituents 接口返回值 weight 为 0 bug
- Python3.9 的 pandas 库 1.5 版本有bug, 在转带时区的datetime数据时非常慢, 限制 pandas 库的最高版本号避免
Version 3.0.154
- 修正用广发端时AccountStatus事件中account_name缺失问题
- 修正AccountStatus状态为6问题
- SDK 报错提示错误信息文案优化
- 支持分布式部署, Linux SDK 现在可以连上终端
- 修复投研数据查询接口返回值时间格式问题
- 指数成分查询函数stk_get_index_constituents增加总市值和流通市值字段
- 优化回测时 on_tick 和 on_bar 的性能瓶颈
- 修复行情连接断开又连上后,订阅行情成功策略却退出问题
- context.account().status 的类型改为 dict 类型
Version 3.0.153
- 修复 SDK Python 3.10 版本的第三方依赖库兼容性问题
Version 3.0.152
- 修复部分老接口日期格式兼容问题
- 修复 grpc 网络错误问题
- 限制第三方库最高版本以保证兼容性
Versino 3.0.151
- 修正使用数据代理时还在读取sdk缓存问题
- 优化 SDK 依赖项, 保证 SDK 安装兼容性
Version 3.0.150
- 本地数据代理优化
- SDK 报错机制改造
- 新增接口 set_option - 设置策略运行系统选项, 目前支持设置回测运行的最大线程数和触发流控时最大等待时间
- 优化回测时的超时机制,避免部分回测业务不正常
- 添加枚举量, 新的委托拒绝原因
- 接口变更, 查询指数成分股接口新增 trade_date 参数
- 修复 AccountStatus 查询与推送系列问题
- 回测模式下载数据时打印相关指引信息
Version 3.0.149
- 新增广发期权组合保证金API
Version 3.0.148
- 新增财务数据接口
- 修复已知 bug
Version 3.0.147
- 修复启动速度过慢的问题
- 修复调用 get_history_symbols 接口时进程崩溃退出问题
Version 3.0.146
- 修复 get_symbols 和 get_history_symbols 接口 bug
- Tick 类型添加 ask_q, bid_q 字段
Version 3.0.145
- 新增投研数据查询接口
- 修复 ipo_get_match_number 和 ipo_get_lot_info 函数日期参数传输错误 bug
- 修复 get_history_instruments 函数返回值不存在 info 字段时产生的 Bug
- 修复用 in 判断 BarLikeDict2 对象时无法退出的 bug
Version 3.0.144
- 修复 get_history_instruments 返回错误的调整标志的 Bug
Version 3.0.143
- 增加接口 bond_convertible_get_call_info - 查询可转债赎回信息
Version 3.0.142
- context.data 获取 tick 时返回格式修正为 DataFrame
- get_history_instrument 增加可转债字段
- 支持 Python3.10, 弃用 Python2.7
Version 3.0.141
- 限制 protobuf 版本小于 4.0 防止不兼容情况
- 修复 get_history_instruments 里获取的保证金比例 margin_ratio 获取的是最新数据而不是历史数据的问题
Version 3.0.140
- 算法单新增 algo_params 字段
- 兼容老版本客户端传入错误的默认参数 undefined 的情况
- 实时模式能正确返回错误信息
- instrument 添加 conversion_price 字段
Version 3.0.139
- 修复 Python 3.7.1 版本 typing_extensions 依赖问题, typing_extensions 版本需要大于等于 4.1.1
- 增加 get_expire_rest_days 查询到期剩余天数
- 修改 option_covered_open 备兑开仓, 在回测/仿真模式下不占用保证金
- 修改 option_covered_close 备兑平仓, 在回测/仿真模式下不释放保证金
- 新增 option_preorder_valid_volume 备兑标志, 可获取备兑可开数量
- run 函数新增 backtest_match_mode 参数, 设置回测撮合模式, 可设定市价单是否采用当前 bar/tick 撮合成交
Version 3.0.138
- 策略进程退出前, SDK主动退订已订阅代码, 恢复订阅权限
- 修复回测模式中在 on_bar 或 on_tick 里下单后资金和持仓没有变化的问题
- 兼容 Pandas 1.4.0 以上版本
- option_get_symbols_by_exchange 增加参数 adjust_flag
- 修复 get_history_instruments 返回的 multiplier 和 exercise_price 字段只取最新数据问题
- 之前对所有的浮点数四舍五入改为仅对价格类的字段四舍五入4位小数
- run 添加参数 backtest_commission_unit, 表示回测手续费需要按张收取
- option_get_symbols_by_in_at_out 添加参数 adjust_flag 来决定选择的合约范围是否包含调整过的合约
- 修复 get_instruments 的 exchanges 不支持list格式问题
- 增加针对剩余时间t=0导致分母为0的健壮性处理, 定价模型计算时剩余时间最小值设置为 0.01
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file gm-3.0.171-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: gm-3.0.171-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 5.4 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4dddae42fe833045bbf38d6385ce38bb0e615944c33aa762e5f94635183e55e |
|
MD5 | 4ba9fe51917b235a46b44a90da371350 |
|
BLAKE2b-256 | 9749a0ca6eedd087f97bd196bbbd161c298cc188b48fecf9ea62fa89d22de615 |
File details
Details for the file gm-3.0.171-cp312-cp312-manylinux1_x86_64.whl
.
File metadata
- Download URL: gm-3.0.171-cp312-cp312-manylinux1_x86_64.whl
- Upload date:
- Size: 11.5 MB
- Tags: CPython 3.12
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce8d8a1b41dc4a3641f4efc2258a26f54b3a59048ed9dd14c75265ef2eb53ece |
|
MD5 | f797e35b2607ccb6e8c1b309a9ba0b4c |
|
BLAKE2b-256 | 55cb7ca3c2bfbca495eb9d48b4cdc499ba0f9327195304f145174c89df2577d2 |
File details
Details for the file gm-3.0.171-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: gm-3.0.171-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 5.4 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10ac0bae2db28f64e91a153364ec36a921894032b3ba66fa00d64a6aff87e51a |
|
MD5 | a0ffffe837da4ed08a3745e49a6c206b |
|
BLAKE2b-256 | 1dea54eb47726a984e7e5e1846a838b1ba10a70c69ce507ea08bc3971ce8b532 |
File details
Details for the file gm-3.0.171-cp311-cp311-win32.whl
.
File metadata
- Download URL: gm-3.0.171-cp311-cp311-win32.whl
- Upload date:
- Size: 4.5 MB
- Tags: CPython 3.11, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69a4229c85c0e8e2f4f5a6469dc08c84c1e2a7540ddca93b3250662132f1c441 |
|
MD5 | a91d02516f3590ba7b4274b2136eb592 |
|
BLAKE2b-256 | 99da4c772272e98a8a5c5b30a6a513ef67cf544a3ca6a2ed1a43c1d3a2fbbc44 |
File details
Details for the file gm-3.0.171-cp311-cp311-manylinux1_x86_64.whl
.
File metadata
- Download URL: gm-3.0.171-cp311-cp311-manylinux1_x86_64.whl
- Upload date:
- Size: 11.2 MB
- Tags: CPython 3.11
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d6545e5eb1a015c8f37dffd8b8f8530ec419d876a01312e745e40cba5f8c4ed |
|
MD5 | bdc977ae7d1cf5f49a686d8754df77e4 |
|
BLAKE2b-256 | 9ea05cf604266d75a10793384cf2389cc10c50b3a7acc79fd6fe1751177786ad |
File details
Details for the file gm-3.0.171-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: gm-3.0.171-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 5.4 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30385ffe7d4c8fb5c1dd6032c6a7a65888e441ed26323a6ea54fe0af607e7737 |
|
MD5 | bab4f7091292772f9c077d0ce73bcd7e |
|
BLAKE2b-256 | d618fbe3391d0eeb037b657cf6e78f2b41bcf0be30036a4337af74e4d59fe24a |
File details
Details for the file gm-3.0.171-cp310-cp310-win32.whl
.
File metadata
- Download URL: gm-3.0.171-cp310-cp310-win32.whl
- Upload date:
- Size: 4.5 MB
- Tags: CPython 3.10, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c7a736c6cbb036e0e6d91ab8d1cc6e0d7c00368ae7184642639eddc91807b17 |
|
MD5 | e80c0f057f31c9b46ee45bc151c11221 |
|
BLAKE2b-256 | cd37c829034fbf9f2e2294095f5d2f72215e3b2776974e8bb8cd9ad8517bd3f2 |
File details
Details for the file gm-3.0.171-cp310-cp310-manylinux1_x86_64.whl
.
File metadata
- Download URL: gm-3.0.171-cp310-cp310-manylinux1_x86_64.whl
- Upload date:
- Size: 10.8 MB
- Tags: CPython 3.10
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d35bf0de4b0ce9b3ec2f4a4aa92409d953685197fcdafe50f11b9cd709cfa5b8 |
|
MD5 | cb581b5bbc4867a04884ddfb2132d95b |
|
BLAKE2b-256 | e867a27315cc974180d4843eec74a76ecc655cfa3a06de9fbf23faf10b25ce2a |
File details
Details for the file gm-3.0.171-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: gm-3.0.171-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 5.4 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f5913b0f5069680554bdac7d7af4fc8c246a23770a9f9a1641ec7d60bbb31eb |
|
MD5 | a33e81a16271159d1ccc0ffbbb483d7e |
|
BLAKE2b-256 | dfb4ff658ed7108c7e1f51c7b51675defb07e6b2d7f3dd215653783faa6da9ed |
File details
Details for the file gm-3.0.171-cp39-cp39-win32.whl
.
File metadata
- Download URL: gm-3.0.171-cp39-cp39-win32.whl
- Upload date:
- Size: 4.5 MB
- Tags: CPython 3.9, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48114695a51e39c6d08f6204c68fa0e56bb0dae6305815ded74e9c4036e89358 |
|
MD5 | fcdca1ad08653fd12f99cc715a801aae |
|
BLAKE2b-256 | 1b07d573da32c7cd97eeb7e2084917212a397a8803bb1c0008514c827517800c |
File details
Details for the file gm-3.0.171-cp39-cp39-manylinux1_x86_64.whl
.
File metadata
- Download URL: gm-3.0.171-cp39-cp39-manylinux1_x86_64.whl
- Upload date:
- Size: 10.7 MB
- Tags: CPython 3.9
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43eafb97e92bb42a16faef33e86b3c321372609a8490e03111d0e42e7464d3ba |
|
MD5 | 629f581ed547688c1bfb54e99d146b10 |
|
BLAKE2b-256 | 834ecef39b30bae8a1fc52f07711540040d4379815893d5ccef7e1a7d14e5d0c |
File details
Details for the file gm-3.0.171-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: gm-3.0.171-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 5.4 MB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b609d80149284b154006a1c32c8ea0167d3a2a3343d845944c6e3681f302bc2 |
|
MD5 | d4f6d1f89b5bf10304c3e76d81aed92e |
|
BLAKE2b-256 | b1cd6c4e25c4faf92c4b5721babe931f263555b823b44971dd789b5bef17aa7c |
File details
Details for the file gm-3.0.171-cp38-cp38-win32.whl
.
File metadata
- Download URL: gm-3.0.171-cp38-cp38-win32.whl
- Upload date:
- Size: 4.5 MB
- Tags: CPython 3.8, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82d4460b59e643c05dd0ecf648d6ab04f060db0e1a51d432af872491db55e2c6 |
|
MD5 | db6cf5514e62d61bff634cee3a3438e1 |
|
BLAKE2b-256 | 68b41c65c08df68abaa94271a172257ea00ebc34ae969452aeacd5338ae46432 |
File details
Details for the file gm-3.0.171-cp38-cp38-manylinux1_x86_64.whl
.
File metadata
- Download URL: gm-3.0.171-cp38-cp38-manylinux1_x86_64.whl
- Upload date:
- Size: 10.8 MB
- Tags: CPython 3.8
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ef1ffa14315fb8e839f910e753b7d242909b906ad9f7d5ac7ad7a62c1852684 |
|
MD5 | 36a87a8013d10ba5fd8b31bb83a83da6 |
|
BLAKE2b-256 | 01739a08f632135011518e7156c96ac24b79ffcacf5a217afdba5461070acf39 |
File details
Details for the file gm-3.0.171-cp37-cp37m-win_amd64.whl
.
File metadata
- Download URL: gm-3.0.171-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 5.4 MB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf4f3abedae3652e7da04695a74265133fa3216f394b6238c3812216d3f3eb29 |
|
MD5 | 2b3a1616c11a79feb39984120e4ad474 |
|
BLAKE2b-256 | 31e9cd6c10078e4f234fcfa2b9b0a764eab800d2be3b0cdc5142286118c2dcba |
File details
Details for the file gm-3.0.171-cp37-cp37m-win32.whl
.
File metadata
- Download URL: gm-3.0.171-cp37-cp37m-win32.whl
- Upload date:
- Size: 4.5 MB
- Tags: CPython 3.7m, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 399958effe2b757e37d62f902d18223023388762c2973def725b9535daf5b92a |
|
MD5 | 3101256077648624c3e44dc48b0db0f1 |
|
BLAKE2b-256 | 6dc9e9e46a49aa06c3d28942369804845bd1e751a9d7b839c5b6840338c62991 |
File details
Details for the file gm-3.0.171-cp37-cp37m-manylinux1_x86_64.whl
.
File metadata
- Download URL: gm-3.0.171-cp37-cp37m-manylinux1_x86_64.whl
- Upload date:
- Size: 10.5 MB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27ddd2ce1c3042c3665bf64af309e03d5275eb5d125ccbd754d4a501794e956f |
|
MD5 | ace89952db46e7e17e7992ab8934af75 |
|
BLAKE2b-256 | d34457f511ad07eb4124f139706160422090037e88be29967ba5eec945133be4 |
File details
Details for the file gm-3.0.171-cp36-cp36m-win_amd64.whl
.
File metadata
- Download URL: gm-3.0.171-cp36-cp36m-win_amd64.whl
- Upload date:
- Size: 5.4 MB
- Tags: CPython 3.6m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b0bfafbb3aa8168f3cd03276478653a09ba3331b91a374c5ed3d7ab89e53663 |
|
MD5 | 5e6282be2835c7542d6e809476f3655f |
|
BLAKE2b-256 | 83b3ea00caaae8225e7cea428a495592467bad6c88dbb7b2f1a02978bb8839e2 |
File details
Details for the file gm-3.0.171-cp36-cp36m-win32.whl
.
File metadata
- Download URL: gm-3.0.171-cp36-cp36m-win32.whl
- Upload date:
- Size: 4.5 MB
- Tags: CPython 3.6m, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c09cfb4b0371c5f9d4674f31aea0f1be2e605fb20c623283db721b57d337916 |
|
MD5 | c2ee02fa25a8dc0b78778bd5c1519c7f |
|
BLAKE2b-256 | 1847ff1cc6df1c878668d4dbf624cb8bdf1f16bd56ebf6e711d003c7f7bd3779 |
File details
Details for the file gm-3.0.171-cp36-cp36m-manylinux1_x86_64.whl
.
File metadata
- Download URL: gm-3.0.171-cp36-cp36m-manylinux1_x86_64.whl
- Upload date:
- Size: 10.5 MB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c352c6f78f17743efd310855d86735d501af04e9df933434fd4e0e0b646dc042 |
|
MD5 | a98eb077938278bb2dbd42c71a66bbd8 |
|
BLAKE2b-256 | 476347e8e3d96e49ed40203c02946119c45b71b3b442f328a45dbe07a7d3a5d6 |