Coder Social home page Coder Social logo

Comments (4)

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

下个版本考虑加上,敬请期待。

from efinance.

vensentzhou avatar vensentzhou commented on August 21, 2024

大佬回复真快,期待新版本

from efinance.

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

于 2021年9月18日,添加对获取 ETF、LOF 基金行情列表的支持(需要更新使用 pipefinance更新到至少 0.3.8 版本)。示例代码如下

from efinance.common.config import FS_DICT
from efinance.common import get_realtime_quotes_by_fs
fs = FS_DICT.get('ETF')
df = get_realtime_quotes_by_fs(fs)
df

运行截图
image

其中比较重要的是 FS_DICT,它的定义如下

FS_DICT = {
    # 可转债
    'bond': 'b:MK0354',
    # 沪深A股
    'stock': 'm:0 t:6,m:0 t:80,m:1 t:2,m:1 t:23',
    # 期货
    'futures': 'm:113,m:114,m:115,m:8,m:142',

    '上证A股': 'm:1 t:2,m:1 t:23',
    '沪A': 'm:1 t:2,m:1 t:23',

    '深证A股': 'm:0 t:6,m:0 t:80',
    '深A': 'm:0 t:6,m:0 t:80',

    # 沪深新股
    '新股': 'm:0 f:8,m:1 f:8',

    '创业板': 'm:0 t:80',
    '科创板': 'm:1 t:23',
    '沪股通': 'b:BK0707',
    '深股通': 'b:BK0804',
    '风险警示板': 'm:0 f:4,m:1 f:4',
    '两网及退市': 'm:0 s:3',

    # 板块
    '地域板块': 'm:90 t:1 f:!50',
    '行业板块': 'm:90 t:2 f:!50',
    '概念板块': 'm:90 t:3 f:!50',

    # 指数
    '上证系列指数': 'm:1 s:2',
    '深证系列指数': 'm:0 t:5',
    '沪深系列指数': 'm:1 s:2,m:0 t:5',
    # ETF 基金
    'ETF':'b:MK0021,b:MK0022,b:MK0023,b:MK0024',
    # LOF 基金
    'LOF':'b:MK0404,b:MK0405,b:MK0406,b:MK0407'

}

你可以模仿上面的写法,获取更多板块的行情。

from efinance.

vensentzhou avatar vensentzhou commented on August 21, 2024

感谢大佬,更新版本试试

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.