Code Monkey home page Code Monkey logo

binanceextensioncpp's Introduction

's GitHub stats
's GitHub stats

binanceextensioncpp's People

Contributors

flashnuke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

binanceextensioncpp's Issues

Malformed klines

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.

Issue changing leverage type

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.

getting price

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

Unresolved external symbol

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)

Creating user data stream

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.