Code Monkey home page Code Monkey logo

cybex-python-demo's Introduction

WELCOME To CYBEX Python API Demo

This is the python demo for CYBEX Python API.

Quick Start

cybex_demo.py can be used as a quick start to use Cybex Python API.

The CYBEX Python API is able to sign a transactions with the provided private key. The standalone Cyb Signer is not required if you use the CYBEX Python API.

Please prepare below information before using cybex-demo.py:

  1. Account Name
  2. Private Key

Usage:

python3 cybex-demo.py <account name> <private key>
e.g. python3 cybex-demo.py test_user 5JbxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxXd

Note: Please use python3, you may encounter problems if python2 is used.

Cybex API Connector (required Cyb Signer) - to be deprecated

cybexapi_connector.py provides 2 wrappers.

One wraps around the CYBEX Restful API server.

The Cybex API server mainly provides API calls to send transaction, query position, query order, etc

The other one wraps the Transaction Signer.

Transaction Signer provies 3 api calls to provide signature to new order, cancel and cancel all orders.

Auto Trader

autotrader.py is a sample (simple) strategy implemented using python. It looks at huobi's market data, calculate 1 minute MACD crossing signals.

Whenever the MACD cross up, the auto-trader buys.

Whenever the MACD corss down,the auto-trader sells.

This auto-trader will require a config.ini to contain API keys for the Huobi market data api.

Note: Currently auto trader is not updated to use latest cybex python api, it still requires cyb signer.

The Cyb Signer is a standalone Java program, it provides a way to sign a transaction through RESTful API.

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.