/FolioTrack

API to manage and track trades, portfolio and returns.

Primary LanguagePythonMIT LicenseMIT

FolioTrack 📈

MIT License PR's Welcome Issues FolioTrack Ping Endpoint

API to manage and track trades, portfolio and returns.

How is this tool helpful?

  • FolioTrack can be used to record trades and maintain personal portfolio.
  • It is intended to be an exploratory learning project to understand the nuances and edge cases of a financial-securities related product.

Key Features

  • Create trades by providing a price, action (BUY or SELL), quantity, and ticker symbol of the security.
  • Fetch all trades for corresponding securities.
  • Modify trade parameters like price, action or quantity.
  • Cancel trades, which will not delete them but mark them an not active.
  • Fetch a portfolio summary that returns net quantity and average price for all securities held.
  • Fetch returns for the portfolio against current ticker price.
  • Strict validation for final securities quantity to always be non-negative.

Tech Stack

Languages

  • Flask | Python 3.9
  • Firestore | NoSQL DB
  • Heroku

API Documentation

  • Fetch Trades
    • Endpoint - /api/trade
    • Method - GET
    • Required parameters - None
    • Fetch all Trades
    • Optional parameters
  • Create / Add Trade
    • Endpoint - /api/trade
    • Method - POST
    • Required Parameters (application/json)
      • price - Price at which the trade is to be considered executed. Type - float
      • action - Either BUY or SELL. Type - string
      • quantity - Quantity of securities. Type - float (consider crypto)
      • ticker - Ticker Symbol of the security. Type - string
      • BUY 1000 $DOGEUSD @ 0.4 | SELL 10 $DOGEUSD @ 1.0
  • Update / Modify Trade
  • Cancel / Remove Trade
    • Endpoint - /api/trade
    • Method - DELETE
    • Required Parameters (application/json)
      • tradeId - Trade ID to be deleted. Type - string
    • Cancel $DOGEUSD Sell Order
  • Fetch Portfolio Summary
  • Fetch Portfolio Returns
  • Ping Endpoint
    • Endpoint - /ping
    • Method - ANY
    • Required Parameters - None
    • Send ping