{
  "openapi": "3.0.0",
  "info": {
    "title": "EVM Blockbook API",
    "description": "Get access to balances, transactions, and address balance history for addresses via JSON-RPC and REST. Also allows fetching currency rate for the specified currency and date.",
    "version": "1.0.0",
    "contact": {
      "email": "support@quicknode.com",
      "url": "https://support.quicknode.com/hc/en-us"
    }
  },
  "servers": [
    {
      "url": "https://{quicknode_endpoint}",
      "description": "Your Quicknode endpoint",
      "variables": {
        "quicknode_endpoint": {
          "default": "your-endpoint.quiknode.pro",
          "description": "Your Quicknode endpoint URL"
        }
      }
    }
  ],
  "tags": [
    {
      "name": "REST API",
      "description": "endpoints for the add-on"
    },
    {
      "name": "JSON-RPC",
      "description": "See request body examples for the available methods you can call on this add-on"
    }
  ],
  "paths": {
    "/addon/674/api/v2/address/{address}": {
      "get": {
        "summary": "Returns balances and transactions of an address. The returned transactions are sorted by block height, newest blocks first.",
        "description": "Returns balances and transactions of an address. The returned transactions are sorted by block height, newest blocks first.",
        "externalDocs": {
          "url": "https://github.com/trezor/blockbook/blob/master/docs/api.md"
        },
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Path parameter"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "1"
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "1000"
          },
          {
            "name": "fromHeight",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "0"
          },
          {
            "name": "details",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "txids"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "tags": [
          "REST API"
        ]
      }
    },
    "/addon/674/api/v2/tx/{txid}": {
      "get": {
        "summary": "Returns transaction object for txHash.",
        "description": "Returns transaction object for txHash.",
        "externalDocs": {
          "url": "https://github.com/trezor/blockbook/blob/master/docs/api.md"
        },
        "parameters": [
          {
            "name": "txid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Path parameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "tags": [
          "REST API"
        ]
      }
    },
    "/addon/674/api/v2/block/{block}": {
      "get": {
        "summary": "Returns the block data with transaction objects.",
        "description": "Returns the block data with transaction objects.",
        "externalDocs": {
          "url": "https://github.com/trezor/blockbook/blob/master/docs/api.md"
        },
        "parameters": [
          {
            "name": "block",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Path parameter"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "1"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "tags": [
          "REST API"
        ]
      }
    },
    "/addon/674/api/v2/block-index/{block_height}": {
      "get": {
        "summary": "Returns the hash of the block at the given height.",
        "description": "Returns the hash of the block at the given height.",
        "externalDocs": {
          "url": "https://github.com/trezor/blockbook/blob/master/docs/api.md"
        },
        "parameters": [
          {
            "name": "block_height",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Path parameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "tags": [
          "REST API"
        ]
      }
    },
    "/addon/674/api/v2/tx-specific/{txid_specific}": {
      "get": {
        "summary": "Returns transaction data in the exact format as returned by backend.",
        "description": "Returns transaction data in the exact format as returned by backend.",
        "externalDocs": {
          "url": "https://github.com/trezor/blockbook/blob/master/docs/api.md"
        },
        "parameters": [
          {
            "name": "txid_specific",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Path parameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "tags": [
          "REST API"
        ]
      }
    },
    "/addon/674/api/v2/tickers-list": {
      "get": {
        "summary": "Returns a list of available currency rate tickers (secondary currencies) for the specified date, along with an actual data timestamp.",
        "description": "Returns a list of available currency rate tickers (secondary currencies) for the specified date, along with an actual data timestamp.",
        "externalDocs": {
          "url": "https://github.com/trezor/blockbook/blob/master/docs/api.md"
        },
        "parameters": [
          {
            "name": "timestamp",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "1574346615"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "tags": [
          "REST API"
        ]
      }
    },
    "/addon/674/api/v2/tickers": {
      "get": {
        "summary": "Returns currency rate for the specified currency and date. If the currency is not available for that specific timestamp, the next closest rate will be returned. All responses contain an actual rate timestamp.",
        "description": "Returns currency rate for the specified currency and date. If the currency is not available for that specific timestamp, the next closest rate will be returned. All responses contain an actual rate timestamp.",
        "externalDocs": {
          "url": "https://github.com/trezor/blockbook/blob/master/docs/api.md"
        },
        "parameters": [
          {
            "name": "timestamp",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "1574346615"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "tags": [
          "REST API"
        ]
      }
    },
    "/addon/674/api/v2/balancehistory/{xpub_or_address}": {
      "get": {
        "summary": "Returns a balance history for the specified address.",
        "description": "Returns a balance history for the specified address.",
        "externalDocs": {
          "url": "https://github.com/trezor/blockbook/blob/master/docs/api.md"
        },
        "parameters": [
          {
            "name": "xpub_or_address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Path parameter"
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "1683684000"
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "1700042400"
          },
          {
            "name": "fiatcurrency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "usd"
          },
          {
            "name": "groupBy",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "3600"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "tags": [
          "REST API"
        ]
      }
    },
    "/rpc": {
      "post": {
        "summary": "JSON-RPC methods for https://blockbook-json-rpc.quicknode.com/rpc",
        "description": "Available methods:\n• bb_getBlockHash: bb_getBlockHash(blockHeight) Returns the hash of the block at the given height.\n• bb_getTxSpecific: bb_getTxSpecific(txHash) Returns transaction data in the exact format as returned by backend.\n• bb_getBalanceHistory: bb_getBalanceHistory(address,options) Returns a balance history for the specified address.\n• bb_getAddress: bb_getAddress(address, options_object) Returns balances and transactions of an address. The returned transactions are sorted by block height, newest blocks first.\n• bb_getTickersList: bb_getTickersList(options) Returns a list of available currency rate tickers (secondary currencies) for the specified date, along with an actual data timestamp.\n• bb_getTickers: bb_getTickers(option) Returns currency rate for the specified currency and date. If the currency is not available for that specific timestamp, the next closest rate will be returned. All responses contain an actual rate timestamp.\n• bb_getBlock: bb_getBlock(block_hash_or_height) Returns the block data with transaction objects.\n• bb_getTx: bb_getTx(txHash) Returns transaction object for txHash.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "jsonrpc": {
                        "type": "string",
                        "enum": [
                          "2.0"
                        ]
                      },
                      "method": {
                        "type": "string",
                        "enum": [
                          "bb_getBlockHash"
                        ]
                      },
                      "id": {
                        "type": "integer",
                        "example": 1
                      },
                      "params": {
                        "type": "array",
                        "description": "Positional parameters",
                        "items": {
                          "description": "Parameter value (can be string, number, boolean, object, etc.)"
                        },
                        "example": [
                          19441691
                        ]
                      }
                    },
                    "required": [
                      "jsonrpc",
                      "method",
                      "id",
                      "params"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "jsonrpc": {
                        "type": "string",
                        "enum": [
                          "2.0"
                        ]
                      },
                      "method": {
                        "type": "string",
                        "enum": [
                          "bb_getTxSpecific"
                        ]
                      },
                      "id": {
                        "type": "integer",
                        "example": 1
                      },
                      "params": {
                        "type": "array",
                        "description": "Positional parameters",
                        "items": {
                          "description": "Parameter value (can be string, number, boolean, object, etc.)"
                        },
                        "example": [
                          "0xbca93210308a3a3e75ac4dd98645ebe8ebecaa3778fa77b7cb408bad23991923"
                        ]
                      }
                    },
                    "required": [
                      "jsonrpc",
                      "method",
                      "id",
                      "params"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "jsonrpc": {
                        "type": "string",
                        "enum": [
                          "2.0"
                        ]
                      },
                      "method": {
                        "type": "string",
                        "enum": [
                          "bb_getBalanceHistory"
                        ]
                      },
                      "id": {
                        "type": "integer",
                        "example": 1
                      },
                      "params": {
                        "type": "array",
                        "description": "Positional parameters",
                        "items": {
                          "description": "Parameter value (can be string, number, boolean, object, etc.)"
                        },
                        "example": [
                          "0x91b51c173a4bDAa1A60e234fC3f705A16D228740",
                          {
                            "from": "1683684000",
                            "to": "1700042400",
                            "fiatcurrency": "usd",
                            "groupBy": 3600
                          }
                        ]
                      }
                    },
                    "required": [
                      "jsonrpc",
                      "method",
                      "id",
                      "params"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "jsonrpc": {
                        "type": "string",
                        "enum": [
                          "2.0"
                        ]
                      },
                      "method": {
                        "type": "string",
                        "enum": [
                          "bb_getAddress"
                        ]
                      },
                      "id": {
                        "type": "integer",
                        "example": 1
                      },
                      "params": {
                        "type": "array",
                        "description": "Positional parameters",
                        "items": {
                          "description": "Parameter value (can be string, number, boolean, object, etc.)"
                        },
                        "example": [
                          "0x91b51c173a4bDAa1A60e234fC3f705A16D228740",
                          {
                            "page": 1,
                            "size": 1000,
                            "fromHeight": 0,
                            "details": "txids"
                          }
                        ]
                      }
                    },
                    "required": [
                      "jsonrpc",
                      "method",
                      "id",
                      "params"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "jsonrpc": {
                        "type": "string",
                        "enum": [
                          "2.0"
                        ]
                      },
                      "method": {
                        "type": "string",
                        "enum": [
                          "bb_getTickersList"
                        ]
                      },
                      "id": {
                        "type": "integer",
                        "example": 1
                      },
                      "params": {
                        "type": "array",
                        "description": "Positional parameters",
                        "items": {
                          "description": "Parameter value (can be string, number, boolean, object, etc.)"
                        },
                        "example": [
                          {
                            "timestamp": 1574346615
                          }
                        ]
                      }
                    },
                    "required": [
                      "jsonrpc",
                      "method",
                      "id",
                      "params"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "jsonrpc": {
                        "type": "string",
                        "enum": [
                          "2.0"
                        ]
                      },
                      "method": {
                        "type": "string",
                        "enum": [
                          "bb_getTickers"
                        ]
                      },
                      "id": {
                        "type": "integer",
                        "example": 1
                      },
                      "params": {
                        "type": "array",
                        "description": "Positional parameters",
                        "items": {
                          "description": "Parameter value (can be string, number, boolean, object, etc.)"
                        },
                        "example": [
                          {
                            "timestamp": 1574346615
                          }
                        ]
                      }
                    },
                    "required": [
                      "jsonrpc",
                      "method",
                      "id",
                      "params"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "jsonrpc": {
                        "type": "string",
                        "enum": [
                          "2.0"
                        ]
                      },
                      "method": {
                        "type": "string",
                        "enum": [
                          "bb_getBlock"
                        ]
                      },
                      "id": {
                        "type": "integer",
                        "example": 1
                      },
                      "params": {
                        "type": "array",
                        "description": "Positional parameters",
                        "items": {
                          "description": "Parameter value (can be string, number, boolean, object, etc.)"
                        },
                        "example": [
                          "0x043976bc1e8efaf2f4b0e241dfa3ba9f42aa5a1df8ae6548e1f9a9cd256ca9d7",
                          {
                            "page": 1
                          }
                        ]
                      }
                    },
                    "required": [
                      "jsonrpc",
                      "method",
                      "id",
                      "params"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "jsonrpc": {
                        "type": "string",
                        "enum": [
                          "2.0"
                        ]
                      },
                      "method": {
                        "type": "string",
                        "enum": [
                          "bb_getTx"
                        ]
                      },
                      "id": {
                        "type": "integer",
                        "example": 1
                      },
                      "params": {
                        "type": "array",
                        "description": "Positional parameters",
                        "items": {
                          "description": "Parameter value (can be string, number, boolean, object, etc.)"
                        },
                        "example": [
                          "0xbca93210308a3a3e75ac4dd98645ebe8ebecaa3778fa77b7cb408bad23991923"
                        ]
                      }
                    },
                    "required": [
                      "jsonrpc",
                      "method",
                      "id",
                      "params"
                    ]
                  }
                ],
                "discriminator": {
                  "propertyName": "method"
                }
              },
              "examples": {
                "bb_getBlockHash": {
                  "summary": "bb_getBlockHash(blockHeight) Returns the hash of the block at the given height.",
                  "value": {
                    "jsonrpc": "2.0",
                    "method": "bb_getBlockHash",
                    "id": 1,
                    "params": [
                      19441691
                    ]
                  }
                },
                "bb_getTxSpecific": {
                  "summary": "bb_getTxSpecific(txHash) Returns transaction data in the exact format as returned by backend.",
                  "value": {
                    "jsonrpc": "2.0",
                    "method": "bb_getTxSpecific",
                    "id": 1,
                    "params": [
                      "0xbca93210308a3a3e75ac4dd98645ebe8ebecaa3778fa77b7cb408bad23991923"
                    ]
                  }
                },
                "bb_getBalanceHistory": {
                  "summary": "bb_getBalanceHistory(address,options) Returns a balance history for the specified address.",
                  "value": {
                    "jsonrpc": "2.0",
                    "method": "bb_getBalanceHistory",
                    "id": 1,
                    "params": [
                      "0x91b51c173a4bDAa1A60e234fC3f705A16D228740",
                      {
                        "from": "1683684000",
                        "to": "1700042400",
                        "fiatcurrency": "usd",
                        "groupBy": 3600
                      }
                    ]
                  }
                },
                "bb_getAddress": {
                  "summary": "bb_getAddress(address, options_object) Returns balances and transactions of an address. The returned transactions are sorted by block height, newest blocks first.",
                  "value": {
                    "jsonrpc": "2.0",
                    "method": "bb_getAddress",
                    "id": 1,
                    "params": [
                      "0x91b51c173a4bDAa1A60e234fC3f705A16D228740",
                      {
                        "page": 1,
                        "size": 1000,
                        "fromHeight": 0,
                        "details": "txids"
                      }
                    ]
                  }
                },
                "bb_getTickersList": {
                  "summary": "bb_getTickersList(options) Returns a list of available currency rate tickers (secondary currencies) for the specified date, along with an actual data timestamp.",
                  "value": {
                    "jsonrpc": "2.0",
                    "method": "bb_getTickersList",
                    "id": 1,
                    "params": [
                      {
                        "timestamp": 1574346615
                      }
                    ]
                  }
                },
                "bb_getTickers": {
                  "summary": "bb_getTickers(option) Returns currency rate for the specified currency and date. If the currency is not available for that specific timestamp, the next closest rate will be returned. All responses contain an actual rate timestamp.",
                  "value": {
                    "jsonrpc": "2.0",
                    "method": "bb_getTickers",
                    "id": 1,
                    "params": [
                      {
                        "timestamp": 1574346615
                      }
                    ]
                  }
                },
                "bb_getBlock": {
                  "summary": "bb_getBlock(block_hash_or_height) Returns the block data with transaction objects.",
                  "value": {
                    "jsonrpc": "2.0",
                    "method": "bb_getBlock",
                    "id": 1,
                    "params": [
                      "0x043976bc1e8efaf2f4b0e241dfa3ba9f42aa5a1df8ae6548e1f9a9cd256ca9d7",
                      {
                        "page": 1
                      }
                    ]
                  }
                },
                "bb_getTx": {
                  "summary": "bb_getTx(txHash) Returns transaction object for txHash.",
                  "value": {
                    "jsonrpc": "2.0",
                    "method": "bb_getTx",
                    "id": 1,
                    "params": [
                      "0xbca93210308a3a3e75ac4dd98645ebe8ebecaa3778fa77b7cb408bad23991923"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jsonrpc": {
                      "type": "string",
                      "enum": [
                        "2.0"
                      ]
                    },
                    "id": {
                      "type": "integer"
                    },
                    "result": {
                      "description": "Method result"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "message": {
                          "type": "string"
                        },
                        "data": {
                          "description": "Additional error data"
                        }
                      }
                    }
                  },
                  "required": [
                    "jsonrpc",
                    "id"
                  ]
                }
              }
            }
          }
        },
        "externalDocs": {
          "url": "https://www.quicknode.com/docs/ethereum/bb_getBlockHash",
          "description": "Documentation: bb_getBlockHash: https://www.quicknode.com/docs/ethereum/bb_getBlockHash, bb_getTxSpecific: https://www.quicknode.com/docs/ethereum/bb_getTxSpecific, bb_getBalanceHistory: https://www.quicknode.com/docs/ethereum/bb_getBalanceHistory, bb_getAddress: https://www.quicknode.com/docs/ethereum/bb_getAddress, bb_getTickersList: https://www.quicknode.com/docs/ethereum/bb_getTickersList, bb_getTickers: https://www.quicknode.com/docs/ethereum/bb_getTickers, bb_getBlock: https://www.quicknode.com/docs/ethereum/bb_getBlock, bb_getTx: https://www.quicknode.com/docs/ethereum/bb_getTx"
        },
        "tags": [
          "JSON-RPC"
        ]
      }
    }
  },
  "externalDocs": {
    "description": "Support Documentation",
    "url": "https://support.quicknode.com/hc/en-us"
  }
}