You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert

5
+

6
6
<br>
7
7
[<imgalt="ci errors"src="https://img.shields.io/github/actions/workflow/status/valeratrades/v_exchanges/errors.yml?branch=master&style=for-the-badge&style=flat-square&label=errors&labelColor=420d09"height="20">](https://github.com/valeratrades/v_exchanges/actions?query=branch%3Amaster)<!--NB: Won't find it if repo is private-->
8
8
[<imgalt="ci warnings"src="https://img.shields.io/github/actions/workflow/status/valeratrades/v_exchanges/warnings.yml?branch=master&style=for-the-badge&style=flat-square&label=warnings&labelColor=d16002"height="20">](https://github.com/valeratrades/v_exchanges/actions?query=branch%3Amaster)<!--NB: Won't find it if repo is private-->
Copy file name to clipboardExpand all lines: v_exchanges/src/binance/futures/account.rs
+12-16Lines changed: 12 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -13,15 +13,13 @@ use crate::core::{AssetBalance, Balances};
13
13
14
14
// balance {{{
15
15
//DUP: difficult to escape duplicating half the [balances] method due to a) not requiring usd value b) binance not having individual asset balance endpoint
let balances:Balances = balances(client, recv_window).await?;
14
14
let balance:&AssetBalance = balances.iter().find(|b| b.asset == asset).ok_or_else(|| eyre!("No balance found for asset: {:?}", asset))?;
15
15
Ok(*balance)
16
16
}
17
17
18
18
/// Should be calling https://bybit-exchange.github.io/docs/v5/asset/balance/all-balance, but with how I'm registered on bybit, my key doesn't have permissions for that (they require it to be able to `transfer` for some reason)
//? potentially `total_balance`? Would return precompiled USDT-denominated balance of a (bybit::wallet/binance::account)
60
64
// balances are defined for each margin type: [futures_balance, spot_balance, margin_balance], but note that on some exchanges, (like bybit), some of these may point to the same exact call
61
65
// to negate confusion could add a `total_balance` endpoint
0 commit comments