Skip to content

Commit

Permalink
upload
Browse files Browse the repository at this point in the history
  • Loading branch information
nickhuangxinyu1 committed Jun 16, 2020
1 parent 5893f7f commit a05f5da
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion config/prod/time.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
time_controller :
{
sleep_time = ["09:30:00-09:45:59", "20:55:00-23:59:59", "00:00:00-02:29:59"];
sleep_time = ["09:30:00-09:45:59"]; //, "20:55:00-23:59:59", "00:00:00-02:29:59"];
close_time = [ "14:30:00-14:50:00"];
force_close_time = [ "14:55:01-15:29:59"];
invalid_time = ["02:30:00-08:30:00", "11:30:00-13:00:00", "15:30:00-20:50:00"];
Expand Down
4 changes: 2 additions & 2 deletions src/ctporder/listener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ void Listener::OnRspError(CThostFtdcRspInfoField *info, int request_id, bool is_

void Listener::OnFrontConnected() {
printf("enter onfrontconnected\n");
// message_sender_->Auth();
message_sender_->SendLogin();
message_sender_->Auth();
// message_sender_->SendLogin();
}

void Listener::OnFrontDisconnected(int reason) {
Expand Down
6 changes: 3 additions & 3 deletions src/ctporder/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ int main() {
}
CThostFtdcTraderApi* user_api = CThostFtdcTraderApi::CreateFtdcTraderApi();

std::string broker = "9999";
std::string username = "116909";
std::string broker = "8060";
std::string username = "9030001896";
std::string password = "yifeng";
/*
std::string broker = "1025";
Expand Down Expand Up @@ -118,7 +118,7 @@ int main() {
user_api->SubscribePrivateTopic(THOST_TERT_QUICK);
user_api->SubscribePublicTopic(THOST_TERT_QUICK);
// std::string counterparty_host = "tcp://101.226.250.179:51205"; // simnow
std::string counterparty_host = "tcp://180.168.146.187:10100";
std::string counterparty_host = "tcp://180.166.65.121:41205";
user_api->RegisterFront(const_cast<char*>(counterparty_host.c_str()));
user_api->Init();
if (enable_file) {
Expand Down
4 changes: 2 additions & 2 deletions src/ctporder/message_sender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ void MessageSender::Auth() {
memset(&reqauth, 0, sizeof(reqauth));
strncpy(reqauth.BrokerID, broker_id_.c_str(), sizeof(reqauth.BrokerID));
strncpy(reqauth.UserID, user_id_.c_str(), sizeof(reqauth.UserID));
strncpy(reqauth.AppID, "client_hft_168", sizeof(reqauth.AppID));
strncpy(reqauth.AuthCode, "9DEYFJ0E8189C29C", sizeof(reqauth.AuthCode));
strncpy(reqauth.AppID, "client_9030001896_v1", sizeof(reqauth.AppID));
strncpy(reqauth.AuthCode, "AQ1963JWQ6ATP9FE", sizeof(reqauth.AuthCode));

printf("Get Auth...\n");
int result = user_api_->ReqAuthenticate(&reqauth, ++request_id_);
Expand Down

0 comments on commit a05f5da

Please sign in to comment.