MarketDataService
implementsGetOHLC
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.
-
Create an virtualenv and install requirements.
cd grpc pip3 install -r requirements.txt
-
(Optional) Generate the compiled files.
python -m grpc_tools.protoc --proto_path=. --python_out=. --grpc_python_out=. market_data.proto
-
Run Server in one terminal window:
python3 server.py
-
Run Client in another terminal:
python3 server.py