Igosuki / binance-rs-async

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

futures position_information implementation #47

Closed Matelasse closed 1 year ago

Matelasse commented 1 year ago

Hello. I tried using position_information that calls the endpoint /fapi/v2/positionRisk. The parameter to position_information is Symbol structure, which has like 20 fields on non Optional members. Is this function implemented correctly? I'd expect to only pass symbol: String to get the data about my positions

pointers: https://github.com/Igosuki/binance-rs-async/blob/master/src/futures/account.rs#L203 https://github.com/Igosuki/binance-rs-async/blob/master/src/futures/rest_model.rs#L29 https://binance-docs.github.io/apidocs/futures/en/#position-information-v2-user_data

GET /fapi/v2/positionRisk (HMAC SHA256)

Get current position information.

Weight: 5

Parameters:


Matelasse commented 1 year ago

I don't know how I overlooked this yesterday, but the param just needs to implement IntoString conversion, so everything's okay.

NameTypeMandatoryDescription
symbolSTRINGNO
recvWindowLONGNO
timestampLONGYES