Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to process buying and selling Future contracts #40

Open
MiErnst opened this issue Sep 22, 2024 · 2 comments
Open

Unable to process buying and selling Future contracts #40

MiErnst opened this issue Sep 22, 2024 · 2 comments

Comments

@MiErnst
Copy link
Contributor

MiErnst commented Sep 22, 2024

The following entries could not be processed with the error ValueError(f'Unknown openclose: {openclose}'):

03/04/2024 02:16 PM,Trade,Sell,/CLJ4,Sell,Sell,1,,,,160,1.820,-160,Sold 1 /CLJ4 @ 79.53,Individual...39
03/04/2024 02:12 PM,Trade,Buy,/CLJ4,Buy,Buy,1,,,,0,1.820,0,Bought 1 /CLJ4 @ 79.69,Individual...39

I created the line with the legacy.py referenced from issue #39. But I guess it would also not be processed successfully by the script.
New Format would look like:

2024-03-04T14:16:27+0100,Trade,Sell,SELL,/CLJ4,Future,Sold 1 /CLJ4 @ 79.53,-160.00,1,-160.00,-1.25,-1.82,,,,,,,310910163,USD
2024-03-04T14:12:32+0100,Trade,Buy,BUY,/CLJ4,Future,Bought 1 /CLJ4 @ 79.69,0.00,1,0.00,-1.25,-1.82,,,,,,,310909959,USD
@quantx-heiko
Copy link
Contributor

quantx-heiko commented Sep 23, 2024

I ran your transactions with the adjusted code for reading the new Tasty data format. There was no issue. It has been processed successfully. So we should may be wait until the Pull Request #42 is incorporated.

@laroche
Copy link
Owner

laroche commented Sep 24, 2024

/CL seems to be included with a multiplier of 1000. I've not looked at this issue in detail.

Can you test this again and report back if the current version works ok or if this issueis still open?

Thanks a lot,

Florian La Roche

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants