{
  "openapi": "3.0.1",
  "info": {
    "title": "Currency Strength Monitor: Which Currencies Are Moving",
    "description": "Which currencies are actually strengthening, measured against the whole basket rather than one pair. Strength ranking, change over several periods, annualised volatility and a correlation matrix, from official ECB reference rates. No API key.",
    "version": "0.1",
    "x-build-id": "TGt3MlnVcAcHti75i"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/precious_bathmat~currency-strength-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-precious_bathmat-currency-strength-monitor",
        "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/precious_bathmat~currency-strength-monitor/runs": {
      "post": {
        "operationId": "runs-sync-precious_bathmat-currency-strength-monitor",
        "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/precious_bathmat~currency-strength-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-precious_bathmat-currency-strength-monitor",
        "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": {
          "currencies": {
            "title": "Currencies",
            "type": "array",
            "description": "The basket to compare. Strength is measured against these currencies and nothing else, so changing the basket changes every score. At least two are needed.",
            "items": {
              "type": "string",
              "enum": [
                "EUR",
                "USD",
                "JPY",
                "GBP",
                "CHF",
                "AUD",
                "CAD",
                "NZD",
                "SEK",
                "NOK",
                "DKK",
                "CNY",
                "HKD",
                "SGD",
                "KRW",
                "INR",
                "BRL",
                "MXN",
                "ZAR",
                "TRY",
                "PLN",
                "CZK",
                "HUF",
                "RON",
                "ILS",
                "IDR",
                "MYR",
                "PHP",
                "THB",
                "ISK"
              ],
              "enumTitles": [
                "Euro",
                "US dollar",
                "Japanese yen",
                "British pound",
                "Swiss franc",
                "Australian dollar",
                "Canadian dollar",
                "New Zealand dollar",
                "Swedish krona",
                "Norwegian krone",
                "Danish krone",
                "Chinese yuan",
                "Hong Kong dollar",
                "Singapore dollar",
                "South Korean won",
                "Indian rupee",
                "Brazilian real",
                "Mexican peso",
                "South African rand",
                "Turkish lira",
                "Polish zloty",
                "Czech koruna",
                "Hungarian forint",
                "Romanian leu",
                "Israeli shekel",
                "Indonesian rupiah",
                "Malaysian ringgit",
                "Philippine peso",
                "Thai baht",
                "Icelandic krona"
              ]
            },
            "default": [
              "EUR",
              "USD",
              "GBP",
              "JPY",
              "CHF",
              "AUD",
              "CAD",
              "NZD"
            ]
          },
          "periods": {
            "title": "Periods to measure",
            "type": "array",
            "description": "Each one adds a change column. Measured in trading days, because the ECB publishes on business days only: a month is 22 observations, not 30 calendar days.",
            "items": {
              "type": "string",
              "enum": [
                "1d",
                "1w",
                "1m",
                "3m",
                "6m",
                "1y"
              ],
              "enumTitles": [
                "1 day",
                "1 week",
                "1 month",
                "3 months",
                "6 months",
                "1 year"
              ]
            },
            "default": [
              "1d",
              "1w",
              "1m",
              "3m"
            ]
          },
          "primaryPeriod": {
            "title": "Rank strength over",
            "enum": [
              "1d",
              "1w",
              "1m",
              "3m",
              "6m",
              "1y"
            ],
            "type": "string",
            "description": "Which period the strength score and the ranking use. Must be one of the periods above. Defaults to the shortest one selected.",
            "default": "1w"
          },
          "volatilityWindowDays": {
            "title": "Volatility window (trading days)",
            "minimum": 5,
            "maximum": 260,
            "type": "integer",
            "description": "How many business days of returns to use for annualised volatility and for the correlation matrix. 30 is about six calendar weeks.",
            "default": 30
          },
          "includeCorrelations": {
            "title": "Include the correlation matrix",
            "type": "boolean",
            "description": "Adds a full correlation matrix to the run summary, and each currency's most and least correlated partner to its row. Useful for spotting when two positions are really one bet.",
            "default": true
          },
          "includeCrossRates": {
            "title": "Also output every cross rate",
            "type": "boolean",
            "description": "Writes every pair in the basket to a second dataset with its rate and change. Each pair costs $0.0005.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}