- Action ID
actions.intent.GET_STOCK_QUOTE
- Description
- Search for a stock quote in an app. Determine the ticker symbol of the stock using the
tickerSymbol
intent parameter.
Locale support
Functionality | Locales |
---|---|
Preview creation using App Actions test tool | en-US, en-GB, en-CA, en-IN, en-BE, en-SG, en-AU |
User invocation from Google Assistant | en-US, en-GB, en-CA, en-IN, en-BE, en-SG, en-AU |
Example queries
Recommended fields
The following fields represent essential information that users often provide in queries that trigger this built-in intent:
tickerSymbol
Sample XML files
For information about the shortcuts.xml
schema, see Create shortcuts.xml.
Handle BII parameters
shortcuts.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- This is a sample shortcuts.xml -->
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
<capability android:name="actions.intent.GET_STOCK_QUOTE">
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="YOUR_UNIQUE_APPLICATION_ID"
android:targetClass="YOUR_TARGET_CLASS">
<!-- Eg. tickerSymbolParam = "GOOGL" -->
<parameter
android:name="tickerSymbol"
android:key="tickerSymbolParam"/>
</intent>
</capability>
</shortcuts>
actions.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- This is a sample actions.xml -->
<actions>
<action intentName="actions.intent.GET_STOCK_QUOTE">
<fulfillment urlTemplate="myapp://custom-deeplink{?tickerSymbolParam}">
<!-- e.g. tickerSymbolParam = "GOOGL" -->
<!-- (Optional) Require a field eg.tickerSymbolParam for fulfillment with required="true" -->
<parameter-mapping urlParameter="tickerSymbolParam" intentParameter="tickerSymbol" required="true" />
</fulfillment>
<!-- Provide a fallback fulfillment with no required parameters. For example, to your app search or router deeplink -->
<fulfillment urlTemplate="myapp://deeplink" />
</action>
</actions>
JSON-LD sample
The following JSON-LD sample provides some example values that you can use in the App Actions test tool:
"GOOGL"