Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Incorrect calculation of available currencies #101

Closed
Tim55667757 opened this issue Nov 28, 2022 · 1 comment
Closed

Incorrect calculation of available currencies #101

Tim55667757 opened this issue Nov 28, 2022 · 1 comment
Assignees
Labels
Error It's a BUG! Or just something isn't working...
Milestone

Comments

@Tim55667757
Copy link
Owner

## Portfolio distribution by assets

| Type                               | Uniques | Percent | Current cost       |
|------------------------------------|---------|---------|--------------------|
| Ruble                              | 1       | 96.93%  | 290230.05 rub      |
| Currencies                         | 3       | 0.04%   | 125.33 rub         |
| Shares                             | 2       | 3.03%   | 9076.60 rub        |

But in overview:

* **Portfolio cost:** 299431.98 RUB
* **Changes:** -29.95 RUB (-0.01%)

## Open positions

| Ticker [FIGI]               | Volume (blocked)                | Lots     | Curr. price  | Avg. price   | Current volume cost | Profit (%)                   |
|-----------------------------|---------------------------------|----------|--------------|--------------|---------------------|------------------------------|
| **Ruble:**                  |            290230.05 (0.00) rub |          |              |              |                     |                              |
|                             |                                 |          |              |              |                     |                              |
| **Currencies:**             |                                 |          |              |              |          125.33 RUB |                              |
| EUR_RUB__TOM [BBG0013HJJ31] |              1000.00 (0.00) eur | —        |    63.57 rub |    63.48 rub |           63.57 rub | +82.50 rub (+0.13%)          |
| RUB000UTSTOM [RUB000UTSTOM] |            166027.88 (0.00) rub | —        |     1.00 rub |     1.00 rub |            1.00 rub | 0.00 rub (0.00%)             |
| USD000UTSTOM [BBG0013HGFT4] |              1000.00 (0.00) usd | —        |    60.76 rub |    60.73 rub |           60.76 rub | +27.50 rub (+0.05%)          |
|                             |                                 |          |              |              |                     |                              |
@Tim55667757 Tim55667757 added the Error It's a BUG! Or just something isn't working... label Nov 28, 2022
@Tim55667757 Tim55667757 added this to the release-1.6 milestone Nov 28, 2022
@Tim55667757 Tim55667757 self-assigned this Nov 28, 2022
Tim55667757 added a commit that referenced this issue Feb 14, 2023
@Tim55667757
Copy link
Owner Author

Bug fixed in v1.6.dev150

Debug build: https://app.travis-ci.com/github/Tim55667757/TKSBrokerAPI/builds/260647729
PyPI artifact for testing: https://pypi.org/project/tksbrokerapi/1.6.dev150/

Test:
image

# Client's portfolio

* **Actual on date:** [2023-02-14 19:59:01 UTC]
* **Account ID:** [2208805297]
* **Portfolio cost:** 582458.21 RUB
* **Changes:** -7253.45 RUB (-1.23%)

## Open positions

| Ticker [FIGI]               | Volume (blocked)                | Lots     | Curr. price  | Avg. price   | Current volume cost | Profit (%)                   |
|-----------------------------|---------------------------------|----------|--------------|--------------|---------------------|------------------------------|
|                             |                                 |          |              |              |                     |                              |
| **Currencies:**             |                                 |          |              |              |   **163297.35 RUB** |                              |
| USD000UTSTOM [BBG0013HGFT4] |                 0.34 (0.00) usd | —        |    73.80 rub |    71.87 rub |           25.09 rub | +0.66 rub (+2.70%)           |
| RUB000UTSTOM [RUB000UTSTOM] |              1241.97 (0.00) rub | —        |     1.00 rub |     1.00 rub |         1241.97 rub | 0.00 rub (0.00%)             |
| EUR_RUB__TOM [BBG0013HJJ31] |                 0.22 (0.00) eur | —        |    79.25 rub |    76.24 rub |           17.43 rub | +0.66 rub (+3.93%)           |
| HKDRUB_TOM [BBG0013HSW87]   |             17000.30 (0.00) hkd | —        |     9.53 rub |     9.46 rub |       162012.86 rub | +1105.53 rub (+0.69%)        |
|                             |                                 |          |              |              |                     |                              |
| **Shares:**                 |                                 |          |              |              |   **404250.35 RUB** |                              |
| LKOH [BBG004731032]         |                           6 (0) | 6        |  3918.00 rub |  3935.50 rub |        23508.00 rub | -105.00 rub (-0.44%)         |
| 3888 [BBG000TF4XZ9]         |                          30 (0) | 3        |    29.55 hkd |    29.60 hkd |          886.50 hkd | -1.50 hkd (-0.17%)           |
| YNDX [BBG006L8G4H1]         |                           4 (0) | 4        |  2027.40 rub |  2069.40 rub |         8109.60 rub | -168.00 rub (-2.03%)         |
| NLMK [BBG004S681B4]         |                          70 (0) | 7        |   123.54 rub |   126.72 rub |         8647.80 rub | -222.60 rub (-2.51%)         |
| AFLT [BBG004S683W7]         |                         910 (0) | 91       |    27.85 rub |    28.48 rub |        25343.50 rub | -576.90 rub (-2.23%)         |

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Error It's a BUG! Or just something isn't working...
Projects
None yet
Development

No branches or pull requests

1 participant