Code Monkey home page Code Monkey logo

task2's Introduction

Stock Trading Backend

Stock Trading Backend made with Python Flask

API Reference

Authentication

  POST /api/login
Parameter Type Description
email string Required. Your email
password string Required. Your password
  POST /api/register
Parameter Type Description
email string Required. Your email
password string Required. Your password
uname string Required. Your user name

Log Out

  POST /api/logout

Test Auth Token

  POST /api/token_test

pass bearer token for testing token

Get new Auth token

  POST /api/new_token

Stocks

Add new asset

  GET /api/add_stock
Parameter Type Description
name string Required. name of asset
balance string Required. balance of asset

Get user portfolio

  GET /api/get_stock

Sell Stock

  GET /api/sell_stock
Parameter Type Description
aid string Required. asset Id
amount string Required. amount to sell

Sell Stock

  GET /api/buy_stock
Parameter Type Description
aid string Required. asset Id
amount string Required. amount to buy

Get Price

  Socket /

Send name of cryptocurrency to get latest price

Installation

Install requirements

  pip3 install -r requirements.txt

Running Tests

To run tests, run the following command

  python3 test.py

Deployment

To deploy this project run

  npm run deploy

Run Locally

Start the server

  python3 app.py

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.