Left Curve Software Stack
    Preparing search index...

    Type Alias PriceOption

    PriceOption: { limit: string } | { market: { maxSlippage: string } }

    Type Declaration

    • { limit: string }

      The order is to have the specified limit price.

    • { market: { maxSlippage: string } }
      • market: { maxSlippage: string }

        The order's limit price is to be determined by the best available price in the resting order book and the specified maximum slippage. If best available price doesn't exist (i.e. that side of the order book is empty), order creation fails.

        • maxSlippage: string
          • For a BUY order, suppose the best (lowest) SELL price in the resting order book is p_best, the order's limit price will be calculated as:

            p_best * (1 + max_slippage)
            
          • For a SELL order, suppose the best (highest) BUY price in the resting order book is p_best, the order's limit price will be calculated as:

            p_best * (1 - max_slippage)