ı want only the symbols ı have open position but it returns me all the symbols available in json returned by the endpoint: def get\_futures\_position\_information(self):
 # Methods job: Is to get all current exchange trading rules and symbol information of the linked binance account.
 try:
 return self.client.futures\_position\_information()
 except Exception as e:
 text = "An exception occured: {0} at BinanceClient/\_\_get\_futures\_exchange\_info()".format(
 e)
 Telegram.\_send\_message(client=self, text=text)
 return False

 def get\_symbols\_in\_position(self):
 return [x["symbol"] for x in self.get\_futures\_position\_information()]
user
it seems like you want to filter the symbols for which you have open positions. you can achieve this by checking if the 'positionamt' is not equal to 0 for each position. here's how you can modify the `get_symbols_in_position` method to achieve this:

```python
def get_symbols_in_position(self):
    positions = self.get_futures_position_information()
    if positions:
        symbols_in_position = [x["symbol"] for x in positions if float(x["positionamt"]) != 0]
        return symbols_in_position
    return []
```

this will return a list of symbols where you have an open position (position amount not equal to 0).
assistant
It seems like you want to filter the symbols for which you have open positions. You can achieve this by checking if the 'positionAmt' is not equal to 0 for each position. Here's how you can modify the `get_symbols_in_position` method to achieve this:

```python
def get_symbols_in_position(self):
    positions = self.get_futures_position_information()
    if positions:
        symbols_in_position = [x["symbol"] for x in positions if float(x["positionAmt"]) != 0]
        return symbols_in_position
    return []
```

This will return a list of symbols where you have an open position (position amount not equal to 0).
assistant