package gemini

  1. Overview
  2. Docs

Represents different types of market data events

type t = [
  1. | `Trade
  2. | `Change
  3. | `Auction
  4. | `Auction_open
  5. | `Block_trade
]

Market data event types. One of `Trade, `Change, `Auction, or `Block_trade.

val __t_of_sexp__ : Sexplib0.Sexp.t -> t
val to_yojson : t -> Yojson.Safe.t
val of_yojson : Yojson.Safe.t -> t Ppx_deriving_yojson_runtime.error_or
include Ppx_enumerate_lib.Enumerable.S with type t := t
val all : t list
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
module Enum_or_string : sig ... end

Wraps a string value promoting it to type Enum enum if it is parsable as such, `String string otherwise.

val dict : (string * t) list
val of_string_opt : string -> t option
val error_message : string -> string
include Csvfields.Csv.Stringable with type t := t
val to_string : t -> string
val of_string : string -> t
val is_csv_atom : bool
val rev_csv_header' : string list -> 'a -> 'b -> string list
val rev_csv_header_spec' : Csvfields.Csv.Spec.t list -> 'a -> 'b -> Csvfields.Csv.Spec.t list
val t_of_row' : 'a -> string list -> (unit -> t) * string list
val write_row_of_t' : is_first:bool -> is_last:bool -> writer:(string -> unit) -> 'a -> 'b -> t -> unit
val csv_header : string list
val csv_header_spec : Csvfields.Csv.Spec.t list
val t_of_row : string list -> t
val row_of_t : t -> string list
val csv_load : ?separator:char -> string -> t list
val csv_load_in : ?separator:char -> Core.In_channel.t -> t list
val csv_save_fn : ?separator:char -> (string -> unit) -> t list -> unit
val csv_save_out : ?separator:char -> Core.Out_channel.t -> t list -> unit
val csv_save : ?separator:char -> string -> t list -> unit
include Core.Comparable with type t := t
include Base.Comparable.S with type t := t
include Base.Comparisons.S with type t := t
include Base.Comparisons.Infix with type t := t
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int

compare t1 t2 returns 0 if t1 is equal to t2, a negative integer if t1 is less than t2, and a positive integer if t1 is greater than t2.

val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int

ascending is identical to compare. descending x y = ascending y x. These are intended to be mnemonic when used like List.sort ~compare:ascending and List.sort ~cmp:descending, since they cause the list to be sorted in ascending or descending order, respectively.

val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool

between t ~low ~high means low <= t <= high

val clamp_exn : t -> min:t -> max:t -> t

clamp_exn t ~min ~max returns t', the closest value to t such that between t' ~low:min ~high:max is true.

Raises if not (min <= max).

val clamp : t -> min:t -> max:t -> t Base.Or_error.t
include Base.Comparator.S with type t := t
type comparator_witness
val validate_lbound : min:t Core.Maybe_bound.t -> t Validate.check
val validate_ubound : max:t Core.Maybe_bound.t -> t Validate.check
val validate_bound : min:t Core.Maybe_bound.t -> max:t Core.Maybe_bound.t -> t Validate.check
OCaml

Innovation. Community. Security.