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

[BUG]: Unmapped AccountActivityType Leading to SDK Error #764

Closed
1 task done
Chacoon3 opened this issue Nov 5, 2024 · 1 comment · Fixed by #765
Closed
1 task done

[BUG]: Unmapped AccountActivityType Leading to SDK Error #764

Chacoon3 opened this issue Nov 5, 2024 · 1 comment · Fixed by #765
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Chacoon3
Copy link
Contributor

Chacoon3 commented Nov 5, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

The account activity type Option Trade, with its string value being OPTRD is not mapped in the client SDK. Therefore, whenever I fetch my account activities, for example, using the ListAccountActivitiesAsAsyncEnumerable method, and when my activities have at least one record of Option Trade, the client SDK will raise a JSON parsing error because the enum value of Option Trade is not listed in the enum class AccountActivityType.

Expected Behavior

All the methods that dela with account activities should be able to correctly parse them given the presence of option trade activity.

Steps To Reproduce

This is going to be a little difficult to reproduce as you need to:
1. sell a put option
2. wait till it expires in-the-money
3. wait till it gets automatically assigned, so that an account activity of option trade will be added to your account.
4. and then you can reproduce this bug query your past account activities.

Environment

- SDK Version: 7.1.1 and 7.1.2
- OS (version, bitness): 
- .NET SDK (version):8.0
- target process .NET version/bitness:

Anything else?

Hopefully this could be debugged in soon as it now makes it impossible for me to query my real-account activities.
It can be fixed by adding the Option Trade as an enum value to the account activity enum class, you need to specify [EnumMember(Value = "OPTRD")]

@Chacoon3
Copy link
Contributor Author

Chacoon3 commented Nov 5, 2024

Just issued a pull request to add that missing enum value to the account activity type. Please refer to the #765 for detail.

@Chacoon3 Chacoon3 changed the title [BUG]: Unmatched AccountActivityType Leading to SDK Error [BUG]: Unmapped AccountActivityType Leading to SDK Error Nov 6, 2024
@OlegRa OlegRa self-assigned this Nov 10, 2024
@OlegRa OlegRa added the bug Something isn't working label Nov 10, 2024
@OlegRa OlegRa added this to the SDK 7.x LTS milestone Nov 10, 2024
@OlegRa OlegRa linked a pull request Nov 10, 2024 that will close this issue
5 tasks
OlegRa added a commit that referenced this issue Nov 10, 2024
OlegRa added a commit that referenced this issue Nov 10, 2024
…tivityType` enum with fallback value.

(cherry picked from commit da5e307)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants