Closed AlexApps99 closed 4 years ago
I am not aware of Binance's Futures implementation in Rust. It could be supported in this crate, as far as I can see from the docs we can reuse most of the data models we have currently.
I would be willing to help if you need a hand with this
@AlexApps99 You are welcome. I will try to do first draft on weekend so we can start helping with the implementation of the futures api.
@AlexApps99 I created the base implementation, see https://github.com/wisespace-io/binance-rs/tree/master/src/futures
I just implemented the general api, I was able to reuse some structs in Exchange Information data model, but the Symbols struct was different as you can see in futures/model.rs, so I guess it will not be always possible to reuse the models.
Excellent, I'll get started implementing the market API.
While looking at src/market.rs
, I noticed that some functionality is unimplemented:
/api/v3/trades
/api/v3/historicalTrades
/api/v3/aggTrades
Should I omit the futures version of these functions too?
I think we could include, if you do not mind to implement. Otherwise, I can add later.
I have created a draft PR (#41) to show my progress and get feedback, hopefully I'll have completed it by the end of this week.
It looks like good, I noticed that you added a comment to get_historical_trades, stating that it may requires API key, however, looking at the docs, It does not seen a signed request.
The documentation is wrong:
http "https://fapi.binance.com/fapi/v1/historicalTrades" symbol=="BTCUSDT"
{
"code": -2014,
"msg": "API-key format invalid."
}
I've done further investigation, and I believe that functionality documented with (MARKET_DATA)
are only accessible by API key
I checked the binance implementation of the futures API. You can use for reference.
Requires:
request = self.__create_request_by_get_with_apikey("/fapi/v1/historicalTrades", builder)
Dont require:
request = self.__create_request_by_get("/fapi/v1/aggTrades", builder)
request = self.__create_request_by_get("/fapi/v1/klines", builder)
request = self.__create_request_by_get("/fapi/v1/depth", builder)
...
We need to add a new method in client.rs do cover the apikey case
I haven't been able to find the time to finish my PR, so I hope what I have done is enough for now
Not all of the Futures API has been implemented yet, so a new issue should be made to track the other parts of the API
From what I can tell, this crate does not support the Binance's Futures API.
Are there any branches/alternate crates that support the API?
Alternatively, are there any plans to add the API to this crate?
Thanks