Save data from TWS API to csv file
问题 I have a python script that reads data from the TWS API (Interactive Brokers) and want to dump the data in a csv file. Right now it just overwrites the data and prints the last line along with a bunch of other values I don't want. It prints out the values fine with print(df). Code: from ibapi.client import EClient from ibapi.wrapper import EWrapper from ibapi.common import * from ibapi.contract import * from threading import Timer from ibapi.ticktype import * import pandas as pd import numpy