CHPP Development/XML/transferHistory
From Hattrick
CHPP Documentation - transferHistory.asp
This page offers XML and HTML interfaces for a team's or a player's transfer history. The XML interface enables CHPP developers to integrate these data into their applications.
Current version
Current version of the XML output is 1.2
Syntax
transferHistory.asp?
outputType = {HTML | XML}
actionType = {team | player | latest | expensive | expensiveint}
[teamID = integer]
[playerID = integer]
[endDate = date]
Indata parameters
outputType
Indicates whether the output to the client should be an HTML document or an XML file. Only the XML document may be used for CHPP use.
actionType
Indicates what type of action the page should perform.
| Value | Default | Description |
|---|---|---|
| view | Default | View the transfer stats for a team. Will show up to 50 transfers before a specified EndDate.
The first list shows transfers for the first 7 days. The next pages then goes back 1 month each and shows up to 50 transfers each. All transfers are shown, so if there are more than 50 transfers in a certain 1 month interval, then the interval will of course be shortened (not the excessive transfers thrown out). Example: Team A buys/sells 10 players last 7 days. The first list shows these 10 transfers. The second list starts 7 days before the first list and goes back 1 month (since the team made less than 50 transfers during that 30 days period). During the previous month however, the team made 60 transfers. Thus that page only shows transfers within a 25 day period (the interval needed to show the next 50 transfers). The next page then shows an interval of another month. |
| player | View the transfer stats for a player. | |
| latest | View a list of recent transfers for a league. This is currently not available for CHPP! | |
| expensive | View a list of the most expensive transfers last week for a league. This is currently not available for CHPP! | |
| expensiveint | View a list of the most expensive transfers last week internationally. This is currently not available for CHPP! |
teamID
Required for actionType "team", otherwise ignored.
playerID
Required for actionType "player", otherwise ignored.
endDate
Required for actionType "team" and indicates the end of the tim interval to search for. if not supplied, the default list of last week's transfers will be shown.
Outdata parameters
The XML output can contain the following tags/containers:
HattrickData
Generic tag wrapped around all XML data from Hattrick.
FileName (Within HattrickData)
The name of the file that your request was sent to.
UserID (Within HattrickData)
The logged on User's UserID (not to be confused with TeamID). If not logged on, it defaults to 0.
Version (Within HattrickData)
The current version number of the XML output.
FetchedDate (Within HattrickData)
Date and time when the XML file was fetched. Format is YYYY-MM-DD HH:MM:SS.
ActionType (Within HattrickData)
The initial actionType that was submitted for the page.
Team (Within HattrickData)
Container for the Team to show the transfers for. Only returned for actionType = "team".
TeamID (Within Team)
Globally unique identifier of the team.
TeamName (Within Team)
The full name of the team.
ActivatedDate (Within Team)
The date when the user got this team.
Stats (Within HattrickData)
Container for the transfer stats. Only returned for actionType = "team".
TotalSumOfBuys (Within Stats)
The total sum in the default currency (equals 1 Swedish kr, or 0.1 €) of all the bought players for this team.
TotalSumOfSales (Within Stats)
The total sum in the default currency (equals 1 Swedish kr, or 0.1 €) of all the sold players for this team.
NumberOfBuys (Within Stats)
The total number of bought players.
NumberOfSales (Within Stats)
The total number of sold players.
Transfers (Within HattrickData)
Container for a set of transfers.
StartDate (Within Transfers)
The oldest date of the selected transfers list.
EndDate (Within Transfers)
The latest date of the selected transfers list.
Player (Within Transfers or Transfer)
Container for the player. If actionType = "team" this container is provided within a particular Transfer, else if actionType = "player", it is provided directly within the Transfers container.
PlayerID (Within Player)
Globally unique identifier of the player.
PlayerName (Within Player)
The full name of the player.
Transfer (Within Transfers)
Container for a particular transfer.
TransferID (Within Transfer)
A globally unique identifier of a particular transfer.
Deadline (Within Transfer)
The date when bidding closed for the transfer.
TransferType (Within Transfer)
One character string of either "S" or "B", representing if the transfer was a Sale or a Buy, seen from the sought for team's point of view.
Buyer (Within Transfer)
Container for the buyer team.
BuyerTeamID (Within Buyer)
Globally unique identifier of the buyer team.
BuyerTeamName (Within Buyer)
The full name of the buyer team.
Seller (Within Transfer)
Container for the Seller team.
SellerTeamID (Within Seller)
Globally unique identifier of the Seller team.
SellerTeamName (Within Seller)
The full name of the Seller team.
Price (Within Transfer)
The final price that the buyer paid.
TSI (Within Player)
The Total Skill Index (TSI) of the player at the time he was sent to the transfer list.
