Class Venue

java.lang.Object
org.drip.oms.exchange.Venue

public class Venue
extends java.lang.Object
Venue implements Functionality corresponding to a Venue. The References are:

  • Chen, J. (2021): Time in Force: Definition, Types, and Examples https://www.investopedia.com/terms/t/timeinforce.asp
  • Cont, R., and A. Kukanov (2017): Optimal Order Placement in Limit Order Markets Quantitative Finance 17 (1) 21-39
  • Vassilis, P. (2005b): Slow and Fast Markets Journal of Economics and Business 57 (6) 576-593
  • Weiss, D. (2006): After the Trade is Made: Processing Securities Transactions Portfolio Publishing London UK
  • Wikipedia (2023): Central Limit Order Book https://en.wikipedia.org/wiki/Central_limit_order_book


Author:
Lakshmi Krishnamurthy
  • Constructor Summary

    Constructors
    Constructor Description
    Venue​(VenueSettings settings)
    Venue Constructor
  • Method Summary

    Modifier and Type Method Description
    java.util.Set<java.lang.String> askLimitOrderTickerSet()
    Retrieve the Ask Limit Order Ticker Set
    OrderBlock askMarketOrderBook​(java.lang.String ticker)
    Retrieve the Ask Market Order Book for the specified Ticker
    java.util.Set<java.lang.String> askMarketOrderTickerSet()
    Retrieve the Ask Market Order Ticker Set
    MontageL1Entry askMontageL1Entry​(java.lang.String ticker)
    Retrieve the Ask L1 Montage Entry for the specified Ticker
    java.util.Map<java.lang.String,​PriceBook> askTickerLimitOrderBookMap()
    Retrieve the Ask Price Limit Order Book per Ticker
    java.util.Map<java.lang.String,​OrderBlock> askTickerMarketOrderBookMap()
    Retrieve the Ask Price Market Order Book per Ticker
    java.util.Set<java.lang.String> bidLimitOrderTickerSet()
    Retrieve the Bid Limit Order Ticker Set
    OrderBlock bidMarketOrderBook​(java.lang.String ticker)
    Retrieve the Bid Market Order Book for the specified Ticker
    java.util.Set<java.lang.String> bidMarketOrderTickerSet()
    Retrieve the Bid Market Order Ticker Set
    MontageL1Entry bidMontageL1Entry​(java.lang.String ticker)
    Retrieve the Bid L1 Montage Entry for the specified Ticker
    java.util.Map<java.lang.String,​PriceBook> bidTickerLimitOrderBookMap()
    Retrieve the Bid Price Limit Order Book per Ticker
    java.util.Map<java.lang.String,​OrderBlock> bidTickerMarketOrderBookMap()
    Retrieve the Bid Price Market Order Book per Ticker
    boolean postAskLimitOrderBlock​(java.lang.String ticker, LimitOrderBlock postedLimitOrderBlock)
    Post a Block to the Venue Ask Limit Order Book for the Ticker
    boolean postAskMarketOrderBlock​(java.lang.String ticker, OrderBlock postedMarketOrderBlock)
    Post a Block to the Venue Ask Market Order Book for the Ticker
    boolean postBidLimitOrderBlock​(java.lang.String ticker, LimitOrderBlock postedLimitOrderBlock)
    Post a Block to the Venue Bid Limit Order Book for the Ticker
    boolean postBidMarketOrderBlock​(java.lang.String ticker, OrderBlock postedMarketOrderBlock)
    Post a Block to the Venue Bid Market Order Book for the Ticker
    double postFee​(java.lang.String ticker, double price, double size)
    Estimate Liquidity Posting Fee for the specified Ticker at the Venue at the Price/Size.
    VenueSettings settings()
    Retrieve the Venue Settings
    boolean sweepAskBlock​(java.lang.String ticker, LimitOrderBlock sweptLimitOrderBlock, boolean allowPartialSweep)
    Sweep a Block to the Venue Ask Limit Order Book for the Ticker
    boolean sweepAskMarketOrderBlock​(java.lang.String ticker, OrderBlock sweptMarketOrderBlock, boolean allowPartialSweep)
    Sweep a Block to the Venue Ask Market Order Book for the Ticker
    boolean sweepBidLimitOrderBlock​(java.lang.String ticker, LimitOrderBlock sweptLimitOrderBlock, boolean allowPartialSweep)
    Sweep a Block to the Venue Bid Limit Order Book for the Ticker
    boolean sweepBidMarketOrderBlock​(java.lang.String ticker, OrderBlock sweptMarketOrderBlock, boolean allowPartialSweep)
    Sweep a Block to the Venue Bid Market Order Book for the Ticker
    double sweepFee​(java.lang.String ticker, double price, double size)
    Estimate Liquidity Sweeping Fee for the specified Ticker at the Venue at the Price/Size.
    LimitOrderBlock topOfTheAskLimitOrderBook​(java.lang.String ticker)
    Retrieve the Top-of-the-Ask Limit Order Book for the specified Ticker
    LimitOrderBlock topOfTheBidLimitOrderBook​(java.lang.String ticker)
    Retrieve the Top-of-the-Bid Limit Order Book for the specified Ticker
    java.lang.String toString()
    Generate String version of the state without Padding
    java.lang.String toString​(java.lang.String pad)
    Generate String version of the state with Padding applied

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Venue

      public Venue​(VenueSettings settings) throws java.lang.Exception
      Venue Constructor
      Parameters:
      settings - Venue Settings
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
  • Method Details

    • settings

      public VenueSettings settings()
      Retrieve the Venue Settings
      Returns:
      The Venue Settings
    • bidTickerLimitOrderBookMap

      public java.util.Map<java.lang.String,​PriceBook> bidTickerLimitOrderBookMap()
      Retrieve the Bid Price Limit Order Book per Ticker
      Returns:
      Bid Price Limit Order Book per Ticker
    • askTickerLimitOrderBookMap

      public java.util.Map<java.lang.String,​PriceBook> askTickerLimitOrderBookMap()
      Retrieve the Ask Price Limit Order Book per Ticker
      Returns:
      Ask Price Limit Order Book per Ticker
    • bidTickerMarketOrderBookMap

      public java.util.Map<java.lang.String,​OrderBlock> bidTickerMarketOrderBookMap()
      Retrieve the Bid Price Market Order Book per Ticker
      Returns:
      Bid Price Market Order Book per Ticker
    • askTickerMarketOrderBookMap

      public java.util.Map<java.lang.String,​OrderBlock> askTickerMarketOrderBookMap()
      Retrieve the Ask Price Market Order Book per Ticker
      Returns:
      Ask Price Market Order Book per Ticker
    • postFee

      public double postFee​(java.lang.String ticker, double price, double size) throws java.lang.Exception
      Estimate Liquidity Posting Fee for the specified Ticker at the Venue at the Price/Size.
      Parameters:
      ticker - Ticker
      price - Price
      size - Size
      Returns:
      Fee for Liquidity Posting
      Throws:
      java.lang.Exception - Thrown if the Liquidity Posting Fee cannot be calculated
    • sweepFee

      public double sweepFee​(java.lang.String ticker, double price, double size) throws java.lang.Exception
      Estimate Liquidity Sweeping Fee for the specified Ticker at the Venue at the Price/Size.
      Parameters:
      ticker - Ticker
      price - Price
      size - Size
      Returns:
      Fee for Liquidity Sweeping
      Throws:
      java.lang.Exception - Thrown if the Liquidity Sweeping Fee cannot be calculated
    • postBidLimitOrderBlock

      public boolean postBidLimitOrderBlock​(java.lang.String ticker, LimitOrderBlock postedLimitOrderBlock)
      Post a Block to the Venue Bid Limit Order Book for the Ticker
      Parameters:
      ticker - The Ticker
      postedLimitOrderBlock - The Posted Limit Order Block
      Returns:
      TRUE - The Block posted to the Venue Bid Limit Order Book for the Ticker
    • postBidMarketOrderBlock

      public boolean postBidMarketOrderBlock​(java.lang.String ticker, OrderBlock postedMarketOrderBlock)
      Post a Block to the Venue Bid Market Order Book for the Ticker
      Parameters:
      ticker - The Ticker
      postedMarketOrderBlock - The Posted Bid Market Order Block
      Returns:
      TRUE - The Block posted to the Venue Bid Market Order Book for the Ticker
    • postAskLimitOrderBlock

      public boolean postAskLimitOrderBlock​(java.lang.String ticker, LimitOrderBlock postedLimitOrderBlock)
      Post a Block to the Venue Ask Limit Order Book for the Ticker
      Parameters:
      ticker - The Ticker
      postedLimitOrderBlock - The Posted Limit Order Block
      Returns:
      TRUE - The Block posted to the Venue Ask Limit Order Book for the Ticker
    • postAskMarketOrderBlock

      public boolean postAskMarketOrderBlock​(java.lang.String ticker, OrderBlock postedMarketOrderBlock)
      Post a Block to the Venue Ask Market Order Book for the Ticker
      Parameters:
      ticker - The Ticker
      postedMarketOrderBlock - The Posted Ask Market Order Block
      Returns:
      TRUE - The Block posted to the Venue Ask Market Order Book for the Ticker
    • sweepBidLimitOrderBlock

      public boolean sweepBidLimitOrderBlock​(java.lang.String ticker, LimitOrderBlock sweptLimitOrderBlock, boolean allowPartialSweep)
      Sweep a Block to the Venue Bid Limit Order Book for the Ticker
      Parameters:
      ticker - The Ticker
      sweptLimitOrderBlock - The Swept Limit Order Block
      allowPartialSweep - TRUE - Partial Sweep is allowed
      Returns:
      TRUE - The Block Swept to the Venue Bid Limit Order Book for the Ticker
    • sweepBidMarketOrderBlock

      public boolean sweepBidMarketOrderBlock​(java.lang.String ticker, OrderBlock sweptMarketOrderBlock, boolean allowPartialSweep)
      Sweep a Block to the Venue Bid Market Order Book for the Ticker
      Parameters:
      ticker - The Ticker
      sweptMarketOrderBlock - The Swept Market Order Block
      allowPartialSweep - TRUE - Partial Sweep is allowed
      Returns:
      TRUE - The Block Swept to the Venue Bid Market Order Book for the Ticker
    • sweepAskBlock

      public boolean sweepAskBlock​(java.lang.String ticker, LimitOrderBlock sweptLimitOrderBlock, boolean allowPartialSweep)
      Sweep a Block to the Venue Ask Limit Order Book for the Ticker
      Parameters:
      ticker - The Ticker
      sweptLimitOrderBlock - The Swept Limit Order Block
      allowPartialSweep - TRUE - Partial Sweep is allowed
      Returns:
      TRUE - The Block Swept to the Venue Ask Limit Order Book for the Ticker
    • sweepAskMarketOrderBlock

      public boolean sweepAskMarketOrderBlock​(java.lang.String ticker, OrderBlock sweptMarketOrderBlock, boolean allowPartialSweep)
      Sweep a Block to the Venue Ask Market Order Book for the Ticker
      Parameters:
      ticker - The Ticker
      sweptMarketOrderBlock - The Swept Market Order Block
      allowPartialSweep - TRUE - Partial Sweep is allowed
      Returns:
      TRUE - The Block Swept to the Venue Ask Market Order Book for the Ticker
    • topOfTheBidLimitOrderBook

      public LimitOrderBlock topOfTheBidLimitOrderBook​(java.lang.String ticker)
      Retrieve the Top-of-the-Bid Limit Order Book for the specified Ticker
      Parameters:
      ticker - Ticker
      Returns:
      The Top-of-the-Bid Limit Order Book
    • bidMarketOrderBook

      public OrderBlock bidMarketOrderBook​(java.lang.String ticker)
      Retrieve the Bid Market Order Book for the specified Ticker
      Parameters:
      ticker - Ticker
      Returns:
      The Bid Market Order Book
    • topOfTheAskLimitOrderBook

      public LimitOrderBlock topOfTheAskLimitOrderBook​(java.lang.String ticker)
      Retrieve the Top-of-the-Ask Limit Order Book for the specified Ticker
      Parameters:
      ticker - Ticker
      Returns:
      The Top-of-the-Ask Limit Order Book
    • askMarketOrderBook

      public OrderBlock askMarketOrderBook​(java.lang.String ticker)
      Retrieve the Ask Market Order Book for the specified Ticker
      Parameters:
      ticker - Ticker
      Returns:
      The Ask Market Order Book
    • bidMontageL1Entry

      public MontageL1Entry bidMontageL1Entry​(java.lang.String ticker)
      Retrieve the Bid L1 Montage Entry for the specified Ticker
      Parameters:
      ticker - Ticker
      Returns:
      The Bid L1 Montage Entry
    • askMontageL1Entry

      public MontageL1Entry askMontageL1Entry​(java.lang.String ticker)
      Retrieve the Ask L1 Montage Entry for the specified Ticker
      Parameters:
      ticker - Ticker
      Returns:
      The Ask L1 Montage Entry
    • bidLimitOrderTickerSet

      public java.util.Set<java.lang.String> bidLimitOrderTickerSet()
      Retrieve the Bid Limit Order Ticker Set
      Returns:
      The Bid Limit Order Ticker Set
    • bidMarketOrderTickerSet

      public java.util.Set<java.lang.String> bidMarketOrderTickerSet()
      Retrieve the Bid Market Order Ticker Set
      Returns:
      The Bid Market Order Ticker Set
    • askLimitOrderTickerSet

      public java.util.Set<java.lang.String> askLimitOrderTickerSet()
      Retrieve the Ask Limit Order Ticker Set
      Returns:
      The Ask Limit Order Ticker Set
    • askMarketOrderTickerSet

      public java.util.Set<java.lang.String> askMarketOrderTickerSet()
      Retrieve the Ask Market Order Ticker Set
      Returns:
      The Ask Market Order Ticker Set
    • toString

      public java.lang.String toString​(java.lang.String pad)
      Generate String version of the state with Padding applied
      Parameters:
      pad - Padding
      Returns:
      String version of the state with Padding applied
    • toString

      public java.lang.String toString()
      Generate String version of the state without Padding
      Overrides:
      toString in class java.lang.Object
      Returns:
      String version of the state without Padding