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

Replace portfolio operation with compactPortfolio #39

Merged
merged 2 commits into from
Oct 29, 2023

Conversation

miry
Copy link
Contributor

@miry miry commented May 11, 2023

TradeRupublic made some changes in API.
Replace single command portfolio with multiple commands: compactPortfolio, instrument and tick.

As sidecar change show the name of the ISIN.

It also copy changes from #29.

Steps:

First merge: #29
Then need to rebase this changes.

closes: #37

# self.payoutCash = response
else:
print(f"unmatched subscription of type '{subscription['type']}':\n{preview(response)}")

if recv == 2:
return
await self.tr.unsubscribe(subscription_id)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure there is no new events for processed messages.

print()
# for x in ['netValue', 'unrealisedProfit', 'unrealisedProfitPercent', 'unrealisedCost']:
# print(f'{x:24}: {self.portfolio[x]:>10.2f}')
# print()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to think to calculate overall portfolio changes.

marzzzello added a commit that referenced this pull request Oct 29, 2023
* miry-miry_master:
  If multiple documents would have the same file path when downloading, try to append the document id to make the file path unique.
  Show name of the isin in portfolio and use real netvalue
  Use compactPortfolio
@marzzzello marzzzello merged commit fcc7466 into pytr-org:master Oct 29, 2023
@miry miry deleted the miry_master branch October 29, 2023 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BAD_SUBSCRIPTION_TYPE error for pytr portfolio
2 participants