-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcutdown.yaml
4194 lines (4143 loc) · 179 KB
/
cutdown.yaml
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: Koios API
contact:
name: Koios Core Team
url: https://t.me/CardanoKoios
email: general@koios.rest
license:
name: Creative Commons Attribution 4.0 International
url: https://github.com/cardano-community/koios-artifacts/blob/main/LICENSE
version: v1.3.1
description: |
Koios is best described as a Decentralized and Elastic RESTful query layer for exploring data on Cardano blockchain to consume within applications/wallets/explorers/etc. This page not only provides an OpenAPI Spec for live implementation, but also ability to execute live demo from client browser against each endpoint with pre-filled examples.
# API Usage
The endpoints served by Koios can be browsed from the left side bar of this site. You will find that almost each endpoint has an example that you can `Try` and will help you get an example in shell using cURL. For public queries, you do not need to register yourself - you can simply use them as per the examples provided on individual endpoints. But in addition, the [PostgREST API](https://postgrest.org/en/stable/api.html) used underneath provides a handful of features that can be quite handy for you to improve your queries to directly grab very specific information pertinent to your calls, reducing data you download and process.
## Vertical Filtering
Instead of returning entire row, you can elect which rows you would like to fetch from the endpoint by using the `select` parameter with corresponding columns separated by commas. See example below (first is complete information for tip, while second command gives us 3 columns we are interested in):<br><br>
``` bash
curl "https://api.koios.rest/api/v1/tip"
# [{"hash":"4d44c8a453e677f933c3df42ebcf2fe45987c41268b9cfc9b42ae305e8c3d99a","epoch_no":317,"abs_slot":51700871,"epoch_slot":120071,"block_height":6806994,"block_time":1643267162}]
curl "https://api.koios.rest/api/v1/blocks?select=epoch_no,epoch_slot,block_height"
# [{"epoch_no":317,"epoch_slot":120071,"block_height":6806994}]
```
## Horizontal Filtering
You can filter the returned output based on specific conditions using operators against a column within returned result. Consider an example where you would want to query blocks minted in first 3 minutes of epoch 250 (i.e. epoch_slot was less than 180). To do so your query would look like below:<br><br>
``` bash
curl "https://api.koios.rest/api/v1/blocks?epoch_no=eq.250&epoch_slot=lt.180"
# [{"hash":"8fad2808ac6b37064a0fa69f6fe065807703d5235a57442647bbcdba1c02faf8","epoch_no":250,"abs_slot":22636942,"epoch_slot":142,"block_height":5385757,"block_time":1614203233,"tx_count":65,"vrf_key":"vrf_vk14y9pjprzlsjvjt66mv5u7w7292sxp3kn4ewhss45ayjga5vurgaqhqknuu","pool":null,"op_cert_counter":2},
# {"hash":"9d33b02badaedc0dedd0d59f3e0411e5fb4ac94217fb5ee86719e8463c570e16","epoch_no":250,"abs_slot":22636800,"epoch_slot":0,"block_height":5385756,"block_time":1614203091,"tx_count":10,"vrf_key":"vrf_vk1dkfsejw3h2k7tnguwrauqfwnxa7wj3nkp3yw2yw3400c4nlkluwqzwvka6","pool":null,"op_cert_counter":2}]
```
Here, we made use of `eq.` operator to denote a filter of "value equal to" against `epoch_no` column. Similarly, we added a filter using `lt.` operator to denote a filter of "values lower than" against `epoch_slot` column. You can find a complete list of operators supported in PostgREST documentation (commonly used ones extracted below):
|Abbreviation|In PostgreSQL|Meaning |
|------------|-------------|-------------------------------------------|
|eq |`=` |equals |
|gt |`>` |greater than |
|gte |`>=` |greater than or equal |
|lt |`<` |less than |
|lte |`<=` |less than or equal |
|neq |`<>` or `!=` |not equal |
|like |`LIKE` |LIKE operator (use * in place of %) |
|in |`IN` |one of a list of values, e.g. `?a=in.("hi,there","yes,you")`|
|is |`IS` |checking for exact equality (null,true,false,unknown)|
|cs |`@>` |contains e.g. `?tags=cs.{example, new}` |
|cd |`<@` |contained in e.g. `?values=cd.{1,2,3}` |
|not |`NOT` |negates another operator |
|or |`OR` |logical `OR` operator |
|and |`AND` |logical `AND` operator |
## Pagination (offset/limit)
When you query any endpoint in PostgREST, the number of observations returned will be limited to a maximum of 1000 rows (set via `max-rows` config option in the `grest.conf` file. This - however - is a result of a paginated call, wherein the [ up to ] 1000 records you see without any parameters is the first page. If you want to see the next 1000 results, you can always append `offset=1000` to view the next set of results. But what if 1000 is too high for your use-case and you want smaller page? Well, you can specify a smaller limit using parameter `limit`, which will see shortly in an example below. The obvious question at this point that would cross your mind is - how do I know if I need to offset and what range I am querying? This is where headers come in to your aid.
The default headers returned by PostgREST will include a `Content-Range` field giving a range of observations returned. For large tables, this range could include a wildcard `*` as it is expensive to query exact count of observations from endpoint. But if you would like to get an estimate count without overloading servers, PostgREST can utilise Postgres's own maintenance thread results (which maintain stats for each table) to provide you a count, by specifying a header `"Prefer: count=estimated"`.
Sounds confusing? Let's see this in practice, to hopefully make it easier.
Consider a simple case where I want query `blocks` endpoint for `block_height` column and focus on `content-range` header to monitor the rows we discussed above.<br><br>
``` bash
curl -s "https://api.koios.rest/api/v1/blocks?select=block_height" -I | grep -i content-range
# content-range: 0-999/*
```
As we can see above, the number of observations returned was 1000 (range being 0-999), but the total size was not queried to avoid wait times. Now, let's modify this default behaviour to query rows beyond the first 999, but this time - also add another clause to limit results by 500. We can do this using `offset=1000` and `limit=500` as below:<br><br>
``` bash
curl -s "https://api.koios.rest/api/v1/blocks?select=block_height&offset=1000&limit=500" -I | grep -i content-range
# content-range: 1000-1499/*
```
The above methods for pagination are very useful to keep some of the queries light as well as process the output in smaller pages, making better use of your resources and respecting server timeouts for response times.
However, note that due to the complex nature of some queries that require pre-processing before being subjected to paginations, these may not always be helpful to avoid server timeouts.
## Ordering
You can set a sorting order for returned queries against specific column(s).
Consider example where you want to check `epoch_no` and `epoch_slot` for the first 5 blocks created by a particular pool, i.e. you can set order to ascending based on block_height column and add horizontal filter for that pool ID as below:<br><br>
``` bash
curl -s "https://api.koios.rest/api/v1/blocks?pool=eq.pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc&order=block_height.asc&limit=5"
# [{"hash":"610b4c7bbebeeb212bd002885048cc33154ba29f39919d62a3d96de05d315706","epoch_no":236,"abs_slot":16594295,"epoch_slot":5495,"block_height":5086774,"block_time":1608160586,"tx_count":1,"vrf_key":"vrf_vk18x0e7dx8j37gdxftnn8ru6jcxs7n6acdazc4ykeda2ygjwg9a7ls7ns699","pool":"pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc","op_cert_counter":1},
# {"hash":"d93d1db5275329ab695d30c06a35124038d8d9af64fc2b0aa082b8aa43da4164","epoch_no":236,"abs_slot":16597729,"epoch_slot":8929,"block_height":5086944,"block_time":1608164020,"tx_count":7,"vrf_key":"vrf_vk18x0e7dx8j37gdxftnn8ru6jcxs7n6acdazc4ykeda2ygjwg9a7ls7ns699","pool":"pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc","op_cert_counter":1},
# {"hash":"dc9496eae64294b46f07eb20499ae6dae4d81fdc67c63c354397db91bda1ee55","epoch_no":236,"abs_slot":16598058,"epoch_slot":9258,"block_height":5086962,"block_time":1608164349,"tx_count":1,"vrf_key":"vrf_vk18x0e7dx8j37gdxftnn8ru6jcxs7n6acdazc4ykeda2ygjwg9a7ls7ns699","pool":"pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc","op_cert_counter":1},
# {"hash":"6ebc7b734c513bc19290d96ca573a09cac9503c5a349dd9892b9ab43f917f9bd","epoch_no":236,"abs_slot":16601491,"epoch_slot":12691,"block_height":5087097,"block_time":1608167782,"tx_count":0,"vrf_key":"vrf_vk18x0e7dx8j37gdxftnn8ru6jcxs7n6acdazc4ykeda2ygjwg9a7ls7ns699","pool":"pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc","op_cert_counter":1},
# {"hash":"2eac97548829fc312858bc56a40f7ce3bf9b0ca27ee8530283ccebb3963de1c0","epoch_no":236,"abs_slot":16602308,"epoch_slot":13508,"block_height":5087136,"block_time":1608168599,"tx_count":1,"vrf_key":"vrf_vk18x0e7dx8j37gdxftnn8ru6jcxs7n6acdazc4ykeda2ygjwg9a7ls7ns699","pool":"pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc","op_cert_counter":1}]
```
## Response Formats
You can get the results from the PostgREST endpoints in CSV or JSON formats. The default response format will always be JSON, but if you'd like to switch, you can do so by specifying header `'Accept: text/csv'` or `'Accept: application/json'`.
Below is an example of JSON/CSV output making use of above to print first in JSON (default), and then override response format to CSV.<br><br>
``` bash
curl -s "https://api.koios.rest/api/v1/blocks?select=epoch_no,epoch_slot,block_time&limit=3"
# [{"epoch_no":318,"epoch_slot":27867,"block_time":1643606958},
# {"epoch_no":318,"epoch_slot":27841,"block_time":1643606932},
# {"epoch_no":318,"epoch_slot":27839,"block_time":1643606930}]
curl -s "https://api.koios.rest/api/v1/blocks?select=epoch_no,epoch_slot,block_time&limit=3" -H "Accept: text/csv"
# epoch_no,epoch_slot,block_time
# 318,28491,1643607582
# 318,28479,1643607570
# 318,28406,1643607497
```
## Limits
While use of Koios is completely free and there are no registration requirements to the usage, the monitoring layer will only restrict spam requests that can potentially cause high amount of load to backends. The emphasis is on using list of objects first, and then [bulk where available] query specific objects to drill down where possible - which forms higher performance results to consumer as well as instance provider. Some basic protection against patterns that could cause unexpected resource spikes are protected as per below:
- Burst Limit: A single IP can query an endpoint up to 100 times within 10 seconds (that's about 8.64 million requests within a day). The sleep time if a limit is crossed is minimal (60 seconds) for that IP - during which, the monitoring layer will return HTTP Status `429 - Too many requests`.
- Pagination/Limits: Any query results fetched will be paginated by 1000 records (you can reduce limit and or control pagination offsets on URL itself, see API > Pagination section for more details).
- Query timeout: If a query from server takes more than 30 seconds, it will return a HTTP Status of `504 - Gateway timeout`. This is because we would want to ensure you're using the queries optimally, and more often than not - it would indicate that particular endpoint is not optimised (or the network connectivity is not optimal between servers).
- Payload size limit: Koios supports sending bulk objects to reduce networking costs as well as number of calls users spent. However, this can also become an easy attack surface. Thus, we've had to add a strict limit for request body size to be limited to 1kb for public and 5kb for registered tiers.
Yet, there may be cases where the above restrictions may need exceptions (for example, an explorer or a wallet might need more connections than above - going beyond the Burst Limit). For such cases, it is best to approach the team and we can work towards a solution.
# Authentication
While Koios public tier remains unauthenticated and allows queries without any authentication, it has low limits to prevent actions against an erroraneous query/loop from a consumer. There is also a Free tier which requires setting up Bearer Auth token that is linked to the owner's wallet account (which can be connected to via [Koios website](https://koios.rest/#/#.html) ).
The examples across this API site already [supports authentication](/#auth), for you to use in the queries.
# Community projects
A big thank you to the following projects who are already starting to use Koios from early days. A list of tools, libraries and projects utilising Koios (atleast those who'd like to be named) can be found [here](https://www.koios.rest/community.html)
x-logo:
url: "https://api.koios.rest/images/koios.png"
servers:
- url: https://api.koios.rest/api/v1
description: Mainnet
- url: https://guild.koios.rest/api/v1
description: Guildnet
- url: https://preview.koios.rest/api/v1
description: Preview Network
- url: https://preprod.koios.rest/api/v1
description: Preprod Network
- url: https://sancho.koios.rest/api/v1
description: Sanchonet Network
paths:
/tip: #RPC
get:
tags:
- Network
responses:
"200":
description: Success!!
content:
application/json:
schema:
$ref: "#/components/schemas/tip"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"404":
$ref: "#/components/responses/NotFound"
summary: Query Chain Tip
description: Get the tip info about the latest block seen by chain
operationId: tip
/genesis: #RPC
get:
tags:
- Network
responses:
"200":
description: Success!!
content:
application/json:
schema:
$ref: "#/components/schemas/genesis"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"404":
$ref: "#/components/responses/NotFound"
summary: Get Genesis info
description: Get the Genesis parameters used to start specific era on chain
operationId: genesis
/totals: #RPC
get:
tags:
- Network
parameters:
- $ref: "#/components/parameters/_epoch_no"
responses:
"200":
description: Success!!
content:
application/json:
schema:
$ref: "#/components/schemas/totals"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"404":
$ref: "#/components/responses/NotFound"
summary: Get historical tokenomic stats
description: >-
Get the circulating utxo, treasury, rewards, supply and reserves in
lovelace for specified epoch, all epochs if empty
operationId: totals
/param_updates: #RPC
get:
tags:
- Network
responses:
"200":
description: Success!!
content:
application/json:
schema:
$ref: "#/components/schemas/param_updates"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"404":
$ref: "#/components/responses/NotFound"
summary: Param Update Proposals
description: Get all parameter update proposals submitted to the chain starting Shelley era
operationId: param_updates
/cli_protocol_params: #RPC
get:
tags:
- Network
responses:
"200":
description: Success!!
content:
application/json:
schema:
$ref: "#/components/schemas/cli_protocol_params"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"404":
$ref: "#/components/responses/NotFound"
summary: CLI Protocol Parameters
description: >-
Get Current Protocol Parameters as published by cardano-cli. Note that
the output schema of this command is unfortunately fluid on cardano-node
and may vary between CLI versions/era. Accordingly, the returned output for
this endpoint is left as raw JSON (single row) and any filtering to output should
be done on client-side
operationId: cli_protocol_params
components:
parameters:
_after_block_height:
deprecated: false
name: _after_block_height
description: Block height for specifying time delta
schema:
type: number
example: 50000
in: query
required: false
allowEmptyValue: true
_epoch_no:
deprecated: false
name: _epoch_no
description: Epoch Number to fetch details for
schema:
type: string
example: "320"
in: query
required: false
allowEmptyValue: true
_stake_address:
deprecated: false
name: _stake_address
description: Cardano staking address (reward account) in bech32 format
schema:
type: string
example: "stake1u8yxtugdv63wxafy9d00nuz6hjyyp4qnggvc9a3vxh8yl0ckml2uz"
in: query
required: true
allowEmptyValue: false
_tx_hash:
deprecated: false
name: _tx_hash
description: Transaction Hash in hexadecimal format (hex)
example: "f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e"
schema:
type: string
in: query
required: true
allowEmptyValue: false
_asset_policy:
deprecated: false
name: _asset_policy
description: Asset Policy ID in hexadecimal format (hex)
schema:
type: string
example: "750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501"
in: query
required: true
allowEmptyValue: false
_asset_name:
deprecated: false
name: _asset_name
description: Asset Name in hexadecimal format (hex), empty asset name returns royalties
schema:
type: string
example: "424f4f4b"
in: query
required: false
allowEmptyValue: true
_asset_policy_nft:
deprecated: false
name: _asset_policy
description: NFT Policy ID in hexadecimal format (hex)
schema:
type: string
example: "f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a"
in: query
required: true
allowEmptyValue: false
_asset_name_nft:
deprecated: false
name: _asset_name
description: NFT Name in hexadecimal format (hex)
schema:
type: string
example: "68616e646c65"
in: query
required: false
allowEmptyValue: true
_voter_id:
deprecated: false
name: _voter_id
description: Voter ID (Drep, SPO, Committee Member) in Bech32 format (CIP-5 | CIP-129)
schema:
type: string
example: "drep17l6sywnwqu9aedd6aumev42w39ln5zfl9nw7j4ak6u8swyrwvz3"
in: query
required: true
allowEmptyValue: false
_drep_id:
deprecated: false
name: _drep_id
description: DRep ID in bech32 format
schema:
type: string
example: "drep17l6sywnwqu9aedd6aumev42w39ln5zfl9nw7j4ak6u8swyrwvz3"
in: query
required: true
allowEmptyValue: false
_drep_id_optional:
deprecated: false
name: _drep_id
description: DRep ID in bech32 format
schema:
type: string
example: "drep17l6sywnwqu9aedd6aumev42w39ln5zfl9nw7j4ak6u8swyrwvz3"
in: query
required: false
allowEmptyValue: true
_cc_hot_id:
deprecated: false
name: _cc_hot_id
description: Committee member hot key ID in Bech32 format (CIP-5 | CIP-129)
schema:
type: string
example: "cc_hot1qgqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqvcdjk7"
in: query
required: false
allowEmptyValue: true
_extended:
deprecated: false
name: _extended
description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call
schema:
type: boolean
example: false
in: query
required: false
allowEmptyValue: true
_history:
deprecated: false
name: _history
description: Include all historical transactions, setting to false includes only the non-empty ones
schema:
type: boolean
example: false
in: query
required: false
allowEmptyValue: false
_include_next_epoch:
deprecated: false
name: _include_next_epoch
description: Include information about nearing but not yet started epoch, to get access to active stake snapshot information if available
schema:
type: boolean
example: false
in: query
required: false
allowEmptyValue: true
_pool_bech32:
deprecated: false
name: _pool_bech32
description: Pool ID in bech32 format
schema:
type: string
example: "pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc"
in: query
required: true
allowEmptyValue: false
_pool_bech32_optional:
deprecated: false
name: _pool_bech32
description: Pool ID in bech32 format (optional)
schema:
type: string
example: "pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc"
in: query
required: false
allowEmptyValue: true
_pool_epoch_no:
deprecated: false
name: _epoch_no
description: Epoch Number to fetch details for
schema:
type: string
example: "320"
in: query
required: false
allowEmptyValue: true
_script_hash:
deprecated: false
name: _script_hash
description: Script hash in hexadecimal format (hex)
schema:
type: string
example: "d8480dc869b94b80e81ec91b0abe307279311fe0e7001a9488f61ff8"
in: query
required: true
allowEmptyValue: false
_proposal_id:
deprecated: false
name: _proposal_id
description: Government proposal ID in CIP-129 Bech32 format
example: "gov_action1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpzklpgpf"
schema:
type: string
in: query
required: true
allowEmptyValue: false
requestBodies:
block_hashes:
content:
application/json:
schema:
required:
- _block_hashes
type: object
properties:
_block_hashes:
format: text
type: array
items:
$ref: "#/components/schemas/blocks/items/properties/hash"
example:
_block_hashes:
- fb9087c9f1408a7bbd7b022fd294ab565fec8dd3a8ef091567482722a1fa4e30
- 60188a8dcb6db0d80628815be2cf626c4d17cb3e826cebfca84adaff93ad492a
- c6646214a1f377aa461a0163c213fc6b86a559a2d6ebd647d54c4eb00aaab015
description: Array of block hashes
block_tx_info:
content:
application/json:
schema:
required:
- _block_hashes
type: object
properties:
_block_hashes:
format: text
type: array
items:
$ref: "#/components/schemas/blocks/items/properties/hash"
_inputs:
format: boolean
type: boolean
description: Controls whether to include transaction inputs in the result
_metadata:
format: boolean
type: boolean
description: Controls whether to include transaction metadata in the result
_assets:
format: boolean
type: boolean
description: Controls whether to include assets involved within transaction the result
_withdrawals:
format: boolean
type: boolean
description: Controls whether to include any stake account reward withdrawals in the result
_certs:
format: boolean
type: boolean
description: Controls whether to include transaction certificates in the result
_scripts:
format: boolean
type: boolean
description: Controls whether to include any details regarding collateral/reference/datum/script objects in the result
_bytecode:
format: boolean
type: boolean
description: Controls whether to include bytecode for associated reference/plutus scripts
example:
_block_hashes:
- fb9087c9f1408a7bbd7b022fd294ab565fec8dd3a8ef091567482722a1fa4e30
- 60188a8dcb6db0d80628815be2cf626c4d17cb3e826cebfca84adaff93ad492a
- c6646214a1f377aa461a0163c213fc6b86a559a2d6ebd647d54c4eb00aaab015
_inputs: false
_metadata: false
_assets: false
_withdrawals: false
_certs: false
_scripts: false
_bytecode: false
description: Array of block hashes
payment_addresses:
content:
application/json:
schema:
required:
- _addresses
type: object
properties:
_addresses:
format: text
type: array
items:
type: string
description: Array of Cardano payment address(es) in bech32 format
example:
_addresses:
- addr1qy2jt0qpqz2z2z9zx5w4xemekkce7yderz53kjue53lpqv90lkfa9sgrfjuz6uvt4uqtrqhl2kj0a9lnr9ndzutx32gqleeckv
- addr1q9xvgr4ehvu5k5tmaly7ugpnvekpqvnxj8xy50pa7kyetlnhel389pa4rnq6fmkzwsaynmw0mnldhlmchn2sfd589fgsz9dd0y
description: Array of Cardano payment address(es)
payment_addresses_with_extended:
content:
application/json:
schema:
required:
- _addresses
type: object
properties:
_addresses:
format: text
type: array
items:
type: string
description: Array of Cardano payment address(es) in bech32 format
_extended:
format: boolean
type: boolean
description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call
example:
_addresses:
- addr1qy2jt0qpqz2z2z9zx5w4xemekkce7yderz53kjue53lpqv90lkfa9sgrfjuz6uvt4uqtrqhl2kj0a9lnr9ndzutx32gqleeckv
- addr1q9xvgr4ehvu5k5tmaly7ugpnvekpqvnxj8xy50pa7kyetlnhel389pa4rnq6fmkzwsaynmw0mnldhlmchn2sfd589fgsz9dd0y
_extended: true
description: Array of Cardano payment address(es) with extended flag to toggle additional fields
address_txs:
content:
application/json:
schema:
required:
- _addresses
type: object
properties:
_addresses:
format: text
type: array
items:
type: string
description: Array of Cardano payment address(es) in bech32 format
_after_block_height:
format: integer
type: number
description: Only fetch information after specific block height
example:
_addresses:
- addr1qy2jt0qpqz2z2z9zx5w4xemekkce7yderz53kjue53lpqv90lkfa9sgrfjuz6uvt4uqtrqhl2kj0a9lnr9ndzutx32gqleeckv
- addr1q9xvgr4ehvu5k5tmaly7ugpnvekpqvnxj8xy50pa7kyetlnhel389pa4rnq6fmkzwsaynmw0mnldhlmchn2sfd589fgsz9dd0y
_after_block_height: 6238675
description: Array of Cardano payment address(es)
stake_addresses_with_epoch_no:
content:
application/json:
schema:
required:
- _stake_addresses
type: object
properties:
_stake_addresses:
format: text
type: array
items:
type: string
description: Array of Cardano stake address(es) in bech32 format
_epoch_no:
format: integer
type: number
description: Only fetch information for a specific epoch
example:
_stake_addresses:
- stake1uyrx65wjqjgeeksd8hptmcgl5jfyrqkfq0xe8xlp367kphsckq250
- stake1uxpdrerp9wrxunfh6ukyv5267j70fzxgw0fr3z8zeac5vyqhf9jhy
_epoch_no: 409
description: Array of Cardano stake address(es) in bech32 format with optional epoch no to filter by
stake_addresses_with_first_only_and_empty:
content:
application/json:
schema:
required:
- _stake_addresses
type: object
properties:
_stake_addresses:
format: text
type: array
items:
type: string
description: Array of Cardano stake address(es) in bech32 format
_first_only:
format: boolean
type: boolean
description: Only return the first result
_empty:
format: boolean
type: boolean
description: Include zero quantity entries
example:
_stake_addresses:
- stake1uyrx65wjqjgeeksd8hptmcgl5jfyrqkfq0xe8xlp367kphsckq250
- stake1uxpdrerp9wrxunfh6ukyv5267j70fzxgw0fr3z8zeac5vyqhf9jhy
_first_only: false
_empty: false
description: Array of Cardano stake credential(s) in bech32 format alongwith flag to return first only or used UTxOs
stake_addresses_with_extended:
content:
application/json:
schema:
required:
- _stake_addresses
type: object
properties:
_stake_addresses:
format: text
type: array
items:
type: string
description: Array of Cardano stake address(es) in bech32 format
_extended:
format: boolean
type: boolean
description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call
example:
_stake_addresses:
- stake1uyrx65wjqjgeeksd8hptmcgl5jfyrqkfq0xe8xlp367kphsckq250
- stake1uxpdrerp9wrxunfh6ukyv5267j70fzxgw0fr3z8zeac5vyqhf9jhy
_extended: true
description: Array of Cardano stake credential(s) in bech32 format alongwith extended flag to return additional columns
stake_addresses:
content:
application/json:
schema:
required:
- _stake_addresses
type: object
properties:
_stake_addresses:
format: text
type: array
items:
type: string
description: Array of Cardano stake address(es) in bech32 format
example:
_stake_addresses:
- stake1uyrx65wjqjgeeksd8hptmcgl5jfyrqkfq0xe8xlp367kphsckq250
- stake1uxpdrerp9wrxunfh6ukyv5267j70fzxgw0fr3z8zeac5vyqhf9jhy
description: Array of Cardano stake credential(s) in bech32 format
credential_txs:
content:
application/json:
schema:
required:
- _payment_credentials
type: object
properties:
_payment_credentials:
format: text
type: array
items:
type: string
description: Array of Cardano payment credential(s) in hex format
_after_block_height:
format: integer
type: number
description: Only fetch information after specific block height
example:
_payment_credentials:
- 025b0a8f85cb8a46e1dda3fae5d22f07e2d56abb4019a2129c5d6c52
- 13f6870c5e4f3b242463e4dc1f2f56b02a032d3797d933816f15e555
_after_block_height: 6238675
description: Array of Cardano payment credential(s) in hex format alongwith filtering based on blockheight
credential_utxos:
content:
application/json:
schema:
required:
- _payment_credentials
type: object
properties:
_payment_credentials:
format: text
type: array
items:
type: string
description: Array of Cardano payment credential(s) in hex format
_extended:
format: boolean
type: boolean
description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call
example:
_payment_credentials:
- 025b0a8f85cb8a46e1dda3fae5d22f07e2d56abb4019a2129c5d6c52
- 13f6870c5e4f3b242463e4dc1f2f56b02a032d3797d933816f15e555
_extended: true
description: Array of Cardano payment credential(s) in hex format
tx_ids:
content:
application/json:
schema:
required:
- _tx_hashes
type: object
properties:
_tx_hashes:
format: text
type: array
items:
type: string
description: Array of Cardano Transaction hashes
example:
_tx_hashes:
- f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e
- 0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94
description: Array of Cardano Transaction hashes
tx_info:
content:
application/json:
schema:
required:
- _tx_hashes
type: object
properties:
_tx_hashes:
format: text
type: array
items:
type: string
description: Array of Cardano Transaction hashes
_inputs:
format: boolean
type: boolean
description: Controls whether to include transaction inputs in the result
_metadata:
format: boolean
type: boolean
description: Controls whether to include transaction metadata in the result
_assets:
format: boolean
type: boolean
description: Controls whether to include assets involved within transaction the result
_withdrawals:
format: boolean
type: boolean
description: Controls whether to include any stake account reward withdrawals in the result
_certs:
format: boolean
type: boolean
description: Controls whether to include transaction certificates in the result
_scripts:
format: boolean
type: boolean
description: Controls whether to include any details regarding collateral/reference/datum/script objects in the result
_bytecode:
format: boolean
type: boolean
description: Controls whether to include bytecode for associated reference/plutus scripts
_governance:
format: boolean
type: boolean
description: Controls whether to include governance certificates, votes and proposals in the result
example:
_tx_hashes:
- f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e
- 0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94
_inputs: false
_metadata: false
_assets: false
_withdrawals: false
_certs: false
_scripts: false
_bytecode: false
description: Array of Cardano Transaction hashes
txbin:
content:
application/cbor:
schema:
type: string
format: binary
example: f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e
description: Serialised Cardano Transaction
pool_ids:
content:
application/json:
schema:
required:
- _pool_bech32_ids
type: object
properties:
_pool_bech32_ids:
format: text
type: array
items:
type: string
description: Array of Cardano pool IDs (bech32 format)
example:
_pool_bech32_ids:
- pool100wj94uzf54vup2hdzk0afng4dhjaqggt7j434mtgm8v2gfvfgp
- pool102s2nqtea2hf5q0s4amj0evysmfnhrn4apyyhd4azcmsclzm96m
- pool102vsulhfx8ua2j9fwl2u7gv57fhhutc3tp6juzaefgrn7ae35wm
description: Array of Cardano pool IDs (bech32 format)
pool_ids_optional:
content:
application/json:
schema:
type: object
properties:
_pool_bech32_ids:
format: text
type: array
items:
type: string
description: Array of Cardano pool IDs (bech32 format)
example:
_pool_bech32_ids:
- pool100wj94uzf54vup2hdzk0afng4dhjaqggt7j434mtgm8v2gfvfgp
- pool102s2nqtea2hf5q0s4amj0evysmfnhrn4apyyhd4azcmsclzm96m
- pool102vsulhfx8ua2j9fwl2u7gv57fhhutc3tp6juzaefgrn7ae35wm
description: Array of Cardano pool IDs (bech32 format) [Optional]
script_hashes:
content:
application/json:
schema:
type: object
properties:
_script_hashes:
format: text
type: array
items:
type: string
description: Array of Cardano script hashes
example:
_script_hashes:
- bd2119ee2bfb8c8d7c427e8af3c35d537534281e09e23013bca5b138
- c0c671fba483641a71bb92d3a8b7c52c90bf1c01e2b83116ad7d4536
description: Array of Cardano script hashes
datum_hashes:
content:
application/json:
schema:
type: object
properties:
_datum_hashes:
format: text
type: array
items:
type: string
description: Array of Cardano datum hashes
example:
_datum_hashes:
- 818ee3db3bbbd04f9f2ce21778cac3ac605802a4fcb00c8b3a58ee2dafc17d46
- 45b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0
description: Array of Cardano datum hashes
asset_list:
content:
application/json:
schema:
required:
- _asset_list
type: object
properties:
_asset_list:
format: text
type: array
description: Array of array of policy ID and asset names (hex)
items:
type: array
items:
type: string
example:
_asset_list:
- ['750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501','424f4f4b']
- ['f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a','6b6f696f732e72657374']
description: Array of array of policyID and asset names (hex)
asset_list_with_extended:
content:
application/json:
schema:
required:
- _asset_list
type: object
properties:
_asset_list:
format: text
type: array
description: Array of array of policy ID and asset names (hex)
items:
type: array
items:
type: string
_extended:
format: boolean
type: boolean
description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call
example:
_asset_list:
- ['750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501','424f4f4b']
- ['f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a','6b6f696f732e72657374']
_extended: true
description: Array of array of policyID and asset names (hex) alongwith extended flag to return additional columns
drep_id_bulk:
content:
application/json:
schema:
required:
- _drep_ids
type: object
properties:
_drep_ids:
format: text
type: array
descriptions: Array of DRep IDs in bech32 format
items:
type: string
example:
_drep_ids:
- drep17l6sywnwqu9aedd6aumev42w39ln5zfl9nw7j4ak6u8swyrwvz3
- drep1s9q5uyddsvza4uk2n9wswy90n8wx9d2jmrq4zgcvlyv055007av
utxo_refs_with_extended:
content:
application/json:
schema:
required:
- _utxo_refs
type: object
properties:
_utxo_refs:
format: text
type: array
items:
type: string
description: Array of Cardano utxo references in the form "hash#index"
_extended:
format: boolean
type: boolean
description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call
example:
_utxo_refs:
- f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e#0