Skip to content

getOrders fails on HTTP wire decimal fields and loses broker string order IDs #225

@yodaliu

Description

@yodaliu

getOrders summaries assumed OpenOrder decimal fields were in-process Decimal instances, so HTTP wire responses with string fields could fail with:

order.totalQuantity.equals is not a function

This issue was observed on Alpaca. Not sure if this is a cross-broker wire-format issue. Alpaca also exposes a related order ID problem because Alpaca order IDs are UUID strings, while Order.orderId is numeric and may be 0, so summaries can lose the real broker-native order ID.

Reference:

Expected behavior:

  • getOrders should handle both Decimal instances and HTTP wire string values.
  • UNSET_DECIMAL sentinel values should still be omitted from summaries.
  • Broker-native string order IDs should be preserved when available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions