asset-search
Example
<cr-component id="component" name="asset-search"></cr-component>
<script>
const component = document.querySelector("#component");
component.init({
query: "pimco",
isInputEnabled: true,
filter: {
alive: true,
countryRegistration: "ES",
symbolType: "FundClass",
currency: ["EUR", "USD"],
investible: true,
},
});
</script>
Schema
{
"type": "object",
"properties": {
"query": {
"type": "string",
"maxLength": 127,
"description": "Text string to be searched. It can be the name or the ISIN of the funds. If empty, nothing is returned. 127 characters cannot be exceed."
},
"filter": {
"type": "object",
"description": "Filter the available universe.",
"additionalProperties": false,
"nullable": true,
"properties": {
"symbolType": {
"anyOf": [
{
"enum": [
"Bond",
"Bond Index",
"CurrencyPair",
"ETF Listing",
"Forward",
"FundClass",
"Future",
"Future Continuation",
"Interest Rate",
"Mandate",
"Stock",
"Stock Index",
"Swap"
]
},
{
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": {
"enum": [
"Bond",
"Bond Index",
"CurrencyPair",
"ETF Listing",
"Forward",
"FundClass",
"Future",
"Future Continuation",
"Interest Rate",
"Mandate",
"Stock",
"Stock Index",
"Swap"
]
}
}
]
},
"countryRegistration": {
"anyOf": [
{
"enum": [
"AF",
"AL",
"DZ",
"AD",
"AO",
"AG",
"AR",
"AM",
"AU",
"AT",
"AZ",
"BS",
"BH",
"BD",
"BB",
"BY",
"BE",
"BZ",
"BJ",
"BT",
"BO",
"BA",
"BW",
"BR",
"BN",
"BG",
"BF",
"MM",
"BI",
"CV",
"KH",
"CM",
"CA",
"CF",
"TD",
"CL",
"CN",
"CO",
"KM",
"CG",
"CR",
"CI",
"HR",
"CU",
"CY",
"CZ",
"CD",
"DK",
"DJ",
"DM",
"DO",
"TL",
"EC",
"EG",
"SV",
"GQ",
"ER",
"EE",
"ET",
"FJ",
"FI",
"FR",
"GA",
"GM",
"GE",
"DE",
"GH",
"GR",
"GD",
"GT",
"GN",
"GW",
"GY",
"HT",
"HN",
"HK",
"HU",
"IS",
"IN",
"ID",
"IR",
"IQ",
"IE",
"IL",
"IT",
"JM",
"JP",
"JO",
"KZ",
"KE",
"KI",
"KW",
"KG",
"LA",
"LV",
"LB",
"LS",
"LR",
"LY",
"LI",
"LT",
"LU",
"MG",
"MW",
"MY",
"MV",
"ML",
"MT",
"MH",
"MR",
"MU",
"MX",
"FM",
"MD",
"MC",
"MN",
"ME",
"MA",
"MZ",
"NA",
"NR",
"NP",
"NL",
"NZ",
"NI",
"NE",
"NG",
"KP",
"MK",
"NO",
"OM",
"PK",
"PW",
"PS",
"PA",
"PG",
"PY",
"PE",
"PH",
"PL",
"PT",
"PR",
"QA",
"RO",
"RU",
"RW",
"KN",
"LC",
"VC",
"WS",
"SM",
"ST",
"SA",
"SN",
"RS",
"SC",
"SL",
"SG",
"SK",
"SI",
"SB",
"SO",
"ZA",
"KR",
"SS",
"ES",
"LK",
"SD",
"SR",
"SZ",
"SE",
"CH",
"SY",
"TW",
"TJ",
"TZ",
"TH",
"TG",
"TO",
"TT",
"TN",
"TR",
"TM",
"TV",
"UG",
"UA",
"AE",
"GB",
"US",
"UY",
"UZ",
"VU",
"VE",
"VN",
"YE",
"ZM",
"ZW"
]
},
{
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": {
"enum": [
"AF",
"AL",
"DZ",
"AD",
"AO",
"AG",
"AR",
"AM",
"AU",
"AT",
"AZ",
"BS",
"BH",
"BD",
"BB",
"BY",
"BE",
"BZ",
"BJ",
"BT",
"BO",
"BA",
"BW",
"BR",
"BN",
"BG",
"BF",
"MM",
"BI",
"CV",
"KH",
"CM",
"CA",
"CF",
"TD",
"CL",
"CN",
"CO",
"KM",
"CG",
"CR",
"CI",
"HR",
"CU",
"CY",
"CZ",
"CD",
"DK",
"DJ",
"DM",
"DO",
"TL",
"EC",
"EG",
"SV",
"GQ",
"ER",
"EE",
"ET",
"FJ",
"FI",
"FR",
"GA",
"GM",
"GE",
"DE",
"GH",
"GR",
"GD",
"GT",
"GN",
"GW",
"GY",
"HT",
"HN",
"HK",
"HU",
"IS",
"IN",
"ID",
"IR",
"IQ",
"IE",
"IL",
"IT",
"JM",
"JP",
"JO",
"KZ",
"KE",
"KI",
"KW",
"KG",
"LA",
"LV",
"LB",
"LS",
"LR",
"LY",
"LI",
"LT",
"LU",
"MG",
"MW",
"MY",
"MV",
"ML",
"MT",
"MH",
"MR",
"MU",
"MX",
"FM",
"MD",
"MC",
"MN",
"ME",
"MA",
"MZ",
"NA",
"NR",
"NP",
"NL",
"NZ",
"NI",
"NE",
"NG",
"KP",
"MK",
"NO",
"OM",
"PK",
"PW",
"PS",
"PA",
"PG",
"PY",
"PE",
"PH",
"PL",
"PT",
"PR",
"QA",
"RO",
"RU",
"RW",
"KN",
"LC",
"VC",
"WS",
"SM",
"ST",
"SA",
"SN",
"RS",
"SC",
"SL",
"SG",
"SK",
"SI",
"SB",
"SO",
"ZA",
"KR",
"SS",
"ES",
"LK",
"SD",
"SR",
"SZ",
"SE",
"CH",
"SY",
"TW",
"TJ",
"TZ",
"TH",
"TG",
"TO",
"TT",
"TN",
"TR",
"TM",
"TV",
"UG",
"UA",
"AE",
"GB",
"US",
"UY",
"UZ",
"VU",
"VE",
"VN",
"YE",
"ZM",
"ZW"
]
}
}
]
},
"currency": {
"anyOf": [
{
"type": "string",
"minLength": 3,
"maxLength": 3
},
{
"type": "array",
"items": {
"type": "string",
"minLength": 3,
"maxLength": 3
},
"minItems": 1
}
]
},
"investible": {
"type": "boolean",
"default": false
},
"alive": {
"type": "boolean"
},
"paysDividends": {
"type": "boolean"
},
"regions": {
"anyOf": [
{
"enum": [
"Europe",
"North America",
"Asia Pacific",
"Emerging Markets",
"Global"
]
},
{
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": {
"enum": [
"Europe",
"North America",
"Asia Pacific",
"Emerging Markets",
"Global"
]
}
}
]
},
"riskFamilies": {
"anyOf": [
{
"enum": [
"Money Market",
"Fixed Income",
"Balanced",
"Equity",
"Commodities",
"Alternative",
"Forex"
]
},
{
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": {
"enum": [
"Money Market",
"Fixed Income",
"Balanced",
"Equity",
"Commodities",
"Alternative",
"Forex"
]
}
}
]
},
"sectors": {
"anyOf": [
{
"enum": [
"Energy",
"Materials",
"Industrials",
"Consumer Discretionary",
"Consumer Staples",
"Health Care",
"Financials",
"Information Technology",
"Communication Services",
"Utilities",
"Real Estate",
"No sector"
]
},
{
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": {
"enum": [
"Energy",
"Materials",
"Industrials",
"Consumer Discretionary",
"Consumer Staples",
"Health Care",
"Financials",
"Information Technology",
"Communication Services",
"Utilities",
"Real Estate",
"No sector"
]
}
}
]
}
}
},
"maxResults": {
"type": "number",
"description": "Maximum number of results to be displayed. The default value is 20 and cannot exceed 50.",
"default": 10,
"maximum": 50,
"minimum": 1
},
"isInputEnabled": {
"type": "boolean",
"description": "Display the input to search for.",
"default": false
}
},
"additionalProperties": true
}
Complete Schema
{}
Events
-
changed
Fired when the user clicks in a search result
Return
- {{isin: string, symbolType: string, name: string, currency: string}} result
CSS Variables
--padding-result: var(--space-2);
--color-hover-result: var(--color-background);
Locales
{
"placeholder": "Search fund...",
"warnings": {
"isinInaccesible": "The isin is not accesible",
"isinInvalid": "The isin is invalid",
"isinNotInDB": "The ISIN you have entered does not correspond to any funds that we have available in our offer. Please select another available."
}
}