Skip to content

Commit

Permalink
fix(options,quote): EBAY "ask", "cryptoTradeable" fields (fixes #560)
Browse files Browse the repository at this point in the history
  • Loading branch information
gadicc committed Nov 16, 2022
1 parent 5f0e1b3 commit b2c4b5a
Show file tree
Hide file tree
Showing 5 changed files with 1,912 additions and 2 deletions.
29 changes: 28 additions & 1 deletion schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1584,6 +1584,9 @@
"tradeable": {
"type": "boolean"
},
"cryptoTradeable": {
"type": "boolean"
},
"exchange": {
"type": "string"
},
Expand Down Expand Up @@ -1906,6 +1909,9 @@
"tradeable": {
"type": "boolean"
},
"cryptoTradeable": {
"type": "boolean"
},
"exchange": {
"type": "string"
},
Expand Down Expand Up @@ -2240,6 +2246,9 @@
"tradeable": {
"type": "boolean"
},
"cryptoTradeable": {
"type": "boolean"
},
"exchange": {
"type": "string"
},
Expand Down Expand Up @@ -2546,6 +2555,9 @@
"tradeable": {
"type": "boolean"
},
"cryptoTradeable": {
"type": "boolean"
},
"exchange": {
"type": "string"
},
Expand Down Expand Up @@ -2852,6 +2864,9 @@
"tradeable": {
"type": "boolean"
},
"cryptoTradeable": {
"type": "boolean"
},
"exchange": {
"type": "string"
},
Expand Down Expand Up @@ -3158,6 +3173,9 @@
"tradeable": {
"type": "boolean"
},
"cryptoTradeable": {
"type": "boolean"
},
"exchange": {
"type": "string"
},
Expand Down Expand Up @@ -3484,6 +3502,9 @@
"tradeable": {
"type": "boolean"
},
"cryptoTradeable": {
"type": "boolean"
},
"exchange": {
"type": "string"
},
Expand Down Expand Up @@ -3790,6 +3811,9 @@
"tradeable": {
"type": "boolean"
},
"cryptoTradeable": {
"type": "boolean"
},
"exchange": {
"type": "string"
},
Expand Down Expand Up @@ -4110,6 +4134,9 @@
"tradeable": {
"type": "boolean"
},
"cryptoTradeable": {
"type": "boolean"
},
"exchange": {
"type": "string"
},
Expand Down Expand Up @@ -4423,6 +4450,7 @@
"customPriceAlertConfidence",
"marketState",
"tradeable",
"cryptoTradeable",
"exchange",
"shortName",
"longName",
Expand Down Expand Up @@ -4771,7 +4799,6 @@
"lastPrice",
"change",
"percentChange",
"ask",
"contractSize",
"expiration",
"lastTradeDate",
Expand Down
3 changes: 3 additions & 0 deletions src/modules/options.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ describe("options", () => {
// {strike: 97.5 }, {expirationDate: 1649894400 }
"BRKS",
],
add: [
"EBAY", // Missing "ask" (#560)
],
});

it.each(symbols)("passes validation for symbol '%s'", async (symbol) => {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export interface CallOrPut {
volume?: number;
openInterest?: number;
bid?: number;
ask: number;
ask?: number;
contractSize: "REGULAR";
expiration: Date;
lastTradeDate: Date;
Expand Down
1 change: 1 addition & 0 deletions src/modules/quote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export interface QuoteBase {
customPriceAlertConfidence?: string; // "HIGH" | "LOW"; TODO: anything else?
marketState: "REGULAR" | "CLOSED" | "PRE" | "PREPRE" | "POST" | "POSTPOST";
tradeable: boolean; // false,
cryptoTradeable?: boolean; // false
exchange: string; // "NMS",
shortName?: string; // "NVIDIA Corporation",
longName?: string; // "NVIDIA Corporation",
Expand Down
Loading

0 comments on commit b2c4b5a

Please sign in to comment.