How do I get the balance of my assets through the binance model?

How do I get the balance of my assets through the binance model? Do I need to calculate the percentage of open positions or is there another way to set me to buy only 10% of the balance of my assets?

10% is just an example, or an increase or decrease in other balance considerations, or even a 100% liquidation of SPOT.