{
  "openapi": "3.0.1",
  "info": {
    "title": "Indian Algo Trading Data",
    "description": "Collect real-time and historical Indian market data from 11 sources and generate trading signals using 8 advanced models. Includes indices, OI, FII/DII, sentiment, news, and global data. Perfect for algo trading, strategy building, and automated market analysis",
    "version": "0.0",
    "x-build-id": "5eQIbcjgSxY20LGZT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cspnair~Indian-algo-trading-data/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cspnair-Indian-algo-trading-data",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/cspnair~Indian-algo-trading-data/runs": {
      "post": {
        "operationId": "runs-sync-cspnair-Indian-algo-trading-data",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/cspnair~Indian-algo-trading-data/run-sync": {
      "post": {
        "operationId": "run-sync-cspnair-Indian-algo-trading-data",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "dataMode",
          "dataTypes",
          "indices"
        ],
        "properties": {
          "dataMode": {
            "title": "Data Collection Mode",
            "enum": [
              "realtime",
              "historical",
              "specificDate"
            ],
            "type": "string",
            "description": "Choose between real-time or historical data collection",
            "default": "realtime"
          },
          "dataTypes": {
            "title": "Data Types to Collect",
            "enum": [
              "indices",
              "oiData",
              "fiiDii",
              "sentiment",
              "sentimentIndices",
              "earnings",
              "economicEvents",
              "corporateActions",
              "international",
              "news",
              "internationalSentiment",
              "supportResistance"
            ],
            "type": "string",
            "description": "Select which types of market data to collect",
            "default": "indices"
          },
          "indices": {
            "title": "Indices to Track",
            "enum": [
              "NIFTY",
              "BANKNIFTY",
              "FINNIFTY",
              "SENSEX"
            ],
            "type": "string",
            "description": "Select which indices to collect data for",
            "default": "NIFTY"
          },
          "startDate": {
            "title": "Start Date",
            "type": "string",
            "description": "Start date for historical data (YYYY-MM-DD format). Required for historical mode.",
            "default": ""
          },
          "endDate": {
            "title": "End Date",
            "type": "string",
            "description": "End date for historical data (YYYY-MM-DD format). Required for historical mode. Defaults to today if not specified.",
            "default": ""
          },
          "specificDate": {
            "title": "Specific Date",
            "type": "string",
            "description": "Specific date to fetch data for (YYYY-MM-DD format). Required for specific date mode.",
            "default": ""
          },
          "includeHistorical": {
            "title": "Include Historical Data",
            "type": "boolean",
            "description": "Fetch historical data along with current data (legacy option)",
            "default": false
          },
          "historicalDays": {
            "title": "Historical Days",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Number of days of historical data to fetch (legacy option)",
            "default": 7
          },
          "outputFormat": {
            "title": "Output Format",
            "enum": [
              "json",
              "csv"
            ],
            "type": "string",
            "description": "Format for the output data",
            "default": "json"
          },
          "includeRawData": {
            "title": "Include Raw API Data",
            "type": "boolean",
            "description": "Include raw API responses in the output",
            "default": false
          },
          "enableModels": {
            "title": "Enable Trading Models",
            "type": "boolean",
            "description": "Process collected data through trading models to generate signals",
            "default": true
          },
          "selectedModels": {
            "title": "Trading Models to Run",
            "type": "string",
            "description": "Select which trading models to process data through (comma-separated for multiple: momentum,meanReversion,supportResistance,consensus)",
            "default": "momentum,meanReversion,supportResistance,consensus"
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}