Skip to content

Commit

Permalink
Kucoin - Migrate to glaze
Browse files Browse the repository at this point in the history
  • Loading branch information
sjanel committed Dec 18, 2024
1 parent ef8e0dc commit d6944a8
Show file tree
Hide file tree
Showing 6 changed files with 688 additions and 250 deletions.
5 changes: 3 additions & 2 deletions src/api/common/src/exchangeprivateapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ BalancePortfolio ExchangePrivate::getAccountBalance(const BalanceOptions &balanc
computeEquiCurrencyAmounts(balancePortfolio, equiCurrency);
}

log::info("Retrieved {} balance for {} assets", exchangeName(), balancePortfolio.size());

if (!balancePortfolio.empty()) {
log::info("Retrieved {} balance for {} assets", exchangeName(), balancePortfolio.size());
}
return balancePortfolio;
}

Expand Down
2 changes: 2 additions & 0 deletions src/api/exchanges/include/kucoinpublicapi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class KucoinPublic : public ExchangePublic {
public:
static constexpr std::string_view kUrlBase = "https://api.kucoin.com";

static constexpr std::string_view kStatusCodeOK = "200000";

static constexpr int kKucoinStandardOrderBookDefaultDepth = 20;

KucoinPublic(const CoincenterInfo& config, FiatConverter& fiatConverter, api::CommonAPI& commonAPI);
Expand Down
3 changes: 1 addition & 2 deletions src/api/exchanges/src/huobiprivateapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ string BuildParamStr(HttpRequestType requestType, std::string_view baseUrl, std:

string paramsStr(requestTypeStr.size() + urlBaseWithoutHttps.size() + method.size() + postDataStr.size() + 3U, '\n');

auto it = paramsStr.begin();
it = std::ranges::copy(requestTypeStr, it).out;
auto it = std::ranges::copy(requestTypeStr, paramsStr.data()).out;
it = std::ranges::copy(urlBaseWithoutHttps, it + 1).out;
it = std::ranges::copy(method, it + 1).out;

Expand Down
Loading

0 comments on commit d6944a8

Please sign in to comment.