错误代码
所有 API 请求均返回以下公共参数,用于描述请求结果:
- code:业务状态码
- message:状态描述
code | message | message detail | 备注 |
---|---|---|---|
0 | success | 请求成功 | |
1 | server error | 当遇到请求参数无法处理时,或服务端本身服务异常时,会返回该状态码 | |
2 | network read time out | 请求网络超时,需要检测网络状况如何,可以考虑和OpenAPI的服务就近部署,或使用稳定的专线服务 | |
4 | access forbidden | 拒绝访问,可能的原因: 1.如果设置的IP白名单,但是发起请求的机器并不在白名单内 2.可能由于账号的频繁请求,或错误请求过多,导致被加入了黑名单 3.长连接验证签名失败 4.长连接订阅的标的过多,超过了限额 | |
-- | You don't have permission to subscribe quotes, please purchase api quotes permission first | 长链接订阅时,没有权限,可订阅数量为0 | |
-- | According to your user level, you can only subscribe to xxx symbols | 长链接订阅时,超过了可订阅标的数量 | |
5 | rate limit error | 请求频率超过限制,这种情况下返回的http状态码是429,同时在错误消息中会返回单位时间内的限制次数说明 | |
1000 | common param error | 解析公共参数出现会导致返回该导致,可能的原因: 1.请求的方法不支持(method参数错误) 2.请求的URL地址错误 3.请求的参数不是标准JSON格式 4.公共参数(非bizContent)校验出错,比如timestamp格式错误,字段为空,sign签名字段校验出错等 | |
-- | invalid symbols | 标的代码有误 | |
-- | the current requested method does not support | 请求的api方法有误。一般出现在调用了不支持的sdk方法,或者未用sdk,写错了api方法 | |
-- | time parse error, support time format is 'yyyy-MM-dd HH:mm:ss' | 日期参数格式有误 | |
-- | failed to verify signature, please make sure you use the correct rsa private key | 签名错误, 一般是密钥有误 | |
-- | request parameters cannot be empty | 请求参数不能为空 | |
-- | field 'xxx' cannot be empty | 字段不能为空 | |
-- | failed to get developer information | 未获取到开发者信息。一般是tigerid不存在或请求到了错误的环境(比如正式的tigerid请求到了sandbox,或US的tigerid请求到了非US) | |
-- | get device information error | 设备id有误 | |
1010 | biz param error | 解析bizContent参数出错,可能的原因: 业务参数校验出错(比如begin_time格式错误,sec_type不支持) | |
-- | failed to parse parameters in 'biz_content' | biz_content 参数内容有误 | |
-- | field 'secret_key' or 'account' invalid | 业务参数错误:机构账户secret_key 或account 错误 | |
-- | 'market' xxxx not supported, all supported market include:[HK] | 市场不支持 | |
-- | 'page_token' is used in the wrong way, when this parameter is used, other parameters cannot be changed | 分页参数page_token 使用有误,使用page_token 时,应该保持除该参数之外的其他参数不变 | |
-- | field 'page_token' is illegal, can't be parsed | page_token 有误 | |
-- | option symbol format error | 期权identifier格式有误 | |
-- | sec_type xxx error, current contract interface supported sec_type include:[STK, OPT, FUT] | sec type 类型错误 | |
-- | symbols cannot be empty and cannot exceed xxx | 标的为空或数量超过限制 | |
1100 | global account response error | 环球账号交易错误,比如: 1.TRADE DUPLICATE ORDER ID:交易订单号重复 2.TRADE ORDER NOT ALLOWED:当前不允许下单 | |
1200 | prime account response error | 综合账号交易错误,比如: 1.BAD_REQUEST:Orders cannot be place at this moment:当前时间无法进行下单操作 2.BAD_REQUEST:You cannot place market or stop order during pre-market and after-hours trading:美股盘前盘后阶段无法下市价单和止损单 3.The order quantity you entered exceeds your currently available position:下单数量超过了可交易数量 4.bad_request:We don’t support trading of this stock now:不支持该只标的交易 | |
1300 | paper account response error | 模拟账号交易错误,错误描述和综合账号返回基本一致 | |
2100 | stock response error | 股票行情相关错误 | |
2200 | option response error | 期权行情相关错误 | |
2300 | futures response error | 期货行情相关错误 | |
2400 | user token error | hk 牌照token错误 | |
user token can not be empty | token 为空 | ||
user token expired invalid | token 过期 | ||
user token invalid | token 失效 | ||
3xxx | subscribe error | 订阅数据相关错误,可能的原因: 1.订阅时的tigerId异常 2.订阅时发生了服务端异常 3.不支持的行情提供商参数 4.不支持的订阅类型 5.订阅数超过了限制要求 | |
4000 | permission denied | 访问权限不足,访问被拒绝,可能的原因: 1.请求K线行情的时间段超过了被允许的范围 2.请求分时数据的时间段超过了被允许的范围 3.请求行情的设备不在允许范围内(多台设备同时抢占时只支持一个设备使用行情) 4.行情权限不符合要求 | |
4001 | kick out by a new connection | 长连接通道已被新建立的连接踢出 |
Updated 1 day ago