sig
module Tws_error :
sig
type t = private { error_code : int; error_msg : string; }
val error_msg : Response.Tws_error.t -> string
val error_code : Response.Tws_error.t -> int
module Fields :
sig
val names : string list
val error_msg :
(Response.Tws_error.t, string) Fieldslib.Field.readonly_t
val error_code :
(Response.Tws_error.t, int) Fieldslib.Field.readonly_t
val fold :
init:'acc__ ->
error_code:('acc__ ->
(Response.Tws_error.t, int)
Fieldslib.Field.readonly_t -> 'acc__) ->
error_msg:('acc__ ->
(Response.Tws_error.t, string)
Fieldslib.Field.readonly_t -> 'acc__) ->
'acc__
val iter :
error_code:((Response.Tws_error.t, int)
Fieldslib.Field.readonly_t -> unit) ->
error_msg:((Response.Tws_error.t, string)
Fieldslib.Field.readonly_t -> unit) ->
unit
val for_all :
error_code:((Response.Tws_error.t, int)
Fieldslib.Field.readonly_t -> bool) ->
error_msg:((Response.Tws_error.t, string)
Fieldslib.Field.readonly_t -> bool) ->
bool
val exists :
error_code:((Response.Tws_error.t, int)
Fieldslib.Field.readonly_t -> bool) ->
error_msg:((Response.Tws_error.t, string)
Fieldslib.Field.readonly_t -> bool) ->
bool
val to_list :
error_code:((Response.Tws_error.t, int)
Fieldslib.Field.readonly_t -> 'elem__) ->
error_msg:((Response.Tws_error.t, string)
Fieldslib.Field.readonly_t -> 'elem__) ->
'elem__ list
val map_poly :
([< `Read ], Response.Tws_error.t, 'x0) Fieldslib.Field.user ->
'x0 list
module Direct :
sig
val iter :
Response.Tws_error.t ->
error_code:((Response.Tws_error.t, int)
Fieldslib.Field.readonly_t ->
Response.Tws_error.t -> int -> unit) ->
error_msg:((Response.Tws_error.t, string)
Fieldslib.Field.readonly_t ->
Response.Tws_error.t -> string -> unit) ->
unit
val fold :
Response.Tws_error.t ->
init:'acc__ ->
error_code:('acc__ ->
(Response.Tws_error.t, int)
Fieldslib.Field.readonly_t ->
Response.Tws_error.t -> int -> 'acc__) ->
error_msg:('acc__ ->
(Response.Tws_error.t, string)
Fieldslib.Field.readonly_t ->
Response.Tws_error.t -> string -> 'acc__) ->
'acc__
end
end
val unpickler : t Tws_prot.Unpickler.t
val pickler : t Tws_prot.Pickler.t Core.Std.Only_in_test.t
val ( = ) : t -> t -> bool
val create : error_code:int -> error_msg:string -> Response.Tws_error.t
val to_string_hum : Response.Tws_error.t -> string
val to_error : Response.Tws_error.t -> Core.Std.Error.t
val to_exn : Response.Tws_error.t -> exn
val raise : Response.Tws_error.t -> 'a
val t_of_sexp : Sexplib.Sexp.t -> Response.Tws_error.t
val sexp_of_t : Response.Tws_error.t -> Sexplib.Sexp.t
end
module Server_time :
sig
type t = Core.Std.Time.t
val unpickler : t Tws_prot.Unpickler.t
val pickler : t Tws_prot.Pickler.t Core.Std.Only_in_test.t
val ( = ) : t -> t -> bool
val create : time:Core.Std.Time.t -> Response.Server_time.t
val t_of_sexp : Sexplib.Sexp.t -> Response.Server_time.t
val sexp_of_t : Response.Server_time.t -> Sexplib.Sexp.t
end
module Tick_price :
sig
module Type :
sig
type t = Bid | Ask | Last | High | Low | Close | Open
val t_of_sexp : Sexplib.Sexp.t -> Response.Tick_price.Type.t
val sexp_of_t : Response.Tick_price.Type.t -> Sexplib.Sexp.t
end
type t = private {
tick_type : Response.Tick_price.Type.t;
price : Price.t;
size : Volume.t;
can_auto_execute : bool option;
}
val can_auto_execute : Response.Tick_price.t -> bool option
val size : Response.Tick_price.t -> Volume.t
val tick_type : Response.Tick_price.t -> Response.Tick_price.Type.t
module Fields :
sig
val names : string list
val can_auto_execute :
(Response.Tick_price.t, bool option) Fieldslib.Field.readonly_t
val size :
(Response.Tick_price.t, Volume.t) Fieldslib.Field.readonly_t
val price :
(Response.Tick_price.t, Price.t) Fieldslib.Field.readonly_t
val tick_type :
(Response.Tick_price.t, Response.Tick_price.Type.t)
Fieldslib.Field.readonly_t
val fold :
init:'acc__ ->
tick_type:('acc__ ->
(Response.Tick_price.t, Response.Tick_price.Type.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
price:('acc__ ->
(Response.Tick_price.t, Price.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
size:('acc__ ->
(Response.Tick_price.t, Volume.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
can_auto_execute:('acc__ ->
(Response.Tick_price.t, bool option)
Fieldslib.Field.readonly_t -> 'acc__) ->
'acc__
val iter :
tick_type:((Response.Tick_price.t, Response.Tick_price.Type.t)
Fieldslib.Field.readonly_t -> unit) ->
price:((Response.Tick_price.t, Price.t)
Fieldslib.Field.readonly_t -> unit) ->
size:((Response.Tick_price.t, Volume.t)
Fieldslib.Field.readonly_t -> unit) ->
can_auto_execute:((Response.Tick_price.t, bool option)
Fieldslib.Field.readonly_t -> unit) ->
unit
val for_all :
tick_type:((Response.Tick_price.t, Response.Tick_price.Type.t)
Fieldslib.Field.readonly_t -> bool) ->
price:((Response.Tick_price.t, Price.t)
Fieldslib.Field.readonly_t -> bool) ->
size:((Response.Tick_price.t, Volume.t)
Fieldslib.Field.readonly_t -> bool) ->
can_auto_execute:((Response.Tick_price.t, bool option)
Fieldslib.Field.readonly_t -> bool) ->
bool
val exists :
tick_type:((Response.Tick_price.t, Response.Tick_price.Type.t)
Fieldslib.Field.readonly_t -> bool) ->
price:((Response.Tick_price.t, Price.t)
Fieldslib.Field.readonly_t -> bool) ->
size:((Response.Tick_price.t, Volume.t)
Fieldslib.Field.readonly_t -> bool) ->
can_auto_execute:((Response.Tick_price.t, bool option)
Fieldslib.Field.readonly_t -> bool) ->
bool
val to_list :
tick_type:((Response.Tick_price.t, Response.Tick_price.Type.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
price:((Response.Tick_price.t, Price.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
size:((Response.Tick_price.t, Volume.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
can_auto_execute:((Response.Tick_price.t, bool option)
Fieldslib.Field.readonly_t -> 'elem__) ->
'elem__ list
val map_poly :
([< `Read ], Response.Tick_price.t, 'x0) Fieldslib.Field.user ->
'x0 list
module Direct :
sig
val iter :
Response.Tick_price.t ->
tick_type:((Response.Tick_price.t,
Response.Tick_price.Type.t)
Fieldslib.Field.readonly_t ->
Response.Tick_price.t ->
Response.Tick_price.Type.t -> unit) ->
price:((Response.Tick_price.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Tick_price.t -> Price.t -> unit) ->
size:((Response.Tick_price.t, Volume.t)
Fieldslib.Field.readonly_t ->
Response.Tick_price.t -> Volume.t -> unit) ->
can_auto_execute:((Response.Tick_price.t, bool option)
Fieldslib.Field.readonly_t ->
Response.Tick_price.t ->
bool option -> unit) ->
unit
val fold :
Response.Tick_price.t ->
init:'acc__ ->
tick_type:('acc__ ->
(Response.Tick_price.t,
Response.Tick_price.Type.t)
Fieldslib.Field.readonly_t ->
Response.Tick_price.t ->
Response.Tick_price.Type.t -> 'acc__) ->
price:('acc__ ->
(Response.Tick_price.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Tick_price.t -> Price.t -> 'acc__) ->
size:('acc__ ->
(Response.Tick_price.t, Volume.t)
Fieldslib.Field.readonly_t ->
Response.Tick_price.t -> Volume.t -> 'acc__) ->
can_auto_execute:('acc__ ->
(Response.Tick_price.t, bool option)
Fieldslib.Field.readonly_t ->
Response.Tick_price.t ->
bool option -> 'acc__) ->
'acc__
end
end
val unpickler : t Tws_prot.Unpickler.t
val pickler : t Tws_prot.Pickler.t Core.Std.Only_in_test.t
val ( = ) : t -> t -> bool
val create :
tick_type:Response.Tick_price.Type.t ->
price:Price.t ->
size:Volume.t ->
can_auto_execute:bool option -> Response.Tick_price.t
val price : Response.Tick_price.t -> Price.t
val pp : Format.formatter -> Response.Tick_price.t -> unit
val t_of_sexp : Sexplib.Sexp.t -> Response.Tick_price.t
val sexp_of_t : Response.Tick_price.t -> Sexplib.Sexp.t
end
module Tick_size :
sig
module Type :
sig
type t = Bid | Ask | Last | Volume
val t_of_sexp : Sexplib.Sexp.t -> Response.Tick_size.Type.t
val sexp_of_t : Response.Tick_size.Type.t -> Sexplib.Sexp.t
end
type t = private {
tick_type : Response.Tick_size.Type.t;
size : Volume.t;
}
val size : Response.Tick_size.t -> Volume.t
val tick_type : Response.Tick_size.t -> Response.Tick_size.Type.t
module Fields :
sig
val names : string list
val size :
(Response.Tick_size.t, Volume.t) Fieldslib.Field.readonly_t
val tick_type :
(Response.Tick_size.t, Response.Tick_size.Type.t)
Fieldslib.Field.readonly_t
val fold :
init:'acc__ ->
tick_type:('acc__ ->
(Response.Tick_size.t, Response.Tick_size.Type.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
size:('acc__ ->
(Response.Tick_size.t, Volume.t) Fieldslib.Field.readonly_t ->
'acc__) ->
'acc__
val iter :
tick_type:((Response.Tick_size.t, Response.Tick_size.Type.t)
Fieldslib.Field.readonly_t -> unit) ->
size:((Response.Tick_size.t, Volume.t) Fieldslib.Field.readonly_t ->
unit) ->
unit
val for_all :
tick_type:((Response.Tick_size.t, Response.Tick_size.Type.t)
Fieldslib.Field.readonly_t -> bool) ->
size:((Response.Tick_size.t, Volume.t) Fieldslib.Field.readonly_t ->
bool) ->
bool
val exists :
tick_type:((Response.Tick_size.t, Response.Tick_size.Type.t)
Fieldslib.Field.readonly_t -> bool) ->
size:((Response.Tick_size.t, Volume.t) Fieldslib.Field.readonly_t ->
bool) ->
bool
val to_list :
tick_type:((Response.Tick_size.t, Response.Tick_size.Type.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
size:((Response.Tick_size.t, Volume.t) Fieldslib.Field.readonly_t ->
'elem__) ->
'elem__ list
val map_poly :
([< `Read ], Response.Tick_size.t, 'x0) Fieldslib.Field.user ->
'x0 list
module Direct :
sig
val iter :
Response.Tick_size.t ->
tick_type:((Response.Tick_size.t, Response.Tick_size.Type.t)
Fieldslib.Field.readonly_t ->
Response.Tick_size.t ->
Response.Tick_size.Type.t -> unit) ->
size:((Response.Tick_size.t, Volume.t)
Fieldslib.Field.readonly_t ->
Response.Tick_size.t -> Volume.t -> unit) ->
unit
val fold :
Response.Tick_size.t ->
init:'acc__ ->
tick_type:('acc__ ->
(Response.Tick_size.t, Response.Tick_size.Type.t)
Fieldslib.Field.readonly_t ->
Response.Tick_size.t ->
Response.Tick_size.Type.t -> 'acc__) ->
size:('acc__ ->
(Response.Tick_size.t, Volume.t)
Fieldslib.Field.readonly_t ->
Response.Tick_size.t -> Volume.t -> 'acc__) ->
'acc__
end
end
val unpickler : t Tws_prot.Unpickler.t
val pickler : t Tws_prot.Pickler.t Core.Std.Only_in_test.t
val ( = ) : t -> t -> bool
val create :
tick_type:Response.Tick_size.Type.t ->
size:Volume.t -> Response.Tick_size.t
val pp : Format.formatter -> Response.Tick_size.t -> unit
val t_of_sexp : Sexplib.Sexp.t -> Response.Tick_size.t
val sexp_of_t : Response.Tick_size.t -> Sexplib.Sexp.t
end
module Tick_option :
sig
module Type :
sig
type t = Bid | Ask | Last | Model | Custom
val t_of_sexp : Sexplib.Sexp.t -> Response.Tick_option.Type.t
val sexp_of_t : Response.Tick_option.Type.t -> Sexplib.Sexp.t
end
type t = private {
tick_type : Response.Tick_option.Type.t;
implied_vol : float;
delta : float;
option_price : Price.t;
pv_dividend : float;
gamma : float;
vega : float;
theta : float;
under_price : Price.t;
}
val under_price : Response.Tick_option.t -> Price.t
val theta : Response.Tick_option.t -> float
val vega : Response.Tick_option.t -> float
val gamma : Response.Tick_option.t -> float
val pv_dividend : Response.Tick_option.t -> float
val option_price : Response.Tick_option.t -> Price.t
val delta : Response.Tick_option.t -> float
val implied_vol : Response.Tick_option.t -> float
val tick_type : Response.Tick_option.t -> Response.Tick_option.Type.t
module Fields :
sig
val names : string list
val under_price :
(Response.Tick_option.t, Price.t) Fieldslib.Field.readonly_t
val theta :
(Response.Tick_option.t, float) Fieldslib.Field.readonly_t
val vega :
(Response.Tick_option.t, float) Fieldslib.Field.readonly_t
val gamma :
(Response.Tick_option.t, float) Fieldslib.Field.readonly_t
val pv_dividend :
(Response.Tick_option.t, float) Fieldslib.Field.readonly_t
val option_price :
(Response.Tick_option.t, Price.t) Fieldslib.Field.readonly_t
val delta :
(Response.Tick_option.t, float) Fieldslib.Field.readonly_t
val implied_vol :
(Response.Tick_option.t, float) Fieldslib.Field.readonly_t
val tick_type :
(Response.Tick_option.t, Response.Tick_option.Type.t)
Fieldslib.Field.readonly_t
val fold :
init:'acc__ ->
tick_type:('acc__ ->
(Response.Tick_option.t, Response.Tick_option.Type.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
implied_vol:('acc__ ->
(Response.Tick_option.t, float)
Fieldslib.Field.readonly_t -> 'acc__) ->
delta:('acc__ ->
(Response.Tick_option.t, float) Fieldslib.Field.readonly_t ->
'acc__) ->
option_price:('acc__ ->
(Response.Tick_option.t, Price.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
pv_dividend:('acc__ ->
(Response.Tick_option.t, float)
Fieldslib.Field.readonly_t -> 'acc__) ->
gamma:('acc__ ->
(Response.Tick_option.t, float) Fieldslib.Field.readonly_t ->
'acc__) ->
vega:('acc__ ->
(Response.Tick_option.t, float) Fieldslib.Field.readonly_t ->
'acc__) ->
theta:('acc__ ->
(Response.Tick_option.t, float) Fieldslib.Field.readonly_t ->
'acc__) ->
under_price:('acc__ ->
(Response.Tick_option.t, Price.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
'acc__
val iter :
tick_type:((Response.Tick_option.t, Response.Tick_option.Type.t)
Fieldslib.Field.readonly_t -> unit) ->
implied_vol:((Response.Tick_option.t, float)
Fieldslib.Field.readonly_t -> unit) ->
delta:((Response.Tick_option.t, float) Fieldslib.Field.readonly_t ->
unit) ->
option_price:((Response.Tick_option.t, Price.t)
Fieldslib.Field.readonly_t -> unit) ->
pv_dividend:((Response.Tick_option.t, float)
Fieldslib.Field.readonly_t -> unit) ->
gamma:((Response.Tick_option.t, float) Fieldslib.Field.readonly_t ->
unit) ->
vega:((Response.Tick_option.t, float) Fieldslib.Field.readonly_t ->
unit) ->
theta:((Response.Tick_option.t, float) Fieldslib.Field.readonly_t ->
unit) ->
under_price:((Response.Tick_option.t, Price.t)
Fieldslib.Field.readonly_t -> unit) ->
unit
val for_all :
tick_type:((Response.Tick_option.t, Response.Tick_option.Type.t)
Fieldslib.Field.readonly_t -> bool) ->
implied_vol:((Response.Tick_option.t, float)
Fieldslib.Field.readonly_t -> bool) ->
delta:((Response.Tick_option.t, float) Fieldslib.Field.readonly_t ->
bool) ->
option_price:((Response.Tick_option.t, Price.t)
Fieldslib.Field.readonly_t -> bool) ->
pv_dividend:((Response.Tick_option.t, float)
Fieldslib.Field.readonly_t -> bool) ->
gamma:((Response.Tick_option.t, float) Fieldslib.Field.readonly_t ->
bool) ->
vega:((Response.Tick_option.t, float) Fieldslib.Field.readonly_t ->
bool) ->
theta:((Response.Tick_option.t, float) Fieldslib.Field.readonly_t ->
bool) ->
under_price:((Response.Tick_option.t, Price.t)
Fieldslib.Field.readonly_t -> bool) ->
bool
val exists :
tick_type:((Response.Tick_option.t, Response.Tick_option.Type.t)
Fieldslib.Field.readonly_t -> bool) ->
implied_vol:((Response.Tick_option.t, float)
Fieldslib.Field.readonly_t -> bool) ->
delta:((Response.Tick_option.t, float) Fieldslib.Field.readonly_t ->
bool) ->
option_price:((Response.Tick_option.t, Price.t)
Fieldslib.Field.readonly_t -> bool) ->
pv_dividend:((Response.Tick_option.t, float)
Fieldslib.Field.readonly_t -> bool) ->
gamma:((Response.Tick_option.t, float) Fieldslib.Field.readonly_t ->
bool) ->
vega:((Response.Tick_option.t, float) Fieldslib.Field.readonly_t ->
bool) ->
theta:((Response.Tick_option.t, float) Fieldslib.Field.readonly_t ->
bool) ->
under_price:((Response.Tick_option.t, Price.t)
Fieldslib.Field.readonly_t -> bool) ->
bool
val to_list :
tick_type:((Response.Tick_option.t, Response.Tick_option.Type.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
implied_vol:((Response.Tick_option.t, float)
Fieldslib.Field.readonly_t -> 'elem__) ->
delta:((Response.Tick_option.t, float) Fieldslib.Field.readonly_t ->
'elem__) ->
option_price:((Response.Tick_option.t, Price.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
pv_dividend:((Response.Tick_option.t, float)
Fieldslib.Field.readonly_t -> 'elem__) ->
gamma:((Response.Tick_option.t, float) Fieldslib.Field.readonly_t ->
'elem__) ->
vega:((Response.Tick_option.t, float) Fieldslib.Field.readonly_t ->
'elem__) ->
theta:((Response.Tick_option.t, float) Fieldslib.Field.readonly_t ->
'elem__) ->
under_price:((Response.Tick_option.t, Price.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
'elem__ list
val map_poly :
([< `Read ], Response.Tick_option.t, 'x0) Fieldslib.Field.user ->
'x0 list
module Direct :
sig
val iter :
Response.Tick_option.t ->
tick_type:((Response.Tick_option.t,
Response.Tick_option.Type.t)
Fieldslib.Field.readonly_t ->
Response.Tick_option.t ->
Response.Tick_option.Type.t -> unit) ->
implied_vol:((Response.Tick_option.t, float)
Fieldslib.Field.readonly_t ->
Response.Tick_option.t -> float -> unit) ->
delta:((Response.Tick_option.t, float)
Fieldslib.Field.readonly_t ->
Response.Tick_option.t -> float -> unit) ->
option_price:((Response.Tick_option.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Tick_option.t -> Price.t -> unit) ->
pv_dividend:((Response.Tick_option.t, float)
Fieldslib.Field.readonly_t ->
Response.Tick_option.t -> float -> unit) ->
gamma:((Response.Tick_option.t, float)
Fieldslib.Field.readonly_t ->
Response.Tick_option.t -> float -> unit) ->
vega:((Response.Tick_option.t, float)
Fieldslib.Field.readonly_t ->
Response.Tick_option.t -> float -> unit) ->
theta:((Response.Tick_option.t, float)
Fieldslib.Field.readonly_t ->
Response.Tick_option.t -> float -> unit) ->
under_price:((Response.Tick_option.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Tick_option.t -> Price.t -> unit) ->
unit
val fold :
Response.Tick_option.t ->
init:'acc__ ->
tick_type:('acc__ ->
(Response.Tick_option.t,
Response.Tick_option.Type.t)
Fieldslib.Field.readonly_t ->
Response.Tick_option.t ->
Response.Tick_option.Type.t -> 'acc__) ->
implied_vol:('acc__ ->
(Response.Tick_option.t, float)
Fieldslib.Field.readonly_t ->
Response.Tick_option.t -> float -> 'acc__) ->
delta:('acc__ ->
(Response.Tick_option.t, float)
Fieldslib.Field.readonly_t ->
Response.Tick_option.t -> float -> 'acc__) ->
option_price:('acc__ ->
(Response.Tick_option.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Tick_option.t -> Price.t -> 'acc__) ->
pv_dividend:('acc__ ->
(Response.Tick_option.t, float)
Fieldslib.Field.readonly_t ->
Response.Tick_option.t -> float -> 'acc__) ->
gamma:('acc__ ->
(Response.Tick_option.t, float)
Fieldslib.Field.readonly_t ->
Response.Tick_option.t -> float -> 'acc__) ->
vega:('acc__ ->
(Response.Tick_option.t, float)
Fieldslib.Field.readonly_t ->
Response.Tick_option.t -> float -> 'acc__) ->
theta:('acc__ ->
(Response.Tick_option.t, float)
Fieldslib.Field.readonly_t ->
Response.Tick_option.t -> float -> 'acc__) ->
under_price:('acc__ ->
(Response.Tick_option.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Tick_option.t -> Price.t -> 'acc__) ->
'acc__
end
end
val unpickler : t Tws_prot.Unpickler.t
val pickler : t Tws_prot.Pickler.t Core.Std.Only_in_test.t
val ( = ) : t -> t -> bool
val create :
tick_type:Response.Tick_option.Type.t ->
implied_vol:float ->
delta:float ->
option_price:Price.t ->
pv_dividend:float ->
gamma:float ->
vega:float ->
theta:float -> under_price:Price.t -> Response.Tick_option.t
val pp : Format.formatter -> Response.Tick_option.t -> unit
val t_of_sexp : Sexplib.Sexp.t -> Response.Tick_option.t
val sexp_of_t : Response.Tick_option.t -> Sexplib.Sexp.t
end
module Tick_string :
sig
module Type :
sig
type t =
Bid_size
| Bid_price
| Ask_price
| Ask_size
| Last_price
| Last_size
| High_price
| Low_price
| Volume
| Close_price
| Bid_option
| Ask_option
| Last_option
| Model_option
| Open_price
| Low_13_week
| High_13_week
| Low_26_week
| High_26_week
| Low_52_week
| High_52_week
| Avg_volume
| Open_interest
| Historical_volatility
| Implied_volatility
| Option_bid_exch
| Option_ask_exch
| Call_open_interest
| Put_open_interest
| Call_volume
| Put_volume
| Index_future_premium
| Bid_exch
| Ask_exch
| Auction_volume
| Auction_price
| Auction_imbalance
| Mark_price
| Bid_efp
| Ask_efp
| Last_efp
| Open_efp
| High_efp
| Low_efp
| Close_efp
| Last_timestamp
| Shortable
| Fundamental_ratios
| Realtime_volume
| Halted
| Bid_yield
| Ask_yield
| Last_yield
| Cust_option_comp
val t_of_sexp : Sexplib.Sexp.t -> Response.Tick_string.Type.t
val sexp_of_t : Response.Tick_string.Type.t -> Sexplib.Sexp.t
end
type t = private {
tick_type : Response.Tick_string.Type.t;
value : string;
}
val value : Response.Tick_string.t -> string
val tick_type : Response.Tick_string.t -> Response.Tick_string.Type.t
module Fields :
sig
val names : string list
val value :
(Response.Tick_string.t, string) Fieldslib.Field.readonly_t
val tick_type :
(Response.Tick_string.t, Response.Tick_string.Type.t)
Fieldslib.Field.readonly_t
val fold :
init:'acc__ ->
tick_type:('acc__ ->
(Response.Tick_string.t, Response.Tick_string.Type.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
value:('acc__ ->
(Response.Tick_string.t, string)
Fieldslib.Field.readonly_t -> 'acc__) ->
'acc__
val iter :
tick_type:((Response.Tick_string.t, Response.Tick_string.Type.t)
Fieldslib.Field.readonly_t -> unit) ->
value:((Response.Tick_string.t, string)
Fieldslib.Field.readonly_t -> unit) ->
unit
val for_all :
tick_type:((Response.Tick_string.t, Response.Tick_string.Type.t)
Fieldslib.Field.readonly_t -> bool) ->
value:((Response.Tick_string.t, string)
Fieldslib.Field.readonly_t -> bool) ->
bool
val exists :
tick_type:((Response.Tick_string.t, Response.Tick_string.Type.t)
Fieldslib.Field.readonly_t -> bool) ->
value:((Response.Tick_string.t, string)
Fieldslib.Field.readonly_t -> bool) ->
bool
val to_list :
tick_type:((Response.Tick_string.t, Response.Tick_string.Type.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
value:((Response.Tick_string.t, string)
Fieldslib.Field.readonly_t -> 'elem__) ->
'elem__ list
val map_poly :
([< `Read ], Response.Tick_string.t, 'x0) Fieldslib.Field.user ->
'x0 list
module Direct :
sig
val iter :
Response.Tick_string.t ->
tick_type:((Response.Tick_string.t,
Response.Tick_string.Type.t)
Fieldslib.Field.readonly_t ->
Response.Tick_string.t ->
Response.Tick_string.Type.t -> unit) ->
value:((Response.Tick_string.t, string)
Fieldslib.Field.readonly_t ->
Response.Tick_string.t -> string -> unit) ->
unit
val fold :
Response.Tick_string.t ->
init:'acc__ ->
tick_type:('acc__ ->
(Response.Tick_string.t,
Response.Tick_string.Type.t)
Fieldslib.Field.readonly_t ->
Response.Tick_string.t ->
Response.Tick_string.Type.t -> 'acc__) ->
value:('acc__ ->
(Response.Tick_string.t, string)
Fieldslib.Field.readonly_t ->
Response.Tick_string.t -> string -> 'acc__) ->
'acc__
end
end
val unpickler : t Tws_prot.Unpickler.t
val pickler : t Tws_prot.Pickler.t Core.Std.Only_in_test.t
val ( = ) : t -> t -> bool
val create :
tick_type:Response.Tick_string.Type.t ->
value:string -> Response.Tick_string.t
val pp : Format.formatter -> Response.Tick_string.t -> unit
val t_of_sexp : Sexplib.Sexp.t -> Response.Tick_string.t
val sexp_of_t : Response.Tick_string.t -> Sexplib.Sexp.t
end
module Order_status :
sig
module State :
sig
type t =
[ `Cancelled
| `Filled
| `Inactive
| `Pending_cancel
| `Pending_submit
| `Pre_submitted
| `Submitted ]
val t_of_sexp : Sexplib.Sexp.t -> Response.Order_status.State.t
val __t_of_sexp__ : Sexplib.Sexp.t -> Response.Order_status.State.t
val sexp_of_t : Response.Order_status.State.t -> Sexplib.Sexp.t
end
type t = private {
state : Response.Order_status.State.t;
filled : Volume.t;
remaining : Volume.t;
avg_fill_price : Price.t;
permanent_id : int;
parent_id : Order_id.t;
last_fill_price : Price.t;
client_id : Client_id.t;
why_held : string option;
}
val why_held : Response.Order_status.t -> string option
val client_id : Response.Order_status.t -> Client_id.t
val last_fill_price : Response.Order_status.t -> Price.t
val parent_id : Response.Order_status.t -> Order_id.t
val permanent_id : Response.Order_status.t -> int
val avg_fill_price : Response.Order_status.t -> Price.t
val remaining : Response.Order_status.t -> Volume.t
val filled : Response.Order_status.t -> Volume.t
val state : Response.Order_status.t -> Response.Order_status.State.t
module Fields :
sig
val names : string list
val why_held :
(Response.Order_status.t, string option)
Fieldslib.Field.readonly_t
val client_id :
(Response.Order_status.t, Client_id.t) Fieldslib.Field.readonly_t
val last_fill_price :
(Response.Order_status.t, Price.t) Fieldslib.Field.readonly_t
val parent_id :
(Response.Order_status.t, Order_id.t) Fieldslib.Field.readonly_t
val permanent_id :
(Response.Order_status.t, int) Fieldslib.Field.readonly_t
val avg_fill_price :
(Response.Order_status.t, Price.t) Fieldslib.Field.readonly_t
val remaining :
(Response.Order_status.t, Volume.t) Fieldslib.Field.readonly_t
val filled :
(Response.Order_status.t, Volume.t) Fieldslib.Field.readonly_t
val state :
(Response.Order_status.t, Response.Order_status.State.t)
Fieldslib.Field.readonly_t
val fold :
init:'acc__ ->
state:('acc__ ->
(Response.Order_status.t, Response.Order_status.State.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
filled:('acc__ ->
(Response.Order_status.t, Volume.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
remaining:('acc__ ->
(Response.Order_status.t, Volume.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
avg_fill_price:('acc__ ->
(Response.Order_status.t, Price.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
permanent_id:('acc__ ->
(Response.Order_status.t, int)
Fieldslib.Field.readonly_t -> 'acc__) ->
parent_id:('acc__ ->
(Response.Order_status.t, Order_id.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
last_fill_price:('acc__ ->
(Response.Order_status.t, Price.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
client_id:('acc__ ->
(Response.Order_status.t, Client_id.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
why_held:('acc__ ->
(Response.Order_status.t, string option)
Fieldslib.Field.readonly_t -> 'acc__) ->
'acc__
val iter :
state:((Response.Order_status.t, Response.Order_status.State.t)
Fieldslib.Field.readonly_t -> unit) ->
filled:((Response.Order_status.t, Volume.t)
Fieldslib.Field.readonly_t -> unit) ->
remaining:((Response.Order_status.t, Volume.t)
Fieldslib.Field.readonly_t -> unit) ->
avg_fill_price:((Response.Order_status.t, Price.t)
Fieldslib.Field.readonly_t -> unit) ->
permanent_id:((Response.Order_status.t, int)
Fieldslib.Field.readonly_t -> unit) ->
parent_id:((Response.Order_status.t, Order_id.t)
Fieldslib.Field.readonly_t -> unit) ->
last_fill_price:((Response.Order_status.t, Price.t)
Fieldslib.Field.readonly_t -> unit) ->
client_id:((Response.Order_status.t, Client_id.t)
Fieldslib.Field.readonly_t -> unit) ->
why_held:((Response.Order_status.t, string option)
Fieldslib.Field.readonly_t -> unit) ->
unit
val for_all :
state:((Response.Order_status.t, Response.Order_status.State.t)
Fieldslib.Field.readonly_t -> bool) ->
filled:((Response.Order_status.t, Volume.t)
Fieldslib.Field.readonly_t -> bool) ->
remaining:((Response.Order_status.t, Volume.t)
Fieldslib.Field.readonly_t -> bool) ->
avg_fill_price:((Response.Order_status.t, Price.t)
Fieldslib.Field.readonly_t -> bool) ->
permanent_id:((Response.Order_status.t, int)
Fieldslib.Field.readonly_t -> bool) ->
parent_id:((Response.Order_status.t, Order_id.t)
Fieldslib.Field.readonly_t -> bool) ->
last_fill_price:((Response.Order_status.t, Price.t)
Fieldslib.Field.readonly_t -> bool) ->
client_id:((Response.Order_status.t, Client_id.t)
Fieldslib.Field.readonly_t -> bool) ->
why_held:((Response.Order_status.t, string option)
Fieldslib.Field.readonly_t -> bool) ->
bool
val exists :
state:((Response.Order_status.t, Response.Order_status.State.t)
Fieldslib.Field.readonly_t -> bool) ->
filled:((Response.Order_status.t, Volume.t)
Fieldslib.Field.readonly_t -> bool) ->
remaining:((Response.Order_status.t, Volume.t)
Fieldslib.Field.readonly_t -> bool) ->
avg_fill_price:((Response.Order_status.t, Price.t)
Fieldslib.Field.readonly_t -> bool) ->
permanent_id:((Response.Order_status.t, int)
Fieldslib.Field.readonly_t -> bool) ->
parent_id:((Response.Order_status.t, Order_id.t)
Fieldslib.Field.readonly_t -> bool) ->
last_fill_price:((Response.Order_status.t, Price.t)
Fieldslib.Field.readonly_t -> bool) ->
client_id:((Response.Order_status.t, Client_id.t)
Fieldslib.Field.readonly_t -> bool) ->
why_held:((Response.Order_status.t, string option)
Fieldslib.Field.readonly_t -> bool) ->
bool
val to_list :
state:((Response.Order_status.t, Response.Order_status.State.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
filled:((Response.Order_status.t, Volume.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
remaining:((Response.Order_status.t, Volume.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
avg_fill_price:((Response.Order_status.t, Price.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
permanent_id:((Response.Order_status.t, int)
Fieldslib.Field.readonly_t -> 'elem__) ->
parent_id:((Response.Order_status.t, Order_id.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
last_fill_price:((Response.Order_status.t, Price.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
client_id:((Response.Order_status.t, Client_id.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
why_held:((Response.Order_status.t, string option)
Fieldslib.Field.readonly_t -> 'elem__) ->
'elem__ list
val map_poly :
([< `Read ], Response.Order_status.t, 'x0) Fieldslib.Field.user ->
'x0 list
module Direct :
sig
val iter :
Response.Order_status.t ->
state:((Response.Order_status.t,
Response.Order_status.State.t)
Fieldslib.Field.readonly_t ->
Response.Order_status.t ->
Response.Order_status.State.t -> unit) ->
filled:((Response.Order_status.t, Volume.t)
Fieldslib.Field.readonly_t ->
Response.Order_status.t -> Volume.t -> unit) ->
remaining:((Response.Order_status.t, Volume.t)
Fieldslib.Field.readonly_t ->
Response.Order_status.t -> Volume.t -> unit) ->
avg_fill_price:((Response.Order_status.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Order_status.t -> Price.t -> unit) ->
permanent_id:((Response.Order_status.t, int)
Fieldslib.Field.readonly_t ->
Response.Order_status.t -> int -> unit) ->
parent_id:((Response.Order_status.t, Order_id.t)
Fieldslib.Field.readonly_t ->
Response.Order_status.t -> Order_id.t -> unit) ->
last_fill_price:((Response.Order_status.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Order_status.t -> Price.t -> unit) ->
client_id:((Response.Order_status.t, Client_id.t)
Fieldslib.Field.readonly_t ->
Response.Order_status.t -> Client_id.t -> unit) ->
why_held:((Response.Order_status.t, string option)
Fieldslib.Field.readonly_t ->
Response.Order_status.t -> string option -> unit) ->
unit
val fold :
Response.Order_status.t ->
init:'acc__ ->
state:('acc__ ->
(Response.Order_status.t,
Response.Order_status.State.t)
Fieldslib.Field.readonly_t ->
Response.Order_status.t ->
Response.Order_status.State.t -> 'acc__) ->
filled:('acc__ ->
(Response.Order_status.t, Volume.t)
Fieldslib.Field.readonly_t ->
Response.Order_status.t -> Volume.t -> 'acc__) ->
remaining:('acc__ ->
(Response.Order_status.t, Volume.t)
Fieldslib.Field.readonly_t ->
Response.Order_status.t -> Volume.t -> 'acc__) ->
avg_fill_price:('acc__ ->
(Response.Order_status.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Order_status.t -> Price.t -> 'acc__) ->
permanent_id:('acc__ ->
(Response.Order_status.t, int)
Fieldslib.Field.readonly_t ->
Response.Order_status.t -> int -> 'acc__) ->
parent_id:('acc__ ->
(Response.Order_status.t, Order_id.t)
Fieldslib.Field.readonly_t ->
Response.Order_status.t -> Order_id.t -> 'acc__) ->
last_fill_price:('acc__ ->
(Response.Order_status.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Order_status.t -> Price.t -> 'acc__) ->
client_id:('acc__ ->
(Response.Order_status.t, Client_id.t)
Fieldslib.Field.readonly_t ->
Response.Order_status.t -> Client_id.t -> 'acc__) ->
why_held:('acc__ ->
(Response.Order_status.t, string option)
Fieldslib.Field.readonly_t ->
Response.Order_status.t -> string option -> 'acc__) ->
'acc__
end
end
val unpickler : t Tws_prot.Unpickler.t
val pickler : t Tws_prot.Pickler.t Core.Std.Only_in_test.t
val ( = ) : t -> t -> bool
val create :
state:Response.Order_status.State.t ->
filled:Volume.t ->
remaining:Volume.t ->
avg_fill_price:Price.t ->
permanent_id:int ->
parent_id:Order_id.t ->
last_fill_price:Price.t ->
client_id:Client_id.t ->
why_held:string option -> Response.Order_status.t
val t_of_sexp : Sexplib.Sexp.t -> Response.Order_status.t
val sexp_of_t : Response.Order_status.t -> Sexplib.Sexp.t
end
module Account_update :
sig
type t = private {
key : string;
value : string;
currency : string option;
account_code : Account_code.t;
}
val account_code : Response.Account_update.t -> Account_code.t
val currency : Response.Account_update.t -> string option
val value : Response.Account_update.t -> string
val key : Response.Account_update.t -> string
module Fields :
sig
val names : string list
val account_code :
(Response.Account_update.t, Account_code.t)
Fieldslib.Field.readonly_t
val currency :
(Response.Account_update.t, string option)
Fieldslib.Field.readonly_t
val value :
(Response.Account_update.t, string) Fieldslib.Field.readonly_t
val key :
(Response.Account_update.t, string) Fieldslib.Field.readonly_t
val fold :
init:'acc__ ->
key:('acc__ ->
(Response.Account_update.t, string)
Fieldslib.Field.readonly_t -> 'acc__) ->
value:('acc__ ->
(Response.Account_update.t, string)
Fieldslib.Field.readonly_t -> 'acc__) ->
currency:('acc__ ->
(Response.Account_update.t, string option)
Fieldslib.Field.readonly_t -> 'acc__) ->
account_code:('acc__ ->
(Response.Account_update.t, Account_code.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
'acc__
val iter :
key:((Response.Account_update.t, string)
Fieldslib.Field.readonly_t -> unit) ->
value:((Response.Account_update.t, string)
Fieldslib.Field.readonly_t -> unit) ->
currency:((Response.Account_update.t, string option)
Fieldslib.Field.readonly_t -> unit) ->
account_code:((Response.Account_update.t, Account_code.t)
Fieldslib.Field.readonly_t -> unit) ->
unit
val for_all :
key:((Response.Account_update.t, string)
Fieldslib.Field.readonly_t -> bool) ->
value:((Response.Account_update.t, string)
Fieldslib.Field.readonly_t -> bool) ->
currency:((Response.Account_update.t, string option)
Fieldslib.Field.readonly_t -> bool) ->
account_code:((Response.Account_update.t, Account_code.t)
Fieldslib.Field.readonly_t -> bool) ->
bool
val exists :
key:((Response.Account_update.t, string)
Fieldslib.Field.readonly_t -> bool) ->
value:((Response.Account_update.t, string)
Fieldslib.Field.readonly_t -> bool) ->
currency:((Response.Account_update.t, string option)
Fieldslib.Field.readonly_t -> bool) ->
account_code:((Response.Account_update.t, Account_code.t)
Fieldslib.Field.readonly_t -> bool) ->
bool
val to_list :
key:((Response.Account_update.t, string)
Fieldslib.Field.readonly_t -> 'elem__) ->
value:((Response.Account_update.t, string)
Fieldslib.Field.readonly_t -> 'elem__) ->
currency:((Response.Account_update.t, string option)
Fieldslib.Field.readonly_t -> 'elem__) ->
account_code:((Response.Account_update.t, Account_code.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
'elem__ list
val map_poly :
([< `Read ], Response.Account_update.t, 'x0) Fieldslib.Field.user ->
'x0 list
module Direct :
sig
val iter :
Response.Account_update.t ->
key:((Response.Account_update.t, string)
Fieldslib.Field.readonly_t ->
Response.Account_update.t -> string -> unit) ->
value:((Response.Account_update.t, string)
Fieldslib.Field.readonly_t ->
Response.Account_update.t -> string -> unit) ->
currency:((Response.Account_update.t, string option)
Fieldslib.Field.readonly_t ->
Response.Account_update.t -> string option -> unit) ->
account_code:((Response.Account_update.t, Account_code.t)
Fieldslib.Field.readonly_t ->
Response.Account_update.t ->
Account_code.t -> unit) ->
unit
val fold :
Response.Account_update.t ->
init:'acc__ ->
key:('acc__ ->
(Response.Account_update.t, string)
Fieldslib.Field.readonly_t ->
Response.Account_update.t -> string -> 'acc__) ->
value:('acc__ ->
(Response.Account_update.t, string)
Fieldslib.Field.readonly_t ->
Response.Account_update.t -> string -> 'acc__) ->
currency:('acc__ ->
(Response.Account_update.t, string option)
Fieldslib.Field.readonly_t ->
Response.Account_update.t ->
string option -> 'acc__) ->
account_code:('acc__ ->
(Response.Account_update.t, Account_code.t)
Fieldslib.Field.readonly_t ->
Response.Account_update.t ->
Account_code.t -> 'acc__) ->
'acc__
end
end
val unpickler : t Tws_prot.Unpickler.t
val pickler : t Tws_prot.Pickler.t Core.Std.Only_in_test.t
val ( = ) : t -> t -> bool
val create :
key:string ->
value:string ->
currency:string option ->
account_code:Account_code.t -> Response.Account_update.t
val t_of_sexp : Sexplib.Sexp.t -> Response.Account_update.t
val sexp_of_t : Response.Account_update.t -> Sexplib.Sexp.t
end
module Position :
sig
type t = private {
contract : Raw_contract.t;
size : Volume.t;
market_price : Price.t;
market_value : Price.t;
average_cost : Price.t;
unrealized_pnl : Price.t;
realized_pnl : Price.t;
account_code : Account_code.t;
}
val account_code : Response.Position.t -> Account_code.t
val realized_pnl : Response.Position.t -> Price.t
val unrealized_pnl : Response.Position.t -> Price.t
val average_cost : Response.Position.t -> Price.t
val market_value : Response.Position.t -> Price.t
val market_price : Response.Position.t -> Price.t
val size : Response.Position.t -> Volume.t
module Fields :
sig
val names : string list
val account_code :
(Response.Position.t, Account_code.t) Fieldslib.Field.readonly_t
val realized_pnl :
(Response.Position.t, Price.t) Fieldslib.Field.readonly_t
val unrealized_pnl :
(Response.Position.t, Price.t) Fieldslib.Field.readonly_t
val average_cost :
(Response.Position.t, Price.t) Fieldslib.Field.readonly_t
val market_value :
(Response.Position.t, Price.t) Fieldslib.Field.readonly_t
val market_price :
(Response.Position.t, Price.t) Fieldslib.Field.readonly_t
val size :
(Response.Position.t, Volume.t) Fieldslib.Field.readonly_t
val contract :
(Response.Position.t, Raw_contract.t) Fieldslib.Field.readonly_t
val fold :
init:'acc__ ->
contract:('acc__ ->
(Response.Position.t, Raw_contract.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
size:('acc__ ->
(Response.Position.t, Volume.t) Fieldslib.Field.readonly_t ->
'acc__) ->
market_price:('acc__ ->
(Response.Position.t, Price.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
market_value:('acc__ ->
(Response.Position.t, Price.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
average_cost:('acc__ ->
(Response.Position.t, Price.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
unrealized_pnl:('acc__ ->
(Response.Position.t, Price.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
realized_pnl:('acc__ ->
(Response.Position.t, Price.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
account_code:('acc__ ->
(Response.Position.t, Account_code.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
'acc__
val iter :
contract:((Response.Position.t, Raw_contract.t)
Fieldslib.Field.readonly_t -> unit) ->
size:((Response.Position.t, Volume.t) Fieldslib.Field.readonly_t ->
unit) ->
market_price:((Response.Position.t, Price.t)
Fieldslib.Field.readonly_t -> unit) ->
market_value:((Response.Position.t, Price.t)
Fieldslib.Field.readonly_t -> unit) ->
average_cost:((Response.Position.t, Price.t)
Fieldslib.Field.readonly_t -> unit) ->
unrealized_pnl:((Response.Position.t, Price.t)
Fieldslib.Field.readonly_t -> unit) ->
realized_pnl:((Response.Position.t, Price.t)
Fieldslib.Field.readonly_t -> unit) ->
account_code:((Response.Position.t, Account_code.t)
Fieldslib.Field.readonly_t -> unit) ->
unit
val for_all :
contract:((Response.Position.t, Raw_contract.t)
Fieldslib.Field.readonly_t -> bool) ->
size:((Response.Position.t, Volume.t) Fieldslib.Field.readonly_t ->
bool) ->
market_price:((Response.Position.t, Price.t)
Fieldslib.Field.readonly_t -> bool) ->
market_value:((Response.Position.t, Price.t)
Fieldslib.Field.readonly_t -> bool) ->
average_cost:((Response.Position.t, Price.t)
Fieldslib.Field.readonly_t -> bool) ->
unrealized_pnl:((Response.Position.t, Price.t)
Fieldslib.Field.readonly_t -> bool) ->
realized_pnl:((Response.Position.t, Price.t)
Fieldslib.Field.readonly_t -> bool) ->
account_code:((Response.Position.t, Account_code.t)
Fieldslib.Field.readonly_t -> bool) ->
bool
val exists :
contract:((Response.Position.t, Raw_contract.t)
Fieldslib.Field.readonly_t -> bool) ->
size:((Response.Position.t, Volume.t) Fieldslib.Field.readonly_t ->
bool) ->
market_price:((Response.Position.t, Price.t)
Fieldslib.Field.readonly_t -> bool) ->
market_value:((Response.Position.t, Price.t)
Fieldslib.Field.readonly_t -> bool) ->
average_cost:((Response.Position.t, Price.t)
Fieldslib.Field.readonly_t -> bool) ->
unrealized_pnl:((Response.Position.t, Price.t)
Fieldslib.Field.readonly_t -> bool) ->
realized_pnl:((Response.Position.t, Price.t)
Fieldslib.Field.readonly_t -> bool) ->
account_code:((Response.Position.t, Account_code.t)
Fieldslib.Field.readonly_t -> bool) ->
bool
val to_list :
contract:((Response.Position.t, Raw_contract.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
size:((Response.Position.t, Volume.t) Fieldslib.Field.readonly_t ->
'elem__) ->
market_price:((Response.Position.t, Price.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
market_value:((Response.Position.t, Price.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
average_cost:((Response.Position.t, Price.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
unrealized_pnl:((Response.Position.t, Price.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
realized_pnl:((Response.Position.t, Price.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
account_code:((Response.Position.t, Account_code.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
'elem__ list
val map_poly :
([< `Read ], Response.Position.t, 'x0) Fieldslib.Field.user ->
'x0 list
module Direct :
sig
val iter :
Response.Position.t ->
contract:((Response.Position.t, Raw_contract.t)
Fieldslib.Field.readonly_t ->
Response.Position.t -> Raw_contract.t -> unit) ->
size:((Response.Position.t, Volume.t)
Fieldslib.Field.readonly_t ->
Response.Position.t -> Volume.t -> unit) ->
market_price:((Response.Position.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Position.t -> Price.t -> unit) ->
market_value:((Response.Position.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Position.t -> Price.t -> unit) ->
average_cost:((Response.Position.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Position.t -> Price.t -> unit) ->
unrealized_pnl:((Response.Position.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Position.t -> Price.t -> unit) ->
realized_pnl:((Response.Position.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Position.t -> Price.t -> unit) ->
account_code:((Response.Position.t, Account_code.t)
Fieldslib.Field.readonly_t ->
Response.Position.t -> Account_code.t -> unit) ->
unit
val fold :
Response.Position.t ->
init:'acc__ ->
contract:('acc__ ->
(Response.Position.t, Raw_contract.t)
Fieldslib.Field.readonly_t ->
Response.Position.t -> Raw_contract.t -> 'acc__) ->
size:('acc__ ->
(Response.Position.t, Volume.t)
Fieldslib.Field.readonly_t ->
Response.Position.t -> Volume.t -> 'acc__) ->
market_price:('acc__ ->
(Response.Position.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Position.t -> Price.t -> 'acc__) ->
market_value:('acc__ ->
(Response.Position.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Position.t -> Price.t -> 'acc__) ->
average_cost:('acc__ ->
(Response.Position.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Position.t -> Price.t -> 'acc__) ->
unrealized_pnl:('acc__ ->
(Response.Position.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Position.t -> Price.t -> 'acc__) ->
realized_pnl:('acc__ ->
(Response.Position.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Position.t -> Price.t -> 'acc__) ->
account_code:('acc__ ->
(Response.Position.t, Account_code.t)
Fieldslib.Field.readonly_t ->
Response.Position.t -> Account_code.t -> 'acc__) ->
'acc__
end
end
val unpickler : t Tws_prot.Unpickler.t
val pickler : t Tws_prot.Pickler.t Core.Std.Only_in_test.t
val ( = ) : t -> t -> bool
val create :
contract:[< Security_type.t ] Contract.t ->
size:Volume.t ->
market_price:Price.t ->
market_value:Price.t ->
average_cost:Price.t ->
unrealized_pnl:Price.t ->
realized_pnl:Price.t ->
account_code:Account_code.t -> Response.Position.t
val contract : Response.Position.t -> [< Security_type.t ] Contract.t
val total_pnl : Response.Position.t -> Price.t
val return : Response.Position.t -> float
val t_of_sexp : Sexplib.Sexp.t -> Response.Position.t
val sexp_of_t : Response.Position.t -> Sexplib.Sexp.t
end
module Contract_data :
sig
type t = private {
contract : Raw_contract.t;
market_name : string;
trading_class : string;
min_tick : float;
order_types : string list;
valid_exchanges : Exchange.t list;
price_magnifier : int;
underlying_id : int;
long_name : string;
contract_month : string;
industry : string;
category : string;
subcategory : string;
time_zone : Core.Std.Time.Zone.t option;
trading_hours : Trading_times.t list;
liquid_hours : Trading_times.t list;
}
val liquid_hours : Response.Contract_data.t -> Trading_times.t list
val trading_hours : Response.Contract_data.t -> Trading_times.t list
val time_zone : Response.Contract_data.t -> Core.Std.Time.Zone.t option
val subcategory : Response.Contract_data.t -> string
val category : Response.Contract_data.t -> string
val industry : Response.Contract_data.t -> string
val contract_month : Response.Contract_data.t -> string
val long_name : Response.Contract_data.t -> string
val underlying_id : Response.Contract_data.t -> int
val price_magnifier : Response.Contract_data.t -> int
val valid_exchanges : Response.Contract_data.t -> Exchange.t list
val order_types : Response.Contract_data.t -> string list
val min_tick : Response.Contract_data.t -> float
val trading_class : Response.Contract_data.t -> string
val market_name : Response.Contract_data.t -> string
module Fields :
sig
val names : string list
val liquid_hours :
(Response.Contract_data.t, Trading_times.t list)
Fieldslib.Field.readonly_t
val trading_hours :
(Response.Contract_data.t, Trading_times.t list)
Fieldslib.Field.readonly_t
val time_zone :
(Response.Contract_data.t, Core.Std.Time.Zone.t option)
Fieldslib.Field.readonly_t
val subcategory :
(Response.Contract_data.t, string) Fieldslib.Field.readonly_t
val category :
(Response.Contract_data.t, string) Fieldslib.Field.readonly_t
val industry :
(Response.Contract_data.t, string) Fieldslib.Field.readonly_t
val contract_month :
(Response.Contract_data.t, string) Fieldslib.Field.readonly_t
val long_name :
(Response.Contract_data.t, string) Fieldslib.Field.readonly_t
val underlying_id :
(Response.Contract_data.t, int) Fieldslib.Field.readonly_t
val price_magnifier :
(Response.Contract_data.t, int) Fieldslib.Field.readonly_t
val valid_exchanges :
(Response.Contract_data.t, Exchange.t list)
Fieldslib.Field.readonly_t
val order_types :
(Response.Contract_data.t, string list)
Fieldslib.Field.readonly_t
val min_tick :
(Response.Contract_data.t, float) Fieldslib.Field.readonly_t
val trading_class :
(Response.Contract_data.t, string) Fieldslib.Field.readonly_t
val market_name :
(Response.Contract_data.t, string) Fieldslib.Field.readonly_t
val contract :
(Response.Contract_data.t, Raw_contract.t)
Fieldslib.Field.readonly_t
val fold :
init:'acc__ ->
contract:('acc__ ->
(Response.Contract_data.t, Raw_contract.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
market_name:('acc__ ->
(Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> 'acc__) ->
trading_class:('acc__ ->
(Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> 'acc__) ->
min_tick:('acc__ ->
(Response.Contract_data.t, float)
Fieldslib.Field.readonly_t -> 'acc__) ->
order_types:('acc__ ->
(Response.Contract_data.t, string list)
Fieldslib.Field.readonly_t -> 'acc__) ->
valid_exchanges:('acc__ ->
(Response.Contract_data.t, Exchange.t list)
Fieldslib.Field.readonly_t -> 'acc__) ->
price_magnifier:('acc__ ->
(Response.Contract_data.t, int)
Fieldslib.Field.readonly_t -> 'acc__) ->
underlying_id:('acc__ ->
(Response.Contract_data.t, int)
Fieldslib.Field.readonly_t -> 'acc__) ->
long_name:('acc__ ->
(Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> 'acc__) ->
contract_month:('acc__ ->
(Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> 'acc__) ->
industry:('acc__ ->
(Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> 'acc__) ->
category:('acc__ ->
(Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> 'acc__) ->
subcategory:('acc__ ->
(Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> 'acc__) ->
time_zone:('acc__ ->
(Response.Contract_data.t,
Core.Std.Time.Zone.t option)
Fieldslib.Field.readonly_t -> 'acc__) ->
trading_hours:('acc__ ->
(Response.Contract_data.t, Trading_times.t list)
Fieldslib.Field.readonly_t -> 'acc__) ->
liquid_hours:('acc__ ->
(Response.Contract_data.t, Trading_times.t list)
Fieldslib.Field.readonly_t -> 'acc__) ->
'acc__
val iter :
contract:((Response.Contract_data.t, Raw_contract.t)
Fieldslib.Field.readonly_t -> unit) ->
market_name:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> unit) ->
trading_class:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> unit) ->
min_tick:((Response.Contract_data.t, float)
Fieldslib.Field.readonly_t -> unit) ->
order_types:((Response.Contract_data.t, string list)
Fieldslib.Field.readonly_t -> unit) ->
valid_exchanges:((Response.Contract_data.t, Exchange.t list)
Fieldslib.Field.readonly_t -> unit) ->
price_magnifier:((Response.Contract_data.t, int)
Fieldslib.Field.readonly_t -> unit) ->
underlying_id:((Response.Contract_data.t, int)
Fieldslib.Field.readonly_t -> unit) ->
long_name:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> unit) ->
contract_month:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> unit) ->
industry:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> unit) ->
category:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> unit) ->
subcategory:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> unit) ->
time_zone:((Response.Contract_data.t,
Core.Std.Time.Zone.t option)
Fieldslib.Field.readonly_t -> unit) ->
trading_hours:((Response.Contract_data.t, Trading_times.t list)
Fieldslib.Field.readonly_t -> unit) ->
liquid_hours:((Response.Contract_data.t, Trading_times.t list)
Fieldslib.Field.readonly_t -> unit) ->
unit
val for_all :
contract:((Response.Contract_data.t, Raw_contract.t)
Fieldslib.Field.readonly_t -> bool) ->
market_name:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> bool) ->
trading_class:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> bool) ->
min_tick:((Response.Contract_data.t, float)
Fieldslib.Field.readonly_t -> bool) ->
order_types:((Response.Contract_data.t, string list)
Fieldslib.Field.readonly_t -> bool) ->
valid_exchanges:((Response.Contract_data.t, Exchange.t list)
Fieldslib.Field.readonly_t -> bool) ->
price_magnifier:((Response.Contract_data.t, int)
Fieldslib.Field.readonly_t -> bool) ->
underlying_id:((Response.Contract_data.t, int)
Fieldslib.Field.readonly_t -> bool) ->
long_name:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> bool) ->
contract_month:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> bool) ->
industry:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> bool) ->
category:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> bool) ->
subcategory:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> bool) ->
time_zone:((Response.Contract_data.t,
Core.Std.Time.Zone.t option)
Fieldslib.Field.readonly_t -> bool) ->
trading_hours:((Response.Contract_data.t, Trading_times.t list)
Fieldslib.Field.readonly_t -> bool) ->
liquid_hours:((Response.Contract_data.t, Trading_times.t list)
Fieldslib.Field.readonly_t -> bool) ->
bool
val exists :
contract:((Response.Contract_data.t, Raw_contract.t)
Fieldslib.Field.readonly_t -> bool) ->
market_name:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> bool) ->
trading_class:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> bool) ->
min_tick:((Response.Contract_data.t, float)
Fieldslib.Field.readonly_t -> bool) ->
order_types:((Response.Contract_data.t, string list)
Fieldslib.Field.readonly_t -> bool) ->
valid_exchanges:((Response.Contract_data.t, Exchange.t list)
Fieldslib.Field.readonly_t -> bool) ->
price_magnifier:((Response.Contract_data.t, int)
Fieldslib.Field.readonly_t -> bool) ->
underlying_id:((Response.Contract_data.t, int)
Fieldslib.Field.readonly_t -> bool) ->
long_name:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> bool) ->
contract_month:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> bool) ->
industry:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> bool) ->
category:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> bool) ->
subcategory:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> bool) ->
time_zone:((Response.Contract_data.t,
Core.Std.Time.Zone.t option)
Fieldslib.Field.readonly_t -> bool) ->
trading_hours:((Response.Contract_data.t, Trading_times.t list)
Fieldslib.Field.readonly_t -> bool) ->
liquid_hours:((Response.Contract_data.t, Trading_times.t list)
Fieldslib.Field.readonly_t -> bool) ->
bool
val to_list :
contract:((Response.Contract_data.t, Raw_contract.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
market_name:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> 'elem__) ->
trading_class:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> 'elem__) ->
min_tick:((Response.Contract_data.t, float)
Fieldslib.Field.readonly_t -> 'elem__) ->
order_types:((Response.Contract_data.t, string list)
Fieldslib.Field.readonly_t -> 'elem__) ->
valid_exchanges:((Response.Contract_data.t, Exchange.t list)
Fieldslib.Field.readonly_t -> 'elem__) ->
price_magnifier:((Response.Contract_data.t, int)
Fieldslib.Field.readonly_t -> 'elem__) ->
underlying_id:((Response.Contract_data.t, int)
Fieldslib.Field.readonly_t -> 'elem__) ->
long_name:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> 'elem__) ->
contract_month:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> 'elem__) ->
industry:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> 'elem__) ->
category:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> 'elem__) ->
subcategory:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t -> 'elem__) ->
time_zone:((Response.Contract_data.t,
Core.Std.Time.Zone.t option)
Fieldslib.Field.readonly_t -> 'elem__) ->
trading_hours:((Response.Contract_data.t, Trading_times.t list)
Fieldslib.Field.readonly_t -> 'elem__) ->
liquid_hours:((Response.Contract_data.t, Trading_times.t list)
Fieldslib.Field.readonly_t -> 'elem__) ->
'elem__ list
val map_poly :
([< `Read ], Response.Contract_data.t, 'x0) Fieldslib.Field.user ->
'x0 list
module Direct :
sig
val iter :
Response.Contract_data.t ->
contract:((Response.Contract_data.t, Raw_contract.t)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t -> Raw_contract.t -> unit) ->
market_name:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t -> string -> unit) ->
trading_class:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t -> string -> unit) ->
min_tick:((Response.Contract_data.t, float)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t -> float -> unit) ->
order_types:((Response.Contract_data.t, string list)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t -> string list -> unit) ->
valid_exchanges:((Response.Contract_data.t, Exchange.t list)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t ->
Exchange.t list -> unit) ->
price_magnifier:((Response.Contract_data.t, int)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t -> int -> unit) ->
underlying_id:((Response.Contract_data.t, int)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t -> int -> unit) ->
long_name:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t -> string -> unit) ->
contract_month:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t -> string -> unit) ->
industry:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t -> string -> unit) ->
category:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t -> string -> unit) ->
subcategory:((Response.Contract_data.t, string)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t -> string -> unit) ->
time_zone:((Response.Contract_data.t,
Core.Std.Time.Zone.t option)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t ->
Core.Std.Time.Zone.t option -> unit) ->
trading_hours:((Response.Contract_data.t,
Trading_times.t list)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t ->
Trading_times.t list -> unit) ->
liquid_hours:((Response.Contract_data.t,
Trading_times.t list)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t ->
Trading_times.t list -> unit) ->
unit
val fold :
Response.Contract_data.t ->
init:'acc__ ->
contract:('acc__ ->
(Response.Contract_data.t, Raw_contract.t)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t ->
Raw_contract.t -> 'acc__) ->
market_name:('acc__ ->
(Response.Contract_data.t, string)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t -> string -> 'acc__) ->
trading_class:('acc__ ->
(Response.Contract_data.t, string)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t -> string -> 'acc__) ->
min_tick:('acc__ ->
(Response.Contract_data.t, float)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t -> float -> 'acc__) ->
order_types:('acc__ ->
(Response.Contract_data.t, string list)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t ->
string list -> 'acc__) ->
valid_exchanges:('acc__ ->
(Response.Contract_data.t, Exchange.t list)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t ->
Exchange.t list -> 'acc__) ->
price_magnifier:('acc__ ->
(Response.Contract_data.t, int)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t -> int -> 'acc__) ->
underlying_id:('acc__ ->
(Response.Contract_data.t, int)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t -> int -> 'acc__) ->
long_name:('acc__ ->
(Response.Contract_data.t, string)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t -> string -> 'acc__) ->
contract_month:('acc__ ->
(Response.Contract_data.t, string)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t -> string -> 'acc__) ->
industry:('acc__ ->
(Response.Contract_data.t, string)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t -> string -> 'acc__) ->
category:('acc__ ->
(Response.Contract_data.t, string)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t -> string -> 'acc__) ->
subcategory:('acc__ ->
(Response.Contract_data.t, string)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t -> string -> 'acc__) ->
time_zone:('acc__ ->
(Response.Contract_data.t,
Core.Std.Time.Zone.t option)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t ->
Core.Std.Time.Zone.t option -> 'acc__) ->
trading_hours:('acc__ ->
(Response.Contract_data.t,
Trading_times.t list)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t ->
Trading_times.t list -> 'acc__) ->
liquid_hours:('acc__ ->
(Response.Contract_data.t,
Trading_times.t list)
Fieldslib.Field.readonly_t ->
Response.Contract_data.t ->
Trading_times.t list -> 'acc__) ->
'acc__
end
end
val unpickler : t Tws_prot.Unpickler.t
val pickler : t Tws_prot.Pickler.t Core.Std.Only_in_test.t
val ( = ) : t -> t -> bool
val create :
contract:[< Security_type.t ] Contract.t ->
market_name:string ->
trading_class:string ->
min_tick:float ->
order_types:string list ->
valid_exchanges:Exchange.t list ->
price_magnifier:int ->
underlying_id:int ->
long_name:string ->
contract_month:string ->
industry:string ->
category:string ->
subcategory:string ->
time_zone:Core.Std.Time.Zone.t ->
trading_hours:Trading_times.t list ->
liquid_hours:Trading_times.t list -> Response.Contract_data.t
val contract :
Response.Contract_data.t -> [< Security_type.t ] Contract.t
val regular_trading_times : Response.Contract_data.t -> Trading_times.t
val extended_trading_times :
Response.Contract_data.t -> Trading_times.t
val t_of_sexp : Sexplib.Sexp.t -> Response.Contract_data.t
val sexp_of_t : Response.Contract_data.t -> Sexplib.Sexp.t
end
module Execution :
sig
module Side :
sig
type t = [ `bought | `sold ]
val of_string : string -> t
val to_string : t -> string
val t_of_sexp : Sexplib.Sexp.t -> Response.Execution.Side.t
val __t_of_sexp__ : Sexplib.Sexp.t -> Response.Execution.Side.t
val sexp_of_t : Response.Execution.Side.t -> Sexplib.Sexp.t
end
type t = private {
order_id : Order_id.t;
contract : Raw_contract.t;
exec_id : Execution_id.t;
time : Core.Std.Time.t;
account_code : Account_code.t;
exchange : Exchange.t;
side : Response.Execution.Side.t;
volume : Volume.t;
price : Price.t;
permanent_id : int;
client_id : Client_id.t;
liquidation : int;
cumulative_volume : Volume.t;
average_price : Price.t;
order_ref : string option;
}
val order_ref : Response.Execution.t -> string option
val average_price : Response.Execution.t -> Price.t
val cumulative_volume : Response.Execution.t -> Volume.t
val liquidation : Response.Execution.t -> int
val client_id : Response.Execution.t -> Client_id.t
val permanent_id : Response.Execution.t -> int
val price : Response.Execution.t -> Price.t
val volume : Response.Execution.t -> Volume.t
val side : Response.Execution.t -> Response.Execution.Side.t
val exchange : Response.Execution.t -> Exchange.t
val account_code : Response.Execution.t -> Account_code.t
val time : Response.Execution.t -> Core.Std.Time.t
val exec_id : Response.Execution.t -> Execution_id.t
val order_id : Response.Execution.t -> Order_id.t
module Fields :
sig
val names : string list
val order_ref :
(Response.Execution.t, string option) Fieldslib.Field.readonly_t
val average_price :
(Response.Execution.t, Price.t) Fieldslib.Field.readonly_t
val cumulative_volume :
(Response.Execution.t, Volume.t) Fieldslib.Field.readonly_t
val liquidation :
(Response.Execution.t, int) Fieldslib.Field.readonly_t
val client_id :
(Response.Execution.t, Client_id.t) Fieldslib.Field.readonly_t
val permanent_id :
(Response.Execution.t, int) Fieldslib.Field.readonly_t
val price :
(Response.Execution.t, Price.t) Fieldslib.Field.readonly_t
val volume :
(Response.Execution.t, Volume.t) Fieldslib.Field.readonly_t
val side :
(Response.Execution.t, Response.Execution.Side.t)
Fieldslib.Field.readonly_t
val exchange :
(Response.Execution.t, Exchange.t) Fieldslib.Field.readonly_t
val account_code :
(Response.Execution.t, Account_code.t) Fieldslib.Field.readonly_t
val time :
(Response.Execution.t, Core.Std.Time.t)
Fieldslib.Field.readonly_t
val exec_id :
(Response.Execution.t, Execution_id.t) Fieldslib.Field.readonly_t
val contract :
(Response.Execution.t, Raw_contract.t) Fieldslib.Field.readonly_t
val order_id :
(Response.Execution.t, Order_id.t) Fieldslib.Field.readonly_t
val fold :
init:'acc__ ->
order_id:('acc__ ->
(Response.Execution.t, Order_id.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
contract:('acc__ ->
(Response.Execution.t, Raw_contract.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
exec_id:('acc__ ->
(Response.Execution.t, Execution_id.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
time:('acc__ ->
(Response.Execution.t, Core.Std.Time.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
account_code:('acc__ ->
(Response.Execution.t, Account_code.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
exchange:('acc__ ->
(Response.Execution.t, Exchange.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
side:('acc__ ->
(Response.Execution.t, Response.Execution.Side.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
volume:('acc__ ->
(Response.Execution.t, Volume.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
price:('acc__ ->
(Response.Execution.t, Price.t) Fieldslib.Field.readonly_t ->
'acc__) ->
permanent_id:('acc__ ->
(Response.Execution.t, int)
Fieldslib.Field.readonly_t -> 'acc__) ->
client_id:('acc__ ->
(Response.Execution.t, Client_id.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
liquidation:('acc__ ->
(Response.Execution.t, int)
Fieldslib.Field.readonly_t -> 'acc__) ->
cumulative_volume:('acc__ ->
(Response.Execution.t, Volume.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
average_price:('acc__ ->
(Response.Execution.t, Price.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
order_ref:('acc__ ->
(Response.Execution.t, string option)
Fieldslib.Field.readonly_t -> 'acc__) ->
'acc__
val iter :
order_id:((Response.Execution.t, Order_id.t)
Fieldslib.Field.readonly_t -> unit) ->
contract:((Response.Execution.t, Raw_contract.t)
Fieldslib.Field.readonly_t -> unit) ->
exec_id:((Response.Execution.t, Execution_id.t)
Fieldslib.Field.readonly_t -> unit) ->
time:((Response.Execution.t, Core.Std.Time.t)
Fieldslib.Field.readonly_t -> unit) ->
account_code:((Response.Execution.t, Account_code.t)
Fieldslib.Field.readonly_t -> unit) ->
exchange:((Response.Execution.t, Exchange.t)
Fieldslib.Field.readonly_t -> unit) ->
side:((Response.Execution.t, Response.Execution.Side.t)
Fieldslib.Field.readonly_t -> unit) ->
volume:((Response.Execution.t, Volume.t)
Fieldslib.Field.readonly_t -> unit) ->
price:((Response.Execution.t, Price.t) Fieldslib.Field.readonly_t ->
unit) ->
permanent_id:((Response.Execution.t, int)
Fieldslib.Field.readonly_t -> unit) ->
client_id:((Response.Execution.t, Client_id.t)
Fieldslib.Field.readonly_t -> unit) ->
liquidation:((Response.Execution.t, int)
Fieldslib.Field.readonly_t -> unit) ->
cumulative_volume:((Response.Execution.t, Volume.t)
Fieldslib.Field.readonly_t -> unit) ->
average_price:((Response.Execution.t, Price.t)
Fieldslib.Field.readonly_t -> unit) ->
order_ref:((Response.Execution.t, string option)
Fieldslib.Field.readonly_t -> unit) ->
unit
val for_all :
order_id:((Response.Execution.t, Order_id.t)
Fieldslib.Field.readonly_t -> bool) ->
contract:((Response.Execution.t, Raw_contract.t)
Fieldslib.Field.readonly_t -> bool) ->
exec_id:((Response.Execution.t, Execution_id.t)
Fieldslib.Field.readonly_t -> bool) ->
time:((Response.Execution.t, Core.Std.Time.t)
Fieldslib.Field.readonly_t -> bool) ->
account_code:((Response.Execution.t, Account_code.t)
Fieldslib.Field.readonly_t -> bool) ->
exchange:((Response.Execution.t, Exchange.t)
Fieldslib.Field.readonly_t -> bool) ->
side:((Response.Execution.t, Response.Execution.Side.t)
Fieldslib.Field.readonly_t -> bool) ->
volume:((Response.Execution.t, Volume.t)
Fieldslib.Field.readonly_t -> bool) ->
price:((Response.Execution.t, Price.t) Fieldslib.Field.readonly_t ->
bool) ->
permanent_id:((Response.Execution.t, int)
Fieldslib.Field.readonly_t -> bool) ->
client_id:((Response.Execution.t, Client_id.t)
Fieldslib.Field.readonly_t -> bool) ->
liquidation:((Response.Execution.t, int)
Fieldslib.Field.readonly_t -> bool) ->
cumulative_volume:((Response.Execution.t, Volume.t)
Fieldslib.Field.readonly_t -> bool) ->
average_price:((Response.Execution.t, Price.t)
Fieldslib.Field.readonly_t -> bool) ->
order_ref:((Response.Execution.t, string option)
Fieldslib.Field.readonly_t -> bool) ->
bool
val exists :
order_id:((Response.Execution.t, Order_id.t)
Fieldslib.Field.readonly_t -> bool) ->
contract:((Response.Execution.t, Raw_contract.t)
Fieldslib.Field.readonly_t -> bool) ->
exec_id:((Response.Execution.t, Execution_id.t)
Fieldslib.Field.readonly_t -> bool) ->
time:((Response.Execution.t, Core.Std.Time.t)
Fieldslib.Field.readonly_t -> bool) ->
account_code:((Response.Execution.t, Account_code.t)
Fieldslib.Field.readonly_t -> bool) ->
exchange:((Response.Execution.t, Exchange.t)
Fieldslib.Field.readonly_t -> bool) ->
side:((Response.Execution.t, Response.Execution.Side.t)
Fieldslib.Field.readonly_t -> bool) ->
volume:((Response.Execution.t, Volume.t)
Fieldslib.Field.readonly_t -> bool) ->
price:((Response.Execution.t, Price.t) Fieldslib.Field.readonly_t ->
bool) ->
permanent_id:((Response.Execution.t, int)
Fieldslib.Field.readonly_t -> bool) ->
client_id:((Response.Execution.t, Client_id.t)
Fieldslib.Field.readonly_t -> bool) ->
liquidation:((Response.Execution.t, int)
Fieldslib.Field.readonly_t -> bool) ->
cumulative_volume:((Response.Execution.t, Volume.t)
Fieldslib.Field.readonly_t -> bool) ->
average_price:((Response.Execution.t, Price.t)
Fieldslib.Field.readonly_t -> bool) ->
order_ref:((Response.Execution.t, string option)
Fieldslib.Field.readonly_t -> bool) ->
bool
val to_list :
order_id:((Response.Execution.t, Order_id.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
contract:((Response.Execution.t, Raw_contract.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
exec_id:((Response.Execution.t, Execution_id.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
time:((Response.Execution.t, Core.Std.Time.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
account_code:((Response.Execution.t, Account_code.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
exchange:((Response.Execution.t, Exchange.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
side:((Response.Execution.t, Response.Execution.Side.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
volume:((Response.Execution.t, Volume.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
price:((Response.Execution.t, Price.t) Fieldslib.Field.readonly_t ->
'elem__) ->
permanent_id:((Response.Execution.t, int)
Fieldslib.Field.readonly_t -> 'elem__) ->
client_id:((Response.Execution.t, Client_id.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
liquidation:((Response.Execution.t, int)
Fieldslib.Field.readonly_t -> 'elem__) ->
cumulative_volume:((Response.Execution.t, Volume.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
average_price:((Response.Execution.t, Price.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
order_ref:((Response.Execution.t, string option)
Fieldslib.Field.readonly_t -> 'elem__) ->
'elem__ list
val map_poly :
([< `Read ], Response.Execution.t, 'x0) Fieldslib.Field.user ->
'x0 list
module Direct :
sig
val iter :
Response.Execution.t ->
order_id:((Response.Execution.t, Order_id.t)
Fieldslib.Field.readonly_t ->
Response.Execution.t -> Order_id.t -> unit) ->
contract:((Response.Execution.t, Raw_contract.t)
Fieldslib.Field.readonly_t ->
Response.Execution.t -> Raw_contract.t -> unit) ->
exec_id:((Response.Execution.t, Execution_id.t)
Fieldslib.Field.readonly_t ->
Response.Execution.t -> Execution_id.t -> unit) ->
time:((Response.Execution.t, Core.Std.Time.t)
Fieldslib.Field.readonly_t ->
Response.Execution.t -> Core.Std.Time.t -> unit) ->
account_code:((Response.Execution.t, Account_code.t)
Fieldslib.Field.readonly_t ->
Response.Execution.t -> Account_code.t -> unit) ->
exchange:((Response.Execution.t, Exchange.t)
Fieldslib.Field.readonly_t ->
Response.Execution.t -> Exchange.t -> unit) ->
side:((Response.Execution.t, Response.Execution.Side.t)
Fieldslib.Field.readonly_t ->
Response.Execution.t ->
Response.Execution.Side.t -> unit) ->
volume:((Response.Execution.t, Volume.t)
Fieldslib.Field.readonly_t ->
Response.Execution.t -> Volume.t -> unit) ->
price:((Response.Execution.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Execution.t -> Price.t -> unit) ->
permanent_id:((Response.Execution.t, int)
Fieldslib.Field.readonly_t ->
Response.Execution.t -> int -> unit) ->
client_id:((Response.Execution.t, Client_id.t)
Fieldslib.Field.readonly_t ->
Response.Execution.t -> Client_id.t -> unit) ->
liquidation:((Response.Execution.t, int)
Fieldslib.Field.readonly_t ->
Response.Execution.t -> int -> unit) ->
cumulative_volume:((Response.Execution.t, Volume.t)
Fieldslib.Field.readonly_t ->
Response.Execution.t -> Volume.t -> unit) ->
average_price:((Response.Execution.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Execution.t -> Price.t -> unit) ->
order_ref:((Response.Execution.t, string option)
Fieldslib.Field.readonly_t ->
Response.Execution.t -> string option -> unit) ->
unit
val fold :
Response.Execution.t ->
init:'acc__ ->
order_id:('acc__ ->
(Response.Execution.t, Order_id.t)
Fieldslib.Field.readonly_t ->
Response.Execution.t -> Order_id.t -> 'acc__) ->
contract:('acc__ ->
(Response.Execution.t, Raw_contract.t)
Fieldslib.Field.readonly_t ->
Response.Execution.t -> Raw_contract.t -> 'acc__) ->
exec_id:('acc__ ->
(Response.Execution.t, Execution_id.t)
Fieldslib.Field.readonly_t ->
Response.Execution.t -> Execution_id.t -> 'acc__) ->
time:('acc__ ->
(Response.Execution.t, Core.Std.Time.t)
Fieldslib.Field.readonly_t ->
Response.Execution.t -> Core.Std.Time.t -> 'acc__) ->
account_code:('acc__ ->
(Response.Execution.t, Account_code.t)
Fieldslib.Field.readonly_t ->
Response.Execution.t ->
Account_code.t -> 'acc__) ->
exchange:('acc__ ->
(Response.Execution.t, Exchange.t)
Fieldslib.Field.readonly_t ->
Response.Execution.t -> Exchange.t -> 'acc__) ->
side:('acc__ ->
(Response.Execution.t, Response.Execution.Side.t)
Fieldslib.Field.readonly_t ->
Response.Execution.t ->
Response.Execution.Side.t -> 'acc__) ->
volume:('acc__ ->
(Response.Execution.t, Volume.t)
Fieldslib.Field.readonly_t ->
Response.Execution.t -> Volume.t -> 'acc__) ->
price:('acc__ ->
(Response.Execution.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Execution.t -> Price.t -> 'acc__) ->
permanent_id:('acc__ ->
(Response.Execution.t, int)
Fieldslib.Field.readonly_t ->
Response.Execution.t -> int -> 'acc__) ->
client_id:('acc__ ->
(Response.Execution.t, Client_id.t)
Fieldslib.Field.readonly_t ->
Response.Execution.t -> Client_id.t -> 'acc__) ->
liquidation:('acc__ ->
(Response.Execution.t, int)
Fieldslib.Field.readonly_t ->
Response.Execution.t -> int -> 'acc__) ->
cumulative_volume:('acc__ ->
(Response.Execution.t, Volume.t)
Fieldslib.Field.readonly_t ->
Response.Execution.t -> Volume.t -> 'acc__) ->
average_price:('acc__ ->
(Response.Execution.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Execution.t -> Price.t -> 'acc__) ->
order_ref:('acc__ ->
(Response.Execution.t, string option)
Fieldslib.Field.readonly_t ->
Response.Execution.t -> string option -> 'acc__) ->
'acc__
end
end
val unpickler : t Tws_prot.Unpickler.t
val pickler : t Tws_prot.Pickler.t Core.Std.Only_in_test.t
val ( = ) : t -> t -> bool
val create :
order_id:Order_id.t ->
contract:[< Security_type.t ] Contract.t ->
exec_id:Execution_id.t ->
time:Core.Std.Time.t ->
account_code:Account_code.t ->
exchange:Exchange.t ->
side:Response.Execution.Side.t ->
volume:Volume.t ->
price:Price.t ->
permanent_id:int ->
client_id:Client_id.t ->
liquidation:int ->
cumulative_volume:Volume.t ->
average_price:Price.t ->
order_ref:string option -> Response.Execution.t
val contract : Response.Execution.t -> [< Security_type.t ] Contract.t
val pp : Format.formatter -> Response.Execution.t -> unit
val t_of_sexp : Sexplib.Sexp.t -> Response.Execution.t
val sexp_of_t : Response.Execution.t -> Sexplib.Sexp.t
end
module Commission :
sig
type t = private {
exec_id : Execution_id.t;
commission : Price.t;
currency : Currency.t;
realized_pnl : Price.t;
yield : float;
yield_redemption_date : int option;
}
val yield_redemption_date : Response.Commission.t -> int option
val yield : Response.Commission.t -> float
val realized_pnl : Response.Commission.t -> Price.t
val currency : Response.Commission.t -> Currency.t
val commission : Response.Commission.t -> Price.t
val exec_id : Response.Commission.t -> Execution_id.t
module Fields :
sig
val names : string list
val yield_redemption_date :
(Response.Commission.t, int option) Fieldslib.Field.readonly_t
val yield :
(Response.Commission.t, float) Fieldslib.Field.readonly_t
val realized_pnl :
(Response.Commission.t, Price.t) Fieldslib.Field.readonly_t
val currency :
(Response.Commission.t, Currency.t) Fieldslib.Field.readonly_t
val commission :
(Response.Commission.t, Price.t) Fieldslib.Field.readonly_t
val exec_id :
(Response.Commission.t, Execution_id.t)
Fieldslib.Field.readonly_t
val fold :
init:'acc__ ->
exec_id:('acc__ ->
(Response.Commission.t, Execution_id.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
commission:('acc__ ->
(Response.Commission.t, Price.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
currency:('acc__ ->
(Response.Commission.t, Currency.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
realized_pnl:('acc__ ->
(Response.Commission.t, Price.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
yield:('acc__ ->
(Response.Commission.t, float) Fieldslib.Field.readonly_t ->
'acc__) ->
yield_redemption_date:('acc__ ->
(Response.Commission.t, int option)
Fieldslib.Field.readonly_t -> 'acc__) ->
'acc__
val iter :
exec_id:((Response.Commission.t, Execution_id.t)
Fieldslib.Field.readonly_t -> unit) ->
commission:((Response.Commission.t, Price.t)
Fieldslib.Field.readonly_t -> unit) ->
currency:((Response.Commission.t, Currency.t)
Fieldslib.Field.readonly_t -> unit) ->
realized_pnl:((Response.Commission.t, Price.t)
Fieldslib.Field.readonly_t -> unit) ->
yield:((Response.Commission.t, float) Fieldslib.Field.readonly_t ->
unit) ->
yield_redemption_date:((Response.Commission.t, int option)
Fieldslib.Field.readonly_t -> unit) ->
unit
val for_all :
exec_id:((Response.Commission.t, Execution_id.t)
Fieldslib.Field.readonly_t -> bool) ->
commission:((Response.Commission.t, Price.t)
Fieldslib.Field.readonly_t -> bool) ->
currency:((Response.Commission.t, Currency.t)
Fieldslib.Field.readonly_t -> bool) ->
realized_pnl:((Response.Commission.t, Price.t)
Fieldslib.Field.readonly_t -> bool) ->
yield:((Response.Commission.t, float) Fieldslib.Field.readonly_t ->
bool) ->
yield_redemption_date:((Response.Commission.t, int option)
Fieldslib.Field.readonly_t -> bool) ->
bool
val exists :
exec_id:((Response.Commission.t, Execution_id.t)
Fieldslib.Field.readonly_t -> bool) ->
commission:((Response.Commission.t, Price.t)
Fieldslib.Field.readonly_t -> bool) ->
currency:((Response.Commission.t, Currency.t)
Fieldslib.Field.readonly_t -> bool) ->
realized_pnl:((Response.Commission.t, Price.t)
Fieldslib.Field.readonly_t -> bool) ->
yield:((Response.Commission.t, float) Fieldslib.Field.readonly_t ->
bool) ->
yield_redemption_date:((Response.Commission.t, int option)
Fieldslib.Field.readonly_t -> bool) ->
bool
val to_list :
exec_id:((Response.Commission.t, Execution_id.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
commission:((Response.Commission.t, Price.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
currency:((Response.Commission.t, Currency.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
realized_pnl:((Response.Commission.t, Price.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
yield:((Response.Commission.t, float) Fieldslib.Field.readonly_t ->
'elem__) ->
yield_redemption_date:((Response.Commission.t, int option)
Fieldslib.Field.readonly_t -> 'elem__) ->
'elem__ list
val map_poly :
([< `Read ], Response.Commission.t, 'x0) Fieldslib.Field.user ->
'x0 list
module Direct :
sig
val iter :
Response.Commission.t ->
exec_id:((Response.Commission.t, Execution_id.t)
Fieldslib.Field.readonly_t ->
Response.Commission.t -> Execution_id.t -> unit) ->
commission:((Response.Commission.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Commission.t -> Price.t -> unit) ->
currency:((Response.Commission.t, Currency.t)
Fieldslib.Field.readonly_t ->
Response.Commission.t -> Currency.t -> unit) ->
realized_pnl:((Response.Commission.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Commission.t -> Price.t -> unit) ->
yield:((Response.Commission.t, float)
Fieldslib.Field.readonly_t ->
Response.Commission.t -> float -> unit) ->
yield_redemption_date:((Response.Commission.t, int option)
Fieldslib.Field.readonly_t ->
Response.Commission.t ->
int option -> unit) ->
unit
val fold :
Response.Commission.t ->
init:'acc__ ->
exec_id:('acc__ ->
(Response.Commission.t, Execution_id.t)
Fieldslib.Field.readonly_t ->
Response.Commission.t -> Execution_id.t -> 'acc__) ->
commission:('acc__ ->
(Response.Commission.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Commission.t -> Price.t -> 'acc__) ->
currency:('acc__ ->
(Response.Commission.t, Currency.t)
Fieldslib.Field.readonly_t ->
Response.Commission.t -> Currency.t -> 'acc__) ->
realized_pnl:('acc__ ->
(Response.Commission.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Commission.t -> Price.t -> 'acc__) ->
yield:('acc__ ->
(Response.Commission.t, float)
Fieldslib.Field.readonly_t ->
Response.Commission.t -> float -> 'acc__) ->
yield_redemption_date:('acc__ ->
(Response.Commission.t, int option)
Fieldslib.Field.readonly_t ->
Response.Commission.t ->
int option -> 'acc__) ->
'acc__
end
end
val unpickler : t Tws_prot.Unpickler.t
val pickler : t Tws_prot.Pickler.t Core.Std.Only_in_test.t
val ( = ) : t -> t -> bool
val create :
exec_id:Execution_id.t ->
commission:Price.t ->
currency:Currency.t ->
realized_pnl:Price.t ->
yield:float ->
yield_redemption_date:int option -> Response.Commission.t
val t_of_sexp : Sexplib.Sexp.t -> Response.Commission.t
val sexp_of_t : Response.Commission.t -> Sexplib.Sexp.t
end
module Book_update :
sig
module Operation :
sig
type t = Insert | Update | Delete
val t_of_sexp : Sexplib.Sexp.t -> Response.Book_update.Operation.t
val sexp_of_t : Response.Book_update.Operation.t -> Sexplib.Sexp.t
end
module Side :
sig
type t = Ask | Bid
val t_of_sexp : Sexplib.Sexp.t -> Response.Book_update.Side.t
val sexp_of_t : Response.Book_update.Side.t -> Sexplib.Sexp.t
end
type t = private {
position : int;
operation : Response.Book_update.Operation.t;
side : Response.Book_update.Side.t;
price : Price.t;
size : Volume.t;
}
val size : Response.Book_update.t -> Volume.t
val price : Response.Book_update.t -> Price.t
val side : Response.Book_update.t -> Response.Book_update.Side.t
val operation :
Response.Book_update.t -> Response.Book_update.Operation.t
val position : Response.Book_update.t -> int
module Fields :
sig
val names : string list
val size :
(Response.Book_update.t, Volume.t) Fieldslib.Field.readonly_t
val price :
(Response.Book_update.t, Price.t) Fieldslib.Field.readonly_t
val side :
(Response.Book_update.t, Response.Book_update.Side.t)
Fieldslib.Field.readonly_t
val operation :
(Response.Book_update.t, Response.Book_update.Operation.t)
Fieldslib.Field.readonly_t
val position :
(Response.Book_update.t, int) Fieldslib.Field.readonly_t
val fold :
init:'acc__ ->
position:('acc__ ->
(Response.Book_update.t, int)
Fieldslib.Field.readonly_t -> 'acc__) ->
operation:('acc__ ->
(Response.Book_update.t,
Response.Book_update.Operation.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
side:('acc__ ->
(Response.Book_update.t, Response.Book_update.Side.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
price:('acc__ ->
(Response.Book_update.t, Price.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
size:('acc__ ->
(Response.Book_update.t, Volume.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
'acc__
val iter :
position:((Response.Book_update.t, int)
Fieldslib.Field.readonly_t -> unit) ->
operation:((Response.Book_update.t,
Response.Book_update.Operation.t)
Fieldslib.Field.readonly_t -> unit) ->
side:((Response.Book_update.t, Response.Book_update.Side.t)
Fieldslib.Field.readonly_t -> unit) ->
price:((Response.Book_update.t, Price.t)
Fieldslib.Field.readonly_t -> unit) ->
size:((Response.Book_update.t, Volume.t)
Fieldslib.Field.readonly_t -> unit) ->
unit
val for_all :
position:((Response.Book_update.t, int)
Fieldslib.Field.readonly_t -> bool) ->
operation:((Response.Book_update.t,
Response.Book_update.Operation.t)
Fieldslib.Field.readonly_t -> bool) ->
side:((Response.Book_update.t, Response.Book_update.Side.t)
Fieldslib.Field.readonly_t -> bool) ->
price:((Response.Book_update.t, Price.t)
Fieldslib.Field.readonly_t -> bool) ->
size:((Response.Book_update.t, Volume.t)
Fieldslib.Field.readonly_t -> bool) ->
bool
val exists :
position:((Response.Book_update.t, int)
Fieldslib.Field.readonly_t -> bool) ->
operation:((Response.Book_update.t,
Response.Book_update.Operation.t)
Fieldslib.Field.readonly_t -> bool) ->
side:((Response.Book_update.t, Response.Book_update.Side.t)
Fieldslib.Field.readonly_t -> bool) ->
price:((Response.Book_update.t, Price.t)
Fieldslib.Field.readonly_t -> bool) ->
size:((Response.Book_update.t, Volume.t)
Fieldslib.Field.readonly_t -> bool) ->
bool
val to_list :
position:((Response.Book_update.t, int)
Fieldslib.Field.readonly_t -> 'elem__) ->
operation:((Response.Book_update.t,
Response.Book_update.Operation.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
side:((Response.Book_update.t, Response.Book_update.Side.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
price:((Response.Book_update.t, Price.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
size:((Response.Book_update.t, Volume.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
'elem__ list
val map_poly :
([< `Read ], Response.Book_update.t, 'x0) Fieldslib.Field.user ->
'x0 list
module Direct :
sig
val iter :
Response.Book_update.t ->
position:((Response.Book_update.t, int)
Fieldslib.Field.readonly_t ->
Response.Book_update.t -> int -> unit) ->
operation:((Response.Book_update.t,
Response.Book_update.Operation.t)
Fieldslib.Field.readonly_t ->
Response.Book_update.t ->
Response.Book_update.Operation.t -> unit) ->
side:((Response.Book_update.t, Response.Book_update.Side.t)
Fieldslib.Field.readonly_t ->
Response.Book_update.t ->
Response.Book_update.Side.t -> unit) ->
price:((Response.Book_update.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Book_update.t -> Price.t -> unit) ->
size:((Response.Book_update.t, Volume.t)
Fieldslib.Field.readonly_t ->
Response.Book_update.t -> Volume.t -> unit) ->
unit
val fold :
Response.Book_update.t ->
init:'acc__ ->
position:('acc__ ->
(Response.Book_update.t, int)
Fieldslib.Field.readonly_t ->
Response.Book_update.t -> int -> 'acc__) ->
operation:('acc__ ->
(Response.Book_update.t,
Response.Book_update.Operation.t)
Fieldslib.Field.readonly_t ->
Response.Book_update.t ->
Response.Book_update.Operation.t -> 'acc__) ->
side:('acc__ ->
(Response.Book_update.t, Response.Book_update.Side.t)
Fieldslib.Field.readonly_t ->
Response.Book_update.t ->
Response.Book_update.Side.t -> 'acc__) ->
price:('acc__ ->
(Response.Book_update.t, Price.t)
Fieldslib.Field.readonly_t ->
Response.Book_update.t -> Price.t -> 'acc__) ->
size:('acc__ ->
(Response.Book_update.t, Volume.t)
Fieldslib.Field.readonly_t ->
Response.Book_update.t -> Volume.t -> 'acc__) ->
'acc__
end
end
val unpickler : t Tws_prot.Unpickler.t
val pickler : t Tws_prot.Pickler.t Core.Std.Only_in_test.t
val ( = ) : t -> t -> bool
val create :
position:int ->
operation:Response.Book_update.Operation.t ->
side:Response.Book_update.Side.t ->
price:Price.t -> size:Volume.t -> Response.Book_update.t
val t_of_sexp : Sexplib.Sexp.t -> Response.Book_update.t
val sexp_of_t : Response.Book_update.t -> Sexplib.Sexp.t
end
module History :
sig
type t = private {
start : Core.Std.Time.t;
stop : Core.Std.Time.t;
num_bars : int;
bars : Bar.t list;
}
val bars : Response.History.t -> Bar.t list
val num_bars : Response.History.t -> int
val stop : Response.History.t -> Core.Std.Time.t
val start : Response.History.t -> Core.Std.Time.t
module Fields :
sig
val names : string list
val bars :
(Response.History.t, Bar.t list) Fieldslib.Field.readonly_t
val num_bars : (Response.History.t, int) Fieldslib.Field.readonly_t
val stop :
(Response.History.t, Core.Std.Time.t) Fieldslib.Field.readonly_t
val start :
(Response.History.t, Core.Std.Time.t) Fieldslib.Field.readonly_t
val fold :
init:'acc__ ->
start:('acc__ ->
(Response.History.t, Core.Std.Time.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
stop:('acc__ ->
(Response.History.t, Core.Std.Time.t)
Fieldslib.Field.readonly_t -> 'acc__) ->
num_bars:('acc__ ->
(Response.History.t, int) Fieldslib.Field.readonly_t ->
'acc__) ->
bars:('acc__ ->
(Response.History.t, Bar.t list) Fieldslib.Field.readonly_t ->
'acc__) ->
'acc__
val iter :
start:((Response.History.t, Core.Std.Time.t)
Fieldslib.Field.readonly_t -> unit) ->
stop:((Response.History.t, Core.Std.Time.t)
Fieldslib.Field.readonly_t -> unit) ->
num_bars:((Response.History.t, int) Fieldslib.Field.readonly_t ->
unit) ->
bars:((Response.History.t, Bar.t list) Fieldslib.Field.readonly_t ->
unit) ->
unit
val for_all :
start:((Response.History.t, Core.Std.Time.t)
Fieldslib.Field.readonly_t -> bool) ->
stop:((Response.History.t, Core.Std.Time.t)
Fieldslib.Field.readonly_t -> bool) ->
num_bars:((Response.History.t, int) Fieldslib.Field.readonly_t ->
bool) ->
bars:((Response.History.t, Bar.t list) Fieldslib.Field.readonly_t ->
bool) ->
bool
val exists :
start:((Response.History.t, Core.Std.Time.t)
Fieldslib.Field.readonly_t -> bool) ->
stop:((Response.History.t, Core.Std.Time.t)
Fieldslib.Field.readonly_t -> bool) ->
num_bars:((Response.History.t, int) Fieldslib.Field.readonly_t ->
bool) ->
bars:((Response.History.t, Bar.t list) Fieldslib.Field.readonly_t ->
bool) ->
bool
val to_list :
start:((Response.History.t, Core.Std.Time.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
stop:((Response.History.t, Core.Std.Time.t)
Fieldslib.Field.readonly_t -> 'elem__) ->
num_bars:((Response.History.t, int) Fieldslib.Field.readonly_t ->
'elem__) ->
bars:((Response.History.t, Bar.t list) Fieldslib.Field.readonly_t ->
'elem__) ->
'elem__ list
val map_poly :
([< `Read ], Response.History.t, 'x0) Fieldslib.Field.user ->
'x0 list
module Direct :
sig
val iter :
Response.History.t ->
start:((Response.History.t, Core.Std.Time.t)
Fieldslib.Field.readonly_t ->
Response.History.t -> Core.Std.Time.t -> unit) ->
stop:((Response.History.t, Core.Std.Time.t)
Fieldslib.Field.readonly_t ->
Response.History.t -> Core.Std.Time.t -> unit) ->
num_bars:((Response.History.t, int)
Fieldslib.Field.readonly_t ->
Response.History.t -> int -> unit) ->
bars:((Response.History.t, Bar.t list)
Fieldslib.Field.readonly_t ->
Response.History.t -> Bar.t list -> unit) ->
unit
val fold :
Response.History.t ->
init:'acc__ ->
start:('acc__ ->
(Response.History.t, Core.Std.Time.t)
Fieldslib.Field.readonly_t ->
Response.History.t -> Core.Std.Time.t -> 'acc__) ->
stop:('acc__ ->
(Response.History.t, Core.Std.Time.t)
Fieldslib.Field.readonly_t ->
Response.History.t -> Core.Std.Time.t -> 'acc__) ->
num_bars:('acc__ ->
(Response.History.t, int)
Fieldslib.Field.readonly_t ->
Response.History.t -> int -> 'acc__) ->
bars:('acc__ ->
(Response.History.t, Bar.t list)
Fieldslib.Field.readonly_t ->
Response.History.t -> Bar.t list -> 'acc__) ->
'acc__
end
end
val unpickler : t Tws_prot.Unpickler.t
val pickler : t Tws_prot.Pickler.t Core.Std.Only_in_test.t
val ( = ) : t -> t -> bool
val create : bars:Bar.t list -> Response.History.t
module Data_frame :
sig
type t = private {
stamps : Core.Std.Time.t array;
op : float array;
hi : float array;
lo : float array;
cl : float array;
vo : int array;
}
val vo : Response.History.Data_frame.t -> int array
val cl : Response.History.Data_frame.t -> float array
val lo : Response.History.Data_frame.t -> float array
val hi : Response.History.Data_frame.t -> float array
val op : Response.History.Data_frame.t -> float array
val stamps : Response.History.Data_frame.t -> Core.Std.Time.t array
module Fields :
sig
val names : string list
val vo :
(Response.History.Data_frame.t, int array)
Fieldslib.Field.readonly_t
val cl :
(Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t
val lo :
(Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t
val hi :
(Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t
val op :
(Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t
val stamps :
(Response.History.Data_frame.t, Core.Std.Time.t array)
Fieldslib.Field.readonly_t
val fold :
init:'acc__ ->
stamps:('acc__ ->
(Response.History.Data_frame.t,
Core.Std.Time.t array)
Fieldslib.Field.readonly_t -> 'acc__) ->
op:('acc__ ->
(Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t -> 'acc__) ->
hi:('acc__ ->
(Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t -> 'acc__) ->
lo:('acc__ ->
(Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t -> 'acc__) ->
cl:('acc__ ->
(Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t -> 'acc__) ->
vo:('acc__ ->
(Response.History.Data_frame.t, int array)
Fieldslib.Field.readonly_t -> 'acc__) ->
'acc__
val iter :
stamps:((Response.History.Data_frame.t,
Core.Std.Time.t array)
Fieldslib.Field.readonly_t -> unit) ->
op:((Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t -> unit) ->
hi:((Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t -> unit) ->
lo:((Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t -> unit) ->
cl:((Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t -> unit) ->
vo:((Response.History.Data_frame.t, int array)
Fieldslib.Field.readonly_t -> unit) ->
unit
val for_all :
stamps:((Response.History.Data_frame.t,
Core.Std.Time.t array)
Fieldslib.Field.readonly_t -> bool) ->
op:((Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t -> bool) ->
hi:((Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t -> bool) ->
lo:((Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t -> bool) ->
cl:((Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t -> bool) ->
vo:((Response.History.Data_frame.t, int array)
Fieldslib.Field.readonly_t -> bool) ->
bool
val exists :
stamps:((Response.History.Data_frame.t,
Core.Std.Time.t array)
Fieldslib.Field.readonly_t -> bool) ->
op:((Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t -> bool) ->
hi:((Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t -> bool) ->
lo:((Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t -> bool) ->
cl:((Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t -> bool) ->
vo:((Response.History.Data_frame.t, int array)
Fieldslib.Field.readonly_t -> bool) ->
bool
val to_list :
stamps:((Response.History.Data_frame.t,
Core.Std.Time.t array)
Fieldslib.Field.readonly_t -> 'elem__) ->
op:((Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t -> 'elem__) ->
hi:((Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t -> 'elem__) ->
lo:((Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t -> 'elem__) ->
cl:((Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t -> 'elem__) ->
vo:((Response.History.Data_frame.t, int array)
Fieldslib.Field.readonly_t -> 'elem__) ->
'elem__ list
val map_poly :
([< `Read ], Response.History.Data_frame.t, 'x0)
Fieldslib.Field.user -> 'x0 list
module Direct :
sig
val iter :
Response.History.Data_frame.t ->
stamps:((Response.History.Data_frame.t,
Core.Std.Time.t array)
Fieldslib.Field.readonly_t ->
Response.History.Data_frame.t ->
Core.Std.Time.t array -> unit) ->
op:((Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t ->
Response.History.Data_frame.t -> float array -> unit) ->
hi:((Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t ->
Response.History.Data_frame.t -> float array -> unit) ->
lo:((Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t ->
Response.History.Data_frame.t -> float array -> unit) ->
cl:((Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t ->
Response.History.Data_frame.t -> float array -> unit) ->
vo:((Response.History.Data_frame.t, int array)
Fieldslib.Field.readonly_t ->
Response.History.Data_frame.t -> int array -> unit) ->
unit
val fold :
Response.History.Data_frame.t ->
init:'acc__ ->
stamps:('acc__ ->
(Response.History.Data_frame.t,
Core.Std.Time.t array)
Fieldslib.Field.readonly_t ->
Response.History.Data_frame.t ->
Core.Std.Time.t array -> 'acc__) ->
op:('acc__ ->
(Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t ->
Response.History.Data_frame.t ->
float array -> 'acc__) ->
hi:('acc__ ->
(Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t ->
Response.History.Data_frame.t ->
float array -> 'acc__) ->
lo:('acc__ ->
(Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t ->
Response.History.Data_frame.t ->
float array -> 'acc__) ->
cl:('acc__ ->
(Response.History.Data_frame.t, float array)
Fieldslib.Field.readonly_t ->
Response.History.Data_frame.t ->
float array -> 'acc__) ->
vo:('acc__ ->
(Response.History.Data_frame.t, int array)
Fieldslib.Field.readonly_t ->
Response.History.Data_frame.t -> int array -> 'acc__) ->
'acc__
end
end
val t_of_sexp : Sexplib.Sexp.t -> Response.History.Data_frame.t
val sexp_of_t : Response.History.Data_frame.t -> Sexplib.Sexp.t
end
val unpack_bars : Response.History.t -> Response.History.Data_frame.t
val t_of_sexp : Sexplib.Sexp.t -> Response.History.t
val sexp_of_t : Response.History.t -> Sexplib.Sexp.t
end
module Realtime_bar :
sig
type t = Bar.t
val unpickler : t Tws_prot.Unpickler.t
val pickler : t Tws_prot.Pickler.t Core.Std.Only_in_test.t
val ( = ) : t -> t -> bool
val create : bar:Bar.t -> Response.Realtime_bar.t
val t_of_sexp : Sexplib.Sexp.t -> Response.Realtime_bar.t
val sexp_of_t : Response.Realtime_bar.t -> Sexplib.Sexp.t
end
end