Skip to content

sunCelery/quote_wss_api

Repository files navigation

quotes_wss_api

Table of content

Description

Program consist of:

  • fault-tolerant service for getting quotes

    • working file: quotes_daemon.py
    • This service establish connection to OKX public-WSS servers and every 5 seconds is getting quotes fro currency pairs: BTC-USDT, ETH-USDT, XRP-USDT
    • In case of failure of the remote server for any reason (losing connection, connection restriction, remote server shut down, and etc)
    • Connection switch to Binance publi-WSS servers
    • this loop continues infinite
  • client-server application for getting quotes:

  • locust load testing app

    • working file: locust_load_test.py
    • perfoms load-testing for 1500 requests per second
    • the test lasts 30 seconds and then print out information into:
      • file: log/locust_load_test.log
      • and in terminal

Install

To install and run the app use command in terminal:

docker-compose up

To install and run the locust-load-test use command in terminal:

docker-compose --file docker-compose-locust.yml up

Usage

after command

docker-compose up

client-server app could be used through http://0.0.0.0:8000 endpoint link to the endpoint will be shown in terminal where you have ran docker-compose up

To Do

  • [] refactor quotes_daemon.py, logic of function need to be less complecated, probably need second layer of abstraction like class with at least 3 function inside

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors