query FundingPeriods(
  $marketId: ID!
  $dateRange: DateRange
  $pagination: Pagination
) {
  fundingPeriods(
    marketId: $marketId
    dateRange: $dateRange
    pagination: $pagination
  ) {
    edges {
      node {
        marketId
        seq
        startTime
        endTime
        fundingPayment
        fundingRate
        externalTwap
        internalTwap
      }
    }
  }
}

query FundingPeriodDataPoints(
  $marketId: ID!
  $dateRange: DateRange
  $pagination: Pagination
) {
  fundingPeriodDataPoints(
    marketId: $marketId
    dateRange: $dateRange
    pagination: $pagination
  ) {
    edges {
      node {
        marketId
        seq
        dataPointSource
        price
        twap
        timestamp
      }
    }
  }
}
