Skip to content

mfinancecombr/finance-wallet-api

This branch is 1 commit ahead of master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8ca3817 · Jan 3, 2022

History

27 Commits
Jan 3, 2022
Jan 3, 2022
Jan 3, 2022
Aug 30, 2020
Aug 30, 2020
Jul 25, 2020
Jan 3, 2022
Jul 25, 2020
Aug 8, 2020
Jul 25, 2020
Aug 8, 2020
Aug 29, 2020
Jan 3, 2022
Jan 3, 2022
Jul 27, 2020

Repository files navigation

Finance Wallet

Dependencies

  • golang
  • mongodb

Installing dependencies

make setup

Run it

make run

Docs

http://localhost:8889/swagger/index.html

Examples:

  • Adding portfolio:
curl \
  http://localhost:8889/api/v1/portfolios \
  -X POST \
  -H 'Content-Type: application/json' \
  -d '{"name": "Default", "slug": "default"}'
  • Adding brokers:
curl \
  http://localhost:8889/api/v1/brokers \
  -X POST \
  -H 'Content-Type: application/json' \
  -d '{"name": "CLEAR", "slug": "clear"}'
  • Adding stocks operations:
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"}'
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 licensed under CC0 Public Domain Licence.