{
  "openapi": "3.0.0",
  "info": {
    "title": "Litecoin Blockbook JSON-RPC API",
    "description": "Get access to balances, transactions, and address balance history for addresses via JSON-RPC. Also allows fetching currency rate for the specified currency and date. ",
    "version": "1.0.0",
    "contact": {
      "email": "support@bitcoinledger.com",
      "url": "https://bitcoinledger.com/support"
    }
  },
  "servers": [
    {
      "url": "https://{quicknode_endpoint}",
      "description": "Your Quicknode endpoint",
      "variables": {
        "quicknode_endpoint": {
          "default": "your-endpoint.quiknode.pro",
          "description": "Your Quicknode endpoint URL"
        }
      }
    }
  ],
  "tags": [
    {
      "name": "JSON-RPC",
      "description": "See request body examples for the available methods you can call on this add-on"
    }
  ],
  "paths": {
    "/v1/rpc": {
      "post": {
        "summary": "JSON-RPC methods for https://api1.hosts.bitcoinledger.com/v1/rpc",
        "description": "Available methods:\n• ltc_bb_getTickers: 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• ltc_bb_getBlock: Returns the block data with transaction objects\n• ltc_bb_getBlockHash: Returns the hash of the block at the given height.\n• ltc_bb_getTxSpecific: Returns transaction data in the exact format as returned by backend. \n• ltc_bb_getTx:  Returns transaction object for the transaction hash.\n• ltc_bb_getTickersList: Returns a list of available currency rate tickers (secondary currencies) for the specified date, along with an actual data timestamp. \n• ltc_bb_getAddress: Returns balances and transactions of an address. The returned transactions are sorted by block height, newest blocks first.\n• ltc_bb_getBalanceHistory: Returns a balance history for the specified address.\n• ltc_bb_getUTXOs: Get all of the unspent transaction outputs for a given Litecoin address or xpub.\n• ltc_bb_getXPUB: Get balances and transactions of an xpub or output descriptor",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "jsonrpc": {
                        "type": "string",
                        "enum": [
                          "2.0"
                        ]
                      },
                      "method": {
                        "type": "string",
                        "enum": [
                          "ltc_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,
                            "currency": "USD"
                          }
                        ]
                      }
                    },
                    "required": [
                      "jsonrpc",
                      "method",
                      "id",
                      "params"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "jsonrpc": {
                        "type": "string",
                        "enum": [
                          "2.0"
                        ]
                      },
                      "method": {
                        "type": "string",
                        "enum": [
                          "ltc_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": [
                          "2848849",
                          {
                            "page": 1
                          }
                        ]
                      }
                    },
                    "required": [
                      "jsonrpc",
                      "method",
                      "id",
                      "params"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "jsonrpc": {
                        "type": "string",
                        "enum": [
                          "2.0"
                        ]
                      },
                      "method": {
                        "type": "string",
                        "enum": [
                          "ltc_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": [
                          "2848849"
                        ]
                      }
                    },
                    "required": [
                      "jsonrpc",
                      "method",
                      "id",
                      "params"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "jsonrpc": {
                        "type": "string",
                        "enum": [
                          "2.0"
                        ]
                      },
                      "method": {
                        "type": "string",
                        "enum": [
                          "ltc_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": [
                          "a24f2a7b4e2c6189a8d72d7fc270a5cb930d86db715aa1573e242e277b7823b1"
                        ]
                      }
                    },
                    "required": [
                      "jsonrpc",
                      "method",
                      "id",
                      "params"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "jsonrpc": {
                        "type": "string",
                        "enum": [
                          "2.0"
                        ]
                      },
                      "method": {
                        "type": "string",
                        "enum": [
                          "ltc_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": [
                          "a24f2a7b4e2c6189a8d72d7fc270a5cb930d86db715aa1573e242e277b7823b1"
                        ]
                      }
                    },
                    "required": [
                      "jsonrpc",
                      "method",
                      "id",
                      "params"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "jsonrpc": {
                        "type": "string",
                        "enum": [
                          "2.0"
                        ]
                      },
                      "method": {
                        "type": "string",
                        "enum": [
                          "ltc_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": [
                          "ltc_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": [
                          "LYhttvnKawAv6RcHQ4eBkNtifuiEA99PFe",
                          {
                            "page": 1
                          }
                        ]
                      }
                    },
                    "required": [
                      "jsonrpc",
                      "method",
                      "id",
                      "params"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "jsonrpc": {
                        "type": "string",
                        "enum": [
                          "2.0"
                        ]
                      },
                      "method": {
                        "type": "string",
                        "enum": [
                          "ltc_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": [
                          "LYhttvnKawAv6RcHQ4eBkNtifuiEA99PFe",
                          {
                            "from": "1683684000",
                            "to": "1715035409",
                            "fiatcurrency": "usd",
                            "groupBy": 3600
                          }
                        ]
                      }
                    },
                    "required": [
                      "jsonrpc",
                      "method",
                      "id",
                      "params"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "jsonrpc": {
                        "type": "string",
                        "enum": [
                          "2.0"
                        ]
                      },
                      "method": {
                        "type": "string",
                        "enum": [
                          "ltc_bb_getUTXOs"
                        ]
                      },
                      "id": {
                        "type": "integer",
                        "example": 1
                      },
                      "params": {
                        "type": "array",
                        "description": "Positional parameters",
                        "items": {
                          "description": "Parameter value (can be string, number, boolean, object, etc.)"
                        },
                        "example": [
                          "LYhttvnKawAv6RcHQ4eBkNtifuiEA99PFe"
                        ]
                      }
                    },
                    "required": [
                      "jsonrpc",
                      "method",
                      "id",
                      "params"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "jsonrpc": {
                        "type": "string",
                        "enum": [
                          "2.0"
                        ]
                      },
                      "method": {
                        "type": "string",
                        "enum": [
                          "ltc_bb_getXPUB"
                        ]
                      },
                      "id": {
                        "type": "integer",
                        "example": 1
                      },
                      "params": {
                        "type": "array",
                        "description": "Positional parameters",
                        "items": {
                          "description": "Parameter value (can be string, number, boolean, object, etc.)"
                        },
                        "example": [
                          "zpub6rZbS9uV9Me1fVpgpipu4oTLTq4LYZ6p3giikA2eTy73JUByf4fBWuTfJ5UiAE7aWTFwBDPcRGVdyaPBqHRRQHfCSY3fFAgDbws7iArMR5p",
                          {
                            "page": 1
                          }
                        ]
                      }
                    },
                    "required": [
                      "jsonrpc",
                      "method",
                      "id",
                      "params"
                    ]
                  }
                ],
                "discriminator": {
                  "propertyName": "method"
                }
              },
              "examples": {
                "ltc_bb_getTickers": {
                  "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. ",
                  "value": {
                    "jsonrpc": "2.0",
                    "method": "ltc_bb_getTickers",
                    "id": 1,
                    "params": [
                      {
                        "timestamp": 1574346615,
                        "currency": "USD"
                      }
                    ]
                  }
                },
                "ltc_bb_getBlock": {
                  "summary": "Returns the block data with transaction objects",
                  "value": {
                    "jsonrpc": "2.0",
                    "method": "ltc_bb_getBlock",
                    "id": 1,
                    "params": [
                      "2848849",
                      {
                        "page": 1
                      }
                    ]
                  }
                },
                "ltc_bb_getBlockHash": {
                  "summary": "Returns the hash of the block at the given height.",
                  "value": {
                    "jsonrpc": "2.0",
                    "method": "ltc_bb_getBlockHash",
                    "id": 1,
                    "params": [
                      "2848849"
                    ]
                  }
                },
                "ltc_bb_getTxSpecific": {
                  "summary": "Returns transaction data in the exact format as returned by backend. ",
                  "value": {
                    "jsonrpc": "2.0",
                    "method": "ltc_bb_getTxSpecific",
                    "id": 1,
                    "params": [
                      "a24f2a7b4e2c6189a8d72d7fc270a5cb930d86db715aa1573e242e277b7823b1"
                    ]
                  }
                },
                "ltc_bb_getTx": {
                  "summary": " Returns transaction object for the transaction hash.",
                  "value": {
                    "jsonrpc": "2.0",
                    "method": "ltc_bb_getTx",
                    "id": 1,
                    "params": [
                      "a24f2a7b4e2c6189a8d72d7fc270a5cb930d86db715aa1573e242e277b7823b1"
                    ]
                  }
                },
                "ltc_bb_getTickersList": {
                  "summary": "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": "ltc_bb_getTickersList",
                    "id": 1,
                    "params": [
                      {
                        "timestamp": 1574346615
                      }
                    ]
                  }
                },
                "ltc_bb_getAddress": {
                  "summary": "Returns balances and transactions of an address. The returned transactions are sorted by block height, newest blocks first.",
                  "value": {
                    "jsonrpc": "2.0",
                    "method": "ltc_bb_getAddress",
                    "id": 1,
                    "params": [
                      "LYhttvnKawAv6RcHQ4eBkNtifuiEA99PFe",
                      {
                        "page": 1
                      }
                    ]
                  }
                },
                "ltc_bb_getBalanceHistory": {
                  "summary": "Returns a balance history for the specified address.",
                  "value": {
                    "jsonrpc": "2.0",
                    "method": "ltc_bb_getBalanceHistory",
                    "id": 1,
                    "params": [
                      "LYhttvnKawAv6RcHQ4eBkNtifuiEA99PFe",
                      {
                        "from": "1683684000",
                        "to": "1715035409",
                        "fiatcurrency": "usd",
                        "groupBy": 3600
                      }
                    ]
                  }
                },
                "ltc_bb_getUTXOs": {
                  "summary": "Get all of the unspent transaction outputs for a given Litecoin address or xpub.",
                  "value": {
                    "jsonrpc": "2.0",
                    "method": "ltc_bb_getUTXOs",
                    "id": 1,
                    "params": [
                      "LYhttvnKawAv6RcHQ4eBkNtifuiEA99PFe"
                    ]
                  }
                },
                "ltc_bb_getXPUB": {
                  "summary": "Get balances and transactions of an xpub or output descriptor",
                  "value": {
                    "jsonrpc": "2.0",
                    "method": "ltc_bb_getXPUB",
                    "id": 1,
                    "params": [
                      "zpub6rZbS9uV9Me1fVpgpipu4oTLTq4LYZ6p3giikA2eTy73JUByf4fBWuTfJ5UiAE7aWTFwBDPcRGVdyaPBqHRRQHfCSY3fFAgDbws7iArMR5p",
                      {
                        "page": 1
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "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/litecoin/ltc_bb_gettickers",
          "description": "Documentation: ltc_bb_getTickers: https://www.quicknode.com/docs/litecoin/ltc_bb_gettickers, ltc_bb_getBlock: https://www.quicknode.com/docs/litecoin/ltc_bb_getblock, ltc_bb_getBlockHash: https://www.quicknode.com/docs/litecoin/ltc_bb_getblockhash, ltc_bb_getTxSpecific: https://www.quicknode.com/docs/litecoin/ltc_bb_gettxspecific, ltc_bb_getTx: https://www.quicknode.com/docs/litecoin/ltc_bb_gettx, ltc_bb_getTickersList: https://www.quicknode.com/docs/litecoin/ltc_bb_gettickerslist, ltc_bb_getAddress: https://www.quicknode.com/docs/litecoin/ltc_bb_getaddress, ltc_bb_getBalanceHistory: https://www.quicknode.com/docs/litecoin/ltc_bb_getbalancehistory, ltc_bb_getUTXOs: https://www.quicknode.com/docs/litecoin/ltc_bb_getutxos, ltc_bb_getXPUB: https://www.quicknode.com/docs/litecoin/ltc_bb_getxpub"
        },
        "tags": [
          "JSON-RPC"
        ]
      }
    }
  },
  "externalDocs": {
    "description": "Support Documentation",
    "url": "https://bitcoinledger.com/support"
  }
}