Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Include class name while serializing NamedTuple #668

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

t1user
Copy link
Contributor

@t1user t1user commented Dec 6, 2023

Before:

[...]
 'fills': [{'contract': {'Future': {'secType': 'FUT',
      'conId': 603558783,
      'symbol': 'YM',
      'lastTradeDateOrContractMonth': '20231215',
      'right': '?',
      'multiplier': '5',
[...]

After:

[...]
  'fills': [{'Fill': {'contract': {'Future': {'secType': 'FUT',
       'conId': 603558783,
       'symbol': 'YM',
       'lastTradeDateOrContractMonth': '20231215',
       'right': '?',
       'multiplier': '5',
       'exchange': 'CBOT',
       'currency': 'USD',
       'localSymbol': 'YM   DEC 23',
       'tradingClass': 'YM'}},
     'execution': {'Execution': {'execId': '0000e1a7.656fc43c.01.01',
       'time': '2023-12-06T09:48:35+00:00',
    [...]

It's much easier to de-serialize if class name is included.

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

Successfully merging this pull request may close these issues.

1 participant