Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore adjust ccxt usage Mar 25, 2019
README.MD update README.MD Mar 15, 2019
autotrader.py fix ccxt huobi functioncall param Mar 28, 2019
binanceapi.py
config_template.ini adjust config Mar 26, 2019
cybex-demo.py
cybexapi_connector.py
log.txt Add cybex-demo Dec 20, 2018
ordermanager.py use cybex python api Mar 14, 2019

README.MD

WELCOME To CYBEX ROME API Demo

This is the python demo for CYBEX ROME API.

Quick Start

The demo applicationcybex_demo.py can be used as a quick start to the CYBEX ROME API.

Use Password for Authentication

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

  1. Account Name
  2. Password

The Account Name and Password are the cloud wallet account name and password you use to logon to the CYBEX exchange at https://dex.cybex.io/.

Usage:

python3 cybex-demo.py -n <account name> -p <password>
e.g. python3 cybex-demo.py -n test_user -p xxxxxxxx

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

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 the latest CYBEX ROME API, it still requires cyb signer (see below).


Optional Usage

Use Private Key for Authentication

The Private Key can also be used for authentication to use the ROME API. The Private Key, however, is NOT the password you use for the web logon.

To find your private key, go to https://olddex.cybex.io (NOTE that this is the old version):

  1. logon with your account name and password
  2. on the top left of the web page, go to ACCOUNT, then to the middle left of the page, click 'Permissions'
  3. under 'Active Permissions'->ACCOUNT/KEY/ADDRESS, click the public key string, which looks like CYB81SdxxxxxxxxxxxxxxxxxxxxxxxxJW
  4. on the pop up box titled 'Private key viewer', click 'SHOW', then the private key string will be shown under 'Private key (WIF - Wallet Import Format)', which looks like '5HyMuxxxxxxxxxxxxxxxxxxxxxxxxxx4ka'
  5. copy and save the private key string in a secure place to use with the CYBEX ROME API

Usage:

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

Cybex API Connector (Cyb Signer Required)

cybexapi_connector.py provides two 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.

Cyb Signer

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

You can’t perform that action at this time.