Is there a stable L2 stock market data interface on the market?

                  

With the development of the market and the advancement of technology, the level2 stock quote data interface has become one of the standard configurations of stock trading software. Although the functions of these brokerage software are largely similar, they still have their own characteristics and advantages.

For example: through the stock exchange, it has received widespread attention for its professional research reports and rich information services; Xueqiu Sina has attracted a large number of users with its community interaction and personalized recommendation functions; Yilian has attracted a large number of users with its efficient trading system and professional risk management Control systems won over investors.

Oriental Fortune Level2 market software is famous for its comprehensive market data and real-time information;

Dazhihui and Tonghuashun L2 stock market data software is favored for its simple and easy-to-use interface and powerful technical analysis tools;

Clicking on the stock market data interface is basically pushed in real time, while most of the data on the Shanghai Stock Exchange is pushed once every 3 seconds. However, L1 general market data is synthesized and pushed in 3 seconds. The L2 stock market data interface is pushed in milliseconds in real time. Compared with the L1 market data, investors can obtain more accurate stock price information, so as to make more informed investment decisions . For many quantitative strategy users, Level2 market data has many advantages over L1 ordinary market data.

Let’s take the case-by-case entrustment of Vanke A as an example:

(Figure 1 here is the order-by-order data returned by the L2 stock market interface, and you can see the data of buying, selling and canceling orders)

 (Figure 2 is the level2 version of Dongfang Fortune's entrustment data, which is consistent with the data in Figure 1.)

The feature of order-by-ticket entrustment of L2 stock market data is that buying orders means that the key is to avoid some traps during the bidding stage. There is a high opening bid, there is no single buy order of more than one million in the bidding stage, and there are a large number of single buy orders of more than one million. The Level 2 market presents the real transaction and volume of each transaction to users with detailed data. By viewing the detailed transaction data, users can determine whether the entrustment is a large order, a medium order, or a small order, and infer from this that it is the work of institutions, large investors, retail investors, etc., and understand the main intention.

Access the stock market data interface DEMO demonstration access process in python language:

 ( This Demo is just to demonstrate the access process )

import grpc

import entity_pb2

import proxy_pb2_grpc

import threading

from multiprocessing import Process

# The address and port that the proxy server listens on

ServerConnect = grpc.insecure_channel('localhost:5000')

Stub = proxy_pb2_grpc.ProxyStub(ServerConnect)

# add subscription

def add_subscription():

    # Example of the method of the ProtoBuf protocol

    String = entity_pb2.String()

    # Modify the value of the protocol

    # 2: Market code identification (1 for Shanghai Securities, 2 for Shenzhen Securities)

    #000002: Stock code

    # 15: Subscribe to all the signs (1 is transaction by transaction, 2 is commission by transaction, 4 is entrustment queue, 8 is ten stock market prices, if you want to subscribe to all, you can directly fill in 15, the principle is 1+2+4+8 , if you want to subscribe to a few quotes, just add up several quote marks)

    String.value = '2_000001_15'

    # String.value = '2_000001_15,2_000002_5,2_000003_12, bulk subscription'

    #rep return code is 1 means success, other status codes can refer to the access document

    Result = Stub.AddSubscription(String)

    print(Result)

# Push tick-by-tick entrustment market data

def order_record_stream():

    StreamResult = Stub.NewOrderRecordStream(entity_pb2.Void())

    # Use For loop to consume data continuously

    for Result in StreamResult:

        print(Result)

In this way, you can get the entrusted transaction data of Vanke A one by one.

As for the buying and selling queue, order by order, etc., you can refer to:

L2 Quotes Interface Documentation (Hyperlink: https://gitee.com/l2gogogo)

Different versions of the development code language java/python/C#/go/C++ and other languages ​​can refer to:

Level2 stock quote interface development document ((Hyperlink: https://gitee.com/l2gogogo/l2-push-python)

The code DEMO demonstration access process is shown in the figure: please refer to https://gitee.com/l2gogogo/l2

Guess you like

Origin blog.csdn.net/L2gogogo/article/details/132361169