# Get Price Reminder List

# get_price_reminder

get_price_reminder(code=None, market=None)

  • Description

    Get a list of price reminders set for the specified stock or market

  • Parameters

    Parameter Type Description
    code str Specified stock code.
    market Market Specified market type.

    Note: Choose either code or market, and code takes precedence if both exist.

  • Return

    Parameter Type Description
    ret RET_CODE Interface result.
    data pd.DataFrame If ret == RET_OK, price reminder data is returned.
    str If ret != RET_OK, error description is returned.
    • Price reminder data format as follows:
      Field Type Description
      code str Stock code.
      name str Stock name.
      key int Identification, used to modify the price reminder.
      reminder_type PriceReminderType The type of price reminder.
      reminder_freq PriceReminderFreq The frequency of price reminder.
      value float Remind value.
      enable bool Whether to enable.
      note str Note.
  • Example

from futu import *
quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)

ret, data = quote_ctx.get_price_reminder(code='HK.00700')
if ret == RET_OK:
    print(data)
    print(data['key'].values.tolist())   # Convert to list
else:
    print('error:', data)
print('******************************************')
ret, data = quote_ctx.get_price_reminder(code=None, market=Market.HK)
if ret == RET_OK:
    print(data)
    if data.shape[0] > 0:  # If the price remind list is not empty
        print(data['code'][0])    # Take the first stock code
        print(data['code'].values.tolist())   # Convert to list
else:
    print('error:', data)
quote_ctx.close() # After using the connection, remember to close it to prevent the number of connections from running out
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  • Output
       code     name                 key reminder_type reminder_freq  value  enable   note
0  HK.00700  TENCENT  168923414326635701      PRICE_UP        ALWAYS  349.2    True  test1
1  HK.00700  TENCENT  168923414328575801    PRICE_DOWN        ALWAYS  349.0    True  test2
[168923414326635701, 168923414328575801]
******************************************
                   code                 name                 key reminder_type reminder_freq  value  enable   note
0              HK.00700              TENCENT  168923414326635701      PRICE_UP        ALWAYS  349.2    True  test1
..                  ...                  ...                 ...           ...           ...    ...     ...    ...
3   HK.TCH230728C330000  TCH 230728 330.00 C  168923555994190207    PRICE_DOWN        ALWAYS   22.0    True  test2

[4 rows x 8 columns]
HK.00700
['HK.00700', 'HK.00700', 'HK.TCH230728C330000', 'HK.TCH230728C330000']
1
2
3
4
5
6
7
8
9
10
11
12
13

Interface Limitations

  • A maximum of 10 requests per 30 seconds