import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
stock_news_api: {
type: "app",
app: "stock_news_api",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://stocknewsapi.com/api/v1`,
params: {
"tickers-only": `TSLA`,
items: `3`,
page: `1`,
token: `${this.stock_news_api.$auth.api_key}`,
},
})
},
})
Stock News API uses API keys for authentication. When you connect your Stock News API account, Pipedream securely stores the keys so you can easily authenticate to Stock News API APIs in both code and no-code steps.