Stock personal trading interface source code sharing

The stock personal trading interface actually refers to a channel of the stock trading interface. When we do stock trading, we must have this channel in order to successfully trade. So today I will share with you the various types of stock personal trading access inquiries. The source code of transaction data!

1. C++ source code of stock personal trading interface (partial)

// Query various 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;

std::cout <<  "========== query shares: category = 1 ===========\n" ;

category = 1;

QueryData(clientId, category, result, errinfo);

if (NULL != errinfo[0]) {

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

} else {

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

}

std::cout << std::endl;

 Generally speaking, if you have your own quantitative trading software, you only need a real stock interface, so if you have this idea, you can pay attention to the business card below!

Guess you like

Origin blog.csdn.net/qq_121463726/article/details/127671911