Cryptocurrency Assistant

Cryptocurrency Assistant · GPT-Aktionen

Upbit API

API for accessing cryptocurrency market data on Upbit.

  • GET /orderbookRetrieve order book information for a given market.
  • GET /candles/minutes/{unit}Retrieve minute candles for a given market.
  • GET /candles/daysRetrieve day candles for a given market.
Ursprüngliches API-Schema
{
  "openapi": "3.0.0",
  "info": {
    "title": "Upbit API",
    "description": "API for accessing cryptocurrency market data on Upbit.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.upbit.com/v1",
      "description": "Upbit API server"
    }
  ],
  "paths": {
    "/orderbook": {
      "get": {
        "operationId": "getOrderbook",
        "summary": "Retrieve order book information for a given market.",
        "parameters": [
          {
            "name": "markets",
            "in": "query",
            "required": true,
            "description": "Market codes to retrieve order book information for.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of order book information.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "market": {
                        "type": "string"
                      },
                      "timestamp": {
                        "type": "integer"
                      },
                      "total_ask_size": {
                        "type": "number"
                      },
                      "total_bid_size": {
                        "type": "number"
                      },
                      "orderbook_units": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "ask_price": {
                              "type": "number"
                            },
                            "bid_price": {
                              "type": "number"
                            },
                            "ask_size": {
                              "type": "number"
                            },
                            "bid_size": {
                              "type": "number"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/candles/minutes/{unit}": {
      "get": {
        "operationId": "getMinuteCandles",
        "summary": "Retrieve minute candles for a given market.",
        "parameters": [
          {
            "name": "unit",
            "in": "path",
            "required": true,
            "description": "Time unit for candles (in minutes).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "market",
            "in": "query",
            "required": true,
            "description": "Market code (e.g., KRW-BTC).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Last candle time in ISO8601 format (exclusive). Defaults to the most recent candle if not provided.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "description": "Number of candles to return (up to 200).",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "An array of minute candle data.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "market": {
                        "type": "string"
                      },
                      "candle_date_time_utc": {
                        "type": "string"
                      },
                      "candle_date_time_kst": {
                        "type": "string"
                      },
                      "opening_price": {
                        "type": "number"
                      },
                      "high_price": {
                        "type": "number"
                      },
                      "low_price": {
                        "type": "number"
                      },
                      "trade_price": {
                        "type": "number"
                      },
                      "timestamp": {
                        "type": "integer"
                      },
                      "candle_acc_trade_price": {
                        "type": "number"
                      },
                      "candle_acc_trade_volume": {
                        "type": "number"
                      },
                      "unit": {
                        "type": "integer"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/candles/days": {
      "get": {
        "operationId": "getDayCandles",
        "summary": "Retrieve day candles for a given market.",
        "parameters": [
          {
            "name": "market",
            "in": "query",
            "required": true,
            "description": "Market code (e.g., KRW-BTC).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Last candle time in ISO8601 format (exclusive). Defaults to the most recent candle if not provided.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "description": "Number of candles to return (up to 200).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "convertingPriceUnit",
            "in": "query",
            "required": false,
            "description": "Converting price unit, if specified returns converted trade price.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "An array of day candle data.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "market": {
                        "type": "string"
                      },
                      "candle_date_time_utc": {
                        "type": "string"
                      },
                      "candle_date_time_kst": {
                        "type": "string"
                      },
                      "opening_price": {
                        "type": "number"
                      },
                      "high_price": {
                        "type": "number"
                      },
                      "low_price": {
                        "type": "number"
                      },
                      "trade_price": {
                        "type": "number"
                      },
                      "timestamp": {
                        "type": "integer"
                      },
                      "candle_acc_trade_price": {
                        "type": "number"
                      },
                      "candle_acc_trade_volume": {
                        "type": "number"
                      },
                      "prev_closing_price": {
                        "type": "number"
                      },
                      "change_price": {
                        "type": "number"
                      },
                      "change_rate": {
                        "type": "number"
                      },
                      "converted_trade_price": {
                        "type": "number"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}