GitXplorerGitXplorer
i

lobq

public
1 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
84f1b61000fa737fbd18946d92e52906f6163d52

Fixed README

iiRhonin committed 5 years ago
Unverified
dfed96309e62eff96ee7ba9c6a1cb9243a961aa1

Some renaming and fixes

iiRhonin committed 5 years ago
Unverified
59ca8430692df9f0a802b57937083d31fa8e3471

Coding style

iiRhonin committed 5 years ago
Unverified
46bd38b88aa58b789bd882b34dfbb0d8b77f6dc4

Added readme

iiRhonin committed 5 years ago
Unverified
e731a5f4c3d0e33180f321684d8cf7f2d0cbd8c4

Added comments

iiRhonin committed 5 years ago
Unverified
19c4ab0511f7dc8eb62940f2694e5ed00dea312c

Improvments

iiRhonin committed 5 years ago

README

The README file for this repository.

Project description

Fast Lob Queue

Implemented in C and complied in order to achive high performance, 5x time faster than numpy implementation.

See profile documention for more benchmarks.

Installation (Python >= 3.6)

$ git clone git@github.com:ArashFatahzade/lobq.git

or

$ git clone https://github.com/ArashFatahzade/lobq.git

$ cd lobq/
$ pip3 install cython  # Can not intall via dependencies
$ pip3 install -e .  # Add a sudo before the command for global

Tests

$ pytest -v # -v for verbos log

Usage

from lobq import LobQ

q = LobQ(cap=10)  # Queue Size 

lob_item = dict(
    time='2016-01-11T00:12:40',
    ask_pr=[1.17, 1.20, 1.25],
    bid_pr=[1.21, 1.20, 1.19], 
    ask_vol=[5.4, 4.2, 1.1],
    bid_vol=[2.4, 1.2, 4.1],
)

q.append(lob_item)

len(q)

q.peek(lob_item['time'])

q[0]  # Newest item
q[-1]  # Oldest item