Commits

Oliver Gu committed f86afb3

Minor cleanups

Comments (0)

Files changed (4)

 
 val ( = ) : 'a t -> 'a t -> bool
 
-val stock :
-  ?id:Id.t
+val stock
+  :  ?id:Id.t
   -> ?listing_exchange:Exchange.t
   -> ?local_symbol:Symbol.t
   -> ?security_id:[ `ISIN  of string
   -> Symbol.t
   -> [> `Stock ] t
 
-val futures :
-  ?id:Id.t
+val futures
+  :  ?id:Id.t
   -> ?multiplier:string
   -> ?listing_exchange:Exchange.t
   -> ?local_symbol:Symbol.t
   -> Symbol.t
   -> [> `Futures ] t
 
-val option :
-  ?id:Id.t
+val option
+  :  ?id:Id.t
   -> ?multiplier:string
   -> ?listing_exchange:Exchange.t
   -> ?local_symbol:Symbol.t
   -> Symbol.t
   -> [> `Option ] t
 
-val forex :
-  ?id:Id.t
+val forex
+  :  ?id:Id.t
   -> ?listing_exchange:Exchange.t
   -> ?local_symbol:Symbol.t
   -> ?security_id:[ `ISIN  of string
   end
   type t with sexp
   include Query_intf.S with type t := t
-  val create :
-    contract:[< Contract.Type.t ] Contract.t
+  val create
+    :  contract:[< Contract.Type.t ] Contract.t
     -> tick_generics:Tick_kind.t list
     -> snapshot:bool
     -> t
 module Option_price : sig
   type t with sexp
   include Query_intf.S with type t := t
-  val create :
-    contract:[ `Option ] Contract.t
+  val create
+    :  contract:[ `Option ] Contract.t
     -> volatility:float
     -> underlying_price:Price.t
     -> t
 module Implied_volatility : sig
   type t with sexp
   include Query_intf.S with type t := t
-  val create :
-    contract:[ `Option ] Contract.t
+  val create
+    :  contract:[ `Option ] Contract.t
     -> option_price:Price.t
     -> underlying_price:Price.t
     -> t
 module Submit_order : sig
   type t with sexp
   include Query_intf.S with type t := t
-  val create :
-    contract:[< Contract.Type.t ] Contract.t
+  val create
+    :  contract:[< Contract.Type.t ] Contract.t
     -> order:([< Order.Action.t ], [< Order.Type.t ]) Order.t
     -> account_code:Account_code.t
     -> t
 module Account_and_portfolio_updates : sig
   type t with sexp
   include Query_intf.S with type t := t
-  val create :
-    subscribe:bool
+  val create
+    :  subscribe:bool
     -> account_code:Account_code.t
     -> t
 end
   type t with sexp
   include Query_intf.S with type t := t
 
-  val create :
-    contract:[< Contract.Type.t] Contract.t
+  val create
+    :  contract:[< Contract.Type.t] Contract.t
     -> client_id:Client_id.t
     -> account_code:Account_code.t
     -> time:Time.t
 module Market_depth : sig
   type t with sexp
   include Query_intf.S with type t := t
-  val create :
-    contract:[< Contract.Type.t ] Contract.t
+  val create
+    :  contract:[< Contract.Type.t ] Contract.t
     -> num_rows:int
     -> t
 end
 
   type t with sexp
   include Query_intf.S with type t := t
-  val create :
-    contract:[< Contract.Type.t ] Contract.t
+  val create
+    :  contract:[< Contract.Type.t ] Contract.t
     -> end_date_time:Time.t
     -> bar_size:Bar_size.t
     -> duration:Duration.t
 
   type t with sexp
   include Query_intf.S with type t := t
-  val create :
-    contract:[< Contract.Type.t ] Contract.t
+  val create
+    :  contract:[< Contract.Type.t ] Contract.t
     -> bar_size:Bar_size.t
     -> show:Show.t
     -> use_rth:bool

lib/raw_contract.ml

 
   let t_of_tws = function
   	| "STK"  -> `Stock
-	  | "FUT"  -> `Futures
-	  | "OPT"  -> `Option
+	| "FUT"  -> `Futures
+	| "OPT"  -> `Option
     | "CASH" -> `Forex
     | s -> invalid_argf "Type.t_of_tws: %S" s ()
 
   with sexp, fields
   include Response_intf.S with type t := t
 
-  val create :
-    state:State.t
+  val create
+    :  state:State.t
     -> filled:int
     -> remaining:int
     -> average_fill_price:Price.t
   with sexp, fields
   include Response_intf.S with type t := t
 
-  val create :
-    key:string
+  val create
+    :  key:string
     -> value:string
     -> currency:string option
     -> account_code:Account_code.t
   with sexp, fields
   include Response_intf.S with type t := t
 
-  val create :
-    contract:Contract.Type.t Contract.t
+  val create
+    :  contract:Contract.Type.t Contract.t
     -> position:int
     -> market_price:Price.t
     -> market_value:Price.t
     } with sexp, fields
   include Response_intf.S with type t := t
 
-  val create :
-    symbol:Symbol.t
+  val create
+    :  symbol:Symbol.t
     -> contract_type:Contract.Type.t
     -> expiry:Date.t option
     -> strike:Price.t option
   with sexp, fields
   include Response_intf.S with type t := t
 
-  val create :
-    order_id:Order_id.t
+  val create
+    :  order_id:Order_id.t
     -> contract:Contract.Type.t Contract.t
     -> exec_id:Execution_id.t
     -> time:Time.t
   with sexp, fields
   include Response_intf.S with type t := t
 
-  val create :
-    position:int
+  val create
+    :  position:int
     -> operation:Operation.t
     -> side:Side.t
     -> price:Price.t
     with sexp, fields
     include Response_intf.S with type t := t
 
-    val create :
-      timestamp:Time.t
+    val create
+      :  timestamp:Time.t
       -> open_:Price.t
       -> high:Price.t
       -> low:Price.t
   with sexp, fields
   include Response_intf.S with type t := t
 
-  val create :
-    start_time:Time.t
+  val create
+    :  start_time:Time.t
     -> end_time:Time.t
     -> bars:Bar.t list
     -> t
   with sexp, fields
   include Response_intf.S with type t := t
 
-  val create :
-    timestamp:Time.t
+  val create
+    :  timestamp:Time.t
     -> open_:Price.t
     -> high:Price.t
     -> low:Price.t