Share the code process of obtaining various transaction data through the l1l2 market interface

Generally speaking, enter the corresponding number in the l1l2 market interface, and you can get the stock number, percentage change, percentage change, stock name, today's opening price, closing price, current price, today's lowest price, bidding price, bidding price, trading volume , transaction amount and other information including all stock-related information.

The following is the process of code execution:

// Query all kinds of transaction data

// category: 0=> funds , 1=> shares , 2=> daily entrustment , 3=> daily transaction , 4=> cancellable order ,

// 5=> shareholder code , 6=> financing balance , 7=> short lending balance , 8=> marginable securities ,

// 12=> can apply for new shares , 13=> subscription quota for new shares , 14=> allocation number , 15=> winning ,

// 16=> open financing contracts , 17=> open securities lending contracts , 18=> open securities lending contracts

typedef void (*QueryDataProc)(int clientId, int category, char *result, char *errinfo);

const auto QueryData = reinterpret_cast<QueryDataProc>(GetProcAddress(hDLL, "QueryData"));

assert(QueryData);

std::cout << "========== Query funds : category = 0 ===========\n" ;

int category = 0;

QueryData(clientId, category, result, errinfo);

if (NULL != errinfo[0]) {

  std::cout << errinfo << std::endl;

} else {

  std::cout << result << std::endl;

}

std::cout << std::endl;

The above is the code process of l1l2 market interface to obtain various transaction data, so I will share it here. In fact, those who are interested in the l2 market interface can go to https://gitee.com/l2gogogo to learn more clearly, or learn more through the qq business card below.

Guess you like

Origin blog.csdn.net/Q_2037696191/article/details/128582281