All Projects → dgtony → orderbook-rs

dgtony / orderbook-rs

Licence: MIT license
Basic order matching engine written in Rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to orderbook-rs

Coinbase.Pro
📈 A .NET/C# implementation of the Coinbase Pro API.
Stars: ✭ 63 (-77.17%)
Mutual labels:  orderbook
roq-samples
How to use the Roq C++20 API for Live Cryptocurrency Algorithmic and High-Frequency Trading as well as for Back-Testing and Historical Simulation
Stars: ✭ 119 (-56.88%)
Mutual labels:  matching-engine
redis-matching-engine-server
Implement exchange matching engine by lua script, run in redis
Stars: ✭ 39 (-85.87%)
Mutual labels:  matching-engine
poloniex-orderbook
Poloniex Orderbook manager
Stars: ✭ 36 (-86.96%)
Mutual labels:  orderbook
dingir-exchange
A high performance crypto trading engine
Stars: ✭ 169 (-38.77%)
Mutual labels:  matching-engine
clob
Simple limit order book and matching engine.
Stars: ✭ 17 (-93.84%)
Mutual labels:  matching-engine
nordnet
Uonfficial wrapper for financial data api from the Scandinavian broker Nordnet
Stars: ✭ 13 (-95.29%)
Mutual labels:  orderbook
sprawl
Alpha implementation of the Sprawl distributed marketplace protocol.
Stars: ✭ 27 (-90.22%)
Mutual labels:  orderbook
matching-engine
Superfast Matching Engine written in golang
Stars: ✭ 35 (-87.32%)
Mutual labels:  matching-engine
clearth
Test automation tool for Clearing, Settlement and Back-Office Systems
Stars: ✭ 26 (-90.58%)
Mutual labels:  trading-systems
uniswap-python
🦄 The unofficial Python client for the Uniswap exchange.
Stars: ✭ 533 (+93.12%)
Mutual labels:  orderbook
bitmex-orderbook
The fastest order book implementation for the BitMEX WebSocket API.
Stars: ✭ 73 (-73.55%)
Mutual labels:  orderbook
LiuAlgoTrader
Framework for algorithmic trading
Stars: ✭ 514 (+86.23%)
Mutual labels:  trading-systems
ccapi
A header-only C++ library for interacting with crypto exchanges. Binding for Python is provided. A spot market making application is also provided as an end-to-end solution for liquidity providers.
Stars: ✭ 227 (-17.75%)
Mutual labels:  orderbook
mmb
Trading bot implemented in Rust, with market making and strategy automation for any exchange or blockchain.
Stars: ✭ 359 (+30.07%)
Mutual labels:  orderbook
cryptoviz
A web-based Depth-Of-Market visualization for data of the Poloniex cryptocurrency exchange.
Stars: ✭ 65 (-76.45%)
Mutual labels:  orderbook
gome
gome- Golang Match Engine, uses Golang for calculations, gRPC for services, ProtoBuf for data exchange, RabbitMQ for queues, and Redis for cache implementation of high-performance matching engine microservices/ gome-高性能撮合引擎微服务
Stars: ✭ 47 (-82.97%)
Mutual labels:  matching-engine
pytradesimulator
Python based exchange simulator using FIX protocol
Stars: ✭ 20 (-92.75%)
Mutual labels:  matching-engine
awesome-pinescript
A Comprehensive Collection of Everything Related to Tradingview Pine Script.
Stars: ✭ 563 (+103.99%)
Mutual labels:  trading-systems
tardis-python
Python client for tardis.dev - historical tick-level cryptocurrency market data replay API.
Stars: ✭ 88 (-68.12%)
Mutual labels:  orderbook

Order matching engine (orderbook)

Project is just a basic order-matching engine (orderbook), created especially for learning Rust and internals of trading systems.

Each instance of orderbook is a single-threaded reactive module for the certain currency pair. It consumes orders and return vector of events, generated during processing.

Supported features:

  • market orders
  • limit orders
  • amending limit order price/quantity
  • cancelling limit order
  • partial filling

Usage

Full example code could be found in bin/example.rs. Here is event log created in processing test orders:

Order => NewLimitOrder { order_asset: BTC, price_asset: USD, side: Bid, price: 0.98, qty: 5.0, ts: SystemTime { tv_sec: 1516040690, tv_nsec: 859954000 } }
Processing => [Ok(Accepted { id: 1, order_type: Limit, ts: SystemTime { tv_sec: 1516040690, tv_nsec: 860016000 } })]
Spread => not available

Order => NewLimitOrder { order_asset: BTC, price_asset: USD, side: Ask, price: 1.02, qty: 1.0, ts: SystemTime { tv_sec: 1516040690, tv_nsec: 859954000 } }
Processing => [Ok(Accepted { id: 2, order_type: Limit, ts: SystemTime { tv_sec: 1516040690, tv_nsec: 860064000 } })]
Spread => bid: 0.98, ask: 1.02

Order => AmendOrder { id: 1, side: Bid, price: 0.99, qty: 4.0, ts: SystemTime { tv_sec: 1516040690, tv_nsec: 859954000 } }
Processing => [Ok(Amended { id: 1, price: 0.99, qty: 4.0, ts: SystemTime { tv_sec: 1516040690, tv_nsec: 860094000 } })]
Spread => bid: 0.99, ask: 1.02

Order => NewLimitOrder { order_asset: BTC, price_asset: USD, side: Bid, price: 1.01, qty: 0.4, ts: SystemTime { tv_sec: 1516040690, tv_nsec: 859955000 } }
Processing => [Ok(Accepted { id: 3, order_type: Limit, ts: SystemTime { tv_sec: 1516040690, tv_nsec: 860119000 } })]
Spread => bid: 1.01, ask: 1.02

Order => NewLimitOrder { order_asset: BTC, price_asset: USD, side: Ask, price: 1.03, qty: 0.5, ts: SystemTime { tv_sec: 1516040690, tv_nsec: 859955000 } }
Processing => [Ok(Accepted { id: 4, order_type: Limit, ts: SystemTime { tv_sec: 1516040690, tv_nsec: 860155000 } })]
Spread => bid: 1.01, ask: 1.02

Order => NewMarketOrder { order_asset: BTC, price_asset: USD, side: Bid, qty: 1.0, ts: SystemTime { tv_sec: 1516040690, tv_nsec: 859955000 } }
Processing => [Ok(Accepted { id: 5, order_type: Market, ts: SystemTime { tv_sec: 1516040690, tv_nsec: 860180000 } }), Ok(Filled { order_id: 5, side: Bid, order_type: Market, price: 1.02, qty: 1.0, ts: SystemTime { tv_sec: 1516040690, tv_nsec: 860183000 } }), Ok(Filled { order_id: 2, side: Ask, order_type: Limit, price: 1.02, qty: 1.0, ts: SystemTime { tv_sec: 1516040690, tv_nsec: 860183000 } })]
Spread => bid: 1.01, ask: 1.03

Order => NewLimitOrder { order_asset: BTC, price_asset: USD, side: Ask, price: 1.05, qty: 0.5, ts: SystemTime { tv_sec: 1516040690, tv_nsec: 859955000 } }
Processing => [Ok(Accepted { id: 6, order_type: Limit, ts: SystemTime { tv_sec: 1516040690, tv_nsec: 860248000 } })]
Spread => bid: 1.01, ask: 1.03

Order => CancelOrder { id: 4, side: Ask }
Processing => [Ok(Cancelled { id: 4, ts: SystemTime { tv_sec: 1516040690, tv_nsec: 860291000 } })]
Spread => bid: 1.01, ask: 1.05

Order => NewLimitOrder { order_asset: BTC, price_asset: USD, side: Bid, price: 1.06, qty: 0.6, ts: SystemTime { tv_sec: 1516040690, tv_nsec: 859955000 } }
Processing => [Ok(Accepted { id: 7, order_type: Limit, ts: SystemTime { tv_sec: 1516040690, tv_nsec: 860320000 } }), Ok(PartiallyFilled { order_id: 7, side: Bid, order_type: Limit, price: 1.05, qty: 0.5, ts: SystemTime { tv_sec: 1516040690, tv_nsec: 860325000 } }), Ok(Filled { order_id: 6, side: Ask, order_type: Limit, price: 1.05, qty: 0.5, ts: SystemTime { tv_sec: 1516040690, tv_nsec: 860325000 } })]
Spread => not available
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].