sig
module Server_log_level :
sig
module Level :
sig
type t = [ `Detail | `Error | `Information | `System | `Warning ]
val t_of_sexp : Sexplib.Sexp.t -> Query.Server_log_level.Level.t
val __t_of_sexp__ :
Sexplib.Sexp.t -> Query.Server_log_level.Level.t
val sexp_of_t : Query.Server_log_level.Level.t -> Sexplib.Sexp.t
end
type t
val pickler : t Tws_prot.Pickler.t
val unpickler : t Tws_prot.Unpickler.t Core.Std.Only_in_test.t
val ( = ) : t -> t -> bool
val create :
level:Query.Server_log_level.Level.t -> Query.Server_log_level.t
val t_of_sexp : Sexplib.Sexp.t -> Query.Server_log_level.t
val sexp_of_t : Query.Server_log_level.t -> Sexplib.Sexp.t
end
module Server_time :
sig
type t
val pickler : t Tws_prot.Pickler.t
val unpickler : t Tws_prot.Unpickler.t Core.Std.Only_in_test.t
val ( = ) : t -> t -> bool
val create : unit -> Query.Server_time.t
val t_of_sexp : Sexplib.Sexp.t -> Query.Server_time.t
val sexp_of_t : Query.Server_time.t -> Sexplib.Sexp.t
end
module Market_data :
sig
type t
val pickler : t Tws_prot.Pickler.t
val unpickler : t Tws_prot.Unpickler.t Core.Std.Only_in_test.t
val ( = ) : t -> t -> bool
val create :
contract:[< Security_type.t ] Contract.t ->
tick_types:Tick_type.t list -> snapshot:bool -> Query.Market_data.t
val t_of_sexp : Sexplib.Sexp.t -> Query.Market_data.t
val sexp_of_t : Query.Market_data.t -> Sexplib.Sexp.t
end
module Option_price :
sig
type t
val pickler : t Tws_prot.Pickler.t
val unpickler : t Tws_prot.Unpickler.t Core.Std.Only_in_test.t
val ( = ) : t -> t -> bool
val create :
contract:[ `Option ] Contract.t ->
volatility:float -> underlying_price:Price.t -> Query.Option_price.t
val t_of_sexp : Sexplib.Sexp.t -> Query.Option_price.t
val sexp_of_t : Query.Option_price.t -> Sexplib.Sexp.t
end
module Implied_volatility :
sig
type t
val pickler : t Tws_prot.Pickler.t
val unpickler : t Tws_prot.Unpickler.t Core.Std.Only_in_test.t
val ( = ) : t -> t -> bool
val create :
contract:[ `Option ] Contract.t ->
option_price:Price.t ->
underlying_price:Price.t -> Query.Implied_volatility.t
val t_of_sexp : Sexplib.Sexp.t -> Query.Implied_volatility.t
val sexp_of_t : Query.Implied_volatility.t -> Sexplib.Sexp.t
end
module Submit_order :
sig
type t
val pickler : t Tws_prot.Pickler.t
val unpickler : t Tws_prot.Unpickler.t Core.Std.Only_in_test.t
val ( = ) : t -> t -> bool
val create :
contract:[< Security_type.t ] Contract.t ->
order:([< Order_action.t ], [< Order_type.t ]) Order.t ->
account_code:Account_code.t -> Query.Submit_order.t
val t_of_sexp : Sexplib.Sexp.t -> Query.Submit_order.t
val sexp_of_t : Query.Submit_order.t -> Sexplib.Sexp.t
end
module Account_updates :
sig
type t
val pickler : t Tws_prot.Pickler.t
val unpickler : t Tws_prot.Unpickler.t Core.Std.Only_in_test.t
val ( = ) : t -> t -> bool
val create :
subscribe:bool ->
account_code:Account_code.t -> Query.Account_updates.t
val t_of_sexp : Sexplib.Sexp.t -> Query.Account_updates.t
val sexp_of_t : Query.Account_updates.t -> Sexplib.Sexp.t
end
module Positions :
sig
type t
val pickler : t Tws_prot.Pickler.t
val unpickler : t Tws_prot.Unpickler.t Core.Std.Only_in_test.t
val ( = ) : t -> t -> bool
val create :
subscribe:bool -> account_code:Account_code.t -> Query.Positions.t
val t_of_sexp : Sexplib.Sexp.t -> Query.Positions.t
val sexp_of_t : Query.Positions.t -> Sexplib.Sexp.t
end
module Executions :
sig
type t
val pickler : t Tws_prot.Pickler.t
val unpickler : t Tws_prot.Unpickler.t Core.Std.Only_in_test.t
val ( = ) : t -> t -> bool
val create :
contract:[< Security_type.t ] Contract.t ->
client_id:Client_id.t ->
account_code:Account_code.t ->
time:Core.Std.Time.t -> action:Order_action.t -> Query.Executions.t
val t_of_sexp : Sexplib.Sexp.t -> Query.Executions.t
val sexp_of_t : Query.Executions.t -> Sexplib.Sexp.t
end
module Contract_details :
sig
type t
val pickler : t Tws_prot.Pickler.t
val unpickler : t Tws_prot.Unpickler.t Core.Std.Only_in_test.t
val ( = ) : t -> t -> bool
val create :
?con_id:Std_internal.Contract_id.t ->
?multiplier:int ->
?listing_exchange:Exchange.t ->
?local_symbol:Symbol.t ->
?sec_id:Std_internal.Security_id.t ->
?include_expired:bool ->
?exchange:Exchange.t ->
?option_right:Std_internal.Option_right.t ->
?expiry:Core.Std.Date.t ->
?strike:Price.t ->
sec_type:Security_type.t ->
currency:Currency.t -> Symbol.t -> Query.Contract_details.t
val t_of_sexp : Sexplib.Sexp.t -> Query.Contract_details.t
val sexp_of_t : Query.Contract_details.t -> Sexplib.Sexp.t
end
module Market_depth :
sig
type t
val pickler : t Tws_prot.Pickler.t
val unpickler : t Tws_prot.Unpickler.t Core.Std.Only_in_test.t
val ( = ) : t -> t -> bool
val create :
contract:[< Security_type.t ] Contract.t ->
num_rows:int -> Query.Market_depth.t
val t_of_sexp : Sexplib.Sexp.t -> Query.Market_depth.t
val sexp_of_t : Query.Market_depth.t -> Sexplib.Sexp.t
end
module History :
sig
module Tick_type :
sig
type t =
[ `Ask
| `Bid
| `Bid_ask
| `Historical_volatility
| `Implied_volatility
| `Midpoint
| `Option_volume
| `Trades ]
val of_string : string -> t
val to_string : t -> string
val t_of_sexp : Sexplib.Sexp.t -> Query.History.Tick_type.t
val __t_of_sexp__ : Sexplib.Sexp.t -> Query.History.Tick_type.t
val sexp_of_t : Query.History.Tick_type.t -> Sexplib.Sexp.t
end
type t
val pickler : t Tws_prot.Pickler.t
val unpickler : t Tws_prot.Unpickler.t Core.Std.Only_in_test.t
val ( = ) : t -> t -> bool
val create :
contract:[< Security_type.t ] Contract.t ->
until:Core.Std.Time.t ->
bar_size:Bar_size.t ->
bar_span:Bar_span.t ->
use_tradehours:bool ->
tick_type:Query.History.Tick_type.t -> Query.History.t
val t_of_sexp : Sexplib.Sexp.t -> Query.History.t
val sexp_of_t : Query.History.t -> Sexplib.Sexp.t
end
module Realtime_bars :
sig
module Tick_type :
sig type t = [ `Ask | `Bid | `Midpoint | `Trades ] end
type t
val pickler : t Tws_prot.Pickler.t
val unpickler : t Tws_prot.Unpickler.t Core.Std.Only_in_test.t
val ( = ) : t -> t -> bool
val create :
contract:[< Security_type.t ] Contract.t ->
tick_type:Query.Realtime_bars.Tick_type.t ->
use_tradehours:bool -> Query.Realtime_bars.t
val t_of_sexp : Sexplib.Sexp.t -> Query.Realtime_bars.t
val sexp_of_t : Query.Realtime_bars.t -> Sexplib.Sexp.t
end
end