Skip to content

Conversation

@2mhk
Copy link

@2mhk 2mhk commented Feb 20, 2025

Add common str post for other request like fapi.

Here is a sample:
use url "fapi.binance.com" instead of "api.binance.com"

        auto res0 = api.common_str("/fapi/v1/trades", { {"symbol","BNBUSDT"} });
        if (res0) std::cout << "api.common_str /fapi/v1/trades: " << res0.v << std::endl;

You can parse the json string by yourself.
The code is not elegant, but it can be used.

@niXman
Copy link
Owner

niXman commented Feb 21, 2025

hi @2mhk

thank you for the PR, I'll try to look at this tshi weekend.

best!

@andrewyuyang
Copy link

Add common str post for other request like fapi.

Here is a sample: use url "fapi.binance.com" instead of "api.binance.com"

        auto res0 = api.common_str("/fapi/v1/trades", { {"symbol","BNBUSDT"} });
        if (res0) std::cout << "api.common_str /fapi/v1/trades: " << res0.v << std::endl;

You can parse the json string by yourself. The code is not elegant, but it can be used.

Hi by "parse the json string by yourself" do you mean that we have to change the mapping from the binance response json to the local variables in binapi? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants