Code Monkey home page Code Monkey logo

woo-algotrading-sdk's Introduction

woo algo trading sdk

A python developer kit for rapid algo trading development, notably the use of event callbacks.

Logging Usage

  • woo_sdk includes rotational logger (deletes log past one day)
  • DAILY, HOURLY, EOD processes logged by default
  • logger can be used anywhere else in code
sdk.logger.debug("text)
sdk.logger.info("text)
sdk.logger.warning("text)
sdk.logger.error("text)
sdk.logger.critical("text)

Scheduler Usage

  • CACHER, DAILY, HOURLY, EOD point to function references (remove parenthesis)
  • STOP_TIME takes a (str) time to stop and run the EOD process

Note : scheduler may ommit certain process if not needed (i.e. ommiting DAILY, HOURLY, or EOD)

import woo_sdk as sdk

def caching_process():
    sdk.logger.info('* i am caching')

def hourly_process(return_data, strategy_name):
    sdk.logger.info(f"({strategy_name}) i am hourly")

def daily_process(return_data, strategy_name):
    sdk.logger.info(f"({strategy_name}) i am daily")

def eod_process(return_data, strategy_name):
    sdk.logger.info(f"({strategy_name}) i am eod")

sdk.scheduler.run(
    DAILY  = daily_process,
    HOURLY = hourly_process,
    EOD    = eod_process,
    ########################
    STOP_TIME = "16:00",
    CACHER    = caching_process
)

Sleep usage

  • allows computer to sleep until "nextMinute" or "nextHour" or half hour when "HALF=True"
import woo_sdk as sdk

sdk.sleep.nextMinute()
sdk.sleep.nextHour()
sdk.sleep.nextHour(HALF=True)

woo-algotrading-sdk's People

Contributors

ltanedo avatar

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.