Skip to content

Files

Latest commit

 

History

History

grpc_advanced

grpc demo

  • MarketDataService implements GetOHLC RPC call.
  • GetOHLC takes in the list of stocks as well as the start and the end dates.
  • GetOHLC returns the open, high, low, close prices for the given list of stocks.

How to Run

  1. Create an virtualenv and install requirements.

    cd grpc
    pip3 install -r requirements.txt
  2. (Optional) Generate the compiled files.

    python -m grpc_tools.protoc --proto_path=. --python_out=. --grpc_python_out=. market_data.proto
  3. Run Server in one terminal window:

    python3 server.py
  4. Run Client in another terminal:

    python3 server.py