5.5.   GetDeletedFavorites

GET and POST GetDeletedFavorites

Description:  Return a list of datasets that have been removed from your ‘favorites’ list.

API Usage:   This endpoint uses zero API calls. Please refer to section 8.2 for more details on API rate limits.

GET Sample Request:

GET https://[server]/GetDeletedFavorites?SessionToken=YOUR_SESSION_TOKEN&DateFormat=YYYY-MM-DD

POST Sample Request:

POST https://[server]/GetDeletedFavorites?SessionToken=YOUR_SESSION_TOKEN
							{
								"SessionToken=YOUR_SESSION_TOKEN",
								"DateFormat":"YYYY-MM-DD"
							}
							

Tip:

    If you wish to permanently erase a series from the deleted favorites list use the GET or POST EraseDeletedFavorites command. It has the same request parameters (session token and Series object) as the endpoint AddFavorites.
    Please refer to the AddFavorites documentation for details.


Request Parameters

Parameter Type Description
SessionToken String Session token from the GetSessionToken endpoint.

Optional Request Parameters

Parameter Type Default Description
DateFormat String “YYYY-MM-DD” The date format to use in the request and result.
See the ‘DateFormat Parameter‘ section below for details.

DateFormat Parameter

You can control the format of dates that are used in the request and returned in the result.

If used, the date separator is the character between the day, month and year values and can be one of 4 characters:

– hyphen or dash
“/” – forward slash
“.” – dot or full stop
” ” – space

Format Result Dates
“YYYY-MM-DD” Formatted as 2018-01-22. (default).
“YYYY-DD-MM” Formatted as 2018-22-01.
“YYYYMMDD” Formatted as 20180122.
“YYYYDDMM” Formatted as 20182201.
“MM-DD-YYYY” Formatted as 01-22-2018.
“DD-MM-YYYY” Formatted as 22-01-2018.
“EXCEL” Formatted as numbers where 1/1/1976 = 27760.
“JULIAN” Formatted as the number of days since ’12h Jan 1, 4713 BC’.
Note

In the examples above we use the “-” date separator character. You can replace this character with any of the other three separators characters. If you require 2 character years, replace “YYYY” with “YY” in the formats above.


Response Parameters

Parameter Type Mandatory Description
1 ServerDateTime String Yes The server UTC date and time as an ISO 8601 string.
2 TimeStamp Float Yes Server date and time as a Julian date.
3 ExecutionTime Float Yes The number of milliseconds taken to process the request.
4 Result [Object] No* If the request is a success, a Result object is returned.
See the ‘Result‘ table below for details.
5 Errors [Object] No* If the request fails, an 'Errors' object is returned.
See the ‘Errors Object‘ table below for details.
Note

A successful API response will return a 'Result' object with the requested payload or an 'Errors' object detailing the issue that caused the error.

Result Object

Parameter Type Description
Datasets [Object] The datasets returned. See the Datasets object below

Datasets Object

Parameter Type Mandatory Description
1 Datasource String Yes The datasource ID.
2 DataCategory String No If true, this is a CategoryDS datasource (result ISCategoryDS is set to true) and the DataCategory result will contain the data category name.
3 Symbol String Yes The dataset ID (market identifier, symbol, ID or code).
4 Name String Yes Text describing the dataset.
5 Description String No* If available, additional data describing the dataset.
6 Frequency String Yes* The frequency ( day, week etc.) in which the data is reported.
7 Currency String Yes* The currency a unit the dataset is reported in as an ISO three character currency code.
8 Unit String Yes* The unit a dataset it reported ( MT, BBL, GALL etc).
9 Decimals Integer Yes* The recommended number of decimal places to use when displaying the dataset values.
10 Bates Array Yes* An array of price data column ‘bate’ names e.g: “Bid”,”Ask”, “High”,”Low”.
11 Bateindex Array Yes* An array of price data column numbers that correspond to the bates array above e.g: “BateIndex”: [ 0, 1, 2 ].
12 StartDate String Yes* The first date available for values in “YYYY-MM-DD” format.
13 EndDate String Yes* The most recent date available for values in “YYYY-MM-DD” format.
14 Values Integer Yes* Total number of value/price records in the dataset.
15 Corrections Integer Yes* The number of value/price corrections available for the dataset.
16 Premium Boolean Yes* If true, this is a premium subscription datasource that is not included gratis as part of a service.
17 Favorite Boolean Yes* If true, this dataset in the users favorite datasets list.
18 IsCategoryDS String Yes* If true the datasource is a CategoryDS datasource. A CategoryDS is a datasource whose datasets are grouped in data categories. The user must be authorised to access individual data categories. See “CategoryDS datasources” note above.
19 Subscription String No* The Subscription parameter is only returned when the request parameter ReturnAccess is set to true.
It returns the type of datasource access available with the current subscription.
There are 4 options: “None”, “Active”, “Inactive” and “Simulated”.
Please note that the option “Simulated” means that the values are fictional and are generated for demonstration purposes only.
20 Additional [Object] No* The Additional object allows more dataset specific information to be provided as additional JSON parameters.
Please refer to the datasource documentation and the raw JSON from the Additional object for more information.
An example of conversion factors in the Additional object is:

“Additional”: {
“Conversions”: [
{
“ConvertTo”: “BBL”,
“ConvertOperator”: “/”,
“ConvertValue”: “7.45”
}
]
}
21 Icon String No* A link to a small datasource logo image.
22 Status Integer No* A HTTP standard result code for the dataset. It returns 200 (success) if the dataset is available. See the Details parameter below.
23 Details String No* A description of the Status parameter value above.
24
DateTime
String No* The server UTC date and time (as an ISO 8601 string) the dataset was deleted from the user favorites list.
Note

The parameter may only be present if Status is 200 – meaning there was no error in the symbol request. If not 200, the dataset may not be available and you may get a dataset result similar to:

{
“Datasource”: “GCP”,
“Symbol”: “AG_GBP”,
“Status”: 404,
“Details”: “Unknown datasource GCP”
}

Errors Object

Parameter Type Mandatory Description
1 Status Integer Yes HTTP status code.
2 Detail String Yes Description of the status code above.

Possible Status codes in the 'Errors' object

Code Description
400 The Datasource/Symbol is invalid.
401 Invalid session token
404 Datasource not found
406 Unacceptable row count
Note

This is not an exhaustive list and additional error codes may be returned. The Errors object Detail field will return request specific error information.

Possible HTTP response codes

This endpoint returns 200 for success.
You can get HTTP client network errors or server errors from any API request. You should check with your network or IT colleagues in case the issue is a local one.
All server generated errors will return an 'Errors' object that will give specific details about the error.
A full list of HTTP codes and their meanings is available here,

Success and fail examples

Sample Request:

GET https://[server]/GetDeletedFavorites?SessionToken=YOUR_SESSION_TOKEN&DateFormat=YYYY-MM-DD
	
						

Response body on success:

Response body on fail:

Last updated on April 20, 2024