-
-
Notifications
You must be signed in to change notification settings - Fork 741
Expand file tree
/
Copy pathopenapi.yaml
More file actions
3104 lines (2925 loc) · 89.2 KB
/
openapi.yaml
File metadata and controls
3104 lines (2925 loc) · 89.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.1.0
info:
title: Blockbook API
version: "2.0.0-draft"
summary: REST and WebSocket API for indexed blockchain data served by Blockbook.
license:
name: GNU Affero General Public License v3.0
identifier: AGPL-3.0-only
description: |-
Canonical description of the Blockbook public API, based on
blockbook-api.ts, api/xpub.go, and the api/server handlers.
API V2 is the current Blockbook API. It is available over REST and over
WebSocket using the WsRequest/WsResponse JSON envelope documented below.
The normalized API shapes are shared by all supported coins, while
blockchain-specific payloads remain extensible where Blockbook returns raw
backend JSON.
Amounts are strings in the lowest denomination of the chain, such as
satoshis or wei, without a decimal point. Empty fields are omitted: empty
means null, an empty string, numeric zero, a null object, or an empty array.
Since the same API serves many different chains, this can sometimes hide
otherwise meaningful zero values such as transaction version 0.
Legacy API V1 is a Bitcore Insight-compatible subset for Bitcoin-type
coins. It is provided as-is for compatibility and is not being extended.
Load estimates are qualitative hints for client authors. Low means a small
constant-time lookup or cached metadata. Medium means bounded indexed work
or response size. High means potentially large scans, large payloads,
broadcast/backend work, or external RPC enrichment. Actual cost also
depends on chain speed, backend health, cache warmth, mempool size,
pageSize, gap, and the number of addresses, transactions, tokens, filters,
or timestamps involved.
servers:
- url: /
description: Current Blockbook instance
tags:
- name: Status
description: Blockbook and backend status.
- name: Blocks
description: Block, block hash, raw block, and filter endpoints.
- name: Transactions
description: Transaction lookup and broadcast endpoints.
- name: Accounts
description: Address, XPUB, UTXO, and balance history endpoints.
- name: Contracts
description: Smart contract and token metadata endpoints.
- name: Fees
description: Fee estimation and fee statistics endpoints.
- name: Fiat
description: Fiat and token rate endpoints.
- name: WebSocket
description: WebSocket upgrade endpoint and message schemas.
- name: Legacy
description: Bitcore Insight-compatible V1 routes for Bitcoin-type coins.
security: []
paths:
/api/status:
get:
tags: [Status]
operationId: getStatus
summary: Get Blockbook and backend status.
description: |-
Returns Blockbook sync state and connected backend metadata.
Load estimate: Low; constant-size status metadata.
responses:
"200":
description: Current Blockbook and backend status.
content:
application/json:
schema:
$ref: "#/components/schemas/SystemInfo"
examples:
status:
$ref: "#/components/examples/Status"
default:
$ref: "#/components/responses/Error"
/api/:
get:
tags: [Status]
operationId: getApiIndexStatus
summary: Get status from the API index handler.
description: |-
Alias served by the same handler as /api/status on full public
interfaces.
Load estimate: Low; constant-size status metadata.
responses:
"200":
description: Current Blockbook and backend status.
content:
application/json:
schema:
$ref: "#/components/schemas/SystemInfo"
examples:
status:
$ref: "#/components/examples/Status"
default:
$ref: "#/components/responses/Error"
/api/v2/block-index/{height}:
get:
tags: [Blocks]
operationId: getBlockHashByHeight
summary: Get a block hash by height.
description: |-
Returns the block hash for a height on the backend main chain.
Blockbook follows the backend main chain; after a rollback or reorg,
height lookups resolve to the current main-chain block.
Load estimate: Low; indexed height-to-hash lookup.
parameters:
- name: height
in: path
required: true
description: Block height on the backend main chain.
schema:
type: integer
minimum: 0
responses:
"200":
description: Block hash at the requested height.
content:
application/json:
schema:
$ref: "#/components/schemas/BlockHashResponse"
examples:
blockHash:
$ref: "#/components/examples/BlockHash"
default:
$ref: "#/components/responses/Error"
/api/v2/block/{blockId}:
get:
tags: [Blocks]
operationId: getBlock
summary: Get a block by height or hash.
description: |-
Returns block information with paged transactions. When full
transaction details are unavailable, the response can contain only
transaction ids.
Blockbook follows the backend main chain. Height lookups always return
the current main-chain block. Hash lookups can return a block from
another fork only if the backend still keeps it.
Load estimate: Medium; grows mainly with block transaction count and
requested page.
parameters:
- name: blockId
in: path
required: true
description: Block height or block hash.
schema:
type: string
- $ref: "#/components/parameters/Page"
responses:
"200":
description: Block details.
content:
application/json:
schema:
$ref: "#/components/schemas/Block"
examples:
block:
$ref: "#/components/examples/Block"
default:
$ref: "#/components/responses/Error"
/api/v2/rawblock/{blockId}:
get:
tags: [Blocks]
operationId: getRawBlock
summary: Get raw block hex.
description: |-
Returns raw serialized block data.
Load estimate: High for large blocks; payload size grows with the raw
block size.
parameters:
- name: blockId
in: path
required: true
description: Block height or block hash.
schema:
type: string
responses:
"200":
description: Raw block data.
content:
application/json:
schema:
$ref: "#/components/schemas/BlockRaw"
examples:
rawBlock:
$ref: "#/components/examples/RawBlock"
default:
$ref: "#/components/responses/Error"
/api/v2/block-filters/:
get:
tags: [Blocks]
operationId: getBlockFilters
summary: Get compact block filters.
description: |-
Returns compact block filters for the script type configured on this
Blockbook instance. Provide either lastN or a from/to range. When to is
omitted for a range, the current best height is used.
Load estimate: High for wide ranges; work and payload grow linearly
with the number of requested filters.
parameters:
- name: scriptType
in: query
required: true
description: Script type configured for block filters on this instance, for example taproot.
schema:
type: string
- name: lastN
in: query
description: Return filters for the last N blocks.
schema:
type: integer
minimum: 1
- name: from
in: query
description: First block height in the requested range.
schema:
type: integer
minimum: 0
- name: to
in: query
description: Last block height in the requested range. Defaults to the current best height when omitted.
schema:
type: integer
minimum: 0
responses:
"200":
description: Block filters keyed by block height.
content:
application/json:
schema:
$ref: "#/components/schemas/BlockFilters"
examples:
blockFilters:
$ref: "#/components/examples/BlockFilters"
default:
$ref: "#/components/responses/Error"
/api/v2/tx/{txid}:
get:
tags: [Transactions]
operationId: getTransaction
summary: Get a normalized transaction.
description: |-
Returns normalized transaction data with the same general structure for
all supported coins. Coin-specific fields that do not fit the common
shape are omitted here; use getTransactionSpecific for backend-native
JSON.
Bitcoin-like confirmed transactions include blockHash, confirmations,
blockTime, size/vsize, value/valueIn, fees, and hex. Unconfirmed
transactions can include confirmationETABlocks and
confirmationETASeconds.
Ethereum-like transactions have one vin and one vout, tokenTransfers,
ethereumSpecific execution data, and optional addressAliases. Parsed
input data is included when the 4byte signature can be resolved.
For mined transactions, blockTime is the block timestamp. For mempool
transactions, blockTime is when this Blockbook instance first learned
about the transaction and can differ between instances.
Load estimate: Medium; grows with inputs, outputs, token transfers,
address aliases, and spending=true extra lookups.
parameters:
- name: txid
in: path
required: true
description: Transaction id/hash.
schema:
type: string
- name: spending
in: query
description: Include spending transaction metadata for UTXO outputs when available.
schema:
type: boolean
responses:
"200":
description: Normalized transaction.
content:
application/json:
schema:
$ref: "#/components/schemas/Tx"
examples:
bitcoinConfirmed:
$ref: "#/components/examples/BitcoinTransactionConfirmed"
bitcoinUnconfirmed:
$ref: "#/components/examples/BitcoinTransactionUnconfirmed"
ethereum:
$ref: "#/components/examples/EthereumTransaction"
default:
$ref: "#/components/responses/Error"
/api/v2/tx-specific/{txid}:
get:
tags: [Transactions]
operationId: getTransactionSpecific
summary: Get blockchain-specific transaction JSON.
description: |-
Returns transaction data in the exact backend-specific format. Use this
when a chain exposes fields that are intentionally absent from the
normalized Tx schema.
Load estimate: Medium; payload size depends on chain-specific fields
and transaction complexity.
parameters:
- name: txid
in: path
required: true
description: Transaction id/hash.
schema:
type: string
responses:
"200":
description: Chain-specific transaction payload.
content:
application/json:
schema:
description: Arbitrary chain-specific transaction payload.
examples:
transactionSpecific:
$ref: "#/components/examples/TransactionSpecific"
default:
$ref: "#/components/responses/Error"
/api/rawtx/{txid}:
get:
tags: [Transactions]
operationId: getRawTransaction
summary: Get raw transaction hex.
description: |-
Unversioned public endpoint exposed by Blockbook for raw transaction
data.
Load estimate: Medium; payload size grows with raw transaction size.
parameters:
- name: txid
in: path
required: true
description: Transaction id/hash.
schema:
type: string
responses:
"200":
description: Raw transaction hex as a JSON string.
content:
application/json:
schema:
type: string
examples:
rawTransaction:
$ref: "#/components/examples/RawTransaction"
default:
$ref: "#/components/responses/Error"
/api/v2/sendtx/{hex}:
get:
tags: [Transactions]
operationId: sendTransactionByGet
summary: Broadcast a raw transaction using the path.
description: |-
Broadcasts hex-encoded raw transaction data. Prefer POST for large
payloads.
Load estimate: High; validates and forwards to the backend, with cost
growing with transaction size and backend mempool policy checks.
parameters:
- name: hex
in: path
required: true
description: Raw transaction.
schema:
type: string
pattern: "^[0-9a-fA-F]+$"
responses:
"200":
description: Broadcast result.
content:
application/json:
schema:
$ref: "#/components/schemas/SendTransactionResponse"
examples:
broadcast:
$ref: "#/components/examples/SendTransaction"
default:
$ref: "#/components/responses/Error"
/api/v2/sendtx/:
post:
tags: [Transactions]
operationId: sendTransactionByPost
summary: Broadcast a raw transaction using the request body.
description: |-
Broadcasts hex-encoded raw transaction data from the request body. The
trailing slash is mandatory in the Blockbook handler. POST bodies are
limited to 8 MiB.
Load estimate: High; validates and forwards to the backend, with cost
growing with transaction size and backend mempool policy checks.
requestBody:
required: true
content:
text/plain:
schema:
type: string
pattern: "^[0-9a-fA-F]+$"
responses:
"200":
description: Broadcast result.
content:
application/json:
schema:
$ref: "#/components/schemas/SendTransactionResponse"
examples:
broadcast:
$ref: "#/components/examples/SendTransaction"
default:
$ref: "#/components/responses/Error"
/api/v2/address/{address}:
get:
tags: [Accounts]
operationId: getAddress
summary: Get address/account details.
description: |-
Returns balances and transactions of an address. Transactions are
sorted by block height with newest blocks first. Response size is
controlled by the details parameter.
At details=basic, mempool transactions are not aggregated:
unconfirmedBalance, unconfirmedSending, and unconfirmedReceiving are
omitted, and unconfirmedTxs reports the raw mempool index size for the
address.
Load estimate: Variable; basic is low, token/tokenBalances and
txids/txslight are medium, and txs can be high as it grows with
pageSize, transactions, token rows, filters, and protocol enrichment.
parameters:
- name: address
in: path
required: true
description: Chain address.
schema:
type: string
- $ref: "#/components/parameters/Page"
- $ref: "#/components/parameters/PageSize"
- $ref: "#/components/parameters/FromHeight"
- $ref: "#/components/parameters/ToHeight"
- $ref: "#/components/parameters/Details"
- $ref: "#/components/parameters/Filter"
- $ref: "#/components/parameters/ContractFilter"
- $ref: "#/components/parameters/Protocols"
- $ref: "#/components/parameters/SecondaryCurrency"
responses:
"200":
description: Address/account details.
content:
application/json:
schema:
$ref: "#/components/schemas/Address"
examples:
bitcoinTxids:
$ref: "#/components/examples/BitcoinAddressTxids"
ethereumTokenBalances:
$ref: "#/components/examples/EthereumAddressTokenBalances"
default:
$ref: "#/components/responses/Error"
/api/v2/xpub/{xpub}:
get:
tags: [Accounts]
operationId: getXpub
summary: Get XPUB or descriptor account details.
description: |-
Returns balances and transactions of an XPUB or output descriptor for
Bitcoin-type coins. Transactions are sorted by block height with newest
blocks first. URL-encode descriptors before placing them after /xpub/.
Blockbook expects XPUBs at level 3 of the derivation path, for example
m/purpose'/coin_type'/account'. It derives the remaining
change/address_index path. The BIP scheme is inferred from the XPUB
prefix; unknown prefixes default to BIP44.
Supported descriptors are pkh(xpub), sh(wpkh(xpub)), wpkh(xpub), and
tr(xpub). Descriptors can include origin paths and change selectors
such as <0;1> or {0,1}; when change is omitted, Blockbook defaults to
<0;1>.
Note: usedTokens always reports the total number of used addresses for
the XPUB, regardless of the tokens query filter.
Load estimate: High for broad accounts; grows with derived addresses,
gap, used address count, pageSize, transaction history, token rows, and
protocol enrichment.
parameters:
- name: xpub
in: path
required: true
allowReserved: true
description: XPUB or supported descriptor.
schema:
type: string
- $ref: "#/components/parameters/Page"
- $ref: "#/components/parameters/PageSize"
- $ref: "#/components/parameters/FromHeight"
- $ref: "#/components/parameters/ToHeight"
- $ref: "#/components/parameters/Details"
- $ref: "#/components/parameters/Tokens"
- $ref: "#/components/parameters/Filter"
- $ref: "#/components/parameters/ContractFilter"
- $ref: "#/components/parameters/Protocols"
- $ref: "#/components/parameters/SecondaryCurrency"
- $ref: "#/components/parameters/Gap"
responses:
"200":
description: XPUB/descriptor account details.
content:
application/json:
schema:
$ref: "#/components/schemas/Address"
examples:
xpub:
$ref: "#/components/examples/XpubAddress"
default:
$ref: "#/components/responses/Error"
/api/v2/utxo/{descriptor}:
get:
tags: [Accounts]
operationId: getUtxo
summary: Get UTXOs for an address, XPUB, or descriptor.
description: |-
Returns unspent outputs for an address, XPUB, or descriptor on
Bitcoin-type coins. By default both confirmed and unconfirmed UTXOs are
returned; confirmed=true filters out unconfirmed entries. Results are
sorted by block height with newest entries first.
Unconfirmed UTXOs omit height, have confirmations set to 0, and can
include lockTime. XPUB and descriptor UTXOs also include address and
derivation path when available. Coinbase UTXOs include coinbase=true
only up to the coinbase confirmation limit, currently 100 blocks.
Load estimate: Variable; address lookups are usually medium, while
XPUB/descriptor lookups grow with gap, derived addresses, and UTXO
count.
parameters:
- name: descriptor
in: path
required: true
allowReserved: true
description: Address, XPUB, or supported descriptor. URL-encode descriptors.
schema:
type: string
- name: confirmed
in: query
description: When true, return only confirmed UTXOs.
schema:
type: boolean
- $ref: "#/components/parameters/Gap"
responses:
"200":
description: UTXO list.
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Utxo"
examples:
utxos:
$ref: "#/components/examples/UtxoList"
default:
$ref: "#/components/responses/Error"
/api/v2/balancehistory/{descriptor}:
get:
tags: [Accounts]
operationId: getBalanceHistory
summary: Get account balance history.
description: |-
Returns balance history points for an address, XPUB, or descriptor.
from and to are Unix timestamps. groupBy is an aggregation interval in
seconds and defaults to 3600. When fiatcurrency is omitted, rates can
contain all available currencies. sentToSelf is the amount sent from an
address to itself or within addresses of the same XPUB.
Load estimate: High; grows with account transaction history, time span,
grouping cardinality, fiat rate lookups, and XPUB/descriptor gap.
parameters:
- name: descriptor
in: path
required: true
allowReserved: true
description: Address, XPUB, or supported descriptor. URL-encode descriptors.
schema:
type: string
- name: from
in: query
description: Unix timestamp lower bound.
schema:
type: integer
format: int64
- name: to
in: query
description: Unix timestamp upper bound.
schema:
type: integer
format: int64
- name: fiatcurrency
in: query
description: Optional fiat currency code to include in rates.
schema:
type: string
example: usd
- name: groupBy
in: query
description: Aggregation interval in seconds. Defaults to 3600.
schema:
type: integer
minimum: 1
- $ref: "#/components/parameters/Gap"
responses:
"200":
description: Balance history points.
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/BalanceHistory"
examples:
allRates:
$ref: "#/components/examples/BalanceHistoryAllRates"
usd:
$ref: "#/components/examples/BalanceHistoryUsd"
grouped:
$ref: "#/components/examples/BalanceHistoryGrouped"
default:
$ref: "#/components/responses/Error"
/api/v2/contract/{contract}:
get:
tags: [Contracts]
operationId: getContractInfo
summary: Get contract metadata.
description: |-
Returns indexed token/contract metadata and optional current protocol
enrichments such as ERC4626.
blockHeight reflects the indexer's best block at request time.
ERC4626 fields under protocols.erc4626 are fetched through JSON-RPC
calls pinned to that exact blockHeight, so the ERC4626 values are a
consistent snapshot. If a vault is detected but the underlying asset
metadata cannot be resolved, protocols.erc4626 contains error and omits
asset; callers must not derive fiat rates or human-unit exchange rates
from such a partial response.
Load estimate: Medium; indexed metadata is cheap, but optional protocol
enrichment can add backend RPC calls and token metadata lookups.
parameters:
- name: contract
in: path
required: true
description: Smart contract address.
schema:
type: string
- name: currency
in: query
description: Secondary currency code for rates.
schema:
type: string
example: usd
- $ref: "#/components/parameters/Protocols"
responses:
"200":
description: Contract metadata.
content:
application/json:
schema:
$ref: "#/components/schemas/ContractInfoResult"
examples:
contract:
$ref: "#/components/examples/ContractInfo"
default:
$ref: "#/components/responses/Error"
/api/v2/estimatefee/{blocks}:
get:
tags: [Fees]
operationId: estimateFee
summary: Estimate a fee target.
description: |-
Returns backend fee estimation for the requested confirmation target.
Load estimate: Low; a small backend fee estimate lookup.
parameters:
- name: blocks
in: path
required: true
description: Confirmation target in blocks.
schema:
type: integer
minimum: 1
- name: conservative
in: query
description: Use conservative smart fee estimation where supported.
schema:
type: boolean
default: true
responses:
"200":
description: Decimal fee estimate in chain base currency.
content:
application/json:
schema:
$ref: "#/components/schemas/ResultStringResponse"
examples:
estimateFee:
$ref: "#/components/examples/EstimateFee"
default:
$ref: "#/components/responses/Error"
/api/v2/feestats/{blockId}:
get:
tags: [Fees]
operationId: getFeeStats
summary: Get fee statistics for a block.
description: |-
Returns fee statistics for transactions in one block.
Load estimate: Medium to high; grows with the number of transactions
in the requested block.
parameters:
- name: blockId
in: path
required: true
description: Block height or block hash.
schema:
type: string
responses:
"200":
description: Fee statistics.
content:
application/json:
schema:
$ref: "#/components/schemas/FeeStats"
examples:
feeStats:
$ref: "#/components/examples/FeeStats"
default:
$ref: "#/components/responses/Error"
/api/v2/tickers/:
get:
tags: [Fiat]
operationId: getFiatTicker
summary: Get current or historical fiat rates.
description: |-
Returns currency rates for the requested currency and date. If a rate
is unavailable for the exact timestamp, the closest available rate can
be returned. Responses include the actual rate timestamp. Without a
currency parameter, all available currencies can be returned. A rate of
-1 marks an unavailable or invalid currency for that timestamp.
Load estimate: Low to medium; specific currency lookups are cheap,
while omitted currency and token lookups increase response size.
parameters:
- name: currency
in: query
description: Optional currency code. When omitted, all available rates can be returned.
schema:
type: string
example: usd
- name: timestamp
in: query
description: Unix timestamp for historical rates.
schema:
type: integer
format: int64
- name: block
in: query
description: Block height or hash whose timestamp should be used for historical rates.
schema:
type: string
- name: token
in: query
description: Optional token symbol or contract/address key for token-specific rates.
schema:
type: string
responses:
"200":
description: Fiat rate ticker.
content:
application/json:
schema:
$ref: "#/components/schemas/FiatTicker"
examples:
allRates:
$ref: "#/components/examples/FiatTickerAll"
usd:
$ref: "#/components/examples/FiatTickerUsd"
unavailable:
$ref: "#/components/examples/FiatTickerUnavailable"
default:
$ref: "#/components/responses/Error"
/api/v2/multi-tickers/:
get:
tags: [Fiat]
operationId: getFiatTickersForTimestamps
summary: Get fiat rates for multiple timestamps.
description: |-
Returns fiat rate tickers for a comma-separated list of Unix
timestamps.
Load estimate: Medium; work and payload grow linearly with timestamp
count, plus token/currency selection.
parameters:
- name: timestamp
in: query
required: true
description: Comma-separated Unix timestamps.
schema:
type: string
pattern: "^[0-9]+(,[0-9]+)*$"
example: "1710000000,1720000000"
- name: currency
in: query
description: Optional currency code.
schema:
type: string
example: usd
- name: token
in: query
description: Optional token symbol or contract/address key.
schema:
type: string
responses:
"200":
description: Fiat rate tickers.
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/FiatTicker"
examples:
multiTickers:
$ref: "#/components/examples/MultiTickers"
default:
$ref: "#/components/responses/Error"
/api/v2/tickers-list/:
get:
tags: [Fiat]
operationId: getFiatTickersList
summary: Get currencies available for a timestamp.
description: |-
Returns available secondary currencies for a date together with the
actual rate timestamp.
Load estimate: Low to medium; token lookups and wide currency lists
increase response size.
parameters:
- name: timestamp
in: query
required: true
description: Unix timestamp for the requested currency list.
schema:
type: integer
format: int64
- name: token
in: query
description: Optional token symbol or contract/address key.
schema:
type: string
responses:
"200":
description: Available currencies.
content:
application/json:
schema:
$ref: "#/components/schemas/AvailableVsCurrencies"
examples:
tickersList:
$ref: "#/components/examples/TickersList"
default:
$ref: "#/components/responses/Error"
/api/v1/block-index/{height}:
get:
tags: [Legacy]
operationId: getLegacyBlockHashByHeight
summary: Legacy get block hash by height.
description: |-
Bitcore Insight-compatible V1 route for Bitcoin-type coins.
Load estimate: Low; indexed height-to-hash lookup.
parameters:
- name: height
in: path
required: true
description: Block height on the backend main chain.
schema:
type: integer
minimum: 0
responses:
"200":
description: Block hash at the requested height.
content:
application/json:
schema:
$ref: "#/components/schemas/BlockHashResponse"
examples:
blockHash:
$ref: "#/components/examples/BlockHash"
default:
$ref: "#/components/responses/Error"
/api/v1/tx/{txid}:
get:
tags: [Legacy]
operationId: getLegacyTransaction
summary: Legacy get transaction.
description: |-
Bitcore Insight-compatible V1 transaction shape for Bitcoin-type
coins.
Load estimate: Medium; grows with inputs, outputs, scripts, and raw
transaction size.
parameters:
- name: txid
in: path
required: true
description: Transaction id/hash.
schema:
type: string
responses:
"200":
description: Legacy transaction payload.
content:
application/json:
schema:
$ref: "#/components/schemas/LegacyObject"
default:
$ref: "#/components/responses/Error"
/api/v1/address/{address}:
get:
tags: [Legacy]
operationId: getLegacyAddress
summary: Legacy get address.
description: |-
Bitcore Insight-compatible V1 address shape for Bitcoin-type coins.
Load estimate: Variable; grows with address transaction count and
legacy response expansion.
parameters:
- name: address
in: path
required: true
description: Chain address.
schema:
type: string
responses:
"200":
description: Legacy address payload.
content:
application/json:
schema:
$ref: "#/components/schemas/LegacyObject"
default:
$ref: "#/components/responses/Error"
/api/v1/utxo/{address}:
get:
tags: [Legacy]
operationId: getLegacyUtxo
summary: Legacy get address UTXOs.
description: |-
Bitcore Insight-compatible V1 UTXO list for Bitcoin-type coins.
Load estimate: Medium; grows with the number of unspent outputs.
parameters:
- name: address