[ts-general] OPT syntax, and ibc

David tshim at allone.org
Wed May 22 10:35:41 EDT 2013


Hello-

After searching the news group, test scripts, and docs I was unable 
to properly ascertain the correct syntax for placing an options order 
and requesting options history.

If anybody can tell me the correct syntax, it would be appreciated. 
These don't work:

req past OPT:SMART:MMM:USD:20140118:CALL:100 d1 ht:17 2d now new;

bind key:TRY_AN_OPTION to oid:1;
create item TestPosition  OPT:SMART:MMM:USD:20140118:CALL:100 
TRY_AN_OPTION MKT 2 0.0 0.0;
submit item TRY_AN_OPTION;

For reference, I've included a snippet of the June 2012 archive below:
==========================================================
    PastCmd <- select past ConExpr BarSize HtagUid BarSpan EndTime;

     BarSize <- s1  | s5  | s15 | s30
              | m1  | m2  | m3  | m5  | m15 | m30
              | h1  | d1  | wk  | mon | qtr | yr

     HtagUid <- ht:Uid
         Uid <- \d\d*

     BarSpan <- NatUnit
        Unit <- s | d | w | m | y
         Nat <- \d\d*

     EndTime <- now | YmdT
        YmdT <- ymd_t(%Y%m%d  %H:%M:%S)

     ConExpr <- PidForm | IbcForm | SymExpr
     PidForm <- pid:ProductUid at Route
     IbcForm <- ibc:ContractId at Route
     SymExpr <-  IND:Route:Symbol:Currency
              |  STK:Route:Symbol:Currency
              | CASH:Route:Symbol:Currency
              |  FUT:Route:Symbol:Currency:Expiry
              |  OPT:Route:Symbol:Currency:Expiry:Right:Strike
              |  FOP:Route:Symbol:Currency:Expiry:Right:Strike

       Route <- /* an Exchange table 'name' attribute value */
      Symbol <- /* a Symbol      "   'name'   "         "   */
    Currency <- /* a Currency    "   'code'   "         "   */
  ProductUid <- /* a Product     "   'uid'    "         "   */
  ContractId <- /* a Product 'ibc' value and IB contract id */

      Expiry <- %Y%m%d
       Right <- P | PUT
              | C | CALL
      Strike <- \d\d*
              | \d\d*.\d*
              |   \d*.\d\d*

Have a GREAT day!



More information about the ts-general mailing list