Skip to content

Commit

Permalink
fix(quote/cryptocurrency): more optionals; ZRC-USD test (fixes #403)
Browse files Browse the repository at this point in the history
The follow fields are now optional in response:

  * coinImageUrl
  * volume24Hr
  * volumeAllCurrencies
  * startDate
  • Loading branch information
gadicc committed Feb 26, 2022
1 parent 1d52360 commit cffe7a6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
6 changes: 1 addition & 5 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1865,7 +1865,6 @@
},
"required": [
"circulatingSupply",
"coinImageUrl",
"customPriceAlertConfidence",
"esgPopulated",
"exchange",
Expand All @@ -1883,13 +1882,10 @@
"quoteType",
"region",
"sourceInterval",
"startDate",
"symbol",
"toCurrency",
"tradeable",
"triggerable",
"volume24Hr",
"volumeAllCurrencies"
"triggerable"
],
"additionalProperties": false
},
Expand Down
1 change: 1 addition & 0 deletions src/modules/quote.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const testSymbols = [
"AZT.OL", // Far less properties than other symbols (#42)
"AAPL220121C00025000", // Option
"LDO.MI", // additionalProperty: underlyingSymbol (#363)
"ZRC-USD", // Low cap crypto (#403)
];

const marketStates = [
Expand Down
8 changes: 4 additions & 4 deletions src/modules/quote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ export interface QuoteCryptoCurrency extends QuoteBase {
fromCurrency: string; // 'BTC'
toCurrency: string; // 'USD=X'
lastMarket: string; // 'CoinMarketCap'
coinImageUrl: string; // 'https://s.yimg.com/uc/fin/img/reports-thumbnails/1.png'
volume24Hr: number; // 62631043072
volumeAllCurrencies: number; // 62631043072
startDate: Date; // new Date(1367103600 * 1000)
coinImageUrl?: string; // 'https://s.yimg.com/uc/fin/img/reports-thumbnails/1.png'
volume24Hr?: number; // 62631043072
volumeAllCurrencies?: number; // 62631043072
startDate?: Date; // new Date(1367103600 * 1000)
}

export interface QuoteCurrency extends QuoteBase {
Expand Down

0 comments on commit cffe7a6

Please sign in to comment.