-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added cache ttl refresh on heartbeat message for Tiingo IEX endpoint (#…
…3244) * add cache ttl refresh feature * changeset
- Loading branch information
1 parent
ebb0af9
commit 8cc43b7
Showing
8 changed files
with
116 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@chainlink/tiingo-adapter': patch | ||
--- | ||
|
||
Added support for cache TTL refresh on heartbeat messages for IEX endpoint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
## Known Issues | ||
|
||
### CACHE_MAX_AGE interaction with Heartbeat messages | ||
|
||
If `CACHE_MAX_AGE` is set below a current heartbeat interval (120000ms), the extended cache TTL feature for out-of-market-hours in IEX endpoint that relies on heartbeats will not work. | ||
|
||
### CACHE_MAX_AGE interaction with WS_SUBSCRIPTION_TTL | ||
|
||
If the value of `WS_SUBSCRIPTION_TTL` is less than the value of `CACHE_MAX_AGE`, there will be stale values in the cache. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,28 @@ | ||
import { AdapterConfig } from '@chainlink/external-adapter-framework/config' | ||
|
||
export const config = new AdapterConfig({ | ||
API_ENDPOINT: { | ||
description: 'API endpoint for tiingo', | ||
default: 'https://api.tiingo.com/', | ||
type: 'string', | ||
export const config = new AdapterConfig( | ||
{ | ||
API_ENDPOINT: { | ||
description: 'API endpoint for tiingo', | ||
default: 'https://api.tiingo.com/', | ||
type: 'string', | ||
}, | ||
API_KEY: { | ||
description: 'API key for tiingo', | ||
type: 'string', | ||
required: true, | ||
sensitive: true, | ||
}, | ||
WS_API_ENDPOINT: { | ||
description: 'websocket endpoint for tiingo', | ||
default: 'wss://api.tiingo.com', | ||
type: 'string', | ||
}, | ||
}, | ||
API_KEY: { | ||
description: 'API key for tiingo', | ||
type: 'string', | ||
required: true, | ||
sensitive: true, | ||
{ | ||
envDefaultOverrides: { | ||
CACHE_MAX_AGE: 150_000, // see known issues in readme | ||
WS_SUBSCRIPTION_TTL: 180_000, | ||
}, | ||
}, | ||
WS_API_ENDPOINT: { | ||
description: 'websocket endpoint for tiingo', | ||
default: 'wss://api.tiingo.com', | ||
type: 'string', | ||
}, | ||
}) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters