# Quote Object

# Create and Initialize the Connection

OpenQuoteContext(host='127.0.0.1', port=11111, is_encrypt=None)

  • Introduction

    Create and initialize market connection

  • Parameters

    Parameter Type Description
    host str FutuOpenD listening address.
    port int FutuOpenD listening port.
    is_encrypt bool Whether to enable encryption.
  • Example

from futu import *
quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111, is_encrypt=False)
quote_ctx.close() # After using the connection, remember to close it to prevent the number of connections from running out
1
2
3

# Close Connection

close()

  • Introduction

Close the interface quotation object. By default, the threads created inside the Futu API will prevent the process from exiting, and the process can exit normally only after all Contexts are closed. But through set_all_thread_daemon, all internal threads can be set as daemon threads. At this time, even if the close of Context is not called, the process can exit normally.

  • Example
from futu import *
quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)
quote_ctx.close() # After using the connection, remember to close it to prevent the number of connections from running out
1
2
3

# Start-up

start()

  • Introduction

    Start to receive push data asynchronously

# Stop

stop()

  • Introduction

    Stop receiving push data asynchronously