Git Product home page Git Product logo

obadiah's Introduction

Obadiah

Obadiah (Order Book Analytics Database) is a system consisting of (i) a Python module for capturing raw high-frequency data from an exchange, (ii) a PostgreSQL database for processing & storing the captured data and (iii) the R package for rendering the processed data in the format suitable for visualization by obAnalytics R package.

To access the database one needs to get a signed SSL certificate as described here. Afterwards it is possible to connect:

config <- config::get()
con <- DBI::dbConnect(RPostgres::Postgres(), user=config$user,dbname=config$dbname, host=config$host,
                      port=config$port, sslmode="require", sslrootcert=config$sslrootcert,
                      sslcert=config$sslcert,sslkey=config$sslkey,bigint="numeric")

Having the connection established, one need to choose the exchange, pair and period.

Currently the database contains data from the following exchanges:

library(lubridate, quietly = T, warn.conflicts=F)

start.time <- with_tz(ymd_hms('2019-05-13 17:56:00+03'), tz='Europe/Moscow')
end.time <- with_tz(ymd_hms('2019-05-13 18:00:00+03'), tz='Europe/Moscow')
exchange <- 'Bitfinex'
pair <- 'BTCUSD'

Now the data can be downloaded

depth <- obadiah::depth(con,start.time, end.time, exchange, pair)
spread <- obadiah::spread(con,start.time, end.time, exchange, pair)
trades <- obadiah::trades(con,start.time, end.time, exchange, pair)

and visualized

obAnalytics::plotPriceLevels(depth, spread, trades, start.time = start.time, end.time = end.time )

obadiah provides data for all visualisation functions in obAnalytics package.

depth.summary <- obadiah::depth_summary(con,start.time, end.time, exchange, pair)
obAnalytics::plotVolumePercentiles(depth.summary, start.time = start.time, end.time = end.time )

events <- obadiah::events(con,start.time, end.time, exchange, pair)
obAnalytics::plotEventMap(events, start.time = start.time, end.time = end.time)

obAnalytics::plotVolumeMap(events,  start.time = start.time, end.time = end.time, log.scale = T)

order.book <- obadiah::order_book(con, start.time, exchange, pair)
obAnalytics::plotCurrentDepth(order.book)

obadiah's People

Contributors

petr-fedorov avatar

Watchers

 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.