import pandas as pd
# transaction fees 
# processing raw data 
# don't hv to call it later 

def load_rate(type):   
    name = type + 'USDT'
    df  = pd.read_csv(str('./FundingRate/' + type + 'USDT.csv'), header = 0, index_col=0)
    df.index = pd.to_datetime(df.index)  
    df = df.iloc[:,-1]
    df.columns = [ str(name)]
    return df

append_df = []
for type in ['BTC','LTC','XRP','LUNA','ADA','SOL','DOT','DOGE','TRX','SUSHI','ETH','BNB']:
    df = load_rate(type)
    print( type + 'USDT.csv' + ' sucessfully loaded.')
    append_df.append(df)
appended_data = pd.concat(append_df, axis = 1)
appended_data.to_csv('funding_rate.csv')

