Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

get_minute_time_data 返回数据有问题 #219

Open
gitrobi opened this issue Sep 4, 2019 · 4 comments
Open

get_minute_time_data 返回数据有问题 #219

gitrobi opened this issue Sep 4, 2019 · 4 comments

Comments

@gitrobi
Copy link

gitrobi commented Sep 4, 2019

hq 的 get_minute_time_data()返回的数据不正确,请检查一下!

@gitrobi gitrobi changed the title get_minute_time_data get_minute_time_data 返回数据有问题 Sep 4, 2019
@gitrobi
Copy link
Author

gitrobi commented Sep 4, 2019

这是我查到的数据, 000001

参数:市场代码, 股票代码, 如: 0,000001 或 1,600300
请输入参数 [0,000001]: 0,000001

   price     vol

0 0.00 48
1 0.48 48
2 0.97 1444
3 0.83 6
4 0.70 -1444
5 9740.34 -6097
6 9790.65 568398
7 9790.65 0
8 9790.66 6638
9 9790.65 5057
10 9824.88 3
11 9851.28 -1366
12 9865.63 18856
13 9865.65 7036

@vbk2000
Copy link

vbk2000 commented Oct 8, 2019

发现同样的问题,将发包的数据头部 改下可以解决这个问题。

class GetMinuteTimeData(BaseParser):
def setParams(self, market, code):
if type(code) is six.text_type:
code = code.encode("utf-8")
# pkg = bytearray.fromhex(u'0c 1b 08 00 01 01 0e 00 0e 00 1d 05')
pkg = bytearray.fromhex(u'0c 01 08 00 01 01 0e 00 0e 00 37 05')

@gitrobi
Copy link
Author

gitrobi commented Oct 11, 2019

@vbk2000 我按你说的修改了,发现还是不对.

1, 600993

[OrderedDict([('price', 16.85), ('vol', 148)]),
OrderedDict([('price', 16.88), ('vol', 323)]),
OrderedDict([('price', 16.95), ('vol', 31)]),
OrderedDict([('price', 16.99), ('vol', 114)]),
OrderedDict([('price', 17.02), ('vol', 135)]),
OrderedDict([('price', 17.05), ('vol', 61)]),
OrderedDict([('price', 17.08), ('vol', 27)]),
OrderedDict([('price', 17.12), ('vol', 217)]),
OrderedDict([('price', 17.2), ('vol', 134)]),
OrderedDict([('price', 17.26), ('vol', 123)]),
OrderedDict([('price', 17.34), ('vol', 20)]),
OrderedDict([('price', 17.41), ('vol', 52)]),
OrderedDict([('price', 17.49), ('vol', 13)]),
OrderedDict([('price', 17.58), ('vol', 111)]),
OrderedDict([('price', 17.69), ('vol', 121)]),
OrderedDict([('price', 17.81), ('vol', 73)]),
OrderedDict([('price', 17.94), ('vol', 132)]),
OrderedDict([('price', 18.07), ('vol', 395)]),
OrderedDict([('price', 18.19), ('vol', 78)]),
OrderedDict([('price', 18.28), ('vol', 91)]),
OrderedDict([('price', 18.41), ('vol', 126)]),
OrderedDict([('price', 18.53), ('vol', 161)]),
OrderedDict([('price', 18.64), ('vol', 92)]),
OrderedDict([('price', 18.78), ('vol', 196)]),
OrderedDict([('price', 18.9), ('vol', 40)]),
OrderedDict([('price', 19.0), ('vol', 398)]),
OrderedDict([('price', 19.09), ('vol', 217)]),
OrderedDict([('price', 19.19), ('vol', 14)]),
OrderedDict([('price', 19.3), ('vol', 34)]),
OrderedDict([('price', 19.41), ('vol', 52)]),
OrderedDict([('price', 19.55), ('vol', 91)]),
OrderedDict([('price', 19.69), ('vol', 143)]),
OrderedDict([('price', 19.83), ('vol', 13)]),
OrderedDict([('price', 19.97), ('vol', 98)]),
OrderedDict([('price', 20.14), ('vol', 231)]),
OrderedDict([('price', 20.31), ('vol', 181)]),
OrderedDict([('price', 20.48), ('vol', 20)]),
OrderedDict([('price', 20.63), ('vol', 89)]),
OrderedDict([('price', 20.79), ('vol', 45)]),
OrderedDict([('price', 20.95), ('vol', 143)]),
OrderedDict([('price', 21.11), ('vol', 46)]),
OrderedDict([('price', 21.27), ('vol', 117)]),
OrderedDict([('price', 21.42), ('vol', 44)]),
OrderedDict([('price', 21.57), ('vol', 24)]),
OrderedDict([('price', 21.73), ('vol', 396)]),
OrderedDict([('price', 21.89), ('vol', 19)]),
OrderedDict([('price', 22.0), ('vol', 353)]),
OrderedDict([('price', 22.11), ('vol', 136)]),
OrderedDict([('price', 22.22), ('vol', 353)]),
OrderedDict([('price', 22.33), ('vol', 20)]),
OrderedDict([('price', 22.44), ('vol', 175)]),
OrderedDict([('price', 22.55), ('vol', 385)]),
OrderedDict([('price', 22.67), ('vol', 4)]),
OrderedDict([('price', 22.78), ('vol', 155)]),
OrderedDict([('price', 22.89), ('vol', 52)]),
OrderedDict([('price', 23.01), ('vol', 525)]),
OrderedDict([('price', 23.14), ('vol', 35)]),
OrderedDict([('price', 23.26), ('vol', 167)]),
OrderedDict([('price', 23.37), ('vol', 37)]),
OrderedDict([('price', 23.49), ('vol', 26)]),
OrderedDict([('price', 23.6), ('vol', 81)]),
OrderedDict([('price', 23.65), ('vol', 264)]),
OrderedDict([('price', 23.75), ('vol', 10)]),
OrderedDict([('price', 23.82), ('vol', 100)]),
OrderedDict([('price', 23.88), ('vol', 131)]),
OrderedDict([('price', 23.93), ('vol', 582)]),
OrderedDict([('price', 23.99), ('vol', 70)]),
OrderedDict([('price', 24.04), ('vol', 167)]),
OrderedDict([('price', 24.09), ('vol', 97)]),
OrderedDict([('price', 24.14), ('vol', 205)]),
OrderedDict([('price', 24.19), ('vol', 63)]),
OrderedDict([('price', 24.24), ('vol', 140)]),
OrderedDict([('price', 24.3), ('vol', 227)]),
OrderedDict([('price', 24.36), ('vol', 46)]),
OrderedDict([('price', 24.45), ('vol', 19)]),
OrderedDict([('price', 24.54), ('vol', 45)]),
OrderedDict([('price', 24.62), ('vol', 42)]),
OrderedDict([('price', 24.66), ('vol', 226)]),
OrderedDict([('price', 24.71), ('vol', 104)]),
OrderedDict([('price', 24.77), ('vol', 55)]),
OrderedDict([('price', 24.83), ('vol', 14)]),
OrderedDict([('price', 24.9), ('vol', 188)]),
OrderedDict([('price', 24.97), ('vol', 10)]),
OrderedDict([('price', 25.04), ('vol', 43)]),
OrderedDict([('price', 25.11), ('vol', 7)]),
OrderedDict([('price', 25.17), ('vol', 29)]),
OrderedDict([('price', 25.26), ('vol', 48)]),
OrderedDict([('price', 25.35), ('vol', 28)]),
OrderedDict([('price', 25.42), ('vol', 23)]),
OrderedDict([('price', 25.47), ('vol', 109)]),
OrderedDict([('price', 25.53), ('vol', 75)]),
OrderedDict([('price', 25.58), ('vol', 29)]),
OrderedDict([('price', 25.62), ('vol', 59)]),
OrderedDict([('price', 25.66), ('vol', 38)]),
OrderedDict([('price', 25.71), ('vol', 144)]),
OrderedDict([('price', 25.76), ('vol', 162)]),
OrderedDict([('price', 25.81), ('vol', 32)]),
OrderedDict([('price', 25.86), ('vol', 106)]),
OrderedDict([('price', 25.91), ('vol', 40)]),
OrderedDict([('price', 25.96), ('vol', 4)]),
OrderedDict([('price', 25.99), ('vol', 236)]),
OrderedDict([('price', 26.01), ('vol', 34)]),
OrderedDict([('price', 26.04), ('vol', 54)]),
OrderedDict([('price', 26.07), ('vol', 42)]),
OrderedDict([('price', 26.1), ('vol', 4)]),
OrderedDict([('price', 26.12), ('vol', 84)]),
OrderedDict([('price', 26.14), ('vol', 189)]),
OrderedDict([('price', 26.18), ('vol', 69)]),
OrderedDict([('price', 26.23), ('vol', 16)]),
OrderedDict([('price', 26.29), ('vol', 16)]),
OrderedDict([('price', 26.35), ('vol', 68)]),
OrderedDict([('price', 26.4), ('vol', 8)]),
OrderedDict([('price', 26.45), ('vol', 18)]),
OrderedDict([('price', 26.49), ('vol', 11)]),
OrderedDict([('price', 26.5), ('vol', 130)]),
OrderedDict([('price', 26.52), ('vol', 268)]),
OrderedDict([('price', 26.51), ('vol', 10)]),
OrderedDict([('price', 26.5), ('vol', 83)]),
OrderedDict([('price', 26.51), ('vol', 21)]),
OrderedDict([('price', 26.51), ('vol', 6)]),
OrderedDict([('price', 26.51), ('vol', 45)]),
OrderedDict([('price', 26.51), ('vol', 10)]),
OrderedDict([('price', 26.52), ('vol', 41)]),
OrderedDict([('price', 26.51), ('vol', 101)]),
OrderedDict([('price', 26.52), ('vol', 2)]),
OrderedDict([('price', 26.53), ('vol', 5)]),
OrderedDict([('price', 26.56), ('vol', 55)]),
OrderedDict([('price', 26.6), ('vol', 24)]),
OrderedDict([('price', 26.65), ('vol', 190)]),
OrderedDict([('price', 26.7), ('vol', 0)]),
OrderedDict([('price', 26.75), ('vol', 7)]),
OrderedDict([('price', 26.8), ('vol', 0)]),
OrderedDict([('price', 26.84), ('vol', 33)]),
OrderedDict([('price', 26.89), ('vol', 6)]),
OrderedDict([('price', 26.93), ('vol', 59)]),
OrderedDict([('price', 26.97), ('vol', 62)]),
OrderedDict([('price', 27.01), ('vol', 173)]),
OrderedDict([('price', 27.04), ('vol', 58)]),
OrderedDict([('price', 27.06), ('vol', 195)]),
OrderedDict([('price', 27.1), ('vol', 15)]),
OrderedDict([('price', 27.14), ('vol', 25)]),
OrderedDict([('price', 27.19), ('vol', 111)]),
OrderedDict([('price', 27.25), ('vol', 218)]),
OrderedDict([('price', 27.3), ('vol', 53)]),

@Dashboard26
Copy link

昨天也发现有这问题,按 vbk2000的也不行

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants