Corporate Supply Chain

FREEMIUM
By alphawave | Updated 5 giorni fa | Finance
Popularity

8 / 10

Latency

899ms

Service Level

58%

Health Check

N/A

Followers: 3
Resources:
Product Website
API Creator:
Rapid account: Alphawave
alphawave
alphawave
Log In to Rate API
Rating: 5 - Votes: 1

README

AlphaWave Data Corporate Supply Chain API

Jupyter Notebook Example
Github Example
Medium
First, we import the necessary Python libraries.

import json
import requests
import pandas as pd

Since our goal is to build a pairs trading algorithm, one potential source of cointegrated stocks is the corporate supply chain. Using the AlphaWave Data Corporate Supply Chain API, we can get a list of suppliers and customers for a given stock symbol. To call this API with Python, you can choose one of the supported Python code snippets provided in the API console. Here is an example of how to invoke the API with Python Requests.

url = "https://corporate-supply-chain.p.rapidapi.com/api/v1/resources/supplychain"

querystring = {"ticker":"IBM"}

headers = {
    'x-rapidapi-host': "YOUR_X-RAPIDAPI-HOST_WILL_COPY_DIRECTLY_FROM_RAPIDAPI_PYTHON_CODE_SNIPPETS",
    'x-rapidapi-key': "YOUR_X-RAPIDAPI-KEY_WILL_COPY_DIRECTLY_FROM_RAPIDAPI_PYTHON_CODE_SNIPPETS"
    }

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)

# Create DataFrame.  
df = pd.DataFrame.from_dict(response.json())
df

Thatโ€™s it!

Now you have a list of suppliers and customers in a pandas DataFrame for a given stock symbol (IBM in this example). If you wish, you can further filter the list of suppliers and customers using fundamental data, technical indicators, or other sources of alternative data to get a list of good pairs trading candidates.