Lean icon indicating copy to clipboard operation
Lean copied to clipboard

Order Serialization Order Value Multiplier

Open AlexCatarino opened this issue 1 year ago • 1 comments

Expected Behavior

The "value" field has the value from Order.GetValue method.

Actual Behavior

The multiplier is not taken into account for option:

Time,Symbol,Price,Quantity,Type,Status,Value,Tag 2021-01-08T20:30:00Z,SPXW 210115C03870000,9.1,-5,Market,Filled,-45.5,"CreateIronCondor: Short Call Order placed with strike 3870 at the current SPX of 3816.93."

"orders": {
    "1": {
        ...
        "symbol": {
            "value": "SPXW  210115C03870000",
            "id": "SPXW XL80P536WOB2|SPX 31",
            "permtick": "SPXW  210115C03870000",
            "underlying": {
                "value": "SPX",
                "id": "SPX 31",
                "permtick": "SPX"
            }
        },
        "price": 9.1,
        ...
        "quantity": -5.0,
        ...
        "value": -45.5,

Checklist

  • [x] I have completely filled out this template
  • [x] I have confirmed that this issue exists on the current master branch
  • [x] I have confirmed that this is not a duplicate issue by searching issues
  • [x] I have provided detailed steps to reproduce the issue

AlexCatarino avatar Dec 05 '24 17:12 AlexCatarino

The order Value property is currently deprecated because of this issue, please use Order.GetValue(security) or security.Holdings.HoldingsValue. We could potentially serialize it instead of Value

Martin-Molinero avatar Dec 05 '24 17:12 Martin-Molinero