I want to save the values I want in a csv file. If the file is recorded for the first time, the header names will be saved first. But when I run my code I get the following error. What do you think is the reason?
Thank you for your help
Error:
Traceback (most recent call last):
File "C:/Users/Yunus/PycharmProjects/binance_test/main.py", line 40, in <module>
save_position('ETHUSDT', 'timestamp', 'datetime', 'SELL', '63', '0.034', '3244.11', '3228.44', 'WON', '93.1233223')
File "C:/Users/Yunus/PycharmProjects/binance_test/main.py", line 20, in save_position
positions …Run Code Online (Sandbox Code Playgroud)