Igosuki / binance-rs-async

Async client for the Binance APIs
https://crates.io/crates/binance-rs-async
Other
171 stars 113 forks source link

Test futures API endpoints #25

Open Igosuki opened 2 years ago

Igosuki commented 2 years ago

Going to use futures in production so this part of the client has to be battle tested.

seongs1024 commented 2 years ago

Examples aren't working.

Run with:

cargo run --features futures_api --example binance_futures

Error is:

[2022-06-16T03:27:22Z ERROR binance_futures] Error: BinanceError { response: BinanceContentError { code: 400, msg: "The endpoint has been out of maintenance", extra: {} } }
Igosuki commented 2 years ago

Please kindly point to the outdated endpoints so I can remove the methods.

Igosuki commented 2 years ago

@seongs1024 it's just that the endpoint needs to be removed from the API as it's not available anymore

seongs1024 commented 2 years ago

The error occurs from the function, get_all_liquidation_orders().

Other functions are working well, so that the example is running if below codes are commented out.

// from the line 107 to 112 in ./examples/binance-futures.rs

async fn market_data() {

    /* snippet */

    match market.get_all_liquidation_orders().await {
        Ok(LiquidationOrders::AllLiquidationOrders(answer)) => {
            info!("First liquidation order: {:?}", answer[0])
        }
        Err(e) => error!("Error: {:?}", e),
    }

    /* snippet */

}
seongs1024 commented 2 years ago

From binance API doc, the endpoint for get_all_liquidation_orders() is no longer available.

2021-04-27

WEBSOCKET

  • The following liquidation orders streams do not push realtime order data anymore. Instead, they push snapshot order data at a maximum frequency of 1 order push per second.:
    • <symbol>@forceOrder
    • !forceOrder@arr

REST

  • The endpoint GET /fapi/v1/allForceOrders stop being maintained and no longer accepts request.

So the functionality can be served only by websocket.

Igosuki commented 1 year ago

@seongs1024 I removed the method from 1.1.9

DoctorEenot commented 1 year ago

Hi, I implemented some functions for endpoints in account https://github.com/Igosuki/binance-rs-async/pull/79

Marvino98 commented 2 months ago

Hi, I am a heavy futures API user. Can there be an implementation to transfer futures assets to spot wallet? https://binance-docs.github.io/apidocs/spot/en/#new-future-account-transfer-user_data @Igosuki