Git Product home page Git Product logo

Comments (1)

rainx avatar rainx commented on July 23, 2024

看了一下,主要的问题在于这里
因为不确定这里应该是4个bytes还是get_price,所以目前的解决方案是发现股票的价格为空的时候,就使用get_price, 否则使用 4 bytes , 目前看来还是可以的,如果有更好的方法,后续再进行改进

            # 不确定这里应该是用 get_price 跳过还是直接跳过4个bytes
            if price == 0 and last_close_diff == 0 and open_diff == 0 and high_diff == 0 and low_diff == 0:
                # 这个股票当前应该无法获取信息, 这个时候,这个值一般是0 或者 100
                #reversed_bytes0 = body_buf[pos: pos + 1]
                #pos += 1
                # 感觉这里应该都可以用 get_price ,但是由于一次性改动影响比较大,所以暂时只针对没有行情的股票做改动
                reversed_bytes0, pos = get_price(body_buf, pos)
            else:
                reversed_bytes0 = body_buf[pos: pos + 4]
                pos += 4

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.