Added Market Data Endpoints For Linear

This commit is contained in:
CryptoCompiler
2021-01-22 10:15:36 +00:00
committed by GitHub
parent 3e14c63002
commit e345943327

View File

@@ -33,10 +33,35 @@ export class LinearClient extends SharedEndpoints {
);
return this;
}
//------------Market Data Endpoints------------>
getKline(params: {
symbol: string;
interval: string;
from: number;
limit?: number;
}): GenericAPIResponse {
return this.requestWrapper.get('/public/linear/kline', params);
}
/**
* @public Get the last funding rate.
*/
* @deprecated use getTrades() instead
*/
getPublicTradingRecords(params: {
symbol: string;
from?: number;
limit?: number;
}): GenericAPIResponse {
return this.getTrades(params);
}
getTrades(params: {
symbol: string;
from?: number;
limit?: number;
}): GenericAPIResponse {
return this.requestWrapper.get('/public/linear/recent-trading-records', params);
}
getLastFundingRate(params: {
symbol: string;
@@ -44,4 +69,40 @@ export class LinearClient extends SharedEndpoints {
return this.requestWrapper.get('public/linear/funding/prev-funding-rate', params);
}
getMarkPriceKline(params: {
symbol: string;
interval: string;
from: number;
limit?: number;
}): GenericAPIResponse {
return this.requestWrapper.get('/public/linear/mark-price-kline', params);
}
getIndexPriceKline(params: {
symbol: string;
interval: string;
from: number;
limit?: number;
}): GenericAPIResponse {
return this.requestWrapper.get('/public/linear/index-price-kline', params);
}
getPremiumIndexKline(params: {
symbol: string;
interval: string;
from: number;
limit?: number;
}): GenericAPIResponse {
return this.requestWrapper.get('/public/linear/premium-index-kline', params);
}
//-----------Account Data Endpoints------------>
//------------Wallet Data Endpoints------------>
//-------------API Data Endpoints-------------->
}