USD marks

This commit is contained in:
tim
2025-03-29 15:27:13 -04:00
parent 1a3638a087
commit 0b29539e0a
3 changed files with 18 additions and 0 deletions

View File

@@ -37,6 +37,10 @@ export class CacheDict {
async contains(chain, key) {
return await redis.hExists(`${chain}|${this.series}`, key)
}
async items(chain) {
return Object.entries(await redis.hGetAll(`${chain}|${this.series}`)).map(([k, v]) => [k, v === null ? null : '' + v])
}
}
@@ -83,3 +87,4 @@ export const vaultOpenOrders = new CacheDict('voo')
export const vaultRecentlyClosedOrders = new CacheDict('vrco')
export const orderFilled = new CacheDict('of')
export const ohlcs = new CacheDict('ohlc')
export const marks = new CacheDict('mark.usd')