Socket
Socket
Sign inDemoInstall

trade-utils

Package Overview
Dependencies
11
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    trade-utils

Algo trading utils package. Zero test-coverage so please cross your fingers prior use.


Maintainers
1

Readme

algo

Set of tools for algorithmic trading

Contributing

To get started install pipenv

Install dependencies

pipenv install --dev

Active environment

pipenv shell

To use VSCode Pyhton: Select Interpreter and choose suggested PipEnv environment.

At this point version update is manual.

Building And uploading

python -m build
twine upload ./dist/* --verbose

Local run for dev

docker compose up
pipenv shell
export CONFIG_FILE=~/config-container/config.yml
python -m algo

TODO:

  • add tests [important] way to many things are dangling on the expectations of valid functioning ie: caching and valid rehidration
  • make config retry loading config file ie do not assign empty config on fail Now it raises error only once on the first attempt to access config. Then it returns empty/default values

DONE:

  • 11/07/22: make install_requires dynamic based on Pipfile
  • 10/07/22: implement multiprocess caches see :synccache: mark. In order to make only one process to call the data retrieval function. to do so: done
    1. keep the temporary cache value as a global lock aka '{cache_key}-loading' its presense mean that one process is loading the data and cache will be available soon
    2. main: loading process should create this special value and start loading data
    3. others: on this cache availability should sleep before the data will become available
    4. main: after data is loaded set cache value and remove the locking entry
    5. others: should poll until there is no such value in the table then read the cached data or take the role of main process

to run test:

python -m unittest discover -p "*_test*" -v  

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc