# 获取夜盘榜

get_us_overnight_rank(sort_dir=None, count=10, offset=None, filter_list=None)

  • 介绍

    获取美股夜盘榜,返回夜盘交易时段涨跌幅排行,包含夜盘价格、涨跌幅、成交额、成交量等数据。

  • 参数

    参数 类型 说明
    sort_dir RankSortDir 排序方向,默认降序(领涨)
    count int 返回数量 [1, 200],默认 10
    offset int 起始位置,默认 0
    filter_list list[SimpleRankFilter] 筛选条件列表(多条件为 AND 关系)
  • 输入限制

    • filter_list 筛选条件(SimpleRankFilter):

      通过 SimpleRankFilter 构造筛选条件:

      构造参数 说明
      indicator_type 筛选因子类型(SimpleRankIndicatorType,必填)
      interval_min 范围最小值(闭区间,MARKET_CAP/PE 使用)
      interval_max 范围最大值(闭区间,MARKET_CAP/PE 使用)
      price_filter 价格筛选枚举(PriceFilter,PRICE 类型必填)
  • 返回

    参数 类型 说明
    ret RET_CODE 接口调用结果
    data pd.DataFrame 当 ret == RET_OK,返回 (all_count, DataFrame) 元组
    str 当 ret != RET_OK,返回错误描述
    • 数据格式如下:
      字段 类型 说明
      security str 股票代码(如 'US.NVDA'
      name str 股票名称
      overnight_price float 夜盘价
      overnight_change_ratio float 夜盘涨跌幅(%)
      overnight_change_amount float 夜盘涨跌额
      overnight_turnover float 夜盘成交额
      overnight_volume int 夜盘成交量
      close_price float 收盘价(上一交易日)
      change_ratio float 盘中涨跌幅(%)
      change_amount float 盘中涨跌额
  • Example

from futu import *

quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)

ret, data = quote_ctx.get_us_overnight_rank(count=2)
if ret == RET_OK:
    all_count, df = data
    print(f'总数据量: {all_count}')
    print(df)
else:
    print('error:', data)

quote_ctx.close()
1
2
3
4
5
6
7
8
9
10
11
12
13
  • Output
总数据量: 17728
  security                   name  overnight_price  overnight_change_ratio  overnight_change_amount  overnight_turnover  overnight_volume  close_price  change_ratio  change_amount
0   US.MGN                  Megan           0.3128                  81.543             1.405000e+08         1681274.123           5102016        0.172     30.303030           0.04
1  US.QNRX  Quoin Pharmaceuticals           5.2900                  62.769             2.040000e+09         1164463.400            223649        3.250    -26.303855          -1.16
1
2
3
4

接口限制

  • 30 秒内最多 60 次请求
  • 分页请求仅首页计入限频统计