Example of python trading api code to quote on LedgerX
Clone or download
Latest commit ddbcbe0 Apr 13, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
gdaxx xx Apr 11, 2018
ledx xx Apr 11, 2018
run xx Apr 11, 2018
.gitignore more to ignore, soon everything! Apr 11, 2018
LICENSE Initial commit Apr 11, 2018
README.md \t Apr 12, 2018
key.py xx Apr 11, 2018
options.py doc Apr 12, 2018
param.py parameter driver and mongo/keys retrieval Apr 11, 2018
requirements.txt Merge branch 'master' into usability Apr 11, 2018
spread.py helper scripts Apr 12, 2018
start.py helper scripts Apr 12, 2018
stop.py helper scripts Apr 12, 2018
vol.py helper scripts Apr 12, 2018



Example of python trading api code to quote on LedgerX


python >= 3.6.4

Example code assumes you run a MongoDB server

mongo>use ledgerx
      db.createCollection("capped", { capped : true, size : 20000000} )

mongo>use connections-test
      db.keys.insert_one({'ledgerx-token': 'xxxxxxxxxx'})
      db.keys.insert_one({'mpid': your lx market participant id})
      db.keys.insert_one({'cid': your client id})
      db.keys.insert_one({'ledgerx-baseurl': 'test.ledgerx.com/api'})
      db.keys.insert_one({'ledgerx-market': 'ledgerx-test'}) # db name for logging


virtualvenv venv -p python3 && source venv/bin/activate

pip3 install -r requirements.txt

API Documentation



Trader Documentation


in ledgerx dir:

python3 -m run.run_ledgerx