10 messages in com.googlegroups.google-finance-apis[Google Finance APIs] Re: additional ...
FromSent OnAttachments
ChrisSep 30, 2008 11:14 am 
ChrisOct 3, 2008 2:21 pm 
DineshOct 3, 2008 8:46 pm 
Doug ChimentoOct 4, 2008 9:35 am 
DineshOct 4, 2008 9:34 pm 
Cham...@gmail.comOct 6, 2008 2:26 pm 
Dion Loy (Google)Oct 6, 2008 3:12 pm 
Cham...@gmail.comOct 7, 2008 8:17 am 
Dion Loy (Google)Oct 8, 2008 9:59 am 
Cham...@gmail.comOct 8, 2008 4:39 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[Google Finance APIs] Re: additional returns data not as describedActions...
From:Dinesh (kdin@gmail.com)
Date:Oct 3, 2008 8:46:03 pm
List:com.googlegroups.google-finance-apis

I too had the same problem, when I tried to query the MarketValue, it said 'Undefined' because it was missing from the output.

On Sat, Oct 4, 2008 at 5:22 AM, Chris <chri@gmail.com> wrote:

On Oct 3, 11:21 am, Doug <dchi@gmail.com> wrote:

Chris, Could you clarify what you mean by market value performance?

Thanks,

Doug

What I mean is the the actual MarketValue for the position. For example, here is the feed that is being returned by this URI:

http://finance.google.com/finance/feeds/default/portfolios/54/positions?returns=true

<?xml version="1.0" encoding="utf-8" ?> - <entry xmlns="http://www.w3.org/2005/Atom"> <gd:feedLink href="http://finance.google.com/finance/feeds/ exam@gmail.com/portfolios/54/positions/NASDAQ:AAPL/transactions" xmlns:gd="http://schemas.google.com/g/2005" /> <gf:positionData gainPercentage="0.0" return1w="0.0" return1y="0.0" return3m="0.0" return3y="0.0" return4w="0.0" return5y="0.0" returnOverall="0.0" returnYTD="0.0" shares="1.0" xmlns:gf="http:// schemas.google.com/finance/2007" /> <gf:symbol exchange="NASDAQ" fullName="Apple Inc." symbol="AAPL" xmlns:gf="http://schemas.google.com/finance/2007" /> <title type="text">Apple Inc.</title> <id>http://finance.google.com/finance/feeds/exam@gmail.com/ portfolios/54/positions/NASDAQ:AAPL<http://finance.google.com/finance/feeds/example@gmail.com/portfolios/54/posi@> </id> <link href="http://finance.google.com/finance/feeds/default/ portfolios/54/positions/NASDAQ%3AAAPL<http://finance.google.com/finance/feeds/default/portfolios/54/positions/NASDAQ%3AAAPL>" rel="self" type="application/ atom+xml" /> <category term="http://schemas.google.com/finance/2007#position" scheme="http://schemas.google.com/g/2005#kind" /> <content type="text" /> <updated>2008-10-03T14:44:39-06:00</updated> </entry>

What I really want, and from what I understand, this is what it should return:

<?xml version="1.0" encoding="utf-8" ?> - <entry xmlns="http://www.w3.org/2005/Atom" xmlns:gf="http:// schemas.google.com/finance/2007" xmlns:gd="http://schemas.google.com/g/ 2005"> <gd:feedLink href="http://finance.google.com/finance/feeds/ exam@gmail.com/portfolios/54/positions" /> - <gf:portfolioData currencyCode="USD" gainPercentage="0.0" return1w="0.0" return1y="0.0" return3m="0.0" return3y="0.0" return4w="0.0" return5y="0.0" returnOverall="0.0" returnYTD="0.0"> - <gf:costBasis> <gd:money amount="0.0" currencyCode="USD" /> </gf:costBasis> - <gf:daysGain> <gd:money amount="-3.029999" currencyCode="USD" /> </gf:daysGain> - <gf:gain> <gd:money amount="97.07" currencyCode="USD" /> </gf:gain> - <gf:marketValue> <gd:money amount="97.07" currencyCode="USD" /> </gf:marketValue> </gf:portfolioData> <title type="text">NinjaTrader0</title> <id>http://finance.google.com/finance/feeds/exam@gmail.com/ portfolios/54<http://finance.google.com/finance/feeds/example@gmail.@> </id> <link href="http://finance.google.com/finance/feeds/default/ portfolios/54<http://finance.google.com/finance/feeds/default/portfolios/54>" rel="self" type="application/atom+xml" /> <link href="http://finance.google.com/finance/feeds/default/ portfolios/54<http://finance.google.com/finance/feeds/default/portfolios/54>" rel="edit" type="application/atom+xml" /> <category term="http://schemas.google.com/finance/2007#portfolio" scheme="http://schemas.google.com/g/2005#kind" /> <content type="text" /> <updated>2008-10-03T15:13:59-06:00</updated> </entry>

Specifically this is what I need:

<gf:marketValue> <gd:money amount="97.07" currencyCode="USD" /> </gf:marketValue>

which is the market value of that position at the current time. From my understanding, using this URI (http://finance.google.com/finance/ feeds/default/portfolios/54/positions?returns=true<http://finance.google.com/finance/feeds/default/portfolios/54/positions?returns=true>) should return the performance statistics on each position in the portfolio (in this case the portfolio numbered 54), yet the only data returned is as above.

So in a nutshell: How do I get the market value of each position in a portfolio using a singe URI request?