Bitcoin
Bitcoin · GPT-Aktionen
Bitcoin API
API for querying Bitcoin price data
GET /historical-data/{symbol}Fetch historical data for a specific cryptocurrencyRetrieves historical price data of a specified cryptocurrency.
GET /intraday-chart/{symbol}Get URL for intraday chart of a specific cryptocurrencyProvides a URL to an image chart showing intraday price data of a specified cryptocurrency for the last day.
GET /historical-chart/{symbol}Get URL for historical chart of a specific cryptocurrencyProvides a URL to an image chart showing historical price data of a specified cryptocurrency.
GET /intraday-data/{symbol}Fetch compact intraday data for a specific cryptocurrencyRetrieves intraday price data of a specified cryptocurrency for the last day, focusing on the close prices with a single time reference at the beginning. The interval is 5 minutes.
Ursprüngliches API-Schema
{
"openapi": "3.0.0",
"info": {
"title": "Bitcoin API",
"version": "1.0.0",
"description": "API for querying Bitcoin price data"
},
"servers": [
{
"url": "https://us-central1-bitcoin-gpt.cloudfunctions.net/api"
}
],
"paths": {
"/historical-data/{symbol}": {
"get": {
"summary": "Fetch historical data for a specific cryptocurrency",
"operationId": "getHistoricalCryptoData",
"description": "Retrieves historical price data of a specified cryptocurrency.",
"parameters": [
{
"in": "path",
"name": "symbol",
"required": true,
"description": "The symbol of the cryptocurrency (e.g., BTC, ETH).",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "startDate",
"required": false,
"description": "Start date for historical data (YYYY-MM-DD format). Defaults to one year ago if not provided.",
"schema": {
"type": "string",
"format": "date"
}
},
{
"in": "query",
"name": "endDate",
"required": false,
"description": "End date for historical data (YYYY-MM-DD format). Defaults to today's date if not provided.",
"schema": {
"type": "string",
"format": "date"
}
}
],
"responses": {
"200": {
"description": "Compact historical cryptocurrency price data",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"startDate": {
"type": "string",
"example": "2023-11-14"
},
"closePrices": {
"type": "array",
"items": {
"type": "number"
}
}
}
}
}
}
}
}
}
},
"/intraday-chart/{symbol}": {
"get": {
"summary": "Get URL for intraday chart of a specific cryptocurrency",
"operationId": "getIntradayCryptoChart",
"description": "Provides a URL to an image chart showing intraday price data of a specified cryptocurrency for the last day.",
"parameters": [
{
"in": "path",
"name": "symbol",
"required": true,
"description": "The symbol of the cryptocurrency (e.g., BTC, ETH).",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "URL to the intraday cryptocurrency price chart",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"chartUrl": {
"type": "string",
"example": "https://example.com/intraday-chart.png"
}
}
}
}
}
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/historical-chart/{symbol}": {
"get": {
"summary": "Get URL for historical chart of a specific cryptocurrency",
"operationId": "getHistoricalCryptoChart",
"description": "Provides a URL to an image chart showing historical price data of a specified cryptocurrency.",
"parameters": [
{
"in": "path",
"name": "symbol",
"required": true,
"description": "The symbol of the cryptocurrency (e.g., BTC, ETH).",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "startDate",
"required": false,
"description": "Start date for historical data (YYYY-MM-DD format). Defaults to one year ago if not provided.",
"schema": {
"type": "string",
"format": "date"
}
},
{
"in": "query",
"name": "endDate",
"required": false,
"description": "End date for historical data (YYYY-MM-DD format). Defaults to today's date if not provided.",
"schema": {
"type": "string",
"format": "date"
}
}
],
"responses": {
"200": {
"description": "URL to the historical cryptocurrency price chart",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"chartUrl": {
"type": "string",
"example": "https://example.com/historical-chart.png"
}
}
}
}
}
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/intraday-data/{symbol}": {
"get": {
"summary": "Fetch compact intraday data for a specific cryptocurrency",
"operationId": "getCompactIntradayCryptoData",
"description": "Retrieves intraday price data of a specified cryptocurrency for the last day, focusing on the close prices with a single time reference at the beginning. The interval is 5 minutes.",
"parameters": [
{
"in": "path",
"name": "symbol",
"required": true,
"description": "The symbol of the cryptocurrency (e.g., BTC, ETH).",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Compact intraday cryptocurrency price data",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"startTime": {
"type": "string",
"example": "2023-11-14 21:25:00"
},
"closePrices": {
"type": "array",
"items": {
"type": "number"
}
}
}
}
}
}
},
"500": {
"description": "Internal Server Error"
}
}
}
}
},
"components": {
"schemas": {
"CompactIntradayData": {
"type": "object",
"properties": {
"startTime": {
"type": "string",
"example": "2023-11-14 21:25:00"
},
"closePrices": {
"type": "array",
"items": {
"type": "number"
}
}
}
},
"HistoricalData": {
"type": "object",
"properties": {
"startDate": {
"type": "string",
"example": "2023-11-14"
},
"closePrices": {
"type": "array",
"items": {
"type": "number"
}
}
}
},
"ChartUrlResponse": {
"type": "object",
"properties": {
"chartUrl": {
"type": "string",
"example": "https://example.com/chart.png"
}
}
}
}
},
"tags": []
}