Skip to content

Commit

Permalink
Fix Kucoin private api bug from glaze migration
Browse files Browse the repository at this point in the history
  • Loading branch information
sjanel committed Dec 21, 2024
1 parent fea1440 commit f026c15
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/api/exchanges/src/kucoinprivateapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,12 @@ auto ComputeBaseStrToSign(HttpRequestType requestType, std::string_view method,
}

CurlOptions CreateCurlOptions(const APIKey& apiKey, HttpRequestType requestType, std::string_view method,
string strToSign, std::string_view nonceTimeStr,
string& strToSign, std::string_view nonceTimeStr,
CurlPostData&& postData = CurlPostData()) {
CurlOptions::PostDataFormat postDataFormat = CurlOptions::PostDataFormat::kString;
if (!postData.empty()) {
if (postData.empty()) {
ComputeBaseStrToSign(requestType, method, 0UL, nonceTimeStr, strToSign);
} else {
if (requestType == HttpRequestType::kGet || requestType == HttpRequestType::kDelete) {
std::string_view postDataStr = postData.str();
auto it = ComputeBaseStrToSign(requestType, method, postDataStr.size() + 1UL, nonceTimeStr, strToSign);
Expand Down

0 comments on commit f026c15

Please sign in to comment.