Pair correlation

This API is to get requested left hand side pair exchange correlated with requested right hand pair exchange.

get
Get pair correlation

https://datascience.api.dev.bitcurate.com/pair_correlation
This endpoint allows you to get left hand pair correlated with requested right hand pair.
Request
Response
Request
Query Parameters
corr
optional
string
Correlation function, only accept ['spearman, 'pearson'].
filtersize
optional
number
size of correlation. Correlation t = correlation last t left close and last t right close. Default is 7. If hist_interval = 'd', 7 means 7d.
hist_interval
optional
string
size of date histogram, example '1h'. Default is '1h', only accept 'Nt', N = positive integer, t = ['h', 'd', 'm']. If 'm', only accept more than or equal to 10.
before_date
optional
string
Start date to get the trend, format 'm/d/Y H:M'. Default is now minus 2 days.
after_date
optional
string
Start date to get the trend, format 'm/d/Y H:M'. Default is now.
right_pair
optional
string
pair, example 'BTC/USDT'. Default is 'BTC/USDT'.
right_exchange
optional
string
exchange, example 'binance'. Default is None. If None, it will average all exchanges for the pair.
left_pair
optional
string
pair, example 'ETH/USDT'. Default is 'ETH/USDT'.
left_exchange
optional
string
exchange, example 'binance'. Default is None. If None, it will average all exchanges for the pair.
Response
200: OK
Successfully retrieved.
{
"correlation": [
null,
null,
null,
null,
null,
null,
0.7857142857142859,
0.8928571428571429,
0.8928571428571429,
1,
1,
0.9642857142857145,
0.8928571428571429,
0.7500000000000002,
0.5,
0.5,
0.14285714285714288,
-0.10714285714285716,
0.42857142857142866,
0.7857142857142859,
0.8571428571428573,
0.9642857142857145,
1,
0.9642857142857145,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0.8928571428571429,
0.8214285714285715,
0.7500000000000002,
0.42857142857142866,
0.03571428571428572,
0.5357142857142858,
0.8571428571428573,
0.8571428571428573,
0.642857142857143,
0.6785714285714287,
0.8571428571428573,
0.9642857142857145,
0.9642857142857145,
0.9285714285714288,
0.8928571428571429,
0.9285714285714288,
0.9285714285714288,
0.9285714285714288,
0.9285714285714288,
0.9642857142857145
],
"left_close": [
200.0888065185547,
201.5873016357422,
201.41553679508948,
203.86012638636998,
202.8760763056138,
199.76356876918248,
197.22113509143855,
198.87662079754998,
202.04573212767676,
208.09006666100544,
212.73438605709353,
215.50514868866625,
215.28676986694336,
215.265799168178,
213.42609202432976,
212.1468302408854,
214.0560294642593,
213.59171699075137,
210.45347152931103,
208.05199508666993,
211.4760279935949,
212.24701575409594,
211.70174724033902,
215.11776399264372,
217.0824978593467,
218.56607856479943,
217.37699455762433,
215.87713968318744,
214.8074480329241,
216.35615975516183,
215.9928591111127,
212.2495061202015,
209.42399552289177,
213.56573661968864,
222.690486795762,
224.2430905822321,
224.18286852155413,
223.89988275784165,
223.6427461912306,
224.18593815394811,
223.94986149884653,
223.27948052156057,
226.2149946793266,
224.14716570818865,
224.22064834704503,
222.80405436924525,
222.5559695724153,
222.0118439162987,
220.9582360839844,
220.971792809049,
221.41960063125148,
220.5978677873131,
217.63220094953263,
217.47584047670716,
217.16756362915038,
218.61455584586935,
215.98142835828992
],
"right_close": [
9497.68134375,
9542.503404017858,
9506.198408564815,
9545.2412109375,
9469.960669849537,
9329.903929798316,
9241.447518547662,
9302.34195601852,
9450.281354631696,
9591.1748046875,
9716.486953406025,
9714.039271763393,
9745.788495232076,
9813.838389444694,
9845.452999441964,
9698.366440716913,
9805.824085263039,
9789.631081973805,
9650.632531474821,
9605.062827845983,
9706.519176793981,
9734.650055803571,
9713.485267857142,
9750.924717881944,
9830.94900251116,
9862.231591796875,
9835.585815429688,
9768.694848808453,
9740.048332868304,
9810.338057002315,
9789.771131150266,
9541.330267816997,
9418.919111689815,
9683.760093470983,
10355.349652458639,
10539.838396470324,
10505.350620814732,
10559.306163194444,
10523.061551339286,
10569.78357282366,
10570.912558451186,
10552.571352751358,
10646.69840148493,
10613.365489447295,
10623.600460379464,
10585.650558035713,
10593.641451870439,
10528.062938745472,
10452.866901506697,
10483.77298129562,
10472.821621659874,
10459.81447405134,
10326.374428013392,
10322.571903935184,
10312.253717912947,
10462.158140345982,
10302.912109375
],
"timestamp": [
"2019-07-17T05:00:00",
"2019-07-17T06:00:00",
"2019-07-17T07:00:00",
"2019-07-17T08:00:00",
"2019-07-17T09:00:00",
"2019-07-17T10:00:00",
"2019-07-17T11:00:00",
"2019-07-17T12:00:00",
"2019-07-17T13:00:00",
"2019-07-17T14:00:00",
"2019-07-17T15:00:00",
"2019-07-17T16:00:00",
"2019-07-17T17:00:00",
"2019-07-17T18:00:00",
"2019-07-17T19:00:00",
"2019-07-17T20:00:00",
"2019-07-17T21:00:00",
"2019-07-17T22:00:00",
"2019-07-17T23:00:00",
"2019-07-18T00:00:00",
"2019-07-18T01:00:00",
"2019-07-18T02:00:00",
"2019-07-18T03:00:00",
"2019-07-18T04:00:00",
"2019-07-18T05:00:00",
"2019-07-18T06:00:00",
"2019-07-18T07:00:00",
"2019-07-18T08:00:00",
"2019-07-18T09:00:00",
"2019-07-18T10:00:00",
"2019-07-18T11:00:00",
"2019-07-18T12:00:00",
"2019-07-18T13:00:00",
"2019-07-18T14:00:00",
"2019-07-18T15:00:00",
"2019-07-18T16:00:00",
"2019-07-18T17:00:00",
"2019-07-18T18:00:00",
"2019-07-18T19:00:00",
"2019-07-18T20:00:00",
"2019-07-18T21:00:00",
"2019-07-18T22:00:00",
"2019-07-18T23:00:00",
"2019-07-19T00:00:00",
"2019-07-19T01:00:00",
"2019-07-19T02:00:00",
"2019-07-19T03:00:00",
"2019-07-19T04:00:00",
"2019-07-19T05:00:00",
"2019-07-19T06:00:00",
"2019-07-19T07:00:00",
"2019-07-19T08:00:00",
"2019-07-19T09:00:00",
"2019-07-19T10:00:00",
"2019-07-19T11:00:00",
"2019-07-19T12:00:00",
"2019-07-19T13:00:00"
]
}
400: Bad Request
Errors from parameters given.
{
"message": "distance from 2 dates need less than 90 days",
"status": 400
}
{
"message": "hist_interval only accept ['h', 'd', 'm']",
"status": 400
}
{
"message": "hist_interval must Nt, N = positive integer, t = interval",
"status": 400
}
{
"message": "'m' size only accept more than or equal to 10",
"status": 400
}
{
"message": "corr only accept ['pearson', 'spearman']",
"status": 400
}
{
"message": "filtersize must bigger than 1",
"status": 400
}
{
"message": "filtersize is too big",
"status": 400
}
{
"message": "left pair data not available",
"status": 400
}
{
"message": "right pair data not available",
"status": 400
}