Skip to content

Unable to process buying and selling Future contracts #40

@MiErnst

Description

@MiErnst

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions