---
agentTools:
  projectIndex: https://tokeninsight-api.readme.io/llms.txt
---

# Top gainers

Retive the top gainers

🪣 *Call credit usage for this endpoint: 1 credit per request*

![](https://files.readme.io/db53934-image.png)

<https://tokeninsight.com/en/cryptocurrencies/gainers-losers>

You will be able to retrieve the top gainer list with this endpoint.

The parameter you set `range` controls the range that top gainers you get from.

`100` stands for you are retrieving the top gainers within the Top 100 tokens by market cap.

`200` stands for you are retrieving the top gainers within the Top 200 tokens by market cap.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "description": "This is a simple API of fetching data from TI.",
    "title": "Tokeninsight API",
    "termsOfService": "https://tokeninsight.com/en/services",
    "contact": {
      "name": "API Support",
      "url": "https://twitter.com/TokenInsight"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "version": "1.0"
  },
  "paths": {
    "/coins/top-gainers": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Retive the top gainers",
        "tags": [
          "coins"
        ],
        "summary": "Top gainers",
        "parameters": [
          {
            "description": "Gainers or losers in top *** coins. Ex: 100 stands for retrieving ganers / losers in only the top 100 marketcap coins. 500 stands for for retrieving ganers / losers in only the top 500 marketcap coins. Default in 100, other options 200 500 1000 and -1 .-1 stands for the whole token range",
            "name": "range",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "topCoin",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/RespFormat"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/handlers.topCoin"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/RespFailFormat"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status400"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/RespFailFormat"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status401"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/RespFailFormat"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status403"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/RespFailFormat"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status429"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/RespFailFormat"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status500"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.tokeninsight.com/api/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "name": "TI_API_KEY",
        "in": "header"
      }
    },
    "schemas": {
      "RespFailFormat": {
        "type": "object",
        "properties": {
          "status": {}
        }
      },
      "RespFormat": {
        "type": "object",
        "properties": {
          "data": {},
          "status": {
            "$ref": "#/components/schemas/Status200"
          }
        }
      },
      "Status200": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "example": 0
          },
          "message": {
            "type": "string",
            "example": ""
          },
          "timestamp": {
            "type": "integer",
            "example": 1640966400000
          }
        }
      },
      "Status400": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "example": 400
          },
          "message": {
            "type": "string",
            "example": "Invalid params"
          },
          "timestamp": {
            "type": "integer",
            "example": 1640966400000
          }
        }
      },
      "Status401": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "example": 401
          },
          "message": {
            "type": "string",
            "example": "TI_API_KEY missing."
          },
          "timestamp": {
            "type": "integer",
            "example": 1640966400000
          }
        }
      },
      "Status403": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "example": 403
          },
          "message": {
            "type": "string",
            "example": "Your TI_API_KEY  doesn't support this endpoint"
          },
          "timestamp": {
            "type": "integer",
            "example": 1640966400000
          }
        }
      },
      "Status429": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "example": 429
          },
          "message": {
            "type": "string",
            "example": "The key exceeds the frequency limit"
          },
          "timestamp": {
            "type": "integer",
            "example": 1640966400000
          }
        }
      },
      "Status500": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "example": 500
          },
          "message": {
            "type": "string",
            "example": "An internal server error occurred"
          },
          "timestamp": {
            "type": "integer",
            "example": 1640966400000
          }
        }
      },
      "handlers.topCoin": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "logo": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "price": {
            "type": "number"
          },
          "price_change_24h": {
            "type": "number"
          },
          "symbol": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 100,
      "1": 10,
      "2": 140,
      "3": 138,
      "4": 103,
      "5": 168,
      "6": 4,
      "7": 0,
      "8": 53,
      "9": 243,
      "10": 106,
      "11": 74
    }
  }
}
```