The development and use of the c-interface for stock trading is based on the principle of automatic order placement based on stock market software data, and then integrates information as the basis of trading strategies. All trading behaviors are automated. Moreover, when traders use the c interface of stock trading, it is actually written by code. In this respect, java language, Python, c language, etc. can be used for development. In this regard, next, the editor will talk about the development concept related to the stock trading interface , so that more traders can master the interface principle, carry out secondary development, or master the knowledge of these quantitative transactions.
For example, the development document of the stock trading c interface:
(1) Description of stock interface API call:
name |
Function |
|
basic function |
Init |
|
Deinit |
||
Logon |
||
logoff |
||
QueryData |
||
QueryHistoryData |
||
SendOrder |
||
CancelOrder |
||
GetQuote |
||
Repay |
||
GetExpireDate |
||
Single Account Batch Function |
QueryDatas |
|
SendOrders |
||
CancelOrders |
||
GetQuotes |
||
Multi-account batch function |
QueryMultiAccountsDatas |
|
SendMultiAccountsOrders |
||
CancelMultiAccountsOrders |
||
GetMultiAccountsQuotes |
(2) The principle of transaction interface querying various transaction data:
sign |
void QueryData(int |
ClientId, int Category, |
char* Result, char* |
ErrorInfo); |
|
Function |
Query various transaction data |
||||
parameter |
ClientId |
Client ID |
|||
Category |
Query Information Category 0: Funds, 1: Shares, 2: Order of the day, 3: Transaction of the day, 4: Cancellation order, 5: Shareholder code, 6: Financing balance, 7: Securities lending balance, 8: Marginable securities, 9: Different securities companies, 10-11: None, 12: Inquiry about new shares available for subscription, 13: Inquiry about subscription quota for new shares, 14: Matching Number Query, 15: Winning Lottery Query |
||||
Result |
Query results, need to allocate 1024*1024 bytes of space Please refer to [Result format] for the format |
||||
ErrorInfo |
Error message, need to allocate 256 bytes of space |
||||
return value |
None, whether the query is successful or not is judged by whether ErrorInfo is an empty string |
The header file type of the stock trading c interface development document:
public int getResultCode() {
return this.resultCode;
}
public void setResultCode(int value) {
this.resultCode = value;
}
public String getResultMsg() {
return this.resultMsg;
}
public void setResultMsg(String value) {
this.resultMsg = value;
}
In other words, the stock trading c interface can also mine various data languages, but if you want to obtain subdivided data, you can develop the program through programming, and just input it directly. It plays a very important role in the automatic trading process in the quantitative field. key role.