{
  "openapi": "3.0.1",
  "info": {
    "title": "TickerLayer Market Data API",
    "description": "Live quotes, snapshots, OHLCV history, symbol catalogs, market hours, bond yields and stock fundamentals for stocks, forex, crypto, indices, ETFs and commodities. One API key, one schema, no scraping.",
    "version": "0.1",
    "x-build-id": "UmOyKDVt5GzfkeAM0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tickerlayer~tickerlayer-market-data/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tickerlayer-tickerlayer-market-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/tickerlayer~tickerlayer-market-data/runs": {
      "post": {
        "operationId": "runs-sync-tickerlayer-tickerlayer-market-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/tickerlayer~tickerlayer-market-data/run-sync": {
      "post": {
        "operationId": "run-sync-tickerlayer-tickerlayer-market-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",
        "properties": {
          "apiKey": {
            "title": "TickerLayer API key",
            "type": "string",
            "description": "Your TickerLayer API key (starts with px_). Create one for free at https://tickerlayer.com/dashboard. Stored encrypted and only sent to api.tickerlayer.com. With your own key nothing is charged through Apify. Leave empty to use the shared key and pay per row or request from your Apify balance (see the pricing table in the README)."
          },
          "operation": {
            "title": "Operation",
            "enum": [
              "snapshot",
              "quote",
              "last_trade",
              "previous_bar",
              "history",
              "symbols",
              "market_status",
              "market_sessions",
              "market_holidays",
              "bond_yield",
              "fundamentals"
            ],
            "type": "string",
            "description": "What to fetch. Snapshot is the best single call for \"how is X doing\": last trade, bid/ask, previous close and change.",
            "default": "snapshot"
          },
          "assetClass": {
            "title": "Asset class",
            "enum": [
              "crypto",
              "forex",
              "stocks",
              "indices",
              "etfs",
              "commodities"
            ],
            "type": "string",
            "description": "Asset class of the symbols. Ignored for bond_yield and fundamentals.",
            "default": "crypto"
          },
          "symbols": {
            "title": "Symbols",
            "uniqueItems": true,
            "type": "array",
            "description": "One symbol per line. Crypto and forex are concatenated pairs (BTCUSD, EURUSD). Commodities use reference codes (XAUUSD, WTIUSD). Indices use bare codes (US500, DE40, JP225). ETFs use their ticker (SPY, US500ETF). Stocks ALWAYS carry the ISO country prefix: US:KO, DE:BMW, GB:HSBA, SA:2222. Bonds use COUNTRY:TENOR (US:10Y, DE:2Y). Leave empty for symbols, market_* operations, or to page a whole fundamentals market.",
            "default": [
              "BTCUSD",
              "ETHUSD",
              "SOLUSD"
            ],
            "items": {
              "type": "string"
            }
          },
          "interval": {
            "title": "Bar interval",
            "enum": [
              "1m",
              "5m",
              "15m",
              "1h",
              "4h",
              "1d"
            ],
            "type": "string",
            "description": "Bar size for history and previous_bar. For previous_bar, 1d returns the previous daily bar and any other value returns the most recently settled intraday bar.",
            "default": "1d"
          },
          "from": {
            "title": "From date (UTC)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Start date for history, YYYY-MM-DD, inclusive. Defaults to 30 days before \"to\"."
          },
          "to": {
            "title": "To date (UTC)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "End date for history, YYYY-MM-DD, inclusive. Defaults to today (UTC)."
          },
          "maxBars": {
            "title": "Max bars per symbol",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap on bars returned per symbol for history. Larger ranges are paged automatically, 5,000 bars per request.",
            "default": 500
          },
          "sort": {
            "title": "Bar order",
            "enum": [
              "asc",
              "desc"
            ],
            "type": "string",
            "description": "Order of history bars by time.",
            "default": "asc"
          },
          "market": {
            "title": "Market code",
            "type": "string",
            "description": "Market for market_status, market_sessions, market_holidays and fundamentals paging. Stock markets are ISO country codes (US, DE, GB, JP, SA). Use CRYPTO, FOREX or COMMODITIES for those calendars. Leave empty on market_status for the global overview."
          },
          "date": {
            "title": "Date (UTC)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Day for market_sessions, YYYY-MM-DD. Defaults to today."
          },
          "year": {
            "title": "Year",
            "minimum": 2020,
            "maximum": 2100,
            "type": "integer",
            "description": "Calendar year for market_holidays. Defaults to the current year."
          },
          "maxConcurrency": {
            "title": "Max concurrent requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Parallel requests to the API. Free TickerLayer keys allow 10 requests per second, so 4 is a safe default. Runs on the shared key are capped at 4.",
            "default": 4
          },
          "continueOnError": {
            "title": "Continue on symbol errors",
            "type": "boolean",
            "description": "When on, a symbol that fails (unknown symbol, plan does not include it) is written to the dataset as an error row and the run continues. When off, the run fails on the first error.",
            "default": true
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}