3 messages in com.googlegroups.google-finance-apis[Google Finance APIs] Creating and po...
FromSent OnAttachments
ChrisSep 26, 2008 1:33 pm 
ChrisSep 30, 2008 11:08 am 
mister mashOct 30, 2008 8:07 am 
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] Creating and posting transaction using Atom EntryActions...
From:Chris (chri@gmail.com)
Date:Sep 26, 2008 1:33:22 pm
List:com.googlegroups.google-finance-apis

Hey All;

I've been trying to create and post a new transaction using a similar logic as presented in the .Net library example as follows:

AtomEntry entry = new AtomEntry(); AtomPerson author = new AtomPerson(AtomPersonType.Author); author.Name = "Jo March"; author.Email = "jo@gmail.com"; entry.Authors.Add(author); entry.Title.Text = "Tennis with Beth"; entry.Content.Content = "Meet for a quick lesson.";

Uri postUri = new Uri("http://www.google.com/calendar/feeds/ jo@gmail.com/private/full");

// Send the request and receive the response: AtomEntry insertedEntry = service.Insert(postUri, entry);

which using the calendar API creates a new calendar entry.

So my problem is where to put the necessary XML to add a stock to a portfolio. From the Api to what's needed is this structure of XML:

<entry> <gf:transactionData date='2007-09-26T00:00:00.000' shares='1000.0' type='Buy'> <gf:commission> <gd:money amount='0.0' currencyCode='USD'/> </gf:commission> <gf:price> <gd:money amount='568.2' currencyCode='USD'/> </gf:price> </gf:transactionData> </entry>

and the feed URI of: http://finance.google.com/finance/feeds/default/portfolios/portfolioID/positions/TICKERID/transactions

When I retrieve position data it is in the ExtensionElements, but when adding does it need to just be in the content area? I think I might be missing something...

Any help I'd really appreciate!!