Binance.us csv import and api not calculating cost basis

Binance.us api data and csv file both are being imported and are resulting in showing purchases as sales. there is $0 cost basis because it is assuming the purchase is a sale and therefore has no reference of the cost basis. all the tokens this is occurring with are those that were purchase on the platform:

Binance.us

tried api and csv both multiple times. it gives me a zero cost basis for the coins purchased and instead is calculating everything as a (SELL) for a gain. this is resulting in massive gains

tried everything I know how to do

Exact same thing happening with me. I have automatic purchases setup every week. $150 for BTC and $50 for ETH. Koinly is showing these as SALES of $150 worth of BTC and $50 of ETH. I have imported via CSV.

You really need to fix this ASAP because it is literally the exact opposite of what is happening and it is screwing up my entire portfolio and charging me tax on a 0 cost basis sale!

Come on and fix this ASAP.

I have analyzed my typical “trade” buys using BinanceUS manually (either website or App). In my attached screenshot example: Line 549, I “traded” $265.6824 USD and received 31 SOL. Koinly grabbed this correctly and it shows exactly what I did. BOUGHT SOL with USD.

Notice on that same day I had a recurring weekly buy of $150USD of BTC. My actual purchase was to spend $150 USD for .00883989 BTC. However, the .csv file from Binance.US shows that I sold .00883989 BTC for $150 USD. Basically the exact opposite of what I did. And since Koinly doesn’t have a cost basis for this sale, they just assume I made $150USD in gains (minus the $2.94 fee).

It seems like this might be a problem with Binance.US incorrectly outputting recurring purchases (just checked all my weekly buys over the past 6 months, all are flip flopped. I don’t know if I am right but this seems like a really obvious error on BinanceUS side that they sure better fix or everybody using recurring buys are going to have massive gains due to there being no cost basis. Is this only happening to me or are there others using recurring buys that have this issue?

@Tyler_Shoff - Check your CSV and see if the incorrect “SELLS” looks like line 547 in my screenshot.

so support confirmed this is because binance.us has changed thier csv data. i had to use the koinly custom csv and manually put in all my transactions… major pain…

I am also having this same problem too. It is happening specifically with fiat / USD buys. It I think I have found a temporary workaround. Open the CSV in Excel or similar. Sort spreadsheet by the category column so all of the straight “buys” are together. Then change “buy” to “sell” under both the columns “category” and “operation” and copy paste all the way down your buys. Then sort the spreedsheet back into its original order by date, export as corrected CSV, then import into Koinly. To avoid duplicating other transactions, it’s probably best to just erase the BinanceUS wallet and import everything over. It’s a pain. But I don’t have too many transactions. Under a 1000. I can imagine this being a nightmare with more.

That worked perfectly. Thanks.