{
  "service": "marketstack",
  "displayName": "Marketstack",
  "categories": [
    "Finance",
    "Data"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "API Key",
      "placeholder": "marketstack_api_key",
      "description": "Marketstack V2 API key sent with the access_key query parameter. Find or reset it in https://marketstack.com/dashboard."
    }
  ],
  "homepageUrl": "https://marketstack.com",
  "actions": [
    {
      "id": "marketstack.get_historical_eod",
      "service": "marketstack",
      "name": "get_historical_eod",
      "description": "Get historical end-of-day data from Marketstack for one or more comma-separated symbols.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "symbols": {
            "type": "string",
            "minLength": 1,
            "description": "One or more comma-separated ticker symbols."
          },
          "exchange": {
            "type": "string",
            "minLength": 1,
            "description": "Exchange MIC used to filter the returned rows."
          },
          "dateFrom": {
            "type": "string",
            "description": "Start date in YYYY-MM-DD format.",
            "format": "date"
          },
          "dateTo": {
            "type": "string",
            "description": "End date in YYYY-MM-DD format.",
            "format": "date"
          },
          "sort": {
            "type": "string",
            "enum": [
              "ASC",
              "DESC"
            ],
            "description": "Sort order for EOD results."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000,
            "description": "Maximum number of EOD rows to return."
          },
          "offset": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of leading EOD rows to skip."
          }
        },
        "additionalProperties": false,
        "required": [
          "symbols"
        ],
        "description": "Input parameters for retrieving historical Marketstack EOD rows."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "eod": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "open": {
                  "anyOf": [
                    {
                      "type": "number",
                      "description": "Opening price for the trading session."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "high": {
                  "anyOf": [
                    {
                      "type": "number",
                      "description": "Highest price for the trading session."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "low": {
                  "anyOf": [
                    {
                      "type": "number",
                      "description": "Lowest price for the trading session."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "close": {
                  "anyOf": [
                    {
                      "type": "number",
                      "description": "Closing price for the trading session."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "volume": {
                  "anyOf": [
                    {
                      "type": "number",
                      "description": "Traded volume for the trading session."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "date": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Timestamp returned by Marketstack for the data point."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "symbol": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Ticker symbol."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "exchange": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Exchange name or code returned by Marketstack."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "exchangeCode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Exchange MIC or exchange code returned by Marketstack."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "name": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Company or instrument name."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "adjOpen": {
                  "anyOf": [
                    {
                      "type": "number",
                      "description": "Adjusted opening price."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "adjHigh": {
                  "anyOf": [
                    {
                      "type": "number",
                      "description": "Adjusted high price."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "adjLow": {
                  "anyOf": [
                    {
                      "type": "number",
                      "description": "Adjusted low price."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "adjClose": {
                  "anyOf": [
                    {
                      "type": "number",
                      "description": "Adjusted closing price."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "adjVolume": {
                  "anyOf": [
                    {
                      "type": "number",
                      "description": "Adjusted traded volume."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "dividend": {
                  "anyOf": [
                    {
                      "type": "number",
                      "description": "Dividend amount included in the EOD payload."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "splitFactor": {
                  "anyOf": [
                    {
                      "type": "number",
                      "description": "Split factor included in the EOD payload."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "assetType": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Asset type returned by Marketstack."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "priceCurrency": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Price currency returned by Marketstack."
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "additionalProperties": false,
              "description": "Normalized Marketstack end-of-day price row."
            },
            "description": "Historical end-of-day rows returned by Marketstack."
          },
          "pagination": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "description": "Number of results returned on the current page."
              },
              "limit": {
                "type": "integer",
                "description": "Requested page size."
              },
              "total": {
                "type": "integer",
                "description": "Total number of results available."
              },
              "offset": {
                "type": "integer",
                "description": "Number of leading results skipped before this page."
              }
            },
            "additionalProperties": false,
            "description": "Pagination information returned by Marketstack."
          }
        },
        "additionalProperties": false,
        "description": "Historical end-of-day response returned by Marketstack."
      }
    },
    {
      "id": "marketstack.get_latest_eod",
      "service": "marketstack",
      "name": "get_latest_eod",
      "description": "Get the latest available end-of-day data for a single Marketstack symbol.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string",
            "minLength": 1,
            "description": "Ticker symbol used to retrieve the latest end-of-day row."
          },
          "exchange": {
            "type": "string",
            "minLength": 1,
            "description": "Exchange MIC used to narrow the symbol lookup."
          }
        },
        "additionalProperties": false,
        "required": [
          "symbol"
        ],
        "description": "Input parameters for retrieving the latest Marketstack EOD row."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "eod": {
            "type": "object",
            "properties": {
              "open": {
                "anyOf": [
                  {
                    "type": "number",
                    "description": "Opening price for the trading session."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "high": {
                "anyOf": [
                  {
                    "type": "number",
                    "description": "Highest price for the trading session."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "low": {
                "anyOf": [
                  {
                    "type": "number",
                    "description": "Lowest price for the trading session."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "close": {
                "anyOf": [
                  {
                    "type": "number",
                    "description": "Closing price for the trading session."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "volume": {
                "anyOf": [
                  {
                    "type": "number",
                    "description": "Traded volume for the trading session."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "date": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Timestamp returned by Marketstack for the data point."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "symbol": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Ticker symbol."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "exchange": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Exchange name or code returned by Marketstack."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "exchangeCode": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Exchange MIC or exchange code returned by Marketstack."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "name": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Company or instrument name."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "adjOpen": {
                "anyOf": [
                  {
                    "type": "number",
                    "description": "Adjusted opening price."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "adjHigh": {
                "anyOf": [
                  {
                    "type": "number",
                    "description": "Adjusted high price."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "adjLow": {
                "anyOf": [
                  {
                    "type": "number",
                    "description": "Adjusted low price."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "adjClose": {
                "anyOf": [
                  {
                    "type": "number",
                    "description": "Adjusted closing price."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "adjVolume": {
                "anyOf": [
                  {
                    "type": "number",
                    "description": "Adjusted traded volume."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "dividend": {
                "anyOf": [
                  {
                    "type": "number",
                    "description": "Dividend amount included in the EOD payload."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "splitFactor": {
                "anyOf": [
                  {
                    "type": "number",
                    "description": "Split factor included in the EOD payload."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "assetType": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Asset type returned by Marketstack."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "priceCurrency": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Price currency returned by Marketstack."
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false,
            "description": "Normalized Marketstack end-of-day price row."
          }
        },
        "additionalProperties": false,
        "description": "Latest end-of-day response returned by Marketstack."
      }
    },
    {
      "id": "marketstack.get_ticker_info",
      "service": "marketstack",
      "name": "get_ticker_info",
      "description": "Get profile information for a single Marketstack ticker.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "ticker": {
            "type": "string",
            "minLength": 1,
            "description": "Ticker symbol used to retrieve company information."
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for retrieving Marketstack ticker information."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "ticker": {
            "type": "object",
            "properties": {
              "name": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Company or instrument name."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "ticker": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Ticker symbol."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "exchangeCode": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Exchange code returned by Marketstack."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "website": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Company website URL."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "sector": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Sector returned by Marketstack."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "industry": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Industry returned by Marketstack."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "address": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "city": {
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "City name."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "street1": {
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "Primary street address line."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "street2": {
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "Secondary street address line."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "postalCode": {
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "Postal code."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "stateOrCountry": {
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "State or country code."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "stateOrCountryDescription": {
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "Full state or country name."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "additionalProperties": false,
                    "description": "Normalized postal address returned by Marketstack."
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false,
            "description": "Normalized Marketstack ticker information."
          }
        },
        "additionalProperties": false,
        "description": "Ticker information response returned by Marketstack."
      }
    },
    {
      "id": "marketstack.list_currencies",
      "service": "marketstack",
      "name": "list_currencies",
      "description": "List currencies available through Marketstack.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000,
            "description": "Maximum number of currencies to return."
          },
          "offset": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of leading currency results to skip."
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for listing Marketstack currencies."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "currencies": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Currency code."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "name": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Currency display name."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "symbol": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Currency symbol."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "symbolNative": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Native currency symbol."
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "additionalProperties": false,
              "description": "Normalized currency returned by Marketstack."
            },
            "description": "Currencies returned by Marketstack."
          },
          "pagination": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "description": "Number of results returned on the current page."
              },
              "limit": {
                "type": "integer",
                "description": "Requested page size."
              },
              "total": {
                "type": "integer",
                "description": "Total number of results available."
              },
              "offset": {
                "type": "integer",
                "description": "Number of leading results skipped before this page."
              }
            },
            "additionalProperties": false,
            "description": "Pagination information returned by Marketstack."
          }
        },
        "additionalProperties": false,
        "description": "Currency list response returned by Marketstack."
      }
    },
    {
      "id": "marketstack.list_exchanges",
      "service": "marketstack",
      "name": "list_exchanges",
      "description": "List stock exchanges available through Marketstack.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "search": {
            "type": "string",
            "minLength": 1,
            "description": "Search term used to filter exchanges by name or acronym."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000,
            "description": "Maximum number of exchanges to return."
          },
          "offset": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of leading exchange results to skip."
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for listing Marketstack exchanges."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "exchanges": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "mic": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Market identifier code of the exchange."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "acronym": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Exchange acronym."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "name": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Exchange display name."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "city": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "City where the exchange is located."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "country": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Country where the exchange is located."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "countryCode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "ISO country code of the exchange."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "currency": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Settlement currency of the exchange."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "website": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Exchange website URL."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "exchangeStatus": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Current exchange status."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "operatingMic": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Operating market identifier code."
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "additionalProperties": false,
              "description": "Normalized stock exchange returned by Marketstack."
            },
            "description": "Stock exchanges returned by Marketstack."
          },
          "pagination": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "description": "Number of results returned on the current page."
              },
              "limit": {
                "type": "integer",
                "description": "Requested page size."
              },
              "total": {
                "type": "integer",
                "description": "Total number of results available."
              },
              "offset": {
                "type": "integer",
                "description": "Number of leading results skipped before this page."
              }
            },
            "additionalProperties": false,
            "description": "Pagination information returned by Marketstack."
          }
        },
        "additionalProperties": false,
        "description": "Exchange list response returned by Marketstack."
      }
    },
    {
      "id": "marketstack.list_tickers",
      "service": "marketstack",
      "name": "list_tickers",
      "description": "List Marketstack tickers with optional search, exchange, and pagination filters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000,
            "description": "Maximum number of tickers to return."
          },
          "offset": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of leading ticker results to skip."
          },
          "search": {
            "type": "string",
            "minLength": 1,
            "description": "Search term used to filter tickers by name or symbol."
          },
          "exchange": {
            "type": "string",
            "minLength": 1,
            "description": "Exchange MIC used to filter the returned tickers."
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for listing Marketstack tickers."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "tickers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Company or instrument name."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "ticker": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Ticker symbol."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "hasEod": {
                  "anyOf": [
                    {
                      "type": "boolean",
                      "description": "Whether end-of-day data is available for the ticker."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "hasIntraday": {
                  "anyOf": [
                    {
                      "type": "boolean",
                      "description": "Whether intraday data is available for the ticker."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "stockExchange": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "mic": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "Market identifier code of the exchange."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "name": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "Display name of the exchange."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "acronym": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "Exchange acronym."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "additionalProperties": false,
                      "description": "Normalized stock exchange summary."
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "additionalProperties": false,
              "description": "Normalized Marketstack ticker summary."
            },
            "description": "Ticker results returned by Marketstack."
          },
          "pagination": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "description": "Number of results returned on the current page."
              },
              "limit": {
                "type": "integer",
                "description": "Requested page size."
              },
              "total": {
                "type": "integer",
                "description": "Total number of results available."
              },
              "offset": {
                "type": "integer",
                "description": "Number of leading results skipped before this page."
              }
            },
            "additionalProperties": false,
            "description": "Pagination information returned by Marketstack."
          }
        },
        "additionalProperties": false,
        "description": "Ticker list response returned by Marketstack."
      }
    }
  ]
}
