Giter VIP home page Giter VIP logo

Comments (6)

vensentzhou avatar vensentzhou commented on August 28, 2024 1

大佬牛B!

from efinance.

Micro-sheep avatar Micro-sheep commented on August 28, 2024

以 159994 为搜索关键词,会匹配到 5GETF (场内基金)和 华银中证5G通信主题ETF(场外基金),你的例子里面,是匹配到了后者,如果想匹配前者,其中一个方法如下

import efinance as ef 
ef.stock.get_quote_history("5GETF")

运行结果

image

from efinance.

vensentzhou avatar vensentzhou commented on August 28, 2024

感谢大佬,可能是代码重叠导致。但之前一段时间的使用正常,今天突然出现这个情况。那get_quote_history有没有控制参数,比如只调用A股、指数、或场内ETF

from efinance.

Micro-sheep avatar Micro-sheep commented on August 28, 2024

感谢大佬,可能是代码重叠导致。但之前一段时间的使用正常,今天突然出现这个情况。那get_quote_history有没有控制参数,比如只调用A股、指数、或场内ETF

可以调用搜索结果进行筛选,下面是一个例子

from efinance.utils import search_quote
from efinance.common import get_quote_history
keyword = '002542'
# 获取多个 keywrod 的在线搜索结果
search_result_list = search_quote(keyword, use_local=False, count=3)
print(search_result_list)
quote_id = ''
for q in search_result_list:
    if q.classify == 'AStock':
        quote_id = q.quote_id
        break

df = get_quote_history(quote_id, quote_id_mode=True)
df

运行结果

image

from efinance.

vensentzhou avatar vensentzhou commented on August 28, 2024

今天再使用同样的代码,匹配的又是5GETF了。(^_^
截屏2022-04-02 下午10 50 14
)

from efinance.

Micro-sheep avatar Micro-sheep commented on August 28, 2024

今天再使用同样的代码,匹配的又是5GETF了。(^_^

截屏2022-04-02 下午10 50 14

)

确实,这个搜索结果是服务器那边自己更新的。

from efinance.

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.