flashnuke / BinanceExtensionCPP

An extension for the API of Binance (https://www.binance.com/)
GNU General Public License v3.0
14 stars 4 forks source link

Issue changing leverage type #56

Closed gitkornel closed 3 years ago

gitkornel commented 3 years ago

Hello, I'm getting this weird error when trying to compile:

unresolved external symbol "public: class Json::Value __cdecl FuturesClient<class FuturesClientUSDT>::change_leverage(struct Params const *)" (?change_leverage@?$FuturesClient@VFuturesClientUSDT@@@@QEAA?AVValue@Json@@PEBUParams@@@Z)

My code:

std::string api_key{ "" };
std::string api_secret{ "" };

static FuturesClientUSDT my_client{ api_key, api_secret };

Params leverage_params{};
leverage_params.set_param("symbol", std::string(coin_name + "USDT"));
leverage_params.set_param("marginType", std::string("ISOLATED"));

std::cout << my_client.change_leverage(&leverage_params) << std::endl;

What am I doing wrong?

Best Regards.

flashnuke commented 3 years ago

Found the issue, missing template function instantiations

pushing a fix, will update shortly

flashnuke commented 3 years ago

@gitkornel tested locally and pushed a fix, please try the latest version and let me know if the issue was resolved

gitkornel commented 3 years ago

@gitkornel tested locally and pushed a fix, please try the latest version and let me know if the issue was resolved

Yes, it works, awesome, big thanks!

flashnuke commented 3 years ago

you're welcome!