Below is a guide to assist with setting up API Data Sources and calling them from the Data rule.

<aside> đź’ˇ In this example, I will use the free AlphaVantage stock data API. In practice, you will likely be using your own APIs or third-party data providers relevant to your business.

</aside>

Set Up A Data Source

Screen Shot 2022-09-04 at 2.26.25 PM.png

Select Your Data Source

Now we will build a simple Ruleset that uses this new Data Source.

Screen Shot 2022-09-04 at 2.28.29 PM.png

When creating the Ruleset and dragging the Blue “Data” rule into your Ruleset, you will then be asked to pick your Data Source. “AlphaVantage Test” should show up in your dropdown list.

Defining Your Data Call Output

To complete the Data rule using an API, you will need a sample of the expected values (JSON response) you would get from the API.

In this example, this can be obtained here: https://www.alphavantage.co/query?function=OVERVIEW&symbol=IBM&apikey=demo

For other third-party APIs, your data vendor should be able to provide a sample. For your own internal API, your engineering team should be able to provide a sample.

example of a filled up Data Call rule.

example of a filled up Data Call rule.

Click JSON Schema Link

After clicking the “JSON Schema (click here)” link, you’ll be taken to an external site.

In the left side, paste your API data sample (for this example, the content from the link https://www.alphavantage.co/query?function=OVERVIEW&symbol=IBM&apikey=demo).