Google 财经 API 出现问题
当我尝试使用 google Finance api 购买股票时,出现异常:
运行:
Enter user ID: ****@gmail.com
Enter user password: ******
Enter transaction type: Buy
Enter transaction date (yyyy-mm-dd): 2010-03-10
Enter number of shares (optional, e.g. 100.0):
Enter price (optional, e.g. 141.14): 12.0
Enter commission (optional, e.g. 20.0): 23.0
Enter currency (optional, e.g. USD, EUR, JPY): USD
Enter any notes: Notes
Enter portfolio ID:
1
Enter ticker (EXCHANGE:SYMBOL):
NASDAQ:INFY
Inserting Entry at location: http://finance.google.com/finance/feeds/default/portfolios/1/positions/NASDAQ:INFY/transactions
The server had a problem handling your request.
com.google.gdata.util.ServiceForbiddenException: Forbidden
Exception message unavailable
at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:561)
at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:563)
at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:536)
at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:515)
at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:535)
at com.google.gdata.client.Service.insert(Service.java:1347)
at com.google.gdata.client.GoogleService.insert(GoogleService.java:599)
at financetester.Main.insertTransactionEntry(Main.java:169)
at financetester.Main.main(Main.java:81)
BUILD SUCCESSFUL (total time: 1 minute 4 seconds)
When i am trying to buy shares using google finance api I am getting an exception:
run:
Enter user ID: ****@gmail.com
Enter user password: ******
Enter transaction type: Buy
Enter transaction date (yyyy-mm-dd): 2010-03-10
Enter number of shares (optional, e.g. 100.0):
Enter price (optional, e.g. 141.14): 12.0
Enter commission (optional, e.g. 20.0): 23.0
Enter currency (optional, e.g. USD, EUR, JPY): USD
Enter any notes: Notes
Enter portfolio ID:
1
Enter ticker (EXCHANGE:SYMBOL):
NASDAQ:INFY
Inserting Entry at location: http://finance.google.com/finance/feeds/default/portfolios/1/positions/NASDAQ:INFY/transactions
The server had a problem handling your request.
com.google.gdata.util.ServiceForbiddenException: Forbidden
Exception message unavailable
at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:561)
at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:563)
at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:536)
at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:515)
at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:535)
at com.google.gdata.client.Service.insert(Service.java:1347)
at com.google.gdata.client.GoogleService.insert(GoogleService.java:599)
at financetester.Main.insertTransactionEntry(Main.java:169)
at financetester.Main.main(Main.java:81)
BUILD SUCCESSFUL (total time: 1 minute 4 seconds)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论