Â
API - Personal Data
Personal Data
API Usage Information
Get user API Usage Information.
Request
GET /api_usage
Example
GET https://api.gurufocus.com/public/user/{api_token}/api_usage
Response
Response will be an object containing the user's API usage information.
{
"API Usage": 20,
"API Requests Remaining": "Unlimited"
}
User Portfolios
Get list of personal portfolios.
Request
GET /portfolio/my_portfolios
Example
GET https://api.gurufocus.com/public/user/{api_token}/portfolio/my_portfolios
Response
Response will be an array containing the list of personal portfolios.
[
{
"id": "123456",
"uid": "654321",
"portid": "123456",
"portname": "Portfolio 1",
"modified": "1541386018",
"intro": "764850",
"private": 0,
"email": "0",
"alert": "",
"settings": "",
"created": "2018-11-04 20:46:58",
"num_stocks": 10,
"p_all": null,
"p_1m": null,
"p_3m": null,
"p_6m": null,
"p_12m": null,
"p_3y": null,
"p_5y": null,
"p_10y": null,
"p_rel_sp500": null,
"is_article": null,
"is_deleted": "0",
"deleted_time": null,
"description": "All-In-One Guru Screener - GuruFocus.com http://gurufocus.com/screener/",
"detail": [
{
"id": "5057214",
"symbol": "OTCPK:ALRT",
"in_price": "0.05",
"price": "0.04",
"currency": "USD",
"pettm": "0.00",
"ps": "0.00",
"pb": "0.00",
"gain": "0",
"gain_p": "-20%",
"gain_today": "0",
"p_change": "0.00",
"p_pct_change": "-5.67",
"open": "0.05",
"high": "0.05",
"low": "0.04",
"volume": "284119",
"date_add": "11/04/2018",
"cost_per_share": "0.05",
"shares": 0,
"company": "ALR Technologies Inc"
},
{
"id": "5057215",
"symbol": "OTCPK:BIIO",
"in_price": "0.28",
"price": "0.35",
"currency": "USD",
"pettm": "0.00",
"ps": "0.00",
"pb": "0.00",
"gain": "0",
"gain_p": "25%",
"gain_today": "0",
"p_change": "0.00",
"p_pct_change": "0.00",
"open": "0.00",
"high": "0.00",
"low": "0.00",
"volume": "0",
"date_add": "11/04/2018",
"cost_per_share": "0.28",
"shares": 0,
"company": "Bionovate Technologies Corp"
}
]
}
]
User Screeners
Get a list of user's customized screeners.
Request
GET /user_screeners
Example
GET https://api.gurufocus.com/public/user/{api_token}/user_screeners
Response
Response will be an array containing the list of screener information.
[
{
"id": 55636,
"user_id": 753587,
"name": "test save screener",
"note": "test",
"is_public": true,
"is_hidden": 0,
"default_exchanges": [
"NAS",
"NYSE",
"OTCPK",
"OTCBB",
"AMEX",
"ARCA",
"IEXG",
"BATS",
"GREY"
],
"default_view": null,
"is_predefined": false,
"updated_at": "2021-10-18 22:18:12",
"created_at": "2021-10-18 22:18:12",
"default_ranking": null,
"alerts": []
}
]
User Screener DataÂ
Detailed information about a screener. Each page contains 100 stocks, such that to get all the stocks of a screener, you need to run multiple queries with the page variable equals 1 to res['stocks']['total'] / 100.
Notice that this API is only available for premium plus members. The maximum page is 50 so only the top 5000 stocks of a screener can be fetched.
Request
GET /user_screeners/{screener_id}/{page}
Example
GET https://api.gurufocus.com/public/user/{api_token}/user_screeners/55636/1
Response
Response will be an object containing the screener information. Notice the stock information is partial.
{
"id": 55636,
"user_id": 753587,
"name": "some name",
"note": "some note",
"is_public": true,
"is_hidden": 0,
"default_exchanges": [
"NAS",
"NYSE",
"OTCPK",
"OTCBB",
"AMEX",
"ARCA",
"IEXG",
"BATS",
"GREY"
],
"default_view": null,
"is_predefined": false,
"updated_at": "2021-10-18 22:18:12",
"created_at": "2021-10-18 22:18:12",
"default_ranking": null,
"stocks": {
"total": 4,
"per_page": 100,
"current_page": 1,
"last_page": 1,
"from": 1,
"to": 4,
"data": [
{
"ranks": "-",
"overall_rank": "-",
"guru_trading_ids": "-",
"insider_trading_ids": "-",
"exchange": "OTCPK",
"symbol": "CZMWY",
"display_symbol": "CZMWY",
"price": 194.6,
"currency_symbol": {
"currency": "USD",
"rate": "1.000000",
"currency_symbol": "$",
"timestamp": "1634669163"
},
"company": "Carl Zeiss Meditec AG",
"region": "U",
"mktcap_norm": "17405.024",
"stockid": "US0FCH"
}
],
"allfilters": [
{
"id": 1984961,
"screener_id": 55636,
"field_id": 53023,
"operator": "=",
"right": "0",
"sequence": null,
"updated_at": "2021-10-18 22:18:12",
"created_at": "2021-10-18 22:18:12",
"field": {
"id": 53023,
"field_name": "use_in_region",
"financial_name": null,
"display_name": "Display Multiple Classes in One Region",
"field_type": "boolean",
"options": {
"all_in_one_screener": {
"type": "select",
"data": [
{
"label": "Yes",
"value": true
},
{
"label": "No",
"value": false
}
]
},
"user_id": -1,
"is_basic": true,
"is_predefined": true,
"is_group": false,
"is_hidden": false,
"is_positive": 0,
"is_increase": 0,
"category": 1,
"updated_at": "2020-08-27 16:36:28",
"created_at": "2020-08-27 15:37:13",
"basic_fields": "use_in_region"
}
}
}
],
"alerts": []
}
}
Continue to read: API Reference - Backtesting