https://github.com/mfinancecombr/finance-wallet-api
Finance Wallet API
https://github.com/mfinancecombr/finance-wallet-api
acoes api bovespa bovespa-api bovespa-stocks fii finance golang stocks stocks-api tesouro-direto
Last synced: 5 months ago
JSON representation
Finance Wallet API
- Host: GitHub
- URL: https://github.com/mfinancecombr/finance-wallet-api
- Owner: mfinancecombr
- License: bsd-3-clause
- Created: 2020-04-24T03:26:10.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-01-10T04:38:17.000Z (over 4 years ago)
- Last Synced: 2024-06-19T04:22:06.431Z (almost 2 years ago)
- Topics: acoes, api, bovespa, bovespa-api, bovespa-stocks, fii, finance, golang, stocks, stocks-api, tesouro-direto
- Language: Go
- Homepage: https://mfinance.com.br/swagger/index.html
- Size: 526 KB
- Stars: 11
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Finance Wallet
## Dependencies
* golang
* mongodb
### Installing dependencies
```bash
make setup
```
## Run it
```bash
make run
```
## Docs
http://localhost:8889/swagger/index.html
## Examples:
* Adding portfolio:
```curlrc
curl \
http://localhost:8889/api/v1/portfolios \
-X POST \
-H 'Content-Type: application/json' \
-d '{"name": "Default", "slug": "default"}'
```
* Adding brokers:
```curlrc
curl \
http://localhost:8889/api/v1/brokers \
-X POST \
-H 'Content-Type: application/json' \
-d '{"name": "CLEAR", "slug": "clear"}'
```
* Adding stocks operations:
```curlrc
curl \
http://localhost:8889/api/v1/stocks/operations \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"portfolioSlug": "default", "symbol": "PETR4", "type": "purchase",
"brokerSlug": "clear", "shares": 500, "price": 10,
"date": "2020-04-24T00:00:00Z"}'
```
```curlrc
curl \
http://localhost:8889/api/v1/stocks/operations \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"portfolioSlug": "default", "symbol": "PETR4", "type": "sale",
"brokerSlug": "clear", "shares": 100, "price": 15,
"date": "2020-06-30T00:00:00Z"}'
```
## Third Party
Favicon uses a picture from [icon-library.com][icon-library]
licensed under [CC0 Public Domain Licence][cco].
[icon-library]: http://icon-library.com/icon/icon-finance-15.html
[cco]: https://creativecommons.org/share-your-work/public-domain/cc0/