@altangent/lib-coinbase
Advanced tools
Comparing version 0.11.1 to 0.12.0
@@ -18,2 +18,3 @@ /// <reference types="node" /> | ||
getTransaction(accountid: string, transactionId: string): Promise<Results.SingleResult<Results.Transaction>>; | ||
candles(marketId: string, start: string, end: string, granularity: number): Promise<number[][]>; | ||
request<T>(path: string, query?: any): Promise<T>; | ||
@@ -20,0 +21,0 @@ protected _cleanOptions(options: any): any; |
@@ -54,2 +54,9 @@ "use strict"; | ||
} | ||
async candles(marketId, start, end, granularity) { | ||
const url = `https://api.exchange.coinbase.com/products/${marketId}/candles?granularity=${granularity}&start=${start}&end=${end}`; | ||
const headers = { | ||
"User-Agent": "curl/7.74", | ||
}; | ||
return (0, lib_http_1.request)({ url, method: "GET", headers }); | ||
} | ||
request(path, query) { | ||
@@ -56,0 +63,0 @@ const key = this.key; |
@@ -72,2 +72,15 @@ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ | ||
public async candles( | ||
marketId: string, | ||
start: string, | ||
end: string, | ||
granularity: number, | ||
): Promise<number[][]> { | ||
const url = `https://api.exchange.coinbase.com/products/${marketId}/candles?granularity=${granularity}&start=${start}&end=${end}`; | ||
const headers = { | ||
"User-Agent": "curl/7.74", | ||
}; | ||
return request({ url, method: "GET", headers }) as Promise<number[][]>; | ||
} | ||
public request<T>(path: string, query?: any): Promise<T> { | ||
@@ -74,0 +87,0 @@ const key = this.key; |
{ | ||
"name": "@altangent/lib-coinbase", | ||
"version": "0.11.1", | ||
"version": "0.12.0", | ||
"description": "Coinbase API client", | ||
@@ -27,3 +27,3 @@ "author": "Brian Mancini <bmancini@gmail.com>", | ||
"dependencies": { | ||
"@altangent/lib-http": "^0.11.1" | ||
"@altangent/lib-http": "^0.12.0" | ||
}, | ||
@@ -33,3 +33,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "4c97d81cca7d7cda83da0d9ed839950b33a67ad8" | ||
"gitHead": "8f3d7416f214cf457e31e668bf4616bb0b3e4094" | ||
} |
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
24164
534
+ Added@altangent/lib-http@0.12.9(transitive)
- Removed@altangent/lib-http@0.11.1(transitive)
Updated@altangent/lib-http@^0.12.0