Git Product home page Git Product logo

Comments (15)

rainx avatar rainx commented on July 23, 2024

是的,这个是通达信的历史行情数据的限制,如果要获取更多的数据,可以通过行情软件导出历史行情文件,然后再进行解析

from pytdx.

billwei19 avatar billwei19 commented on July 23, 2024

请问您知道现在哪个行情软件可以批量导出历史分笔数据吗?我手上的通达信软件全部只能导出历史一分钟数据。

from pytdx.

zfsamzfsam avatar zfsamzfsam commented on July 23, 2024

对于API获取数据的限制,能否定义常量固定下来?

from pytdx.

rainx avatar rainx commented on July 23, 2024

@billwei19 哦,我可能之前理解成k线数据了,分笔数据我记得通达信的网站上好像有一份

from pytdx.

rainx avatar rainx commented on July 23, 2024

@zfsamzfsam 嗯,后面争取加上这部分

from pytdx.

rainx avatar rainx commented on July 23, 2024

@zfsamzfsam 增加了一些常量 https://github.com/rainx/pytdx/blob/master/pytdx/params.py

from pytdx.

yutiansut avatar yutiansut commented on July 23, 2024

,,,,,

from pytdx.

yutiansut avatar yutiansut commented on July 23, 2024

@rainx 你你你你

from pytdx.

yutiansut avatar yutiansut commented on July 23, 2024

@rainx @billwei19 @zfsamzfsam
并不是不全的,是你要不断的改开始的数据指针位置:
文档参考

api.get_history_transaction_data(TDXParams.MARKET_SZ, '000001', 0, 10, 20170209)

这里面第三个参数,是起始的指针位置:

所以完整的示例是这样的

 from pytdx.hq import TdxHq_API
 api=TdxHq_API()
 with api.connect():
       data=api.get_history_transaction_data(TDXParams.MARKET_SZ, '000001', 2001, 2000, 20170209)+api.get_history_transaction_data(TDXParams.MARKET_SZ, '000001', 0, 2000, 20170209)


print(api.to_df(data))

from pytdx.

billwei19 avatar billwei19 commented on July 23, 2024

@yutiansut @rainx 经试验,确实如 @yutiansut 所提示的,如每页获取最多的2000条,要翻到下一页数据就要从2000开始. 也就是说,需要自己去判断是否已到页尾/首页。 谢谢 @yutiansut 给的提示,帮了大忙。

from pytdx.

yutiansut avatar yutiansut commented on July 23, 2024

@billwei19 @rainx 一般来说 6000条肯定足够了 要是不放心 可以再加一个判断 比如 拿到数据以后判断是不是9:30了 如果是的话就return结果 如果不是 继续叠加

from pytdx.

billwei19 avatar billwei19 commented on July 23, 2024

@yutiansut 但问题是,接口貌似每页数据最多只能获取2000条数据每页。如何能一次获取6000条呢?

from pytdx.

yutiansut avatar yutiansut commented on July 23, 2024

@billwei19 你在外面包一层函数啊....包到6000

from pytdx.

billwei19 avatar billwei19 commented on July 23, 2024

我现在就是用的while来循环获取。我以为你还有什么方法可以更简单一行搞定。不过,真的很感谢,棒了大忙.

from pytdx.

yutiansut avatar yutiansut commented on July 23, 2024

恩恩 可以看看这个 #21 @billwei19

from pytdx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.