Crypto Price GPT
Crypto Price GPT · GPT-Aktionen
Get crypto price
Retrieves current crypto price from OKX
GET /api/v5/market/candlesGetOKXCandlestickDataGet candlestick data from OKX
GET /api/v5/market/tickersGetOKXMarketTickersGet market tickers from OKX
GET /api/v5/market/tickerGetOKXTickerGet crypto market ticker from OKX
Ursprüngliches API-Schema
{
"openapi": "3.1.0",
"info": {
"title": "Get crypto price",
"description": "Retrieves current crypto price from OKX",
"version": "v1.0.0"
},
"servers": [
{
"url": "https://www.okx.com"
}
],
"paths": {
"/api/v5/market/candles": {
"get": {
"description": "Get candlestick data from OKX",
"operationId": "GetOKXCandlestickData",
"parameters": [
{
"name": "instId",
"in": "query",
"description": "Instrument ID, e.g., BTC-USD-190927-5000-C",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "bar",
"in": "query",
"description": "Bar size, default is 1m",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "after",
"in": "query",
"description": "Pagination to return records earlier than the requested ts",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "before",
"in": "query",
"description": "Pagination to return records newer than the requested ts. Returns latest data when used alone",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "limit",
"in": "query",
"description": "Number of results per request, max 300, default 100",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}
}
},
"/api/v5/market/tickers": {
"get": {
"description": "Get market tickers from OKX",
"operationId": "GetOKXMarketTickers",
"parameters": [
{
"name": "instType",
"in": "query",
"description": "Instrument type",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "uly",
"in": "query",
"description": "Underlying, e.g. BTC-USD. Applicable to FUTURES/SWAP/OPTION",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "instFamily",
"in": "query",
"description": "Instrument family. Applicable to FUTURES/SWAP/OPTION",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"msg": {
"type": "string"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"instType": {
"type": "string"
},
"instId": {
"type": "string"
},
"last": {
"type": "string"
},
"lastSz": {
"type": "string"
},
"askPx": {
"type": "string"
},
"askSz": {
"type": "string"
},
"bidPx": {
"type": "string"
},
"bidSz": {
"type": "string"
},
"open24h": {
"type": "string"
},
"high24h": {
"type": "string"
},
"low24h": {
"type": "string"
},
"volCcy24h": {
"type": "string"
},
"vol24h": {
"type": "string"
},
"sodUtc0": {
"type": "string"
},
"sodUtc8": {
"type": "string"
},
"ts": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
},
"/api/v5/market/ticker": {
"get": {
"description": "Get crypto market ticker from OKX",
"operationId": "GetOKXTicker",
"parameters": [
{
"name": "instId",
"in": "query",
"description": "Instrument ID, e.g., BTC-USD-SWAP",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"msg": {
"type": "string"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"instType": {
"type": "string"
},
"instId": {
"type": "string"
},
"last": {
"type": "string"
},
"lastSz": {
"type": "string"
},
"askPx": {
"type": "string"
},
"askSz": {
"type": "string"
},
"bidPx": {
"type": "string"
},
"bidSz": {
"type": "string"
},
"open24h": {
"type": "string"
},
"high24h": {
"type": "string"
},
"low24h": {
"type": "string"
},
"volCcy24h": {
"type": "string"
},
"vol24h": {
"type": "string"
},
"sodUtc0": {
"type": "string"
},
"sodUtc8": {
"type": "string"
},
"ts": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
}
},
"components": {
"schemas": {}
}
}