# 筛选窝轮 V2

get_warrant_screen(request)

  • 介绍

    窝轮筛选 V2,参数与返回字段同 nn 标签页。

  • Example

from moomoo import (
    OpenQuoteContext, RET_OK, WarrantScreenRequest,
    WarrantMarket, WarrantField, WarrantType,
)

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

req = WarrantScreenRequest(warrant_market=WarrantMarket.HK)
req.add_choice_filter(field_id=WarrantField.WARRANT_TYPE,
                      choices=[WarrantType.CALL, WarrantType.PUT])
req.add_interval_filter(field_id=WarrantField.CURRENT_PRICE,
                        min_val=0.1, max_val=5.0)
req.add_interval_filter(field_id=WarrantField.EFFECTIVE_LEVERAGE, min_val=3.0)
req.add_sort(field_id=WarrantField.VOLUME, desc=True)
req.page_count = 20

ret, data = quote_ctx.get_warrant_screen(req)
if ret == RET_OK:
    last_page, all_count, df = data
    print(df[['stock_id', 'warrant_type', 'current_price', 'effective_leverage']].head())
else:
    print('error: ', data)

quote_ctx.close()
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24