[ts-gen] create & modify orders

Bill Pippin pippin at owlriver.net
Thu Apr 17 13:20:29 EDT 2008


Nils, there is no need to respond to this post unless you still have
problems that you believe are related to the newest version of the
shim.

[Nils is having problems with orders for the symbol GBL, which 
 he presumably includes via LocalSet.sql.  He has since sent
 me email indicating that the problem is probably account specific.]

I'm still sending this response to the list, in case anyone else
has similar problems, to indicate the sequence of tests to make.
So, my over-taken by events post follows:
____________________________________________________________________

You may want to roll back to an earlier version for awhile, if that
helps, about which more later in this post.  First, though, I'll focus
on fixing your problem with GBL given the existing setup:  

>                     ... new tws errors occured. If I try GBL June
> Contract, it says "Security GBL is not allowed for this account ..."
> This used to work in my old setup.

Some questions to localize the problem follow.  Although I realize
your post suggests that the first can't be the problem, and the
second is obvious, I just want to be sure:

    1. Are you sure that your contract is for GBL?
    2. Can you still subscribe to GBL via the tws gui?
    3. Can you subscribe to GBL market data via the shim?
    4. What is the text of the request stream, for
       subscriptions as well as orders, to GBL?

For (1) above, you would want to check the related line from
sql/mod/LocalSet.sql, and then you might run a query such as
the following to check for surprises:

#!/bin/bash

mysql -u code -h xps400 testing <<EOF

  select Contract.uid, SecType.type,
         Exchange.name, Product.name, Currency.code, FutDetail.expiry
    from Contract, Exchange, Currency, Product, SecType, FutDetail
   where Contract.uid   = 216
     and Contract.route =  Exchange.uid
     and Contract.unit  =  Currency.uid
     and Contract.tag   = FutDetail.uid
     and Contract.sid   =   Product.uid
     and  SecType.uid   =   Product.sym_type

EOF

In the query above, there may be typos or thinkos, since I've not
restored my database to the version you're using, and in any case
I don't have your LocalSet contracts.  Please feel free to adjust
the text as needed.

I ask (3) in order to disambiguate between problems with contracts
and orders.  In (4) above, by request text I mean the results of
running the shim with the save and file options on, and feeding
tws2shim.bin through bin/req.filter .

Also, looking at logs, you comment elsewhere that the log line text
has decreased in verbosity from those produced by the January release.
It's hard to say from here whether that's a problem, but the
request text translation via bin/req.filter will nail this down.

If you would like to post that text and the related ShimText file
to the list, feel free.  Of course you should trim as desired to
keep private info private.  Also, this may well not be worth the
effort:

In the event that the problem is with the shim, there should be a
much-improved database symbology available to you soon, and at that
point your problem might either disappear, or else be easier to fix.
That's why I mention rolling back to an earlier version above.

Now, back to your post:

> This used to work in my old setup. As I understand the table Template
> replaces LineItem and requires about the same input ...

Correct.  If you want to check the wiring from Template to Position to
Contract, a query such as the one above should do the trick.

Thanks,

Bill


More information about the ts-general mailing list