{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/paraswap/main/json-schema/token.json",
  "title": "ParaSwap Token",
  "description": "A token supported by the ParaSwap/Velora DEX aggregator, returned from the /tokens endpoint.",
  "type": "object",
  "required": ["symbol", "address", "decimals", "img", "network"],
  "properties": {
    "symbol": {
      "type": "string",
      "description": "Token ticker symbol.",
      "example": "ETH"
    },
    "address": {
      "type": "string",
      "description": "Token contract address. ETH is represented as 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE.",
      "example": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
    },
    "name": {
      "type": "string",
      "description": "Full token name.",
      "example": "Ether"
    },
    "decimals": {
      "type": "integer",
      "minimum": 0,
      "description": "Number of decimal places for the token.",
      "example": 18
    },
    "img": {
      "type": "string",
      "format": "uri",
      "description": "URL for the token logo image.",
      "example": "https://img.paraswap.network/ETH.png"
    },
    "network": {
      "type": "number",
      "description": "Blockchain network ID the token is on.",
      "enum": [1, 3, 56, 137]
    },
    "newToken": {
      "type": "boolean",
      "default": false,
      "description": "True if this is a newly listed token."
    },
    "connectors": {
      "type": "array",
      "description": "List of connector token addresses used in routing.",
      "items": {
        "type": "string"
      }
    },
    "tokenType": {
      "type": "string",
      "description": "Classification of the token standard or protocol.",
      "enum": ["ETH", "ERC20", "SYNTH", "cToken", "iToken", "aToken", "aToken2", "idleToken", "Chai", "bDAI"]
    }
  }
}
