Git Product home page Git Product logo

go-hft-orderbook's Introduction

Build Status

go-hft-orderbook

Golang implementation of a Limit Order Book (LOB) for high frequency trading in crypto exchanges. Inspired by this article.

Operations

  • Add – O(log M) for the first order at a limit, O(1) for all others
  • Cancel – O(1)
  • GetBestBid/Offer – O(1)
  • GetVolumeAtLimit – O(1)

Performance

  • Random generated insertion with limited number of price levels (10K levels) on average MacBook Pro: ~200ns/op or ~5M op/s

TODO

  • Object pool (Done)
  • Real data for benchmarks

Radicle URN

rad:git:hwd1yregaqj5mrp5dgc3gyuu6exszg84zr71su8j1f7t6oe9czxee1zzyzr

go-hft-orderbook's People

Contributors

alexey-ernest avatar ankit257 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-hft-orderbook's Issues

example

could you please provide a complete example for real use case ?

Match orderbook logic for orders inserted into orderbook

Is there any orderbook matching logic included?

if I add an ask at price = 100.0 (volume = 5.0) and a bid at price 101.0 (volume = 9.0) then I'd expect that these offers would "cross" and the orderbook would have remaining 1 bid order at price = 101.0 with volume = 4.0 along with one trade which is a sell at price = 100.0 for volume = 5.0

Can you please comment on whether "matching" an orderbook is part of the scope of this project?

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.