掘金社区

Python md怎么获取数据Pinned highlighted

186003***376 发表在掘金2 2016-06-16 02:46:24

掘金2
1000
2
0

from gmsdk import md
md.init(usernam, passwd) #登录返回为0,是正常的
print md.get_ticks("SHFE.HC1610.tick", "2016-06-14 9:30:00", "2016-06-14 15:00:00")
返回为[]

为什么获取不了数据?是api调用错了吗?也没见异常啊?
到底怎么用?
api文档能不能写清楚点,连个返回数据结构都不写,又不能看源码。

评论: 2
  • 用官方提供examples/test_md_query.py测试结果:
    ('get_ticks: ', 0)
    ('get_last_ticks: ', 0)
    ('get_last_n_ticks(10): ', 0)
    ('get_bars: ', 0)
    ('get_last_bars: ', 0)
    ('get_last_n_bars(10): ', 0)
    ('get_dailybars: ', 0)
    ('get_last_dailybars: ', 0)
    ('get_last_n_dailybars(10): ', 0)
    ('get_instruments: ', 0)
    ('get_instruments_by_name', 0)
    ('get_constituents', 0)
    ('get_financial_index', 0)
    ('get_last_financial_index', 0)
    ('get_last_n_financial_index', 0)
    ('get_share_index', 0)
    ('get_last_share_index', 0)
    ('get_last_n_share_index', 0)
    ('get_market_index', 0)
    ('get_last_market_index', 0)
    ('get_last_n_market_index', 0)
    ('get_calendar', 0)

    请问现在能提供哪些数据?

    2016-06-16 03:05:23
  • thank U !!!
    Done

    2016-06-16 07:26:15

Looks like your connection to 掘金量化社区 - 量化交易者的策略交流学习社区 was lost, please wait while we try to reconnect.