Fibonaccio Straccio

Fibonaccio Straccio · GPT 작업

Get Stock Chart Data

Retrieves chart data for a given stock ticker over different time intervals and generates charts, including RSI.

  • GET /get_chartGet Stock Chart

    Get chart data for a specific stock ticker over various intervals.

  • GET /draw_chartDraw Stock Chart

    Generates and returns a chart image for the specified stock ticker and interval.

  • GET /draw_rsi_macd_chartDraw RSI and MACD Chart

    Generates and returns a combined RSI and MACD chart image for the specified stock ticker and interval. It includes the latest RSI, MACD, and Signal line values.

원본 API 스키마
{
  "openapi": "3.1.0",
  "info": {
    "title": "Get Stock Chart Data",
    "description": "Retrieves chart data for a given stock ticker over different time intervals and generates charts, including RSI.",
    "version": "v1.0.0"
  },
  "servers": [
    {
      "url": "https://fibonaccio.dav77h.com/api"
    }
  ],
  "paths": {
    "/get_chart": {
      "get": {
        "summary": "Get Stock Chart",
        "description": "Get chart data for a specific stock ticker over various intervals.",
        "operationId": "getStockChart",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "description": "The stock ticker to retrieve the chart for",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "interval",
            "in": "query",
            "description": "The interval for the chart data (e.g., 1mo, 1wk, 1d, 1h)",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1mo",
                "1wk",
                "1d",
                "1h"
              ],
              "default": "1d"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of stock data points over the specified interval",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "date": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "close": {
                        "type": "number"
                      },
                      "volume": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (e.g., missing ticker parameter or unsupported interval)"
          }
        }
      }
    },
    "/draw_chart": {
      "get": {
        "summary": "Draw Stock Chart",
        "description": "Generates and returns a chart image for the specified stock ticker and interval.",
        "operationId": "drawStockChart",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "description": "The stock ticker to retrieve the chart for",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "interval",
            "in": "query",
            "description": "The interval for the chart data",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1mo",
                "1wk",
                "1d",
                "1h"
              ],
              "default": "1d"
            }
          },
          {
            "name": "support",
            "in": "query",
            "description": "Optional lower key level to watch",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "resistance",
            "in": "query",
            "description": "Optional higher key level to watch",
            "required": false,
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the generated stock chart image",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (e.g., missing ticker parameter or unsupported interval)"
          }
        }
      }
    },
    "/draw_rsi_macd_chart": {
      "get": {
        "summary": "Draw RSI and MACD Chart",
        "description": "Generates and returns a combined RSI and MACD chart image for the specified stock ticker and interval. It includes the latest RSI, MACD, and Signal line values.",
        "operationId": "drawRSIMACDChart",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "required": true,
            "description": "The stock ticker to retrieve the combined RSI and MACD chart for",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "interval",
            "in": "query",
            "description": "The interval for the RSI and MACD chart data",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1mo",
                "1wk",
                "1d",
                "1h"
              ],
              "default": "1d"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with the generated RSI and MACD chart image and the latest RSI, MACD, and Signal data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "image_url": {
                      "type": "string",
                      "description": "URL to the generated RSI and MACD chart image"
                    },
                    "latest_14_rsi": {
                      "type": "array",
                      "description": "The last 14 RSI values",
                      "items": {
                        "type": "number"
                      }
                    },
                    "latest_14_macd": {
                      "type": "array",
                      "description": "The last 14 MACD values",
                      "items": {
                        "type": "number"
                      }
                    },
                    "latest_14_signal": {
                      "type": "array",
                      "description": "The last 14 Signal line values, which is a moving average of the MACD values. Crosses between the MACD and Signal lines can signal buy or sell opportunities.",
                      "items": {
                        "type": "number"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (e.g., missing ticker parameter, unsupported interval, or not enough data to generate the chart)"
          }
        }
      }
    }
  }
}