import type { KyInstance } from 'ky' import type { PerpMarketFilter, PerpRunningTradeRead } from '../types.js' export type PerpIsolatedGetRunningTradesInput = PerpMarketFilter export type PerpIsolatedGetRunningTradesOutput = PerpRunningTradeRead[] type GetRunningTrades = ( input?: Readonly ) => Promise export const createGetRunningTrades = ( instance: Readonly ): GetRunningTrades => { return async ({ instrument, pair } = {}) => { return instance .get('perp/isolated/trades/running', { searchParams: { instrument, pair }, }) .json() } }