From a4ccec1ac28bd3d1c2a99face089fdefaeec7793 Mon Sep 17 00:00:00 2001 From: Maximilian Schneider Date: Sat, 19 Aug 2023 00:34:00 +0200 Subject: [PATCH] add new endpoint for openbook merged birdeye charts --- apis/datafeed.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apis/datafeed.ts b/apis/datafeed.ts index 707f148b..6e6f9e1f 100644 --- a/apis/datafeed.ts +++ b/apis/datafeed.ts @@ -163,6 +163,7 @@ export const queryBirdeyeBars = async ( to: number }, quote_token: string, + market: string, ): Promise => { const { from, to } = periodParams @@ -172,6 +173,7 @@ export const queryBirdeyeBars = async ( type: parseResolution(resolution), time_from: from, time_to: to, + merge_market_id: market, } const query = Object.keys(urlParameters) @@ -181,7 +183,7 @@ export const queryBirdeyeBars = async ( ) .join('&') - const data = await makeApiRequest(`defi/ohlcv/base_quote?${query}`) + const data = await makeApiRequest(`defi/ohlcv/base_quote_merge?${query}`) if (!data.success || data.data.items.length === 0) { return [] } @@ -327,6 +329,7 @@ export default { resolution as any, periodParams, symbolInfo.quote_token, + symbolInfo.address, ) } if (!bars || bars.length === 0) {