Skip to content

Perps Fills & Funding Payments

Organization API: Replace /v2/portfolio/ with /v2/organization/portfolios/{portfolioId}/. See Portfolio vs. Organization API.

Account endpoints return 503 on deployments where perps account reads are not yet enabled — see Availability.

Fills

Portfolio API: GET https://ddp.definitive.fi/v2/portfolio/perps/fills

{
  fills: [
    {
      symbol: "BTC",
      side: "sell",
      direction: "Open Short",
      price: "68293",
      size: "0.01",
      closedPnl: "0",
      fee: "0.30",
      feeToken: "USDC",
      builderFee: null,
      orderId: "31298744123",
      tradeId: "913312998",
      hash: "0x7ac2…",
      startPosition: "0",
      crossed: true, // true = taker
      time: 1787100002000,
    },
  ];
}

Funding Payments

Portfolio API: GET https://ddp.definitive.fi/v2/portfolio/perps/funding-payments

Funding paid (negative) or received (positive) on open positions.

ParameterTypeRequiredDescription
startTimenumberNoRange start, epoch milliseconds (13-digit)
{
  payments: [
    {
      time: 1787130000000,
      symbol: "BTC",
      amount: "-0.0132",
      size: "-0.03",
      fundingRate: "0.0000125",
      hash: "0x91b4…",
      samples: 1,
    },
  ];
}