magic loops
StockAPI
API Call 🚇
Trigger the loop when an API request with a JSON body containing a stock ticker is received
Loading...
API Response 🚇
Return the formatted JSON object with the stock price as the output of the loop
Description
Returns stock price via API
OpenAPI spec:
openapi: 3.0.0
info:
title: Stock Price API
version: 1.0.0
description: API for fetching stock prices based on ticker symbols.
servers:
- url: 'https://magicloops.dev/api/loop/run/a02c1ef5-9d51-4720-925d-09b8d159e00b'
description: Main API server for stock price retrieval
paths:
/:
post:
summary: Get stock price
description: Returns the price of the stock for the given ticker symbol.
operationId: getStockPrice
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
ticker:
type: string
example: 'TSLA'
example:
ticker: 'TSLA'
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
price:
type: number
format: double
example: 250.55
'400':
description: Invalid request
'404':
description: Ticker not found
'500':
description: Internal server error
components:
schemas:
StockRequest:
type: object
properties:
ticker:
type: string
StockPrice:
type: object
properties:
price:
type: number
format: double
5.0 (0 ratings)
38 runs