import type { KyInstance } from 'ky' import type { PaginatedResponse, PaginationInput } from '../../types.js' export type GetFundingSettlementsInput = PaginationInput export interface FundingSettlement { id: string time: string fundingRate: number fixingPrice: number } export type GetFundingSettlementsOutput = PaginatedResponse type GetFundingSettlements = ( input?: Readonly ) => Promise export const createGetFuturesFundingSettlementsRoute = ( instance: Readonly ): GetFundingSettlements => { return async ({ cursor, from, limit, to } = {}) => { return instance .get('futures/funding-settlements', { searchParams: { cursor, from, limit, to }, }) .json() } }