Skip to content

Commit

Permalink
fix v4 version
Browse files Browse the repository at this point in the history
  • Loading branch information
dtmkeng committed Aug 27, 2024
1 parent 30fe165 commit a91e6c1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fees/dydx-v4/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { FetchOptions, SimpleAdapter } from '../../adapters/types'
import { ChainBlocks, FetchOptions, SimpleAdapter } from '../../adapters/types'
import { httpGet } from '../../utils/fetchURL'

interface IFees {
day: string
sum_tradingfeecollection: string
}
const fetchFees = async (options: FetchOptions) => {
const fetchFees = async (timestamp: number, _t: ChainBlocks ,options: FetchOptions) => {
const url = 'https://api.lacertalabs.xyz/data/tradingfeecollection'
const dateStr = new Date(options.startOfDay * 1000).toISOString().split('T')[0]
const res = await httpGet(url)
Expand All @@ -14,6 +14,7 @@ const fetchFees = async (options: FetchOptions) => {
const dailyFees = item.find((i) => i.day.split('T')[0] === dateStr)?.sum_tradingfeecollection
return {
dailyFees: dailyFees ? dailyFees : undefined,
timestamp: timestamp,
}
}

Expand Down

0 comments on commit a91e6c1

Please sign in to comment.