[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Using Ruby to Invest in the Market?

Michael Gorsuch

12/30/2005 1:36:00 AM

An idea popped in my head today. Has anyone ever used a stock
investment service that allows you to access an investment API or
something like that?

It would nice if I could use Ruby to buy or sell stocks in real time,
but I do not have any experience in dealing with this programatically.

Anybody?

Thank you in advance,

Michael


13 Answers

dbikle

12/30/2005 5:57:00 AM

0

I'd suggest InteractiveBrokers.com They offer a Java based API.
I've read that Java and Ruby play well together so you might want
to look into that.

I like them more for their commissions on option contracts.
They charge $1 per contract which is about the same as
optionsxpress.com
but optionsxpress forces you to trade 10 contracts to get the $1 price.

10 contracts corresponds to 1,000 shares of stock which is too large of
a bet for most programmers.

dbikle

12/30/2005 6:01:00 AM

0

oh, IB also offers paper trading which means you trade with play money
which should be of interest to a programmer tinkering with trading
algorithms.

Charles Ballowe

12/30/2005 7:59:00 AM

0

You'd need real time data feeds as well as a trading API. When I was
bored and reading about it a while back, it seemed that in order to
get access to APIs you had to sign agreements and often be a fairly
large customer of the exchange to get access. Most of the software
that is given to private investors and day traders uses one api -
generally not published - to access the brokerage - often custom to
the brokerage. The broker then has another API into the market. Some
of the markets use software based on products from TIBCO or other
messaging software vendors.

I think the short answer is -- if you want to, good luck getting
access. Really, I'd be happy if I could find a source for a real time
- or even delayed stock ticker with an easy API so I could write code
and just play with simulating trades.

-Charlie

On 12/29/05, Michael Gorsuch <michael.gorsuch@gmail.com> wrote:
> An idea popped in my head today. Has anyone ever used a stock
> investment service that allows you to access an investment API or
> something like that?
>
> It would nice if I could use Ruby to buy or sell stocks in real time,
> but I do not have any experience in dealing with this programatically.
>
> Anybody?
>
> Thank you in advance,
>
> Michael
>
>


Sky Yin

12/30/2005 8:37:00 AM

0

I'm looking at Ruby/Finance library (
http://www.caliban.org/ruby/ruby-fin...). Before using Ruby/Rails,
I've researched several financial quoting web-services. Some are free with
limitations, others are not. For real-time quoting, it may be worth the
money to buy such stuffs, but for delayed or historical quotes, I found
Yahoo! Finance data downloading function is good enough. The csv file format
is very easy to phrase and import into database. The above mentioned
Ruby/Finance library uses Yahoo!Finance as well.

Hope it help.


On 12/30/05, Charles Ballowe <cballowe@gmail.com> wrote:
>
> You'd need real time data feeds as well as a trading API. When I was
> bored and reading about it a while back, it seemed that in order to
> get access to APIs you had to sign agreements and often be a fairly
> large customer of the exchange to get access. Most of the software
> that is given to private investors and day traders uses one api -
> generally not published - to access the brokerage - often custom to
> the brokerage. The broker then has another API into the market. Some
> of the markets use software based on products from TIBCO or other
> messaging software vendors.
>
> I think the short answer is -- if you want to, good luck getting
> access. Really, I'd be happy if I could find a source for a real time
> - or even delayed stock ticker with an easy API so I could write code
> and just play with simulating trades.
>
> -Charlie
>
> On 12/29/05, Michael Gorsuch <michael.gorsuch@gmail.com> wrote:
> > An idea popped in my head today. Has anyone ever used a stock
> > investment service that allows you to access an investment API or
> > something like that?
> >
> > It would nice if I could use Ruby to buy or sell stocks in real time,
> > but I do not have any experience in dealing with this programatically.
> >
> > Anybody?
> >
> > Thank you in advance,
> >
> > Michael
> >
> >
>
>

Joe Van Dyk

12/30/2005 9:20:00 AM

0

On 12/29/05, Charles Ballowe <cballowe@gmail.com> wrote:
> On 12/29/05, Michael Gorsuch <michael.gorsuch@gmail.com> wrote:
> > An idea popped in my head today. Has anyone ever used a stock
> > investment service that allows you to access an investment API or
> > something like that?
> >
> > It would nice if I could use Ruby to buy or sell stocks in real time,
> > but I do not have any experience in dealing with this programatically.
>
> You'd need real time data feeds as well as a trading API. When I was
> bored and reading about it a while back, it seemed that in order to
> get access to APIs you had to sign agreements and often be a fairly
> large customer of the exchange to get access. Most of the software
> that is given to private investors and day traders uses one api -
> generally not published - to access the brokerage - often custom to
> the brokerage. The broker then has another API into the market. Some
> of the markets use software based on products from TIBCO or other
> messaging software vendors.
>
> I think the short answer is -- if you want to, good luck getting
> access. Really, I'd be happy if I could find a source for a real time
> - or even delayed stock ticker with an easy API so I could write code
> and just play with simulating trades.

You might find this of interest:

http://rubyquiz.com/q...


James Gray

12/30/2005 1:51:00 PM

0

On Dec 29, 2005, at 7:35 PM, Michael Gorsuch wrote:

> An idea popped in my head today. Has anyone ever used a stock
> investment service that allows you to access an investment API or
> something like that?

My investment club uses E*Trade for our purchases. We are a "buy and
hold" strategy group, so there's not enough action to warrant doing
it through Ruby.

I have wondered if E*Trade exposes an API for reading account
information though. That would be neat for our valuation reports. I
could always screen scrape of course, but a web service would be much
better. Just haven't had the time to look into it yet...

James Edward Gray II


Michael Gorsuch

12/30/2005 3:03:00 PM

0

Thanks to everyone for the replies. I'll have to marinate on this for
a little while.

On 12/30/05, James Edward Gray II <james@grayproductions.net> wrote:
> On Dec 29, 2005, at 7:35 PM, Michael Gorsuch wrote:
>
> > An idea popped in my head today. Has anyone ever used a stock
> > investment service that allows you to access an investment API or
> > something like that?
>
> My investment club uses E*Trade for our purchases. We are a "buy and
> hold" strategy group, so there's not enough action to warrant doing
> it through Ruby.
>
> I have wondered if E*Trade exposes an API for reading account
> information though. That would be neat for our valuation reports. I
> could always screen scrape of course, but a web service would be much
> better. Just haven't had the time to look into it yet...
>
> James Edward Gray II
>
>


Gavin Kistner

12/30/2005 3:21:00 PM

0

On Dec 30, 2005, at 8:03 AM, Michael Gorsuch wrote:
> Thanks to everyone for the replies. I'll have to marinate on this for
> a little while.

Amusing choice of words. :)

In case it was a slip-up, the pedagogical side of me wants to point out:

You can marinate _in_ something (to soak in a marinade) or you can
_ruminate_ on something (to think deeply about, to 'chew over').

(Ruminants are animals [like cows] that eat food and later bring it
back up from their stomach into their mouths to chew. The word is
based on the Latin word for "to chew over again"; it is from this
that our modern usage of the word 'ruminate' is derived. Chewing on
something for a long period of time, staring out into space...he must
be lost in thought.)



james_b

12/30/2005 3:47:00 PM

0

Gavin Kistner wrote:
...

So I'm sitting here, eating breakfast, and reading ruby-talk, when ...

> (Ruminants are animals [like cows] that eat food and later bring it
> back up from their stomach into their mouths to chew.


Suddenly my oatmeal tasted ... different.

:)

James
--

http://www.ru... - Ruby Help & Documentation
http://www.artima.c... - Ruby Code & Style: Writers wanted
http://www.rub... - The Ruby Store for Ruby Stuff
http://www.jame... - Playing with Better Toys
http://www.30seco... - Building Better Tools


Anthony Elizondo

12/30/2005 4:03:00 PM

0

On 12/29/05, Michael Gorsuch <michael.gorsuch@gmail.com> wrote:
> An idea popped in my head today. Has anyone ever used a stock
> investment service that allows you to access an investment API or
> something like that?

I am very interested in this. A few weeks back I looked into a few
different brokers with APIs. Here are a few links:

http://qcharts.mbtrading.c...
http://www.interactivebrokers.com/en/software/highlights/apiHighlights.php?ib_...
http://www.quotetr...help/qtse...
http://www.cybertrader.com/AboutCyberTrader/API/De...

Interactive Brokers offers a "paper trading" service. Could be a great
way to test your software cheaply.

http://www.interactivebrokers.com/en/software/paperTrader.php?ib_...

On Windows you may be able to use the QuoteTracker API, which will
open access to a lot of brokers, both for trading and streaming
quotes.

http://www.quotetr...

I have some experience with financials could help anyone navigate
through those details. I've written no code yet, and my day job
unfortunately does not give me the chance to play with Ruby, so my
Ruby level is probably at "moderate enthusiast".

Anyone should feel free to contact me for more details.