UNPKG

@ln-markets/sdk

Version:
15 lines (11 loc) 336 B
import type { KyInstance } from 'ky' export interface GetBestPriceOutput { askPrice: number bidPrice: number } type GetBestPrice = () => Promise<GetBestPriceOutput> export const createGetBestPrice = (instance: KyInstance): GetBestPrice => { return async () => { return instance.get('synthetic-usd/best-price').json() } }