All Projects → ArjunVachhani → Order Matcher

ArjunVachhani / Order Matcher

simple matching engine supports limit, market, stop-loss, iceberg, IOC, FOK, GTD orders

Projects that are alternatives of or similar to Order Matcher

Alphapy
Automated Machine Learning [AutoML] with Python, scikit-learn, Keras, XGBoost, LightGBM, and CatBoost
Stars: ✭ 564 (+2463.64%)
Mutual labels:  cryptocurrency, trading, stocks
Tradingview Trainer
A lightweight app for practicing your trading on Tradingview
Stars: ✭ 106 (+381.82%)
Mutual labels:  cryptocurrency, trading, stocks
Stocksharp
Algorithmic trading and quantitative trading open source platform to develop trading robots (stock markets, forex, crypto, bitcoins, and options).
Stars: ✭ 4,601 (+20813.64%)
Mutual labels:  cryptocurrency, trading, stocks
Fastquant
fastquant — Backtest and optimize your trading strategies with only 3 lines of code!
Stars: ✭ 457 (+1977.27%)
Mutual labels:  cryptocurrency, stocks
Crypto Exchanges Gateway
Your gateway to the world of crypto !
Stars: ✭ 343 (+1459.09%)
Mutual labels:  cryptocurrency, trading
Tribeca
A high frequency, market making cryptocurrency trading platform in node.js
Stars: ✭ 3,646 (+16472.73%)
Mutual labels:  cryptocurrency, trading
Bxbot
A simple Bitcoin trading bot written in Java.
Stars: ✭ 515 (+2240.91%)
Mutual labels:  cryptocurrency, trading
Qtbitcointrader
Secure multi crypto exchange trading client
Stars: ✭ 520 (+2263.64%)
Mutual labels:  cryptocurrency, trading
Python Poloniex
Poloniex API wrapper for Python 2.7 & 3
Stars: ✭ 557 (+2431.82%)
Mutual labels:  cryptocurrency, trading
Gym Anytrading
The most simple, flexible, and comprehensive OpenAI Gym trading environment (Approved by OpenAI Gym)
Stars: ✭ 627 (+2750%)
Mutual labels:  trading, stocks
Python Bittrex
Python bindings for bittrex
Stars: ✭ 601 (+2631.82%)
Mutual labels:  cryptocurrency, trading
Coinbase Pro Trading Toolkit
DEPRECATED — The Coinbase Pro trading toolkit
Stars: ✭ 817 (+3613.64%)
Mutual labels:  cryptocurrency, trading
Wolfbot
Crypto currency trading bot written in TypeScript for NodeJS
Stars: ✭ 335 (+1422.73%)
Mutual labels:  cryptocurrency, trading
Ccxt
A JavaScript / Python / PHP cryptocurrency trading API with support for more than 100 bitcoin/altcoin exchanges
Stars: ✭ 22,501 (+102177.27%)
Mutual labels:  cryptocurrency, trading
Tectonicdb
Database for L2 orderbook
Stars: ✭ 321 (+1359.09%)
Mutual labels:  cryptocurrency, trading
51bitquant
51bitquant Python数字货币量化交易视频 CCXT框架 爬取交易所数据 比特币量化交易 交易机器人51bitquant tradingbot cryptocurrency quantitative trading btc trading
Stars: ✭ 284 (+1190.91%)
Mutual labels:  cryptocurrency, trading
Freqtrade Strategies
Free trading strategies for Freqtrade bot
Stars: ✭ 697 (+3068.18%)
Mutual labels:  cryptocurrency, trading
tuneta
Intelligently optimizes technical indicators and optionally selects the least intercorrelated for use in machine learning models
Stars: ✭ 77 (+250%)
Mutual labels:  trading, stocks
Tai
A composable, real time, market data and trade execution toolkit. Built with Elixir, runs on the Erlang virtual machine
Stars: ✭ 264 (+1100%)
Mutual labels:  cryptocurrency, trading
Kelp
Kelp is a free and open-source trading bot for the Stellar DEX and 100+ centralized exchanges
Stars: ✭ 580 (+2536.36%)
Mutual labels:  cryptocurrency, trading

order-matcher

Order Matching Engine / Trading Engine

  • Built with .Net Core, can run on linux and windows
  • Support multiple order types
    • Limit
    • Market
    • Stop Loss / Stop Limit
    • Immediate or Cancel(IOC)
    • Fill or kill(FOK)
    • Good till Date(GTD)
    • Iceberg

Supports integer & real numbers/decimal for price and quantity

Hand written serializer faster than any serializer. x15 times faster than JSON, x5 times faster than messagepack

Documentation

home

1. Terminology

2. Order

3. Frequently Asked Questions(FAQ)

Code

class Program
{
	static void Main(string[] args)
	{
		//create instance of matching engine.
		MatchingEngine matchingEngine = new MatchingEngine(0, 1, new MyTradeListener(), new TimeProvider());

		Order order1 = new Order { IsBuy = true, OrderId = 1, Quantity = 1000, Price = 10 };
		//push new order engine.
		matchingEngine.AddOrder(order1);

		//cancel existing orders
		matchingEngine.CancelOrder(1);//pass orderId to cancel
	}
}



//create a listener to receive events from matching engine. pass it to constructore of MatchingEngine
class MyTradeListener : ITradeListener
{
    public void OnCancel(ulong orderId, Quantity remainingQuantity, Quantity remainingOrderAmount, CancelReason cancelReason)
    {
        Console.WriteLine($"Order Cancelled.... orderId : {orderId}, remainingQuantity : {remainingQuantity}, cancelReason : {cancelReason}");
    }

    public void OnOrderTriggered(ulong orderId)
    {
        Console.WriteLine($"Stop Order Triggered.... orderId : {orderId}");
    }

    public void OnTrade(ulong incomingOrderId, ulong restingOrderId, Price matchPrice, Quantity matchQuantiy, bool incomingOrderCompleted)
    {
        Console.WriteLine($"Order matched.... incomingOrderId : {incomingOrderId}, restingOrderId : {restingOrderId}, executedQuantity : {matchQuantiy}, exetedPrice : {matchPrice}");
    }
}
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].