coinbase-api
Advanced tools
Comparing version 1.0.4 to 1.0.5
import { AxiosRequestConfig } from 'axios'; | ||
import { BaseRestClient } from './lib/BaseRestClient.js'; | ||
import { RestClientOptions, RestClientType } from './lib/requestUtils.js'; | ||
import { CancelINTXOrdersRequest, GetINTXAggregatedCandlesData, GetINTXDailyTradingVolumes, GetINTXFillsByPortfoliosRequest, GetINTXMatchingTransfersRequest, GetINTXOpenOrdersRequest, GetINTXPortfolioFillsRequest, INTXWithdrawToCounterpartyIdRequest, INTXWithdrawToCryptoAddressRequest, SubmitINTXOrderRequest, TransferINTXFundsBetweenPortfoliosRequest, TransferINTXPositionsBetweenPortfoliosRequest, UpdateINTXOpenOrderRequest, UpdateINTXPortfolioParametersRequest } from './types/request/coinbase-international.js'; | ||
import { CancelINTXOrdersRequest, GetINTXAggregatedCandlesData, GetINTXDailyTradingVolumes, GetINTXFillsByPortfoliosRequest, GetINTXIndexCandlesRequest, GetINTXIndexCompositionHistory, GetINTXMatchingTransfersRequest, GetINTXOpenOrdersRequest, GetINTXPortfolioFillsRequest, INTXWithdrawToCounterpartyIdRequest, INTXWithdrawToCryptoAddressRequest, SubmitINTXOrderRequest, TransferINTXFundsBetweenPortfoliosRequest, TransferINTXPositionsBetweenPortfoliosRequest, UpdateINTXOpenOrderRequest, UpdateINTXPortfolioParametersRequest } from './types/request/coinbase-international.js'; | ||
/** | ||
@@ -41,2 +41,37 @@ * REST client for Coinbase's Institutional International Exchange API: | ||
* | ||
* Index Endpoints | ||
* | ||
*/ | ||
/** | ||
* Get index composition | ||
* | ||
* Retrieves the latest index composition (metadata) with an ordered set of constituents. | ||
*/ | ||
getIndexComposition(params: { | ||
index: string; | ||
}): Promise<any>; | ||
/** | ||
* Get index composition history | ||
* | ||
* Retrieves a history of index composition records in a descending time order. | ||
* The results are an array of index composition data recorded at different "timestamps". | ||
*/ | ||
getIndexCompositionHistory(params: GetINTXIndexCompositionHistory): Promise<any>; | ||
/** | ||
* Get index price | ||
* | ||
* Retrieves the latest index price. | ||
*/ | ||
getIndexPrice(params: { | ||
index: string; | ||
}): Promise<any>; | ||
/** | ||
* Get index candles | ||
* | ||
* Retrieves the historical daily index prices in time descending order. | ||
* The daily values are represented as aggregated entries for the day in typical OHLC format. | ||
*/ | ||
getIndexCandles(params: GetINTXIndexCandlesRequest): Promise<any>; | ||
/** | ||
* | ||
* Instruments Endpoints | ||
@@ -43,0 +78,0 @@ * |
@@ -49,2 +49,43 @@ "use strict"; | ||
* | ||
* Index Endpoints | ||
* | ||
*/ | ||
/** | ||
* Get index composition | ||
* | ||
* Retrieves the latest index composition (metadata) with an ordered set of constituents. | ||
*/ | ||
getIndexComposition(params) { | ||
return this.get(`/api/v1/index/${params.index}/composition`); | ||
} | ||
/** | ||
* Get index composition history | ||
* | ||
* Retrieves a history of index composition records in a descending time order. | ||
* The results are an array of index composition data recorded at different "timestamps". | ||
*/ | ||
getIndexCompositionHistory(params) { | ||
const { index, ...query } = params; | ||
return this.get(`/api/v1/index/${index}/composition-history`, query); | ||
} | ||
/** | ||
* Get index price | ||
* | ||
* Retrieves the latest index price. | ||
*/ | ||
getIndexPrice(params) { | ||
return this.get(`/api/v1/index/${params.index}/price`); | ||
} | ||
/** | ||
* Get index candles | ||
* | ||
* Retrieves the historical daily index prices in time descending order. | ||
* The daily values are represented as aggregated entries for the day in typical OHLC format. | ||
*/ | ||
getIndexCandles(params) { | ||
const { index, ...query } = params; | ||
return this.get(`/api/v1/index/${index}/candles`, query); | ||
} | ||
/** | ||
* | ||
* Instruments Endpoints | ||
@@ -51,0 +92,0 @@ * |
@@ -8,2 +8,19 @@ /** | ||
* | ||
* Index Endpoints | ||
* | ||
*/ | ||
export interface GetINTXIndexCompositionHistory { | ||
index: string; | ||
time_from?: string; | ||
result_limit?: number; | ||
result_offset?: number; | ||
} | ||
export interface GetINTXIndexCandlesRequest { | ||
index: string; | ||
granularity: string; | ||
start: string; | ||
end?: string; | ||
} | ||
/** | ||
* | ||
* Instruments Endpoints | ||
@@ -10,0 +27,0 @@ * |
import { AxiosRequestConfig } from 'axios'; | ||
import { BaseRestClient } from './lib/BaseRestClient.js'; | ||
import { RestClientOptions, RestClientType } from './lib/requestUtils.js'; | ||
import { CancelINTXOrdersRequest, GetINTXAggregatedCandlesData, GetINTXDailyTradingVolumes, GetINTXFillsByPortfoliosRequest, GetINTXMatchingTransfersRequest, GetINTXOpenOrdersRequest, GetINTXPortfolioFillsRequest, INTXWithdrawToCounterpartyIdRequest, INTXWithdrawToCryptoAddressRequest, SubmitINTXOrderRequest, TransferINTXFundsBetweenPortfoliosRequest, TransferINTXPositionsBetweenPortfoliosRequest, UpdateINTXOpenOrderRequest, UpdateINTXPortfolioParametersRequest } from './types/request/coinbase-international.js'; | ||
import { CancelINTXOrdersRequest, GetINTXAggregatedCandlesData, GetINTXDailyTradingVolumes, GetINTXFillsByPortfoliosRequest, GetINTXIndexCandlesRequest, GetINTXIndexCompositionHistory, GetINTXMatchingTransfersRequest, GetINTXOpenOrdersRequest, GetINTXPortfolioFillsRequest, INTXWithdrawToCounterpartyIdRequest, INTXWithdrawToCryptoAddressRequest, SubmitINTXOrderRequest, TransferINTXFundsBetweenPortfoliosRequest, TransferINTXPositionsBetweenPortfoliosRequest, UpdateINTXOpenOrderRequest, UpdateINTXPortfolioParametersRequest } from './types/request/coinbase-international.js'; | ||
/** | ||
@@ -41,2 +41,37 @@ * REST client for Coinbase's Institutional International Exchange API: | ||
* | ||
* Index Endpoints | ||
* | ||
*/ | ||
/** | ||
* Get index composition | ||
* | ||
* Retrieves the latest index composition (metadata) with an ordered set of constituents. | ||
*/ | ||
getIndexComposition(params: { | ||
index: string; | ||
}): Promise<any>; | ||
/** | ||
* Get index composition history | ||
* | ||
* Retrieves a history of index composition records in a descending time order. | ||
* The results are an array of index composition data recorded at different "timestamps". | ||
*/ | ||
getIndexCompositionHistory(params: GetINTXIndexCompositionHistory): Promise<any>; | ||
/** | ||
* Get index price | ||
* | ||
* Retrieves the latest index price. | ||
*/ | ||
getIndexPrice(params: { | ||
index: string; | ||
}): Promise<any>; | ||
/** | ||
* Get index candles | ||
* | ||
* Retrieves the historical daily index prices in time descending order. | ||
* The daily values are represented as aggregated entries for the day in typical OHLC format. | ||
*/ | ||
getIndexCandles(params: GetINTXIndexCandlesRequest): Promise<any>; | ||
/** | ||
* | ||
* Instruments Endpoints | ||
@@ -43,0 +78,0 @@ * |
@@ -46,2 +46,43 @@ import { BaseRestClient } from './lib/BaseRestClient.js'; | ||
* | ||
* Index Endpoints | ||
* | ||
*/ | ||
/** | ||
* Get index composition | ||
* | ||
* Retrieves the latest index composition (metadata) with an ordered set of constituents. | ||
*/ | ||
getIndexComposition(params) { | ||
return this.get(`/api/v1/index/${params.index}/composition`); | ||
} | ||
/** | ||
* Get index composition history | ||
* | ||
* Retrieves a history of index composition records in a descending time order. | ||
* The results are an array of index composition data recorded at different "timestamps". | ||
*/ | ||
getIndexCompositionHistory(params) { | ||
const { index, ...query } = params; | ||
return this.get(`/api/v1/index/${index}/composition-history`, query); | ||
} | ||
/** | ||
* Get index price | ||
* | ||
* Retrieves the latest index price. | ||
*/ | ||
getIndexPrice(params) { | ||
return this.get(`/api/v1/index/${params.index}/price`); | ||
} | ||
/** | ||
* Get index candles | ||
* | ||
* Retrieves the historical daily index prices in time descending order. | ||
* The daily values are represented as aggregated entries for the day in typical OHLC format. | ||
*/ | ||
getIndexCandles(params) { | ||
const { index, ...query } = params; | ||
return this.get(`/api/v1/index/${index}/candles`, query); | ||
} | ||
/** | ||
* | ||
* Instruments Endpoints | ||
@@ -48,0 +89,0 @@ * |
@@ -8,2 +8,19 @@ /** | ||
* | ||
* Index Endpoints | ||
* | ||
*/ | ||
export interface GetINTXIndexCompositionHistory { | ||
index: string; | ||
time_from?: string; | ||
result_limit?: number; | ||
result_offset?: number; | ||
} | ||
export interface GetINTXIndexCandlesRequest { | ||
index: string; | ||
granularity: string; | ||
start: string; | ||
end?: string; | ||
} | ||
/** | ||
* | ||
* Instruments Endpoints | ||
@@ -10,0 +27,0 @@ * |
{ | ||
"name": "coinbase-api", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Node.js SDK for Coinbase's REST APIs and WebSockets, with TypeScript & strong end to end tests.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
932556
22071