-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcoinindex_DataFeed_1.0.0_swagger.json
982 lines (982 loc) · 37.5 KB
/
coinindex_DataFeed_1.0.0_swagger.json
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
{
"swagger" : "2.0",
"info" : {
"description" : "DataFeed API for CoinIndex cryptocurrency and exchange data",
"version" : "1.0.0",
"title" : "CoinIndex DataFeed API",
"contact" : {
"email" : "datafeed@coinindex.agency"
},
"license" : {
"name" : "Apache 2.0",
"url" : "http://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"tags" : [ {
"name" : "public",
"description" : "Access free, without License key"
}, {
"name" : "license",
"description" : "License key required"
}, {
"name" : "developers",
"description" : "For developers and admin"
} ],
"schemes" : [ "https" ],
"paths" : {
"/time" : {
"get" : {
"tags" : [ "developers", "public" ],
"summary" : "Get server time",
"description" : "Request current server time in UTC",
"operationId" : "time",
"produces" : [ "application/json" ],
"responses" : {
"200" : {
"description" : "Server current time",
"schema" : {
"type" : "object",
"properties" : {
"status" : {
"type" : "string",
"description" : "Status of the query",
"example" : "OK",
"enum" : [ "OK", "ERROR" ]
},
"data" : {
"type" : "object",
"description" : "Current system time",
"properties" : {
"time" : {
"type" : "integer",
"description" : "Server time in UTC timestamp",
"example" : 1520856000
}
}
}
},
"required" : [ "status", "data - time" ],
"example" : {
"status" : "OK",
"data" : {
"time" : 1520856000
}
}
}
},
"500" : {
"description" : "Server system error"
}
}
}
},
"/health" : {
"get" : {
"tags" : [ "developers", "public" ],
"summary" : "Check system alive",
"description" : "Checking current system\\'s alive",
"operationId" : "health",
"produces" : [ "application/json" ],
"responses" : {
"200" : {
"description" : "Server current health status",
"schema" : {
"type" : "object",
"properties" : {
"status" : {
"type" : "string",
"description" : "Status of the query",
"example" : "OK",
"enum" : [ "OK", "ERROR" ]
},
"data" : {
"type" : "string",
"description" : "System status",
"example" : "OK",
"enum" : [ "OK", "ERROR" ]
}
},
"required" : [ "status", "data" ],
"example" : {
"status" : "OK",
"data" : "OK"
}
}
},
"500" : {
"description" : "Server system error"
}
}
}
},
"/fx/rates" : {
"get" : {
"tags" : [ "license" ],
"summary" : "Latest FX rates",
"description" : "Provides raw access to latest FX rates, used for internal calculates",
"operationId" : "fx_rates",
"produces" : [ "application/json" ],
"responses" : {
"200" : {
"description" : "Current used FX rates",
"schema" : {
"type" : "object",
"properties" : {
"status" : {
"type" : "string",
"description" : "Status of the query"
},
"data" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"symbol" : {
"type" : "string",
"description" : "FX pair symbol",
"example" : "EUR/USD"
},
"rate" : {
"type" : "number",
"format" : "float",
"description" : "FX rate",
"example" : 1.2964
},
"updated_at" : {
"type" : "integer",
"description" : "UTC datetime of rates last update",
"example" : 1520856000
},
"updated_datetime" : {
"type" : "string",
"description" : "Human readable datetime of rates last update",
"example" : "2018-03-12 12:00:00"
},
"currency" : {
"type" : "string",
"description" : "ISO code of currency",
"example" : "USD"
}
}
}
}
},
"required" : [ "status", "data" ],
"example" : {
"status" : "OK",
"data" : [ {
"symbol" : "USD/RUB",
"rate" : 56.8964,
"updated_at" : 1520856000,
"updated_datetime" : "2018-03-12 12:00:00",
"currency" : "RUB"
} ]
}
}
},
"500" : {
"description" : "Server system error"
}
}
}
},
"/exchanges/list" : {
"get" : {
"tags" : [ "license" ],
"summary" : "List of all connected exchanges",
"description" : "Provides full list of all connected cryptocurrency exchanges",
"operationId" : "exchanges_list",
"produces" : [ "application/json" ],
"responses" : {
"200" : {
"description" : "List of all exchanges",
"schema" : {
"type" : "object",
"properties" : {
"status" : {
"type" : "string",
"description" : "Status of the query"
},
"data" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"ex_id" : {
"type" : "integer",
"description" : "Unique exchange ID",
"example" : "62 for Bitfinex"
},
"ex_code" : {
"type" : "string",
"description" : "Unique symbolic code of exchange (lowercase, only alphabet and numbers)",
"example" : "bitfinex for Bitfinex"
},
"ex_name" : {
"type" : "string",
"description" : "Exchange full name",
"example" : "Bitfinex, BTCtrade.com.ua"
},
"ex_url" : {
"type" : "string",
"description" : "URL for exchange site",
"example" : "https://www.bitfinex.com/"
},
"ex_country_code" : {
"type" : "string",
"description" : "ISO code of country (register or operate or main market or datacenter)",
"example" : "USA, EU, CH, UA"
},
"total_trading_pairs" : {
"type" : "integer",
"description" : "Total trading pair, available on the exchange",
"example" : 6
},
"total_trades" : {
"type" : "integer",
"description" : "Total trades collected from exchange (from all pairs)"
},
"last_update_datetime" : {
"type" : "string",
"description" : "Human readable datetime of last update",
"example" : "2018-03-12 12:00:00"
}
}
}
}
},
"required" : [ "status", "data" ],
"example" : {
"status" : "OK",
"data" : [ {
"ex_id" : 51,
"ex_code" : "abucoins",
"ex_name" : "Abucoins",
"ex_url" : "https://abucoins.com/",
"ex_country_code" : "PL",
"total_trading_pairs" : 36,
"total_trades" : 38122,
"last_update_datetime" : "2018-03-13 09:24:01"
} ]
}
}
},
"500" : {
"description" : "Server system error"
}
}
}
},
"/exchanges/listing" : {
"get" : {
"tags" : [ "license" ],
"summary" : "New trading pair listed by date",
"description" : "Provides full list of all new listing for given date",
"operationId" : "exchanges_listing",
"produces" : [ "application/json" ],
"parameters" : [ {
"in" : "query",
"name" : "date",
"type" : "string",
"format" : "date",
"required" : false,
"description" : "Date for listing (current date if empty), format YYYY-MM-DD"
} ],
"responses" : {
"200" : {
"description" : "All new listings on given date, separated by exchange",
"schema" : {
"type" : "object",
"properties" : {
"status" : {
"type" : "string",
"description" : "Status of the query"
},
"data" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"ex_id" : {
"type" : "integer",
"description" : "Unique exchange ID",
"example" : "62 for Bitfinex"
},
"ex_code" : {
"type" : "string",
"description" : "Unique symbolic code of exchange (lowercase, only alphabet and numbers)",
"example" : "bitfinex for Bitfinex"
},
"ex_name" : {
"type" : "string",
"description" : "Exchange full name",
"example" : "Bitfinex, BTCtrade.com.ua"
},
"ex_url" : {
"type" : "string",
"description" : "URL for exchange site",
"example" : "https://www.bitfinex.com/"
},
"ex_country_code" : {
"type" : "string",
"description" : "ISO code of country (register or operate or main market or datacenter)",
"example" : "USA, EU, CH, UA"
},
"pairs" : {
"type" : "array",
"description" : "Array of new listed pairs",
"items" : {
"type" : "object",
"properties" : {
"asset_id" : {
"type" : "integer",
"description" : "Unique id of this currency pair",
"example" : 99
},
"asset" : {
"type" : "string",
"description" : "Asset symbol",
"example" : "BTC"
},
"currency" : {
"type" : "string",
"description" : "Currency symbol",
"example" : "USD"
},
"symbol" : {
"type" : "string",
"description" : "Canonical trading pair symbol",
"example" : "BTC/USD"
},
"asset_type" : {
"type" : "string",
"description" : "Asset type",
"example" : "CUR (Currency), FUT (Futures), OPT (Option), SWP (Swap)"
},
"total_trades" : {
"type" : "integer",
"description" : "Total collected trades for this pair",
"example" : 212
},
"added_at_datetime" : {
"type" : "string",
"description" : "Datetime of adding to our base",
"example" : "2018-02-23 05:38:02"
}
}
}
}
}
}
}
},
"required" : [ "status", "data" ],
"example" : {
"status" : "OK",
"data" : [ {
"ex_id" : 51,
"ex_code" : "abucoins",
"ex_name" : "Abucoins",
"ex_url" : "https://abucoins.com/",
"ex_country_code" : "PL",
"total_trading_pairs" : 36,
"total_trades" : 38122,
"last_update_datetime" : "2018-03-13 09:24:01"
} ]
}
}
},
"500" : {
"description" : "Server system error"
}
}
}
},
"/assets/exchanges" : {
"get" : {
"tags" : [ "license" ],
"summary" : "Exchange on which the specified asset is traded",
"description" : "Provides full list of exchanges, who traded asset or currency (or trading pair)",
"operationId" : "assets_exchanges",
"produces" : [ "application/json" ],
"parameters" : [ {
"in" : "query",
"name" : "asset",
"type" : "string",
"required" : true,
"description" : "Asset code to find all traded pairs(e.g. BTC)"
}, {
"in" : "query",
"name" : "currency",
"type" : "string",
"required" : false,
"description" : "Currency code to find traded pairs for asset (e.g. USD or ETH)"
}, {
"in" : "query",
"name" : "symbol",
"type" : "string",
"required" : false,
"description" : "Full canonical trading pair, e.g. BTC/USD"
}, {
"in" : "query",
"name" : "hidden",
"type" : "number",
"required" : false,
"description" : "Include trading pairs without collected trades or not"
} ],
"responses" : {
"200" : {
"description" : "All found exchanges and trading pairs",
"schema" : {
"type" : "object",
"properties" : {
"status" : {
"type" : "string",
"description" : "Status of the query"
},
"data" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"ex_id" : {
"type" : "integer",
"description" : "Unique exchange ID",
"example" : "62 for Bitfinex"
},
"ex_code" : {
"type" : "string",
"description" : "Unique symbolic code of exchange (lowercase, only alphabet and numbers)",
"example" : "bitfinex for Bitfinex"
},
"ex_name" : {
"type" : "string",
"description" : "Exchange full name",
"example" : "Bitfinex, BTCtrade.com.ua"
},
"ex_url" : {
"type" : "string",
"description" : "URL for exchange site",
"example" : "https://www.bitfinex.com/"
},
"ex_country_code" : {
"type" : "string",
"description" : "ISO code of country (register or operate or main market or datacenter)",
"example" : "USA, EU, CH, UA"
},
"pairs" : {
"type" : "array",
"description" : "Array of traded pairs",
"items" : {
"type" : "object",
"properties" : {
"asset_id" : {
"type" : "integer",
"description" : "Unique id of this currency pair",
"example" : 99
},
"asset" : {
"type" : "string",
"description" : "Asset symbol",
"example" : "BTC"
},
"currency" : {
"type" : "string",
"description" : "Currency symbol",
"example" : "USD"
},
"symbol" : {
"type" : "string",
"description" : "Canonical trading pair symbol",
"example" : "BTC/USD"
},
"asset_type" : {
"type" : "string",
"description" : "Asset type",
"example" : "CUR (Currency), FUT (Futures), OPT (Option), SWP (Swap)"
},
"total_trades" : {
"type" : "integer",
"description" : "Total collected trades for this pair",
"example" : 212
},
"added_at_datetime" : {
"type" : "string",
"description" : "Datetime of adding to our base",
"example" : "2018-02-23 05:38:02"
},
"last_trade_datetime" : {
"type" : "string",
"description" : "Last trade datetime",
"example" : "2018-02-23 05:38:02"
}
}
}
}
}
}
}
},
"required" : [ "status", "data" ],
"example" : {
"status" : "OK",
"data" : [ {
"ex_id" : 51,
"ex_code" : "abucoins",
"ex_name" : "Abucoins",
"ex_url" : "https://abucoins.com/",
"ex_country_code" : "PL",
"pairs" : [ {
"asset_id" : 1,
"asset" : "BTC",
"currency" : "USD",
"symbol" : "BTC/USD",
"asset_type" : "CUR",
"total_trades" : 345,
"added_at_datetime" : "2018-02-23 05:38:02",
"last_trade_datetime" : "2018-02-25 05:38:02"
} ]
} ]
}
}
},
"500" : {
"description" : "Server system error"
}
}
}
},
"/exchange/pairs" : {
"get" : {
"tags" : [ "license" ],
"summary" : "List of all current traded pairs",
"description" : "List of all current traded pairs on the exchange",
"operationId" : "exchange_pairs",
"produces" : [ "application/json" ],
"parameters" : [ {
"in" : "query",
"name" : "exchange",
"type" : "string",
"required" : true,
"description" : "Exchange ID or code (e.g. 65 or bitfinex)"
}, {
"in" : "query",
"name" : "hidden",
"type" : "number",
"required" : false,
"description" : "Include trading pairs without collected trades or not"
} ],
"responses" : {
"200" : {
"description" : "All found trading pairs by exchange",
"schema" : {
"type" : "object",
"properties" : {
"status" : {
"type" : "string",
"description" : "Status of the query"
},
"data" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"asset_id" : {
"type" : "integer",
"description" : "Unique id of this currency pair",
"example" : 99
},
"asset" : {
"type" : "string",
"description" : "Asset symbol",
"example" : "BTC"
},
"currency" : {
"type" : "string",
"description" : "Currency symbol",
"example" : "USD"
},
"symbol" : {
"type" : "string",
"description" : "Canonical trading pair symbol",
"example" : "BTC/USD"
},
"asset_type" : {
"type" : "string",
"description" : "Asset type",
"example" : "CUR (Currency), FUT (Futures), OPT (Option), SWP (Swap)"
},
"total_trades" : {
"type" : "integer",
"description" : "Total collected trades for this pair",
"example" : 212
},
"added_at_datetime" : {
"type" : "string",
"description" : "Datetime of adding to our base",
"example" : "2018-02-23 05:38:02"
},
"last_trade_datetime" : {
"type" : "string",
"description" : "Last trade datetime",
"example" : "2018-02-23 05:38:02"
}
}
}
}
},
"required" : [ "status", "data" ],
"example" : {
"status" : "OK",
"data" : [ {
"asset_id" : 1,
"asset" : "BTC",
"currency" : "USD",
"symbol" : "BTC/USD",
"asset_type" : "CUR",
"total_trades" : 345,
"added_at_datetime" : "2018-02-23 05:38:02",
"last_trade_datetime" : "2018-02-25 05:38:02"
}
]
}
}
},
"500" : {
"description" : "Server system error"
}
}
}
},
"/exchange/trades" : {
"get" : {
"tags" : [ "license" ],
"summary" : "List of latest trades",
"description" : "List of up to 100 latest trades on the exchange",
"operationId" : "exchange_trades",
"produces" : [ "application/json" ],
"parameters" : [ {
"in" : "query",
"name" : "exchange",
"type" : "string",
"required" : true,
"description" : "Exchange ID or code (e.g. 65 or bitfinex)"
},{
"in" : "query",
"name" : "asset",
"type" : "string",
"required" : true,
"description" : "Asset ID to obtain trades (e.g. 41, see @/exchange/pairs)"
}],
"responses" : {
"200" : {
"description" : "All latest trades (up to 100) by exchange",
"schema" : {
"type" : "object",
"properties" : {
"status" : {
"type" : "string",
"description" : "Status of the query"
},
"data" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"_id" : {
"type" : "integer",
"description" : "Unique id of this trade",
"example" : 619004770
},
"trade_id" : {
"type" : "string",
"description" : "Unique id of this trade provided by exchange",
"example" : "212085514 or ffeba8328579db9495db6e8b0f77c475"
},
"symbol" : {
"type" : "string",
"description" : "Canonical trading pair symbol",
"example" : "BTC/USD"
},
"asset_type" : {
"type" : "string",
"description" : "Asset type",
"example" : "CUR (Currency), FUT (Futures), OPT (Option), SWP (Swap)"
},
"trade_ts" : {
"type" : "integer",
"description" : "UTC time of this trade",
"example" : "1521125789"
},
"trade_datetime" : {
"type" : "string",
"description" : "Datetime of this trade",
"example" : "2018-03-15 14:56:29"
},
"trade_side" : {
"type" : "string",
"description" : "Trade side, if provided from exchange",
"example" : "BUY, SELL or empty string value"
},
"trade_price" : {
"type" : "float",
"description" : "Trade price (in currency)",
"example" : 0.00031596
},
"trade_amount" : {
"type" : "float",
"description" : "Total amount of trade, in asset",
"example" : 2500
},
"trade_total" : {
"type" : "float",
"description" : "Total sum of trade, including trading fee, if provided by exchange",
"example" : 0.7899
},
"trade_hash" : {
"type" : "string",
"description" : "Hash (MD5 func.) of this trade, including all metadata. May be used to verify integrity",
"example" : "99acf3f36c4eb7056f739ea382127176"
}
}
}
}
},
"required" : [ "status", "data" ],
"example" : {
"status" : "OK",
"data" : [ {
_id: 619004770,
trade_id: "212085514",
asset_id: 24964,
symbol: "AID/ETH",
asset_type: "CUR",
trade_ts: 1521125789,
trade_datetime: "2018-03-15 14:56:29",
trade_side: "SELL",
trade_price: 0.00031596,
trade_amount: 2500,
trade_total: 0.7899,
trade_hash: "99acf3f36c4eb7056f739ea382127176"
},
{
_id: 619004769,
trade_id: "212085515",
asset_id: 24964,
symbol: "AID/ETH",
asset_type: "CUR",
trade_ts: 1521125789,
trade_datetime: "2018-03-15 14:56:29",
trade_side: "SELL",
trade_price: 0.00031595,
trade_amount: 1249.875,
trade_total: 0.394898006,
trade_hash: "432a6c68153f0244ab00d27536374c25"
},
{
_id: 618483974,
trade_id: "212055621",
asset_id: 24964,
symbol: "AID/ETH",
asset_type: "CUR",
trade_ts: 1521122145,
trade_datetime: "2018-03-15 13:55:45",
trade_side: "BUY",
trade_price: 0.00031796,
trade_amount: 1249.875,
trade_total: 0.397410255,
trade_hash: "a89c2f1b4df4f08dd6cc21659ed0a41b"
}
]
}
}
},
"500" : {
"description" : "Server system error"
}
}
}
},
"/exchange/prices" : {
"get" : {
"tags" : [ "license" ],
"summary" : "Aggregated price by symbol from exchange",
"description" : "Provides 15 min aggregated and validated price (OHLC, TWAP, VWAP, Mid and volumes)",
"operationId" : "exchange_prices",
"produces" : [ "application/json" ],
"parameters" : [ {
"in" : "query",
"name" : "asset",
"type" : "string",
"required" : true,
"description" : "Unique asset ID"
}, {
"in" : "query",
"name" : "exchange",
"type" : "string",
"required" : false,
"description" : "Exchange ID or code"
}, {
"in" : "query",
"name" : "to",
"type" : "number",
"required" : false,
"description" : "UTC timestamp"
},{
"in" : "query",
"name" : "limit",
"type" : "number",
"required" : false,
"description" : "Count results, from 1 up to 1000, default 100"
} ],
"responses" : {
"200" : {
"description" : "Returns aggregated prices from exchange (with 15 min timeframe)",
"schema" : {
"type" : "object",
"properties" : {
"status" : {
"type" : "string",
"description" : "Status of the query"
},
"data" : {
"type" : "array",
"items" : {
"type" : "array",
"items" : {
"type" : "object",
"properties": {
"_id" : {
"type" : "integer",
"description" : "Unique price ID",
"example" : "14350870"
},
"asset_id" : {
"type" : "integer",
"description" : "Unique id of this currency pair",
"example" : 99
},
"symbol" : {
"type" : "string",
"description" : "Canonical trading pair symbol",
"example" : "BTC/USD"
},
"price_twap" : {
"type" : "float",
"description" : "TWAP price (Time-Weighted average price)",
"example" : "24302.5"
},
"price_vwap" : {
"type" : "float",
"description" : "VWAP price (Volume-Weighted average price)",
"example" : "24302.5"
},
"price_mid" : {
"type" : "float",
"description" : "Median price",
"example" : "24302.5"
},
"price_low" : {
"type" : "float",
"description" : "Minimum price on the period",
"example" : "24300"
},
"price_high" : {
"type" : "float",
"description" : "Maximum price on the period",
"example" : "24304"
},
"price_open" : {
"type" : "float",
"description" : "First (open) price on the period",
"example" : "24304"
},
"price_close" : {
"type" : "float",
"description" : "Last (close) price on the period",
"example" : "24300"
},
"price_twap_dev_prc" : {
"type" : "float",
"description" : "Change in TWAP price relative to the previous value, percent",
"example" : "-5.31"
},
"price_vwap_dev_prc" : {
"type" : "float",
"description" : "Change in VWAP price relative to the previous value, percent",
"example" : "-3.31"
},
"price_mid_dev_prc" : {
"type" : "float",
"description" : "Change in median price relative to the previous value, percent",
"example" : "-5.33"
},
"vol_open" : {
"type" : "float",
"description" : "Total trade volume by open price",
"example" : "0.239"
},
"vol_low" : {
"type" : "float",
"description" : "Total trade volume by min price",
"example" : "0.08424"
},
"vol_high" : {
"type" : "float",
"description" : "Total trade volume by high price",
"example" : "0.239"
},
"vol_close" : {
"type" : "float",
"description" : "Total trade volume by close price",
"example" : "0.08424"
},
"trades_used" : {
"type" : "integer",
"description" : "Total trades, aggregated in the period",
"example" : "12"
},
"trades_volume" : {
"type" : "integer",
"description" : "Total trade volume in the period",
"example" : "12"
},
"trades_ts_from" : {
"type" : "integer",
"description" : "Timestamp beginning of the period",
"example" : "1521207900"
},
"trades_ts_to" : {
"type" : "integer",
"description" : "Timestamp ending of the period",
"example" : "1521207900"
},
"time_from_previous_trade" : {
"type" : "integer",
"description" : "How much seconds has passed from the previous trade",
"example" : "400"
},
"compliance_total_level" : {
"type" : "integer",
"description" : "Total risk score of our automated checking system. 0 - all test passed OK, 1 - badly, but OK, 2 or higer - untrusted period",
"example" : "0"
}
}
}
}
}
},
"required" : [ "status", "data" ],
"example" : {"status":"OK","data":[{"_id":14523006,"asset_id":2,"symbol":"BTC\/UAH","price_twap":221355.125,"price_vwap":221321.02626012,"price_mid":221266,"price_min":"220521","price_max":"222300","price_open":220521,"price_close":222217,"price_twap_dev_prc":-35.09,"price_vwap_dev_prc":-35.1,"price_mid_dev_prc":-35.11,"vol_open":0.0022,"vol_min":"0.0022","vol_high":0.002997,"vol_close":0.012,"trades_used":8,"trades_volume":0.096915,"trades_ts_from":1521275400,"trades_ts_to":1521276300,"time_from_previous_trade":0,"compliance_total_level":0,"price_low":220521,"price_high":222300,"vol_low":0.0022},{"_id":14520515,"asset_id":2,"symbol":"BTC\/UAH","price_twap":221763.33333333,"price_vwap":221928.25606146,"price_mid":222385,"price_min":"220515","price_max":"222390","price_open":220515,"price_close":222385,"price_twap_dev_prc":-34.97,"price_vwap_dev_prc":-34.92,"price_mid_dev_prc":-34.78,"vol_open":0.01,"vol_min":"0.01","vol_high":0.006301,"vol_close":0.024572,"trades_used":3,"trades_volume":0.040873,"trades_ts_from":1521274500,"trades_ts_to":1521275400,"time_from_previous_trade":0,"compliance_total_level":0,"price_low":220515,"price_high":222390,"vol_low":0.01},{"_id":14517660,"asset_id":2,"symbol":"BTC\/UAH","price_twap":221361,"price_vwap":220954.30255224,"price_mid":220510,"price_min":"220510","price_max":"223063","price_open":220510,"price_close":223063,"price_twap_dev_prc":-35.08,"price_vwap_dev_prc":-35.2,"price_mid_dev_prc":-35.33,"vol_open":0.04,"vol_min":"0.04","vol_high":0.008428,"vol_close":0.008428,"trades_used":3,"trades_volume":0.048428,"trades_ts_from":1521273600,"trades_ts_to":1521274500,"time_from_previous_trade":0,"compliance_total_level":0,"price_low":220510,"price_high":223063,"vol_low":0.04}]}
}
},
"500" : {
"description" : "Server system error"
}
}
}
},
},
"host" : "virtserver.swaggerhub.com",
"basePath" : "/coinindex/DataFeed/1.0.0"
}