flashnuke / binanceextensioncpp Goto Github PK
View Code? Open in Web Editor NEWAn extension for the API of Binance (https://www.binance.com/)
License: GNU General Public License v3.0
An extension for the API of Binance (https://www.binance.com/)
License: GNU General Public License v3.0
Getting klines I'm randomly receiving malformed kline object which is always last in response
],
[
1622667600000,
"1.81059000",
"1.81856000",
"1.80819000",
"1.81000000",
"3131994.90000000",
1622669399999,
"5679722.58880500",
8036,
"1450047.50000000",
"2630337.35958400",
"0"
],
[
1622669400000,
"1.81000000",
null
]
][
[
1622671200000,
"1.81245000",
"1.81966000",
"1.81000000",
"1.81183000",
"3189448.30000000",
1622672999999,
"5783082.03389300",
7960,
"1224261.90000000",
"2220666.73000300",
"0"
],
You can see it here between two good klines. Didn't happen with python-binance so i thought that might be library issue.
Json above is formed by doing multiple requests so in this case it's not last in the list.
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.
How would one get the currnet price of a symbol in a loop to compare it?
im not sure how to read the json from get_ticker
Getting
error LNK2019: unresolved external symbol "public: void __cdecl Params::set_param<class std::basic_string<char,struct std::char_traits,class std::allocator > *>(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class std::basic_string<char,struct std::char_traits,class std::allocator > * &&)" (??$set_param@PEAV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@params@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@$$QEAPEAV12@@z) referenced in function "public: class TickerData __cdecl Binance::getKlines(class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::basic_string<char,struct std::char_traits,class std::allocator >)" (?getKlines@Binance@@qeaa?AVTickerData@@v?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@000@Z)
On simplest code
TickerData GetKlines(std::string symbol, std::string interval, std::string startTime, std::string endTime)
{
Params requestParams;
requestParams.set_param("symbol", symbol);
requestParams.set_param("interval", interval);
return TickerData();
}
All .cpp files of the library are included along the program.
Win 10, VS 2019 (16.9)
Hello, I've been wondering how can you create a user data listen stream?
There is no example and quite didn't understand the code.
What I came up to (but doesn't compile neither works):
SomeFunctor ws_stream_read{};
std::string cust_stream = "fapi/v1/listenKey";
std::thread t1(&FuturesClientUSDT::stream_userStream<SomeFunctor>, cust_stream, std::ref(ws_stream_read.msg_buffer), std::ref(ws_stream_read));
t1.join();
Any ideas?
Best Regards.
How to Combine with TradingView AlertMessage and BinanceAPI
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.