Binance transaction fee's showing as missing purchase history

Describe the problem:

Some of my Binance transactions are including the BNB transaction fee in my portfolio which is then showing as missing purchase history/zero cost basis.

Which exchange/wallet is this regarding?

Binance

How did you import data into this wallet?

API

What have you tried to fix this so far?

N/A

the same problem…how to fix it?

Then probably the error is that a former purchase of BNB is not documented in Koinly. You should check your holdings and trades from the beginning and check if the status in Koinly is the same as in Binance. If not, go and find the missing transaction(s).
In Binance I had it now and then that a transaction was not caught by the API, I have no idea why. I had to add them manually until everything was clean again.