crypto-chassis / ccapi

A header-only C++ library for interacting with crypto exchanges. Bindings for Python, Java, C#, Go, and Javascript are provided.
https://discord.gg/b5EKcp9s8T
MIT License
582 stars 201 forks source link

MARKET_DEPTH in kucoin futures question #419

Closed dongpuxiao closed 1 year ago

dongpuxiao commented 1 year ago

Hello, when I subscribe to MARKET_DEPTH in kucoin futures, the corresponding market data is not returned after the subscription is successful. How can I solve it?

Below is the implementation code for: exchanges.push_back(CCAPI_EXCHANGE_NAME_KUCOIN_FUTURES); std::vector subscriptionList; for (const std::string &exchange : exchanges) { std::string w_symbol = imp_getWssSymbol(exchange, symbol); ROBOT_LOG_ERROR << exchange << ":MARKET_DEPTH@" << w_symbol << " wss connecting...." << std::endl; subscriptionList.emplace_back(exchange, w_symbol, "MARKET_DEPTH", "", exchange); } session.subscribe(subscriptionList);

The log:Print the following date and do not return market data。 (2023-08-19 13:30:36) [ERROR ] kucoin-futures:MARKET_DEPTH@YGGUSDM wss connect....

(2023-08-19 13:30:37) [ERROR ] Event [type = SESSION_STATUS, messageList = [ Message [type = SESSION_CONNECTION_UP, recapType = UNKNOWN, time = 1970-01-01T00:00:00.000000000Z, timeReceived = 2023-08-19T13:30:37.525663311Z, elementList = [ Element [nameValueMap = {CONNECTION_ID=0x7f8458023cf0, CONNECTION_URL=wss://ws-api-futures.kucoin.com/?token=2neAiuYvAU61ZDXANAGAsiL4-iAExhsBXZxftpOeh_55i3Ysy2q2LEsEWU64mdzUOPusi34M_wGoSf7iNyEWJyzqTcRy3JLJvWF5iotNU2XhJCj74_N1ldiYB9J6i9GjsxUuhPw3BlrzazF6ghq4L9XPmXpeMKKkB2vlzY8xHjU=.Px2VIyDrt9PTFOCQfcQUYg==}] ], correlationIdList = [ kucoin-futures ], secondaryCorrelationIdMap = {}] ]]

(2023-08-19 13:30:37) [ERROR ] :Event [type = SUBSCRIPTION_STATUS, messageList = [ Message [type = SUBSCRIPTION_STARTED, recapType = UNKNOWN, time = 1970-01-01T00:00:00.000000000Z, timeReceived = 2023-08-19T13:30:37.711362404Z, elementList = [ Element [nameValueMap = {INFO_MESSAGE={"id":"0","type":"ack"}}] ], correlationIdList = [ kucoin-futures ], secondaryCorrelationIdMap = {}] ]]

cryptochassis commented 1 year ago

Please make sure that the symbol that you used does exist on the exchange. If it doesn't, you might observe that issue.