[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: an "API"



PureBytes Links

Trading Reference Links

Abhijit. On point 3, EasyLanguage 2000 certainly had File, FileAppend
and FileDelete statements and locking could be avoided with some
workarounds especially if there is only one server and one client.
Having said that though, you make a compelling argument for email as a
robust and elegant solution to the problem. 

Interesting thread.

John R Pretorius 
13 Olive Lane, Morningside Sandton 2196, South Africa
Telephone +27 11 784 5546 Mobile +27 83 231 5025
International Fax +27 11 403 8308 SA Fax 086 683 2561 
Skype john.r.pretorius
E-mail johnpretorius@xxxxxxxxxxxxx
Website http://home.imaginet.co.za/optionscan/


-----Original Message-----
From: Abhijit Dey [mailto:omegalist@xxxxxxxxxx] 
Sent: 21 September 2007 04:59 PM
To: 'Omega List'
Subject: Re: an "API"


John, it's not hocus pocus.
1) It's much simpler than it sounds. Less than a page of code
2) This will be a socket communication between TS & your program. VERY 
robust
3) TS sends email. I am not sure if it writes text files. If it does, 
say "file locking"
4) File based interface would be a order of magnitude slower than socket

communication

It's about as easy as this
try {
    serverSocket = new ServerSocket(25);
} catch (IOException e) { /* error handling */ }

try {
    clientSocket = serverSocket.accept();
    /* Got the mail here. Parse it. Trade it */
} catch (IOException e) { /* error handling */ }

Just to demonstrate how easy it is for someone to implement this.

Thanks,
Abhijit


On 9/21/2007 2:20 AM, John Pretorius wrote:
> The 2nd approach from Abhijit makes sense - get the alert out there 
> for analysis by a third party program. I am puzzled though by the need

> for all the hocus pocus of an email server. Why not simply write out a

> flat file to be picked up by an external program, say Excel which can 
> then interface with the API?
>
> John R Pretorius
> 13 Olive Lane, Morningside Sandton 2196, South Africa
> Telephone +27 11 784 5546 Mobile +27 83 231 5025
> International Fax +27 11 403 8308 SA Fax 086 683 2561 
> Skype john.r.pretorius
> E-mail johnpretorius@xxxxxxxxxxxxx
> Website http://home.imaginet.co.za/optionscan/
>
>
> -----Original Message-----
> From: Chris Evans [mailto:paratradesystems@xxxxxxx]
> Sent: 20 September 2007 08:07 PM
> To: 'Abhijit Dey'
> Cc: Omega List
> Subject: RE: an "API"
>
>
> I found and downloaded the Tradebolt program but they seem to have 
> died around 2004 so I don't know if the program will still work 
> without their involvement
>
> -----Original Message-----
> From: Abhijit Dey [mailto:omegalist@xxxxxxxxxx]
> Sent: Thursday, September 20, 2007 10:22 AM
> To: Omega List
> Subject: Re: an "API"
>
> There are a few - look in interactivebroker.com, under 3rd party 
> tools.
> Avoid anyone trying to charge you per trade - that's a rip off.
>
> There are 2 approaches to do this.
> 1) Some program monitoring pop-up alerts in TS, and figuring out what 
> to
>
> do. I would strongly advise to avoid this. This approach is very 
> brittle
>
> and will break
> 2) Better approach: Programs running as a mail server in your local
> machine, and configuring TS to send alert mail to this mail server.
Much
>
> easier than it sounds - less than a page worth of code can accomplish
> this. Than the program can parse the email body and use IB's API (or 
> whoever else's API) to send / cancel orders. This part - parsing the 
> email body, managing orders in "3rd party" brokers API etc. is the 
> complicated part of the approach. But you have to do that even if go 
> route 1.
>
> Sadly I don't have any code to share right now. I personally 
> implemented
>
> approach 2, and it worked great. An unfortunate hard disk crash caused
> me to lose some code, including this (had 2 HDD in raid-mirroring -
both
>
> crashed in 15 minutes interval... can you believe that?). Anyways, I 
> am
> a bit more discretionary / long-term right now, and haven't bothered
to 
> rewrite that code. But it can be done, and it works well.
>
> HTH,
> Thanks - Abhijit
>
> On 9/20/2007 10:48 AM, Chris Evans wrote:
>   
>> Does anyone know anyone who writes API programs that route orders 
>> from
>>     
>
>   
>> TS 8.2 to a broker other than RJ O'Brien?  Is this a hugely expensive
>> interface? CE
>>
>>   
>>     
>
>
>