Enter URL or search on title

BlogShares Developer XML-RPC API

API Version: 1.0
Status: Request for Comments
Author: Seyed Razavi
Feedback and Discussion: Tools and Developers forum.
Version Date: 12 May 2003

Table of Contents

Introduction
License
Session Management
Querying
Trading
Misc
Standard Error Codes

Introduction

[TOC]

BlogShares XML-RPC API is offered to developers of third-party tools and services to build discrete or fully-featured interfaces into the BlogShares simulation. The long-term objective is to enable a full set of features for usage without accessing the BlogShares website. Therefore, there is a different licensing model for the XML-RPC API which is designed to compensate for the loss of website traffic whilst promoting third-party development free of complicated pricing schemes.

This document assumes familiarity with the XML-RPC standard and the BlogShares system.

Licensing

[TOC]

Client Access Key: Each client which accesses the XML-RPC requires a key to create a session on the server. Keys are freely available to Premium Members at no charge. Keys are not tied to a particular tool or Application Certificate. They can be used with any tool or at any location. They are solely tied to the player account.

Application Certificate: Each application needs to provide a certificate when creating a session which identifies the tool with the BlogShares system. Application developers can obtain such certificates freely for open-source, non-commercial purposes. Commercial application certificates are also available upon request for an annual fee (TBD). Certified tools can be used by anyone with a valid Client Access Key, which is required primarily for trading activities or activities tied to a logged in player's account.

Public access: If either the Client Access Key or Application Certificate is not provided, the tool will be limited to a single session with 100 queries per day. No trading or other facilities tied to the user account will be permitted. Sessions will be tracked by IP in this case.

Data: All data provided via the XML-RPC interface is subject to a Creative Commons License.

Session Management

[TOC]

All activity with BlogShares requires a session which needs to be registered as the first call to the system. A session identifier is provided and needs to be passed to every method. Sessions are expired either manually or due to inactivity.

blogshares.registerSession

This creates a session on the server.

Parameters

Returns

Error codes

blogshares.unregisterSession

This terminates a session on the server. It is required tools call this method to help resource management rather than waiting for session expiration.

Parameters

Returns
None

Error codes

blogshares.validSession

Checks whether the session is still valid, useful if period of inactivity between method calls.

Parameters

Returns

Error codes

Querying

[TOC]

A selection of methods for querying the BlogShares system.

blogshares.listBlogs

Get a list of blogs

Parameters

Returns

Error codes

blogshares.getBlogDetails

Get details of a blog

Parameters

Returns

Error codes

blogshares.getBlogShareholders

Get current shareholders for blog

Parameters

Returns

Error codes

blogshares.getBlogTransactions

Get a list of transactions for a blog

Parameters

Returns

Error codes

blogshares.getBlogMarketOrders

Get a list of market orders

Parameters

Returns

Error codes

blogshares.getBlogTracking

Get tracking information for blog

Parameters

Returns

Error codes

blogshares.getBlogPriceTracking

Get price tracking information for blog

Parameters

Returns

Error codes

blogshares.getBlogAddresses

Get a complete list of known addresses (URL) for this blog

Parameters

Returns

Error codes

blogshares.getBlogIncomingLinks

Get incoming links for a blog

Parameters

Returns

Error codes

blogshares.getBlogOutgoingLinks

Parameters

Returns

Error codes

blogshares.getUserProfile

Get a user's profile

Parameters

Returns

Error codes

blogshares.getUserPortfolio

Get a user's stock portfolio.

Parameters

Returns

Error codes

blogshares.getUserIndexFunds

Get a user's index fund shares.

Parameters

Returns

Error codes

blogshares.getMarketOrders

Get a list of market orders for the logged in player

Parameters

Returns

Error codes

blogshares.getTransactions

Get a list of transactions for the logged in player

Parameters

Returns

Error codes

blogshares.getWatchlist

Get a list of blogs in the logged in player's watchlist

Parameters

Returns

Error codes

blogshares.getBlogsOwned

Get a list of blog's owned by the logged in player

Parameters

Returns

Error codes

blogshares.getMarketIndex

Parameters

Returns

Error codes

Trading

[TOC]

These methods enable direct trading in the same manner as provided by the website and with the same limitations.

blogshares.buyShares

Buy shares

Parameters

Returns

Error codes

blogshares.sellShares

Sell shares

Parameters

Returns

Error codes

blogshares.giftShares

Gift a gift of shares to a player

Parameters

Returns

Error codes

blogshares.placeBuyOrder

Place a buy order

Parameters

Returns

Error codes

blogshares.placeSellOrder

Place a sell order

Parameters

Returns

Error codes

blogshares.cancelOrder

Cancel a market order

Parameters

Returns

Error codes

blogshares.completeOrder

Complete a market order

Parameters

Returns

Error codes

blogshares.buyIndexFund

Buy an index fund share

Parameters

Returns

Error codes

blogshares.sellIndexFund

Sell an index fund share

Parameters

Returns

Error codes

Misc

[TOC]

A variety of special use methods.

blogshares.watchBlog

Watch a blog

Parameters

Returns

Error codes

Standard Error Codes

[TOC]

The following error codes can be returned for any of the above methods.