Crypto Advisor

Crypto Advisor · GPT アクション

CoinCap API v2

API for accessing cryptocurrency assets information and their historical data.

  • GET /assetsRetrieve assets

    Fetches information about cryptocurrency assets, optionally filtered.

  • GET /assets/{id}Retrieve a single asset

    Fetches details of a single cryptocurrency asset by its ID.

  • GET /assets/{id}/historyRetrieve asset history

    Fetches historical data for a cryptocurrency asset.

元の API スキーマ
{
  "openapi": "3.0.0",
  "info": {
    "title": "CoinCap API v2",
    "version": "2.0",
    "description": "API for accessing cryptocurrency assets information and their historical data."
  },
  "servers": [
    {
      "url": "https://api.coincap.io/v2"
    }
  ],
  "paths": {
    "/assets": {
      "get": {
        "summary": "Retrieve assets",
        "description": "Fetches information about cryptocurrency assets, optionally filtered.",
        "operationId": "getAssets",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Search by asset id (bitcoin) or symbol (BTC)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ids",
            "in": "query",
            "required": false,
            "description": "Query with multiple ids (e.g., bitcoin,ethereum,monero)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max limit of 2000",
            "schema": {
              "type": "integer",
              "default": 5,
              "maximum": 2000
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Offset for pagination",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of assets",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetListResponse"
                }
              }
            }
          }
        }
      }
    },
    "/assets/{id}": {
      "get": {
        "summary": "Retrieve a single asset",
        "description": "Fetches details of a single cryptocurrency asset by its ID.",
        "operationId": "getAssetById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Asset ID, e.g., 'bitcoin'",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Asset details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Asset"
                }
              }
            }
          }
        }
      }
    },
    "/assets/{id}/history": {
      "get": {
        "summary": "Retrieve asset history",
        "description": "Fetches historical data for a cryptocurrency asset.",
        "operationId": "getAssetHistory",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Asset ID, e.g., 'bitcoin'",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "interval",
            "in": "query",
            "required": true,
            "description": "Point-in-time interval.",
            "schema": {
              "type": "string",
              "enum": [
                "m1",
                "m5",
                "m15",
                "m30",
                "h1",
                "h2",
                "h6",
                "h12",
                "d1"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Historical data for the asset",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AssetHistory"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AssetListResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Asset"
            }
          }
        }
      },
      "Asset": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "rank": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "supply": {
            "type": "string"
          },
          "maxSupply": {
            "type": "string",
            "nullable": true
          },
          "marketCapUsd": {
            "type": "string"
          },
          "volumeUsd24Hr": {
            "type": "string"
          },
          "priceUsd": {
            "type": "string"
          },
          "changePercent24Hr": {
            "type": "string"
          },
          "vwap24Hr": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "AssetHistory": {
        "type": "object",
        "properties": {
          "priceUsd": {
            "type": "string"
          },
          "time": {
            "type": "integer"
          }
        },
        "required": [
          "priceUsd",
          "time"
        ]
      }
    }
  }
}

CoinGecko API

API for accessing CoinGecko data on trending cryptocurrency coins.

  • GET /search/trendingTop-7 Trending Coins

    Retrieves the top-7 trending cryptocurrency coins on CoinGecko as searched by users in the last 24 hours.

元の API スキーマ
{
  "openapi": "3.0.0",
  "info": {
    "title": "CoinGecko API",
    "version": "v3",
    "description": "API for accessing CoinGecko data on trending cryptocurrency coins."
  },
  "servers": [
    {
      "url": "https://api.coingecko.com/api/v3"
    }
  ],
  "paths": {
    "/search/trending": {
      "get": {
        "summary": "Top-7 Trending Coins",
        "description": "Retrieves the top-7 trending cryptocurrency coins on CoinGecko as searched by users in the last 24 hours.",
        "operationId": "getTrendingCoins",
        "responses": {
          "200": {
            "description": "A list of top-7 trending cryptocurrency coins.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrendingCoinsResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "TrendingCoinsResponse": {
        "type": "object",
        "properties": {
          "coins": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TrendingCoinItem"
            }
          }
        }
      },
      "TrendingCoinItem": {
        "type": "object",
        "properties": {
          "item": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique identifier for the cryptocurrency."
              },
              "coin_id": {
                "type": "integer",
                "description": "Numeric identifier of the coin."
              },
              "name": {
                "type": "string",
                "description": "The name of the cryptocurrency."
              },
              "symbol": {
                "type": "string",
                "description": "The symbol used to represent the cryptocurrency."
              },
              "market_cap_rank": {
                "type": "integer",
                "description": "Rank based on market cap."
              },
              "thumb": {
                "type": "string",
                "description": "URL to the thumbnail image."
              },
              "small": {
                "type": "string",
                "description": "URL to the small image."
              },
              "large": {
                "type": "string",
                "description": "URL to the large image."
              },
              "slug": {
                "type": "string",
                "description": "Slug name for the coin."
              },
              "price_btc": {
                "type": "number",
                "description": "Price in Bitcoin."
              },
              "score": {
                "type": "integer",
                "description": "Trending score of the coin."
              },
              "data": {
                "type": "object",
                "properties": {
                  "price": {
                    "type": "string",
                    "description": "Price in USD."
                  },
                  "price_btc": {
                    "type": "string",
                    "description": "Price in Bitcoin."
                  },
                  "price_change_percentage_24h": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "number"
                    },
                    "description": "Price change percentage in the last 24 hours in various currencies."
                  },
                  "market_cap": {
                    "type": "string",
                    "description": "Market capitalization in USD."
                  },
                  "market_cap_btc": {
                    "type": "string",
                    "description": "Market capitalization in Bitcoin."
                  },
                  "total_volume": {
                    "type": "string",
                    "description": "Total trading volume in USD."
                  },
                  "total_volume_btc": {
                    "type": "string",
                    "description": "Total trading volume in Bitcoin."
                  },
                  "sparkline": {
                    "type": "string",
                    "description": "URL to the sparkline graph image."
                  },
                  "content": {
                    "type": "string",
                    "nullable": true,
                    "description": "Additional content if available."
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}