@@ -32,6 +32,14 @@ export enum FiatBackend {
3232 * https://api.coindesk.com/v1/bpi/historical/close.json
3333 */
3434 COINDESK = 'COINDESK' ,
35+ /** CUSTOM - Use custom price data provided in a CSV file for fiat price information. */
36+ CUSTOM = 'CUSTOM' ,
37+ /**
38+ * COINGECKO - Use the CoinGecko API for fiat price information.
39+ * This API is reached through the following URL:
40+ * https://api.coingecko.com/api/v3/coins/bitcoin/market_chart
41+ */
42+ COINGECKO = 'COINGECKO' ,
3543 UNRECOGNIZED = 'UNRECOGNIZED'
3644}
3745
@@ -298,6 +306,8 @@ export interface ExchangeRateRequest {
298306 granularity : Granularity ;
299307 /** The api to be used for fiat related queries. */
300308 fiatBackend : FiatBackend ;
309+ /** Custom price points to use if the CUSTOM FiatBackend option is set. */
310+ customPrices : BitcoinPrice [ ] ;
301311}
302312
303313export interface ExchangeRateResponse {
@@ -310,6 +320,8 @@ export interface BitcoinPrice {
310320 price : string ;
311321 /** The timestamp for this price price provided. */
312322 priceTimestamp : string ;
323+ /** The currency that the price is denoted in. */
324+ currency : string ;
313325}
314326
315327export interface ExchangeRate {
@@ -344,6 +356,8 @@ export interface NodeAuditRequest {
344356 customCategories : CustomCategory [ ] ;
345357 /** The api to be used for fiat related queries. */
346358 fiatBackend : FiatBackend ;
359+ /** Custom price points to use if the CUSTOM FiatBackend option is set. */
360+ customPrices : BitcoinPrice [ ] ;
347361}
348362
349363export interface CustomCategory {
@@ -397,13 +411,16 @@ export interface ReportEntry {
397411 customCategory : string ;
398412 /** The transaction id of the entry. */
399413 txid : string ;
400- /** The fiat amount of the entry's amount in USD. */
414+ /**
415+ * The fiat amount of the entry's amount in the currency specified in the
416+ * btc_price field.
417+ */
401418 fiat : string ;
402419 /** A unique identifier for the entry, if available. */
403420 reference : string ;
404421 /** An additional note for the entry, providing additional context. */
405422 note : string ;
406- /** The bitcoin price and timestamp used to calcualte our fiat value. */
423+ /** The bitcoin price and timestamp used to calculate our fiat value. */
407424 btcPrice : BitcoinPrice | undefined ;
408425}
409426
0 commit comments