Crypto Trading & Investing ๐Ÿ’น

Crypto Trading & Investing ๐Ÿ’น ยท GPT Actions

CoinMarketCap API

Actions schema to fetch crypto market data from CoinMarketCap

  • GET /v1/cryptocurrency/listings/latestGet latest cryptocurrency listings
  • GET /v1/cryptocurrency/quotes/latestGet cryptocurrency quotes by symbol
ๅŽŸๅง‹ API ๅฎšไน‰
{
  "openapi": "3.1.0",
  "info": {
    "title": "CoinMarketCap API",
    "version": "1.0.0",
    "description": "Actions schema to fetch crypto market data from CoinMarketCap"
  },
  "servers": [
    {
      "url": "https://pro-api.coinmarketcap.com"
    }
  ],
  "paths": {
    "/v1/cryptocurrency/listings/latest": {
      "get": {
        "operationId": "getLatestListings",
        "summary": "Get latest cryptocurrency listings",
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10
            }
          },
          {
            "name": "convert",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "USD"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "CMC_API_KEY": []
          }
        ]
      }
    },
    "/v1/cryptocurrency/quotes/latest": {
      "get": {
        "operationId": "getCryptoQuotes",
        "summary": "Get cryptocurrency quotes by symbol",
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "BTC,ETH"
            }
          },
          {
            "name": "convert",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "USD"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "CMC_API_KEY": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "CMC_API_KEY": {
        "type": "apiKey",
        "in": "header",
        "name": "X-CMC_PRO_API_KEY"
      }
    },
    "schemas": {}
  }
}