I have my Python deploy Dallas' excellent Log Winner baf, then once the market closes I retrieve the Stored values and Pnl, then write to csv. I've not found a way to do it natively via the API yet
Log Winner.baf
You do not have the required permissions to view the files attached to this post.