@master-chief/alpaca
Advanced tools
Comparing version 3.5.0 to 3.5.1
{ | ||
"name": "@master-chief/alpaca", | ||
"version": "3.5.0", | ||
"version": "3.5.1", | ||
"description": "a TypeScript Node.js library for the https://alpaca.markets REST API and WebSocket streams", | ||
@@ -5,0 +5,0 @@ "author": "master-chief", |
# alpaca | ||
 | ||
 | ||
 | ||
 | ||
 | ||
 | ||
@@ -57,3 +57,5 @@ a TypeScript Node.js library for the https://alpaca.markets REST API and | ||
If you wish to use env vars, populate these fields with `process.env` on your own. Paper account key detection is automatic. Using OAuth? Simply pass an `access_token` in the credentials object. | ||
If you wish to use env vars, populate these fields with `process.env` on your | ||
own. Paper account key detection is automatic. Using OAuth? Simply pass an | ||
`access_token` in the credentials object. | ||
@@ -60,0 +62,0 @@ ```typescript |
@@ -29,3 +29,3 @@ import { | ||
if (!rawAccount) { | ||
return null | ||
return undefined | ||
} | ||
@@ -65,3 +65,3 @@ | ||
if (!rawClock) { | ||
return null | ||
return undefined | ||
} | ||
@@ -84,3 +84,3 @@ | ||
if (!rawOrder) { | ||
return null | ||
return undefined | ||
} | ||
@@ -120,3 +120,3 @@ | ||
parseOrders(rawOrders: RawOrder[]): Order[] { | ||
return rawOrders ? rawOrders.map((order) => this.parseOrder(order)) : null | ||
return rawOrders ? rawOrders.map((order) => this.parseOrder(order)) : undefined | ||
} | ||
@@ -126,3 +126,3 @@ | ||
if (!rawPosition) { | ||
return null | ||
return undefined | ||
} | ||
@@ -159,3 +159,3 @@ | ||
? rawPositions.map((pos) => this.parsePosition(pos)) | ||
: null | ||
: undefined | ||
} | ||
@@ -165,3 +165,3 @@ | ||
if (!rawTradeActivity) { | ||
return null | ||
return undefined | ||
} | ||
@@ -189,3 +189,3 @@ | ||
if (!rawNonTradeActivity) { | ||
return null | ||
return undefined | ||
} | ||
@@ -210,3 +210,3 @@ | ||
if (!rawActivities) { | ||
return null | ||
return undefined | ||
} | ||
@@ -226,4 +226,5 @@ | ||
private parseNumber(numStr: string): number { | ||
if (typeof numStr === 'undefined') return numStr | ||
return parseFloat(numStr) | ||
} | ||
} |
@@ -19,3 +19,3 @@ import { Parser } from '../src/parser' | ||
expect(result).toBeNull() | ||
expect(result).toBeUndefined() | ||
}) | ||
@@ -48,3 +48,3 @@ | ||
expect(result).toBeNull() | ||
expect(result).toBeUndefined() | ||
}) | ||
@@ -92,3 +92,3 @@ | ||
expect(order.legs).toBeNull() | ||
expect(order.legs).toBeUndefined() | ||
}) | ||
@@ -114,3 +114,3 @@ }) | ||
expect(result).toBeNull() | ||
expect(result).toBeUndefined() | ||
}) | ||
@@ -124,3 +124,3 @@ }) | ||
expect(result).toBeNull() | ||
expect(result).toBeUndefined() | ||
}) | ||
@@ -154,3 +154,3 @@ | ||
expect(result).toBeNull() | ||
expect(result).toBeUndefined() | ||
}) | ||
@@ -176,3 +176,3 @@ | ||
expect(result).toBeNull() | ||
expect(result).toBeUndefined() | ||
}) | ||
@@ -205,3 +205,3 @@ | ||
expect(result).toBeNull() | ||
expect(result).toBeUndefined() | ||
}) | ||
@@ -234,3 +234,3 @@ | ||
expect(result).toBeNull() | ||
expect(result).toBeUndefined() | ||
}) | ||
@@ -237,0 +237,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
160860
4867
393