class Binance::Responses::PriceFilter

Overview

PRICE_FILTER

The PRICE_FILTER defines the price rules for a symbol. There are 3 parts:

Any of the above variables can be set to 0, which disables that rule in the price filter. In order to pass the price filter, the following must be true for price/stopPrice of the enabled rules:

Typical server response

    {
      "filterType":"PRICE_FILTER",
      "minPrice":"0.00000100",
      "maxPrice":"100000.00000000",
      "tickSize":"0.00000100"
    }

Defined in:

binance/client/rest/responses/price_filter.cr

Constructors

Instance Method Summary

Instance methods inherited from class Binance::Responses::ExchangeFilter

filter_type : String filter_type

Constructor methods inherited from class Binance::Responses::ExchangeFilter

new(pull : JSON::PullParser)
new
new

Class methods inherited from class Binance::Responses::ExchangeFilter

from_array(string : String) from_array

Constructor Detail

def self.new(pull : JSON::PullParser) #

PRICE_FILTER

The PRICE_FILTER defines the price rules for a symbol. There are 3 parts:

  • minPrice defines the minimum price/stopPrice allowed; disabled on minPrice == 0.
  • maxPrice defines the maximum price/stopPrice allowed; disabled on maxPrice == 0.
  • tickSize defines the intervals that a price/stopPrice can be increased/decreased by; disabled on tickSize == 0.

Any of the above variables can be set to 0, which disables that rule in the price filter. In order to pass the price filter, the following must be true for price/stopPrice of the enabled rules:

  • price >= minPrice
  • price <= maxPrice
  • (price-minPrice) % tickSize == 0

Typical server response

    {
      "filterType":"PRICE_FILTER",
      "minPrice":"0.00000100",
      "maxPrice":"100000.00000000",
      "tickSize":"0.00000100"
    }

Instance Method Detail

def decimals #

def max_price : Float64 #

maxPrice defines the maximum price/stopPrice allowed; disabled on maxPrice == 0.


def min_price : Float64 #

minPrice defines the minimum price/stopPrice allowed; disabled on minPrice == 0.


def tick_size : Float64 #

tickSize defines the intervals that a price/stopPrice can be increased/decreased by; disabled on tickSize == 0.


def valid?(value : Float64) #

def validate(value : Float64) #