Investment Co-Pilot
Investment Co-Pilot · GPT アクション
Quotient's comprehensive capabilities' API
API for retrieving comprehensive financial data and portfolio backtesting
GET /testTest endpointGET /fundamentalsGet Company Fundamental DataGET /backtestBack test a theoretical portfolio by providing company tickers and allocation sizesGET /priceGet Stock DataGET /analyzeDataApply statistical measuresGET /feedbackSend feed back to GPT creatorGET /metricsCalculate Financial Metrics
元の API スキーマ
{
"openapi": "3.1.0",
"info": {
"title": "Quotient's comprehensive capabilities' API",
"version": "1.0.0",
"description": "API for retrieving comprehensive financial data and portfolio backtesting"
},
"servers": [
{
"url": "https://quotient-api.com"
}
],
"paths": {
"/test": {
"get": {
"summary": "Test endpoint",
"operationId": "testEndpoint",
"responses": {
"200": {
"description": "A simple string",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}
}
},
"security": [
{
"ApiKeyAuth": []
}
]
}
},
"/fundamentals": {
"get": {
"summary": "Get Company Fundamental Data",
"operationId": "getFundamentals",
"parameters": [
{
"name": "query",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "ticker of company"
},
{
"name": "type",
"in": "query",
"required": true,
"schema": {
"type": "string",
"enum": [
"income",
"balance",
"cashflow"
]
},
"description": "Income Statement, Balance Sheet, or Cashflow Statement"
},
{
"name": "year",
"in": "query",
"required": true,
"schema": {
"type": "string",
"enum": [
"2023",
"2022",
"2021",
"2020",
"2019",
"2018",
"2017",
"2016",
"2015",
"2014",
"2013",
"2012",
"2011",
"2010",
"2009"
]
},
"description": "Year of financial data to pull"
},
{
"name": "frequency",
"in": "query",
"required": true,
"schema": {
"type": "string",
"enum": [
"quarterly",
"annual"
]
},
"description": "Frequency of financial data to pull"
}
],
"responses": {
"200": {
"description": "Returns a company's financial statements and its KPIs",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}
}
},
"security": [
{
"ApiKeyAuth": []
}
]
}
},
"/backtest": {
"get": {
"summary": "Back test a theoretical portfolio by providing company tickers and allocation sizes",
"operationId": "backtestPortfolio",
"parameters": [
{
"name": "asset_allocation",
"in": "query",
"required": true,
"schema": {
"type": "string",
"example": "{'QQQ': 0.30, 'SPY': 0.50}"
},
"description": "Asset allocation as a string representing a dictionary with asset symbols as keys and their allocation percentages as values"
},
{
"name": "start_date",
"in": "query",
"required": true,
"schema": {
"type": "string",
"format": "str",
"example": "2020-1-1",
"default": "2021-1-1"
},
"description": "The start date for the portfolio backtest"
},
{
"name": "end_date",
"in": "query",
"required": true,
"schema": {
"type": "string",
"format": "str",
"example": "2020-1-1",
"default": "2021-12-31"
},
"description": "The end date for the portfolio backtest"
},
{
"name": "benchmark",
"in": "query",
"required": false,
"schema": {
"type": "string",
"format": "str",
"default": "{'SPY': 1.00}",
"example": "{'SPY': 0.60, 'BND': 0.40}"
},
"description": "The benchmark asset/s for the portfolio backtest, default is {'SPY': 1.00}. User can construct an entire portfolio as a benchmark."
}
],
"responses": {
"200": {
"description": "backtest results",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}
}
},
"security": [
{
"ApiKeyAuth": []
}
]
}
},
"/price": {
"get": {
"summary": "Get Stock Data",
"operationId": "getPriceData",
"parameters": [
{
"name": "ticker",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "Stock symbol for the company"
},
{
"name": "start_date",
"in": "query",
"required": true,
"schema": {
"type": "string",
"default": "2020-1-1"
},
"description": "start date for the stock data"
},
{
"name": "end_date",
"in": "query",
"required": true,
"schema": {
"type": "string",
"default": "2021-12-31"
},
"description": "end date for the stock data"
},
{
"name": "interval",
"in": "query",
"required": true,
"schema": {
"type": "string",
"enum": [
"1m",
"2m",
"5m",
"15m",
"30m",
"60m",
"90m",
"1h",
"1d",
"5d",
"1wk",
"1mo",
"3mo"
],
"default": "1d"
},
"description": "Data granularity"
}
],
"responses": {
"200": {
"description": "Stock data response",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}
}
},
"security": [
{
"ApiKeyAuth": []
}
]
}
},
"/analyzeData": {
"get": {
"summary": "Apply statistical measures",
"operationId": "getStats",
"parameters": [
{
"name": "dataset",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "dataset to apply statistical measurement on"
}
],
"responses": {
"200": {
"description": "comprehensive statistical measurement",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}
}
},
"security": [
{
"ApiKeyAuth": []
}
]
}
},
"/feedback": {
"get": {
"summary": "Send feed back to GPT creator",
"operationId": "sendFeedback",
"parameters": [
{
"name": "feedback",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "feedback/message to send to creator"
},
{
"name": "category",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "category of feedback"
}
],
"responses": {
"200": {
"description": "confirmation of feedback sent",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}
}
},
"security": [
{
"ApiKeyAuth": []
}
]
}
},
"/metrics": {
"get": {
"summary": "Calculate Financial Metrics",
"operationId": "getMetrics",
"parameters": [
{
"name": "ticker",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "Stock symbol for the company"
},
{
"name": "period",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"1d",
"5d",
"1mo",
"3mo",
"6mo",
"1y",
"2y",
"5y",
"10y",
"ytd",
"max"
],
"default": "1mo"
},
"description": "Time frame for the stock data"
},
{
"name": "interval",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"1m",
"2m",
"5m",
"15m",
"30m",
"60m",
"90m",
"1h",
"1d",
"5d",
"1wk",
"1mo",
"3mo"
],
"default": "1d"
},
"description": "Data granularity"
}
],
"responses": {
"200": {
"description": "Financial metrics calculation response",
"content": {
"text/plain": {
"schema": {
"type": "number"
}
}
}
}
},
"security": [
{
"ApiKeyAuth": []
}
]
}
}
},
"components": {
"securitySchemes": {
"ApiKeyAuth": {
"type": "apiKey",
"in": "header",
"name": "X-API-KEY"
}
},
"schemas": {}
}
}