use fixed interval to leverage caching on backend
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
parent
42aeace9b7
commit
5c67a33cd0
|
@ -445,9 +445,12 @@ async function getOhlcv(
|
|||
fromS: number,
|
||||
toS: number
|
||||
) {
|
||||
const fromSFixed = fromS.toFixed();
|
||||
const toSFixed = toS.toFixed();
|
||||
|
||||
const historyResponse = await fetch(
|
||||
`https://serum-history.herokuapp.com/tv/history` +
|
||||
`?symbol=${market}&resolution=${resolution}&from=${fromS}&to=${toS}`
|
||||
`?symbol=${market}&resolution=${resolution}&from=${fromSFixed}&to=${toSFixed}`
|
||||
);
|
||||
return historyResponse.json();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue