Skip to content

Commit

Permalink
#124 bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim55667757 committed Feb 15, 2023
1 parent 569163f commit 2d771a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ branches:
only:
- master
- /^release-.*$/
# - develop
- develop

stages:
- env-test-build-publish
Expand Down
8 changes: 4 additions & 4 deletions tksbrokerapi/TKSBrokerAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -1978,10 +1978,10 @@ def Overview(self, show: bool = False, details: str = "full", onlyFiles=False) -
# update dict with free funds for trading (total - blocked) by currencies
# e.g. {"rub": {"total": 10000.99, "totalCostRUB": 10000.99, "free": 1234.56, "freeCostRUB": 1234.56}, "usd": {"total": 250.55, "totalCostRUB": 15375.80, "free": 125.05, "freeCostRUB": 7687.50}}
view["stat"]["funds"][currency] = {
"total": round(volume, 6),
"totalCostRUB": round(costRUB * volume, 6), # total volume cost in rubles
"free": round(volume - blocked, 6),
"freeCostRUB": round(costRUB * (volume - blocked), 6), # free volume cost in rubles
"total": round(statData["volume"], 6),
"totalCostRUB": round(statData["cost"], 6), # total volume cost in rubles
"free": round(statData["volume"] - statData["blocked"], 6),
"freeCostRUB": round(statData["currentPrice"] * (statData["volume"] - statData["blocked"]), 6), # free volume cost in rubles
}

elif item["instrumentType"] == "share":
Expand Down

0 comments on commit 2d771a9

Please # to comment.