[{"data":1,"prerenderedAt":597},["ShallowReactive",2],{"navigation_docs":3,"-providers-blockcypher":162,"-providers-blockcypher-surround":594},[4,56],{"title":5,"path":6,"stem":7,"children":8,"icon":55},"Guide","\u002Fguide","1.guide\u002F01.index",[9,11,15,19,23,27,31,35,39,43,47,51],{"title":10,"path":6,"stem":7},"Getting Started",{"title":12,"path":13,"stem":14},"CLI","\u002Fguide\u002Fcli","1.guide\u002F02.cli",{"title":16,"path":17,"stem":18},"Provider selection","\u002Fguide\u002Fselection","1.guide\u002F03.selection",{"title":20,"path":21,"stem":22},"Balances","\u002Fguide\u002Fbalances","1.guide\u002F04.balances",{"title":24,"path":25,"stem":26},"Transactions","\u002Fguide\u002Ftransactions","1.guide\u002F05.transactions",{"title":28,"path":29,"stem":30},"Tokens","\u002Fguide\u002Ftokens","1.guide\u002F06.tokens",{"title":32,"path":33,"stem":34},"Contracts","\u002Fguide\u002Fcontracts","1.guide\u002F07.contracts",{"title":36,"path":37,"stem":38},"Gas and blocks","\u002Fguide\u002Fgas-and-blocks","1.guide\u002F08.gas-and-blocks",{"title":40,"path":41,"stem":42},"Errors","\u002Fguide\u002Ferrors","1.guide\u002F09.errors",{"title":44,"path":45,"stem":46},"Agents","\u002Fguide\u002Fagents","1.guide\u002F10.agents",{"title":48,"path":49,"stem":50},"Custom providers","\u002Fguide\u002Fcustom","1.guide\u002F11.custom",{"title":52,"path":53,"stem":54},"Explorer","\u002Fguide\u002Fexplorer","1.guide\u002F12.explorer","i-lucide-book-open",{"title":57,"icon":58,"path":59,"stem":60,"children":61},"Providers","i-lucide-library","\u002Fproviders","2.providers",[62,65,70,74,78,82,86,90,94,98,102,106,110,114,118,122,126,130,134,138,142,146,150,154,158],{"title":63,"path":59,"stem":64},"Overview","2.providers\u002F0.index",{"title":66,"path":67,"stem":68,"lead":69},"Chains","\u002Fproviders\u002Fchains","2.providers\u002F0.chains","Matrix",{"title":71,"path":72,"stem":73},"Etherscan","\u002Fproviders\u002Fetherscan","2.providers\u002F01.etherscan",{"title":75,"path":76,"stem":77},"Blockscout","\u002Fproviders\u002Fblockscout","2.providers\u002F02.blockscout",{"title":79,"path":80,"stem":81},"Blockchair","\u002Fproviders\u002Fblockchair","2.providers\u002F03.blockchair",{"title":83,"path":84,"stem":85},"Mempool","\u002Fproviders\u002Fmempool","2.providers\u002F04.mempool",{"title":87,"path":88,"stem":89},"Blockstream","\u002Fproviders\u002Fblockstream","2.providers\u002F05.blockstream",{"title":91,"path":92,"stem":93},"Solscan","\u002Fproviders\u002Fsolscan","2.providers\u002F06.solscan",{"title":95,"path":96,"stem":97},"Helius","\u002Fproviders\u002Fhelius","2.providers\u002F07.helius",{"title":99,"path":100,"stem":101},"TONAPI","\u002Fproviders\u002Fton","2.providers\u002F08.ton",{"title":103,"path":104,"stem":105},"TRONSCAN","\u002Fproviders\u002Ftronscan","2.providers\u002F09.tronscan",{"title":107,"path":108,"stem":109},"Aptos Explorer","\u002Fproviders\u002Faptos","2.providers\u002F10.aptos",{"title":111,"path":112,"stem":113},"Blockberry","\u002Fproviders\u002Fblockberry","2.providers\u002F11.blockberry",{"title":115,"path":116,"stem":117},"Koios","\u002Fproviders\u002Fkoios","2.providers\u002F12.koios",{"title":119,"path":120,"stem":121},"arweave.net","\u002Fproviders\u002Farweave","2.providers\u002F13.arweave",{"title":123,"path":124,"stem":125},"Turbo","\u002Fproviders\u002Fturbo","2.providers\u002F14.turbo",{"title":127,"path":128,"stem":129},"ar.io","\u002Fproviders\u002Fario","2.providers\u002F15.ario",{"title":131,"path":132,"stem":133},"dcrdata","\u002Fproviders\u002Fdcrdata","2.providers\u002F16.dcrdata",{"title":135,"path":136,"stem":137},"Horizon","\u002Fproviders\u002Fhorizon","2.providers\u002F17.horizon",{"title":139,"path":140,"stem":141},"WhatsOnChain","\u002Fproviders\u002Fwhatsonchain","2.providers\u002F18.whatsonchain",{"title":143,"path":144,"stem":145},"Blockbook","\u002Fproviders\u002Fblockbook","2.providers\u002F19.blockbook",{"title":147,"path":148,"stem":149},"Haskoin","\u002Fproviders\u002Fhaskoin","2.providers\u002F20.haskoin",{"title":151,"path":152,"stem":153},"eCash Explorer","\u002Fproviders\u002Fecash","2.providers\u002F21.ecash",{"title":155,"path":156,"stem":157},"XRPSCAN","\u002Fproviders\u002Fxrpscan","2.providers\u002F22.xrpscan",{"title":159,"path":160,"stem":161},"BlockCypher","\u002Fproviders\u002Fblockcypher","2.providers\u002F23.blockcypher",{"id":163,"title":159,"body":164,"description":587,"extension":588,"links":589,"meta":590,"navigation":214,"path":160,"seo":592,"stem":161,"__hash__":593},"docs\u002F2.providers\u002F23.blockcypher.md",{"type":165,"value":166,"toc":581},"minimark",[167,171,176,291,295,298,313,317,387,394,398,568,572,577],[168,169],"provider-facts",{"provider":170},"blockcypher",[172,173,175],"h2",{"id":174},"address-it","Address it",[177,178,183],"pre",{"className":179,"code":180,"language":181,"meta":182,"style":182},"language-ts shiki shiki-themes explorers explorers explorers","import { BlockCypher } from \"@agntn\u002Fexplorers\u002Fproviders\u002Fblockcypher\";\n\nconst cypher = new BlockCypher(); \u002F\u002F or create(\"blockcypher\")\nawait cypher.getBalance(\"LPo6JkP8usUMayqvVHQWdCZSDPTH3fhYrv\", \"litecoin\");\nawait cypher.getUtxos(\"DR7EKP5k7x29XWPwSPFtyJNVzuBRHhqcZh\", \"dogecoin\");\n","ts","",[184,185,186,209,216,242,269],"code",{"__ignoreMap":182},[187,188,191,195,199,202,206],"span",{"class":189,"line":190},"line",1,[187,192,194],{"class":193},"skH_V","import",[187,196,198],{"class":197},"s38Sx"," { BlockCypher } ",[187,200,201],{"class":193},"from",[187,203,205],{"class":204},"shU9J"," \"@agntn\u002Fexplorers\u002Fproviders\u002Fblockcypher\"",[187,207,208],{"class":197},";\n",[187,210,212],{"class":189,"line":211},2,[187,213,215],{"emptyLinePlaceholder":214},true,"\n",[187,217,219,222,225,228,231,235,238],{"class":189,"line":218},3,[187,220,221],{"class":193},"const",[187,223,224],{"class":197}," cypher ",[187,226,227],{"class":193},"=",[187,229,230],{"class":193}," new",[187,232,234],{"class":233},"sK71F"," BlockCypher",[187,236,237],{"class":197},"(); ",[187,239,241],{"class":240},"scIB-","\u002F\u002F or create(\"blockcypher\")\n",[187,243,245,248,251,254,257,260,263,266],{"class":189,"line":244},4,[187,246,247],{"class":193},"await",[187,249,250],{"class":197}," cypher.",[187,252,253],{"class":233},"getBalance",[187,255,256],{"class":197},"(",[187,258,259],{"class":204},"\"LPo6JkP8usUMayqvVHQWdCZSDPTH3fhYrv\"",[187,261,262],{"class":197},", ",[187,264,265],{"class":204},"\"litecoin\"",[187,267,268],{"class":197},");\n",[187,270,272,274,276,279,281,284,286,289],{"class":189,"line":271},5,[187,273,247],{"class":193},[187,275,250],{"class":197},[187,277,278],{"class":233},"getUtxos",[187,280,256],{"class":197},[187,282,283],{"class":204},"\"DR7EKP5k7x29XWPwSPFtyJNVzuBRHhqcZh\"",[187,285,262],{"class":197},[187,287,288],{"class":204},"\"dogecoin\"",[187,290,268],{"class":197},[292,293,294],"p",{},"BlockCypher reads Bitcoin, Litecoin and Dogecoin without a key, and the provider never sends one. The catch is the budget. A hundred requests an hour, where other explorers hand out thousands a day. So it's the second opinion, not the crawler.",[292,296,297],{},"Litecoin starts on Mempool at litecoinspace.org. When that read times out, gets a 5xx or hits a limit, it moves here. Blockchair comes after it, and keyless Blockchair likes to block the IP asking. Two doors that can shut on the same day. This is the third.",[292,299,300,301,304,305,308,309,312],{},"Dogecoin starts here and falls back to Blockchair. With ",[184,302,303],{},"BLOCKCHAIR_API_KEY"," set, the order flips. Bitcoin doesn't change at all, Mempool first and Blockstream after. BlockCypher answers Bitcoin only when you name it, with ",[184,306,307],{},"-p blockcypher"," or ",[184,310,311],{},"create(\"blockcypher\")",".",[172,314,316],{"id":315},"what-it-reads","What it reads",[318,319,320,333],"table",{},[321,322,323],"thead",{},[324,325,326,330],"tr",{},[327,328,329],"th",{},"Operation",[327,331,332],{},"Route",[334,335,336,347,357,367,377],"tbody",{},[324,337,338,342],{},[339,340,341],"td",{},"balance",[339,343,344],{},[184,345,346],{},"\u002Faddrs\u002F{address}\u002Fbalance",[324,348,349,352],{},[339,350,351],{},"history",[339,353,354],{},[184,355,356],{},"\u002Faddrs\u002F{address}\u002Ffull",[324,358,359,362],{},[339,360,361],{},"one transaction",[339,363,364],{},[184,365,366],{},"\u002Ftxs\u002F{hash}",[324,368,369,372],{},[339,370,371],{},"unspent outputs",[339,373,374],{},[184,375,376],{},"\u002Faddrs\u002F{address}?unspentOnly=true",[324,378,379,382],{},[339,380,381],{},"block",[339,383,384],{},[184,385,386],{},"\u002Fblocks\u002F{height}",[292,388,389,390,393],{},"No gas, outspends, public keys, tokens or contracts. BlockCypher quotes fees per kilobyte, with nothing to turn them into sat\u002FvB. A spent output names the transaction that spent it, but not the input or the block. Half an answer, so ",[184,391,392],{},"getOutspends"," stays out. Public keys aren't read yet.",[172,395,397],{"id":396},"gotchas","Gotchas",[399,400,401,408,431,444,466,480,489,495,509,530,540,550,561],"ul",{},[402,403,404,405,312],"li",{},"The keyless budget is 3 requests per second and 100 per hour. It resets at the top of the hour UTC. Exceed it and HTTP 429 becomes a ",[184,406,407],{},"RateLimitError",[402,409,410,413,414,417,418,262,421,308,424,427,428,312],{},[184,411,412],{},"baseUrl"," defaults to ",[184,415,416],{},"https:\u002F\u002Fapi.blockcypher.com\u002Fv1",". The provider adds ",[184,419,420],{},"btc\u002Fmain",[184,422,423],{},"ltc\u002Fmain",[184,425,426],{},"doge\u002Fmain",". Without a chain or an address that identifies one, it reads Bitcoin. Other chains throw ",[184,429,430],{},"UnsupportedChainError",[402,432,433,436,437,440,441,312],{},[184,434,435],{},"@agntn\u002Fchains"," checks addresses before a request. A typo costs none of that hourly budget. Uppercase bech32 goes out lowercase. Litecoin ",[184,438,439],{},"3..."," addresses are refused: Litecoin writes P2SH as ",[184,442,443],{},"M...",[402,445,446,447,450,451,454,455,458,459,454,462,465],{},"History is newest first. ",[184,448,449],{},"sort: \"asc\""," throws before a request. ",[184,452,453],{},"startBlock"," and ",[184,456,457],{},"endBlock"," are inclusive. BlockCypher's bounds are exclusive, so the provider sends ",[184,460,461],{},"after = startBlock - 1",[184,463,464],{},"before = endBlock + 1",". Negative or reversed ranges throw.",[402,467,468,471,472,475,476,479],{},[184,469,470],{},"limit"," goes up to 50, and ",[184,473,474],{},"page * limit"," up to 200. A ",[184,477,478],{},"\u002Ffull"," page counts the address's inputs and outputs, not transactions. One sweep with 217 inputs fills a page on its own. Asked for three and got one? That's why, and the page may not even mention there's more.",[402,481,482,483,485,486,312],{},"The provider walks below the previous page's lowest block. It makes at most four requests per call. A busy address can return fewer rows than ",[184,484,470],{},". A page those requests can't reach throws ",[184,487,488],{},"ExplorerError",[402,490,491,492,494],{},"Transaction reads request up to 1000 inputs and outputs. BlockCypher otherwise stops at 20. A bigger one throws an ",[184,493,488],{}," with its hash, because half a list counts the wrong amount.",[402,496,497,498,501,502,505,506,508],{},"From an address, a transaction is a send when an input spent from it. ",[184,499,500],{},"value"," is what went to everyone else. ",[184,503,504],{},"to"," is the first of them. Otherwise, it's a receive and ",[184,507,500],{}," is what landed there. A transaction read without an address takes the first paying output.",[402,510,511,513,514,517,518,521,522,525,526,529],{},[184,512,341],{}," is confirmed. ",[184,515,516],{},"unconfirmed"," is the signed mempool change, negative while a spend waits. ",[184,519,520],{},"funded"," is total received and ",[184,523,524],{},"spent"," total sent. The endpoint sends no height, so ",[184,527,528],{},"blockNumber"," is null.",[402,531,532,533,536,537,312],{},"BlockCypher puts mempool transactions at height -1. They read as ",[184,534,535],{},"pending"," at block 0, without a timestamp. A mempool one that lost a double spend reads as ",[184,538,539],{},"failed",[402,541,542,543,545,546,549],{},"Unspent outputs come in pages of 2000, with three pages at most. More throws instead of silently cutting the list short. Mempool outputs come first and have null ",[184,544,528],{},". ",[184,547,548],{},"blockHash"," is always null.",[402,551,552,553,556,557,560],{},"Blocks include version, merkle root, bits, nonce and size. BlockCypher sends no difficulty, median time or weight. ",[184,554,555],{},"miner"," is empty. A block past the tip throws ",[184,558,559],{},"NotFoundError",". A missing transaction does too, naming the hash.",[402,562,563,564,567],{},"OP_RETURN pushes go into ",[184,565,566],{},"opReturn"," from output scripts. Ordinals inscriptions come from input witnesses.",[172,569,571],{"id":570},"where-it-lives","Where it lives",[292,573,574,312],{},[184,575,576],{},"src\u002Fproviders\u002Fblockcypher.ts",[578,579,580],"style",{},"html pre.shiki code .skH_V, html code.shiki .skH_V{--shiki-light:var(--shiki-token-keyword);--shiki-default:var(--shiki-token-keyword);--shiki-dark:var(--shiki-token-keyword)}html pre.shiki code .s38Sx, html code.shiki .s38Sx{--shiki-light:var(--ui-text-highlighted);--shiki-default:var(--ui-text-highlighted);--shiki-dark:var(--ui-text-highlighted)}html pre.shiki code .shU9J, html code.shiki .shU9J{--shiki-light:var(--shiki-token-string);--shiki-default:var(--shiki-token-string);--shiki-dark:var(--shiki-token-string)}html pre.shiki code .sK71F, html code.shiki .sK71F{--shiki-light:var(--shiki-token-function);--shiki-default:var(--shiki-token-function);--shiki-dark:var(--shiki-token-function)}html pre.shiki code .scIB-, html code.shiki .scIB-{--shiki-light:var(--shiki-token-comment);--shiki-default:var(--shiki-token-comment);--shiki-dark:var(--shiki-token-comment)}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":182,"searchDepth":211,"depth":211,"links":582},[583,584,585,586],{"id":174,"depth":211,"text":175},{"id":315,"depth":211,"text":316},{"id":396,"depth":211,"text":397},{"id":570,"depth":211,"text":571},"Bitcoin, Litecoin and Dogecoin through BlockCypher. No key, a hundred requests an hour, and the Litecoin fallback when litecoinspace.org stalls.","md",null,{"icon":591},"i-lucide-boxes",{"title":159,"description":587},"4Nu3x9qefxzopWTo3B7hQsl0sSU2PUSwE9tF1A2DWXU",[595,589],{"title":155,"path":156,"stem":157,"description":596,"children":-1},"The XRP Ledger through XRPSCAN. Balances in drops, history, trust line tokens and ledgers as blocks. No key, ten thousand requests a day.",1795182970118]