-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.yaml
3482 lines (3482 loc) · 136 KB
/
openapi.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.0.1
info:
title: REST API
description: "\nRESTful endpoint provides the widest range of data, based on HTTP protocol which works in Request-Reply scheme.\n\nImplemented Standards:\n\n * [HTTP1.0](https://datatracker.ietf.org/doc/html/rfc1945)\n * [HTTP1.1](https://datatracker.ietf.org/doc/html/rfc2616)\n * [HTTP2.0](https://datatracker.ietf.org/doc/html/rfc7540)\n * [OpenAPI v3](https://www.openapis.org/)\n\n> **Note:** We adhere to the OpenAPI standards for documenting our API.\n\n## OpenAPI Specification\n\nTo access our API's OpenAPI specification, you can use the following link: [OpenAPI v3](https://raw.githubusercontent.com/coinapi/coinapi-sdk/master/data-api/coinapi-marketdata-rest.yaml)\n\nIf you need to import the OpenAPI file into software like Postman, simply copy and paste the link below:\n```shell\nhttps://raw.githubusercontent.com/coinapi/coinapi-sdk/master/data-api/coinapi-marketdata-rest.yaml\n```\n\n## Endpoints\n\nEnviroment | Encryption | Value \n--- | --- | ---\nProduction | Yes | `https://rest.coinapi.io/`\nProduction | No | `http://rest.coinapi.io/`\n\n:::info\n\nFor real-time market data streaming, you should use WebSockets. REST API only supports pooling, meaning you can periodically request the current market data state. In streaming, you subscribe and data or updates are delivered to you continuously.\n\n:::\n\n## General\n\nIf you want to learn how to authenticate to this API, you can find detailed instructions and guidance in\n[authentication section](/authentication) of this documentation.\n\n### HTTP Requests\n\nEach HTTP request must contain the header ``Accept: application/json`` as all our responses are in JSON format.\n\nWe encourage you to use the HTTP request header ``Accept-Encoding: deflate, gzip`` for all requests. \nThis will indicate to us that we can deliver compressed data to you which on your side should be decompressed transparently.\n\n:::tip\n\nBy allowing data compression you are lowering bandwidth requirements by approximately 80%. \nThis is important for requesting large amounts of data or using WebSocket Streaming API, \nas we can deliver data to you faster and more effectively.\n\n:::\n\n#### HTTP Success\n\nSuccessful HTTP responses have the status code `200` and the body in a format according to documentation of the requested resource.\n\n:::info\n\nYou should always check that your HTTP response status code is equal to 200, otherwise the requested was not successful.\n\n:::\n\n#### HTTP Errors\n\n> Error message is returned in JSON structured like this:\n\n```json\n{\n \"error\": \"Invalid API key\"\n}\n```\n\nAll HTTP requests with response status codes different to `200` must be considered as failed \nand you should expect additional JSON inside the body of the response with the error message encapsulated inside it as shown in the example.\nWe use the following error codes:\n\nError Code | Meaning\n---------- | -------\n400 | Bad Request -- There is something wrong with your request\n401 | Unauthorized -- Your API key is wrong\n403 | Forbidden -- Your API key doesnt't have enough privileges to access this resource\n429 | Too many requests -- You have exceeded your API key rate limits\n550 | No data -- You requested specific single item that we don't have at this moment.\n\n:::info\n\nGood practice is to store all error messages somewhere along with request data for further manual review.\n\n:::\n\n### Limits\n\nAny authenticated endpoint is providing (in HTTP response headers) information about the current state of the limits associated with API Key. In this section we will describe each limit.\n\n#### Request limit / APIKey\n\n```html\nX-RateLimit-Limit: 1000000\nX-RateLimit-Remaining: 999989\nX-RateLimit-Request-Cost: 1\n```\n\nThe request limit define number of maximum requests that could be executed in the 24 hours period (sliding/rollowing window - always last 24 hours from specific moment) for your subscription.\n\nWe define request as data request credits and this is not always equal to the number of API calls executed against the API. A request is deemed to be a single one if the limit query parameter on the endpoint isn’t available, isn’t used or it's stated otherwise in the API documentation. Otherwise — if the limit query parameter is available and is used — then each of the 100 data points returned in the response is counted as one request.\n\nFor example at the 2019-08-22 13:00 UTC value of the requests remaining (X-RateLimit-Remaining) will be equal to the allocated quota (X-RateLimit-Limit) decreased by the sum of the request costs (SUM(X-RateLimit-Request-Cost)) executed in the period 2019-08-21 13:00 UTC - 2019-08-22 13:00 UTC (last 24 hours).\n\n\nHTTP Header | Type | Description\n---------- | ------- | ---\nX-RateLimit-Used | int | Provides information about the request limit that has been used within the last 24-hour period. This header indicates the amount of request capacity consumed based on the usage history. It is important to note that the header is not always appended to every request to optimize the operation of the API.\nX-RateLimit-Limit | int | Is an optional feature that can be enabled via the customer portal to impose a limit on the capabilities of a specific API key. It allows you to define a threshold for the number of requests that can be made using a single API key within a 24-hour time frame.\nX-RateLimit-Remaining | int | Provides information about the number of requests that can still be made within the last 24-hour period based on the usage history. This header serves as a helpful indicator of the remaining request capacity, allowing API consumers to manage their usage effectively. It is important to note that the header is not always appended to every request to optimize the operation of the API.\nX-RateLimit-Request-Cost | int | The number of requests used to generate current HTTP response.\nX-RateLimit-Quota-Overage | string | Provides information about whether a given API key may exceed the plan quota within a 24-hour time frame, which could result in additional charges. This header is fully defined and configured in the customer portal.\nX-RateLimit-Quota-Allocated | string | Total number of requests that can be made within a specific subscription during a 24-hour time frame. This quota allocation is determined based on the user's subscription purchase.\nX-RateLimit-Quota-Remaining | string | Provides valuable information about the remaining quota within the subscription for making requests within a 24-hour time frame. This header indicates the number of requests that can still be made within the allocated quota for the current 24-hour period.\n\n```json\nGET v1/exchanges/ECB/apiKey-ED802AF4-E855-YOUR-API-KEY\nHost: coinapi.io\nX-RateLimit-Used: 1000\nX-RateLimit-Limit: 5000\nX-RateLimit-Remaining: 4000\nX-RateLimit-Request-Cost: 1\nX-RateLimit-Quota-Overage: ENABLED\nX-RateLimit-Quota-Allocated: 10000\nX-RateLimit-Quota-Remaining: 5000\n```\n\nExplanation:\n\n- X-RateLimit-Used: 1000 (requests used in the last 24 hours)\n- X-RateLimit-Limit: 5000 (total request limit within a 24-hour time frame)\n- X-RateLimit-Remaining: 4000 (requests remaining within the last 24 hours)\n- X-RateLimit-Request-Cost: 1 (cost or \"weight\" of each individual request)\n- X-RateLimit-Overage: ENABLED (API key may exceed the plan quota within a 24-hour time frame)\n- X-RateLimit-Quota-Allocated: 10000 (total number of requests allowed for all API keys within the subscription within a 24-hour time frame)\n- X-RateLimit-Quota-Remaining: 5000 (requests remaining within the subscription's allocated quota within the last 24 hours)\n\n#### Concurrency limit / APIKey\n\n```html\nX-ConcurrencyLimit-Limit: 10\nX-ConcurrencyLimit-Remaining: 5\n```\n\nThe concurrency limit defines the number of maximum concurrent API calls/requests that the API could process for your subscription at the current moment. Every API call/request increases the Concurrency limit against quota, and when it finishes, decreases it.\n\nHTTP Header | Type | Description\n---------- | ------- | ---\nX-ConcurrencyLimit-Limit | int | Concurrency limit allocated for your API key.\nX-ConcurrencyLimit-Remaining | int | The number of concurrent API calls/requests available to be executed in this moment for your API key.\n\n### Output data format\n\nBy default we are using JSON output data format for all of our endpoints, you can control format of data by using `output_format` variable in query string parameters.\n\n#### URL Parameters\n\nParameter | Type | Description\n---------- | ------- | -------\noutput_format | string | Output data format *(optional, default value is `json`, possible values are `json`, `xml` or `csv`)*\ncsv_include_header | bool | Ignore header line in CSV output? *(optional, default value is `true`, `true` to include CSV header line, `false` otherwise)*\ncsv_include_quotes | bool | Encapsulate strings with quotes in CSV output? *(optional, default value is `false`, `true` to encapsulate all strings with `\"`, `false` to leave them unquoted)*\ncsv_exclude_col | string | Comma delimited list of column names to ignore in CSV output *(optional, by default all columns are included)*\ncsv_set_delimiter | string | Character that will be used as column delimiter in CSV output *(optional, default value is `;`)*\ncsv_set_dec_mark | string | Character that will be used as decimal separator in CSV output *(optional, default value is `.`)*\ncsv_set_timeformat | string | Format for datetime type in CSV output or `unix` for unix timestamp *(optional, default value is `yyyy-MM-ddTHH:mm:ss.fffffffZ`)*\ncsv_set_newline | string | New line type *(optional, default value is `unix`, possible values `win`, `mac`, `unix`)*\n\n### Excel / G-Sheets\n\nThere are several ways to use data from our REST API inside the Excel, Google Sheets, or similar calculation sheet application. This section will do as best as possible to keep all information up to date on how you could load the data into these applications. Feel free to contact support if we are missing an option.\n\n#### CSV download, import:\n\n 1. Open the data in the CSV format from the browser eg. ```https://rest.coinapi.io/v1/exchangerate/USD?apikey=YOUR_API_KEY&invert=true&output_format=csv```\n 2. Save the data to the file with the .csv extension.\n 3. Use the file saved and import it into the software.\n 4. When configuring import, refer to the parameters like delimiter from the [Output data format](#output-data-format)\n\nThe platform-independent way described above is based on CSV but could also be used in other formats like JSON and XML as long as the software support it, but the import procedure needs to be adjusted accordingly.\n\n#### Microsoft Excel\n\n * Use [PowerQuery](https://docs.microsoft.com/en-us/power-query/power-query-what-is-power-query) to load the URL directly into the CSV import without saving the file locally. \n * Use the [=WEBSERVICE](https://support.office.com/en-us/article/webservice-function-0546a35a-ecc6-4739-aed7-c0b7ce1562c4) function to load the API response directly into the sheet, but this will not parse the data; additional processing is required.\n\n#### Google Sheets\n\n * Use [=IMPORT](https://support.google.com/docs/answer/3093335?hl=en) function to load the REST API endpoint and automatically parse the CSV format data into the cells. eg. ```=IMPORTDATA(\"https://rest.coinapi.io/v1/exchangerate/USD?apikey=YOUR_API_KEY&invert=true&output_format=csv```\n\n#### OpenOffice Calc\n\n * Select the menu Insert -> Sheet From File, 2. In the Insert dialog, put the URL eg. ```https://rest.coinapi.io/v1/exchangerate/USD?apikey=YOUR_API_KEY&invert=true&output_format=csv``` in the File Name box at the bottom. Set the drop-down list next to that to Web Page Query and click Open. The Text Import dialog opens where you can change the defaults if needed.\n "
contact:
name: COINAPI LTD
url: https://www.coinapi.io
email: [email protected]
license:
name: MIT License
url: https://github.com/coinapi/coinapi-sdk/blob/master/LICENSE
version: v1
servers:
- url: https://rest.coinapi.io
paths:
/v1/assets:
get:
tags:
- Metadata
summary: List all assets
description: "Retrieves all assets.\r\n \r\n:::info\r\nOur asset identifiers are aligned with the ISO 4217 currency codes standard only for fiat money (government or law regulated currency).\r\n:::\r\n \r\n:::info\r\nProperties of the output are providing aggregated information from across all symbols related to the specific asset. If you need to calculate your aggregation (e.g., limiting only the particular type of symbols), you should use /v1/symbols endpoint as a data source.\r\n:::"
parameters:
- name: filter_asset_id
in: query
description: 'Comma or semicolon delimited asset identifiers used to filter response. (optional, eg. `BTC;ETH`).'
schema:
type: string
- name: include_supply
in: query
description: Flag indicating whether to include supply information.
schema:
type: boolean
default: false
responses:
'200':
description: successful operation
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Asset'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Asset'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Asset'
application/x-msgpack:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Asset'
'/v1/assets/{asset_id}':
get:
tags:
- Metadata
summary: List all assets by asset ID
parameters:
- name: asset_id
in: path
description: The asset ID.
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Asset'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Asset'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Asset'
application/x-msgpack:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Asset'
'/v1/assets/icons/{size}':
get:
tags:
- Metadata
summary: List all asset icons
description: Gets the list of icons (of the given size) for all the assets.
parameters:
- name: size
in: path
description: The size of the icons.
required: true
schema:
type: integer
format: int32
responses:
'200':
description: successful operation
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Icon'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Icon'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Icon'
application/x-msgpack:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Icon'
'/v1/exchangerate/{asset_id_base}/{asset_id_quote}':
get:
tags:
- Exchange Rates
summary: '[exchange rates] Get specific rate'
description: "Retrieves the exchange rate for a specific base and quote asset at a given time or the current rate.\r\n \r\n:::info\r\nIf you are using an exchange rate for mission-critical operations, then for best reliability, you should measure the difference between current time and the time returned from the response to ensure that value of the difference between those meets your internal requirements.\r\n:::"
operationId: Get specific rate
parameters:
- name: asset_id_base
in: path
description: Requested exchange rate base asset identifier (from the Metadata -> Assets)
required: true
schema:
type: string
- name: asset_id_quote
in: path
description: Requested exchange rate quote asset identifier (from the Metadata -> Assets)
required: true
schema:
type: string
- name: time
in: query
description: 'Time at which exchange rate is calculated (optional, if not supplied then current rate is returned)'
schema:
type: string
responses:
'200':
description: successful operation
content:
text/plain:
schema:
$ref: '#/components/schemas/v1.ExchangeRate'
examples:
Current rate:
value: {"time": "2024-02-27T12:38:35.4363800Z", "asset_id_base": "BTC", "asset_id_quote": "USD", "rate": 10000.0}
Historical rate:
value: {"time": "2024-02-26T12:38:35.4365750Z", "asset_id_base": "BTC", "asset_id_quote": "USD", "rate": 10000.0}
application/json:
schema:
$ref: '#/components/schemas/v1.ExchangeRate'
examples:
Current rate:
value: {"time": "2024-02-27T12:38:35.4363800Z", "asset_id_base": "BTC", "asset_id_quote": "USD", "rate": 10000.0}
Historical rate:
value: {"time": "2024-02-26T12:38:35.4365750Z", "asset_id_base": "BTC", "asset_id_quote": "USD", "rate": 10000.0}
text/json:
schema:
$ref: '#/components/schemas/v1.ExchangeRate'
examples:
Current rate:
value: {"time": "2024-02-27T12:38:35.4363800Z", "asset_id_base": "BTC", "asset_id_quote": "USD", "rate": 10000.0}
Historical rate:
value: {"time": "2024-02-26T12:38:35.4365750Z", "asset_id_base": "BTC", "asset_id_quote": "USD", "rate": 10000.0}
application/x-msgpack:
schema:
$ref: '#/components/schemas/v1.ExchangeRate'
examples:
Current rate:
value: {"time": "2024-02-27T12:38:35.4363800Z", "asset_id_base": "BTC", "asset_id_quote": "USD", "rate": 10000.0}
Historical rate:
value: {"time": "2024-02-26T12:38:35.4365750Z", "asset_id_base": "BTC", "asset_id_quote": "USD", "rate": 10000.0}
'/v1/exchangerate/{asset_id_base}':
get:
tags:
- Exchange Rates
summary: '[exchange rates] Get all current rates'
description: "Get the current exchange rate between requested asset and all other assets.\r\n \r\n:::info\r\nIf you are using an exchange rate for mission-critical operations, then for best reliability, you should measure the difference between current time and the time returned from the response to ensure that value of the difference between those meets your internal requirements.\r\n:::\r\n \r\n:::info\r\nYou can invert the rates by using Y = 1 / X equation, for example BTC/USD = 1 / (USD/BTC);\r\n:::"
parameters:
- name: asset_id_base
in: path
description: Requested exchange rates base asset identifier (from the Metadata -> Assets)
required: true
schema:
type: string
- name: filter_asset_id
in: query
description: Comma or semicolon delimited asset identifiers used to filter response (optional)
schema:
type: string
- name: invert
in: query
description: 'True will invert all the rates (optional, if true then rates will be calculated as `rate = 1 / actual_rate` eg. `USD/BTC` as `BTC/USD`)'
schema:
type: boolean
default: false
- name: time
in: query
description: Time for historical rates (optional)
schema:
type: string
responses:
'200':
description: successful operation
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/v1.ExchangeRatesRate'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.ExchangeRatesRate'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.ExchangeRatesRate'
application/x-msgpack:
schema:
type: array
items:
$ref: '#/components/schemas/v1.ExchangeRatesRate'
/v1/exchangerate/history/periods:
get:
tags:
- Exchange Rates
summary: '[exchange rates] Timeseries periods'
description: "You can also obtain historical exchange rates of any asset pair, grouped into time periods.\r\nGet full list of supported time periods available for requesting exchange rates historical timeseries data.\r\n \r\n## Timeseries periods\r\nTime unit |\tPeriod identifiers\r\n--- | ---\r\nSecond | 1SEC, 2SEC, 3SEC, 4SEC, 5SEC, 6SEC, 10SEC, 15SEC, 20SEC, 30SEC\r\nMinute | 1MIN, 2MIN, 3MIN, 4MIN, 5MIN, 6MIN, 10MIN, 15MIN, 20MIN, 30MIN\r\nHour | 1HRS, 2HRS, 3HRS, 4HRS, 6HRS, 8HRS, 12HRS\r\nDay | 1DAY, 2DAY, 3DAY, 5DAY, 7DAY, 10DAY"
responses:
'200':
description: successful operation
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/v1.TimeseriesPeriod'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.TimeseriesPeriod'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.TimeseriesPeriod'
application/x-msgpack:
schema:
type: array
items:
$ref: '#/components/schemas/v1.TimeseriesPeriod'
'/v1/exchangerate/{asset_id_base}/{asset_id_quote}/history':
get:
tags:
- Exchange Rates
summary: '[exchange rates] Timeseries data'
description: Get the historical exchange rates between two assets in the form of the timeseries.
parameters:
- name: asset_id_base
in: path
description: Requested exchange rates base asset identifier (from the Metadata -> Assets)
required: true
schema:
type: string
- name: asset_id_quote
in: path
description: Requested exchange rates base asset identifier (from the Metadata -> Assets)
required: true
schema:
type: string
- name: period_id
in: query
description: 'Identifier of requested timeseries period (required, e.g. `5SEC` or `1HRS`)'
schema:
type: string
- name: time_start
in: query
description: Timeseries starting time in ISO 8601 (required)
schema:
type: string
- name: time_end
in: query
description: Timeseries ending time in ISO 8601 (required)
schema:
type: string
- name: limit
in: query
description: 'Amount of items to return (optional, mininum is 1, maximum is 100000, default value is 100, if the parameter is used then every 100 output items are counted as one request)'
schema:
type: integer
format: int32
default: 100
responses:
'200':
description: successful operation
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/v1.ExchangeRatesTimeseriesItem'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.ExchangeRatesTimeseriesItem'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.ExchangeRatesTimeseriesItem'
application/x-msgpack:
schema:
type: array
items:
$ref: '#/components/schemas/v1.ExchangeRatesTimeseriesItem'
/v1/exchanges:
get:
tags:
- Metadata
summary: List all exchanges
description: "Get a detailed list of exchanges provided by the system.\r\n \r\n:::info\r\nProperties of the output are providing aggregated information from across all symbols related to the specific exchange. If you need to calculate your aggregation (e.g., limiting only the particular type of symbols), you should use /v1/symbols endpoint as a data source.\r\n:::"
parameters:
- name: filter_exchange_id
in: query
description: 'Comma or semicolon delimited exchange identifiers used to filter response. (optional, eg. `BITSTAMP;GEMINI`)'
schema:
type: string
responses:
'200':
description: successful operation
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Exchange'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Exchange'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Exchange'
application/x-msgpack:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Exchange'
'/v1/exchanges/{exchange_id}':
get:
tags:
- Metadata
summary: List all exchanges by exchange_id
parameters:
- name: exchange_id
in: path
description: The ID of the exchange.
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Exchange'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Exchange'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Exchange'
application/x-msgpack:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Exchange'
'/v1/exchanges/icons/{size}':
get:
tags:
- Metadata
summary: List of icons for the exchanges
parameters:
- name: size
in: path
description: The size of the icons.
required: true
schema:
type: integer
format: int32
responses:
'200':
description: successful operation
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Icon'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Icon'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Icon'
application/x-msgpack:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Icon'
/v1/indexes:
get:
tags:
- Indexes
summary: List of available indexes
responses:
'200':
description: successful operation
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Index'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Index'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Index'
application/x-msgpack:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Index'
post:
tags:
- Indexes
summary: Create index
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/v1.IndexData'
text/json:
schema:
$ref: '#/components/schemas/v1.IndexData'
application/*+json:
schema:
$ref: '#/components/schemas/v1.IndexData'
application/x-msgpack:
schema:
$ref: '#/components/schemas/v1.IndexData'
responses:
'201':
description: successful operation
content:
text/plain:
schema:
$ref: '#/components/schemas/v1.IndexDataResponse'
application/json:
schema:
$ref: '#/components/schemas/v1.IndexDataResponse'
text/json:
schema:
$ref: '#/components/schemas/v1.IndexDataResponse'
application/x-msgpack:
schema:
$ref: '#/components/schemas/v1.IndexDataResponse'
'/v1/indexes/{index_id}':
get:
tags:
- Indexes
summary: Get index data
parameters:
- name: index_id
in: path
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
text/plain:
schema:
$ref: '#/components/schemas/v1.IndexData'
application/json:
schema:
$ref: '#/components/schemas/v1.IndexData'
text/json:
schema:
$ref: '#/components/schemas/v1.IndexData'
application/x-msgpack:
schema:
$ref: '#/components/schemas/v1.IndexData'
put:
tags:
- Indexes
summary: Update index
parameters:
- name: index_id
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/v1.IndexData'
text/json:
schema:
$ref: '#/components/schemas/v1.IndexData'
application/*+json:
schema:
$ref: '#/components/schemas/v1.IndexData'
application/x-msgpack:
schema:
$ref: '#/components/schemas/v1.IndexData'
responses:
'200':
description: successful operation
content:
text/plain:
schema:
$ref: '#/components/schemas/v1.IndexDataResponse'
application/json:
schema:
$ref: '#/components/schemas/v1.IndexDataResponse'
text/json:
schema:
$ref: '#/components/schemas/v1.IndexDataResponse'
application/x-msgpack:
schema:
$ref: '#/components/schemas/v1.IndexDataResponse'
'/v1/indexes/{index_id}/history':
get:
tags:
- Indexes
summary: Retrieve Historical Index Value and Composition
parameters:
- name: index_id
in: path
required: true
schema:
type: string
- name: time_start
in: query
schema:
type: string
format: date-time
- name: time_end
in: query
schema:
type: string
format: date-time
- name: limit
in: query
schema:
type: integer
format: int32
default: 100
responses:
'200':
description: successful operation
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/v1.IndexValue'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.IndexValue'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.IndexValue'
application/x-msgpack:
schema:
type: array
items:
$ref: '#/components/schemas/v1.IndexValue'
'/v1/indexes/{index_id}/timeseries':
get:
tags:
- Indexes
summary: Retrieve Historical Index Value Timeseries
parameters:
- name: index_id
in: path
required: true
schema:
type: string
- name: time_start
in: query
schema:
type: string
format: date-time
- name: time_end
in: query
schema:
type: string
format: date-time
- name: limit
in: query
schema:
type: integer
format: int32
default: 100
responses:
'200':
description: successful operation
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/v1.IndexTimeseriesItem'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.IndexTimeseriesItem'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.IndexTimeseriesItem'
application/x-msgpack:
schema:
type: array
items:
$ref: '#/components/schemas/v1.IndexTimeseriesItem'
'/v1/indexes/{index_id}/timeseries/TO_BE_ANNOUNCED':
get:
tags:
- Indexes
summary: "Retrieve Historical Composition Value Timeseries\r\nRetrieves historical timeseries for the specific composition value for an index"
parameters:
- name: index_id
in: path
required: true
schema:
type: string
- name: source_id
in: query
schema:
type: string
- name: source_type
in: query
schema:
type: string
- name: time_start
in: query
schema:
type: string
format: date-time
- name: time_end
in: query
schema:
type: string
format: date-time
- name: limit
in: query
schema:
type: integer
format: int32
default: 100
responses:
'200':
description: successful operation
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/v1.IndexTimeseriesItem'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.IndexTimeseriesItem'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.IndexTimeseriesItem'
application/x-msgpack:
schema:
type: array
items:
$ref: '#/components/schemas/v1.IndexTimeseriesItem'
/v1/metadata:
get:
tags:
- Metadata
summary: Base url of the API.
responses:
'200':
description: Success
/v1/metrics/listing:
get:
tags:
- Metrics
summary: Listing of all supported metrics by CoinAPI
description: Get all data metrics.
responses:
'200':
description: successful operation
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Metric'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Metric'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Metric'
application/x-msgpack:
schema:
type: array
items:
$ref: '#/components/schemas/v1.Metric'
/v1/metrics/exchange/listing:
get:
tags:
- Metrics
summary: Listing of all supported exchange metrics
description: Get data metrics for exchange.
parameters:
- name: metric_id
in: query
description: The metric identifier (from the Metrics -> Listing)
schema:
type: string
- name: exchange_id
in: query
description: The exchange identifier (from the Metadata -> Exchanges)
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/v1.ListingItem'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.ListingItem'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.ListingItem'
application/x-msgpack:
schema:
type: array
items:
$ref: '#/components/schemas/v1.ListingItem'
/v1/metrics/exchange/current:
get:
tags:
- Metrics
summary: Current metrics for given exchange
description: Get current exchange metrics values.
parameters:
- name: metric_id
in: query
description: The metric identifier (from the Metrics -> Listing)
schema:
type: string
- name: exchange_id
in: query
description: The exchange identifier (from the Metadata -> Exchanges)
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/v1.GeneralData'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.GeneralData'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.GeneralData'
application/x-msgpack:
schema:
type: array
items:
$ref: '#/components/schemas/v1.GeneralData'
/v1/metrics/exchange/history:
get:
tags:
- Metrics
summary: Historical metrics for the exchange
description: Get exchange metrics history.
parameters:
- name: metric_id
in: query
description: Metric identifier (from the Metrics -> Listing)
required: true
schema:
type: string
- name: exchange_id
in: query
description: Exchange identifier (from the Metadata -> Exchanges)
required: true
schema:
type: string
- name: time_start
in: query
description: Starting time in ISO 8601
schema:
type: string
format: date-time
- name: time_end
in: query
description: Ending time in ISO 8601
schema:
type: string
format: date-time
- name: time_format
in: query
description: 'If set, returned values will be in unix timestamp format (valid values: unix_sec, unix_millisec, unix_microsec, unix_nanosec)'
schema:
type: string
- name: period_id
in: query
description: 'Identifier of requested timeseries period (e.g. `5SEC` or `2MTH`), default value is `1SEC`'
schema:
type: string
- name: limit
in: query
description: 'Amount of items to return (optional, mininum is 1, maximum is 100000, default value is 100, if the parameter is used then every 100 output items are counted as one request)'
schema:
type: integer
format: int32
default: 100
responses:
'200':
description: successful operation
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/v1.MetricData'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.MetricData'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.MetricData'
application/x-msgpack:
schema:
type: array
items:
$ref: '#/components/schemas/v1.MetricData'
/v1/metrics/symbol/listing:
get:
tags:
- Metrics
summary: Listing of all supported metrics for symbol
description: Get data metrics for symbol.
parameters:
- name: metric_id
in: query
description: Metric identifier (from the Metrics -> Listing)
schema:
type: string
- name: exchange_id
in: query
description: Exchange identifier (from the Metadata -> Exchanges)
schema:
type: string
- name: symbol_id
in: query
description: Symbol identifier (from the Metadata -> Symbols)
schema:
type: string
responses:
'200':
description: successful operation
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/v1.ListingItem'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.ListingItem'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/v1.ListingItem'
application/x-msgpack:
schema:
type: array
items:
$ref: '#/components/schemas/v1.ListingItem'
/v1/metrics/symbol/current:
get:
tags:
- Metrics
summary: Current metrics for given symbol
description: Get current symbol metrics.
parameters:
- name: metric_id
in: query
description: Metric identifier (from the Metrics -> Listing)
schema:
type: string
- name: symbol_id
in: query
description: Symbol identifier (from the Metadata -> Symbols)
schema:
type: string
- name: exchange_id
in: query
description: Exchange id (from the Metadata -> Exchanges)