Skip to content

Latest commit

 

History

History
59 lines (35 loc) · 1.91 KB

README.rst

File metadata and controls

59 lines (35 loc) · 1.91 KB

capp-futures

Couchapp for futures baked by couchapp.py.

Push to CouchDB

  1. Create .couchapprc in dir futures:

    {
        "env" : {
            "default" : {
                "db" : "http://username:password@localhost:5984/market"
            }
        }
    }
    
  2. cp futures/.couchapprc options/

  3. make

Usage

Settlement endpoint:

curl 'http://localhost:5984/futures-kbar/_design/profile/_list/settlement/settlement?startkey=\["TX","2020-01-01"\]&endkey=\["TX\ufff0"\]&header=true'

n sec K Bar endpoint, specified via tf argument which stands for timeframe:

curl 'http://localhost:5984/futures-kbar/_design/profile/_list/kbar/by_sym?startkey=\["TX"\]&endkey=\["TX\ufff0"\]&tf=2&include_docs=true&header=true'

curl 'http://localhost:5984/market/_design/profile/_list/kbar/by_sym?startkey=\["TX","2020-03-01"\]&endkey=\["TX",\{\}\]&include_docs=true&tf=3600'

Vol Bar:

curl 'http://localhost:5984/futures-volbar/_design/volprofile/_list/volbar/by_sym?include_docs=true&startkey=\["TX","2020-03-19"]&endkey=\["TX",\{\}\]&tf=60'

Tick Bar:

curl 'http://localhost:5984/market/_design/futures/_list/tickbar/tick/tickbar?startkey=\["TX","2020-01-01"\]&endkey=\["TX\ufff0"\]&tf=3600'

Dev Notes