https://github.com/a0s/tinkoff-invest-status
Obtains Tinkoff Invest balance in JSON to stdout
https://github.com/a0s/tinkoff-invest-status
cli currencies golang mtmr tinkoff
Last synced: 2 months ago
JSON representation
Obtains Tinkoff Invest balance in JSON to stdout
- Host: GitHub
- URL: https://github.com/a0s/tinkoff-invest-status
- Owner: a0s
- Created: 2021-02-04T13:03:49.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-04T17:18:16.000Z (over 5 years ago)
- Last Synced: 2025-01-06T02:12:10.412Z (over 1 year ago)
- Topics: cli, currencies, golang, mtmr, tinkoff
- Language: Go
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
tinkoff-invest-status
=====================
Works with [Tinkoff Invest OpenAPI](https://github.com/TinkoffCreditSystems/invest-openapi). Returns portfolio and
currencies to STDOUT in JSON format.
How to use
----------
1) Obtain Tinkoff Invest token from [https://www.tinkoff.ru/invest/settings/](https://www.tinkoff.ru/invest/settings/)
2) Download the latest release
```shell
cd $HOME
wget https://github.com/a0s/tinkoff-invest-status/releases/latest/download/tinkoff-invest-status
chmod +x tinkoff-invest-status
```
3) Run it and get full portfolio
```shell
./tinkoff-invest-status --token=%YOUR_TOKEN%
# Select summary by USD with jq
./tinkoff-invest-status --token=%YOUR_TOKEN% | jq '.[].Summary.USD'
```
Using with [MTMR](https://github.com/Toxblh/MTMR)
-------------------------------------------------
Add this into MTMR config
```json
{
"type": "shellScriptTitledButton",
"width": 150,
"refreshInterval": 15,
"source": {
"inline": "echo \"USD $($HOME/tinkoff-invest-status --token=%YOUR_TOKEN% | /usr/local/bin/jq '.[].Summary.USD')\""
},
"actions": [],
"align": "right",
"bordered": false
}
```
Known problems
-------------
- Tinkoff Invest API has some limits on request frequency. In some cases, you need to increase `refreshInterval` up to 30s.