LogoLogo
Join DiscordFollow on XBridge FundsLong $BERA
  • Doc Bros v1
    • Overview
    • Key Features
      • Speed & Liquidity is Key
      • Bropetual Markets
      • A Hub for Berachain DeFi
    • Proof-of-Liquidity
      • Reward Vault
    • Power of Points
    • Partners & Integrations
    • Campaigns
      • bro.trade Em Up
  • bullish bros
    • SuperBros NFT
  • Technicals
    • What is Proof-of-Liquidity?
    • One-Click Trading
    • Funding Rates
  • Liquidations & Insurance Fund
  • Vertex Edge Sequencer
  • Fees
  • PnL Settlements
  • Withdrawals
  • Pricing (Oracles)
  • links & resources
    • bro.trade Links
      • Website
      • Trade Bropetuals
      • Discord
      • X (Twitter)
      • Medium
      • Swap on OogaBooga
    • Berachain Links
      • Berachain.com
      • Official Bridge
      • BeraHub
      • Berascan
      • Bera Discord
      • Berachain X (Twitter)
      • Berachain Docs
    • FAQ
  • developer bros
    • API
      • Gateway
        • Executes
          • Place Order
          • Cancel Order
          • Cancel and Place
          • Cancel Product Order
          • Withdraw Colleteral
          • Transfer Quote
          • Liquidate Subaccount
          • Mint LP
          • Burn LP
          • Link Signer
        • Queries
          • All Products
          • Contracts
          • Fee Rates
          • Health Groups
          • Insurance
          • Linked Signer
          • Market Liquidity
          • Market Prices
          • Max Lp Mintable
          • Max Order Size
          • Max Withdrawable
          • Min Deposit Rates
          • Nonces
          • Order
          • Orders
          • Status
          • Subaccount Info
          • Symbols
        • Signing
          • Examples
          • Q A
      • Subscriptions
        • Authentication
        • Streams
        • Events
        • Rate Limits
      • Archive (indexer)
        • Candlesticks
        • Events
        • Funding Rate
        • Interest Funding Payments
        • Linked Signer Rate Limit
        • Liquidation Feed
        • Maker Statistics
        • Market Snapshots
        • Matches
        • Merkle Proofs
        • Oracle Price
        • Orders
        • Perp Prices
        • Product Snapshots
        • Rewards
        • Signatures
        • Subaccounts
        • Summary
        • HONEY Price
      • Trigger
        • Executes
          • Place Order
          • Cancel Orders
          • Cancel Product Orders
        • Queries
          • List Trigger Orders
      • V2
        • Apr
        • Assets
        • Contracts
        • Orderbook
        • Pairs
        • Tickers
        • Trades
      • Rate limits
      • Errors
      • Symbols
      • Depositing
      • Withdrawing (on-chain)
      • Integrate via Smart Contracts
      • Definitions / Formulas
    • On-Chain Contracts
Powered by GitBook
On this page
  • Rate limits
  • Request
  • Request Parameters
  • Response
  • Response Fields
  1. developer bros
  2. API
  3. Archive (indexer)

Interest Funding Payments

Query historical interest and funding payments for a subaccount.

PreviousFunding RateNextLinked Signer Rate Limit

Last updated 2 months ago

Rate limits

  • 480 requests/min or 80 requests/10secs per IP address. (weight = 5)

See more details in .

Request

Query subaccount historical interest and funding payments.

POST [ARCHIVE_ENDPOINT]

Body

{
  "interest_and_funding": {
    "subaccount": "0xD028878bF5c96218E53DA859e587cb8398B17b3f64656661756c740000000000",
    "product_ids": [1, 2],
    "limit": 10,
    "max_idx": 1315836
  }
}

Request Parameters

Parameter
Type
Required

subaccount

string

Yes

A bytes32 sent as a hex string; includes the address and the subaccount identifier.

product_ids

number[]

Yes

Ids of products to historical interest/funding payments for.

max_idx

string/number

No

When provided, only return records with idx <= max_idx.

limit

number

Yes

Max number of records to return. Max possible of 100.

Response

{
    "interest_payments": [
        {
            "product_id": 4,
            "idx": "5968022",
            "timestamp": "1701698400",
            "amount": "-12273223338657163",
            "balance_amount": "1000000000000000000",
            "rate_x18": "47928279191008320",
            "oracle_price_x18": "2243215034242228224820"
        },
        ...
    ],
    "funding_payments": [
        {
            "product_id": 2,
            "idx": "5968022",
            "timestamp": "1701698400",
            "amount": "-12273223338657163",
            "balance_amount": "1000000000000000000",
            "rate_x18": "47928279191008320",
            "oracle_price_x18": "2243215034242228224820"
        },
        ...
    ],
    "next_idx": "1314805"
}

Response Fields

Field name
Description

interest_payments.product_id

Id of spot product the interest payment is associated to.

interest_payments.idx

Id of transaction that triggered the interest payment.

interest_payments.timestamp

Timestamp of the transaction that triggered the interest payment.

interest_payments.amount

Amount of interest paid multiplied by 10**18.

interest_payments.balance_amount

Previous spot balance at the moment of payment (exclusive of payment amount)

interest_payments.rate_x18

Spot interest rate at the moment of payment, multiplied by 10**18.

interest_payments.oracle_price_x18

Oracle price for the spot product at the moment of payment, multiplied by 10**18.

funding_payments.product_id

Id of perp product the funding payment is associated to.

funding_payments.idx

Id of transaction that triggered the funding payment.

funding_payments.timestamp

Timestamp of the transaction that triggered the funding payment.

funding_payments.amount

Amount of funding paid multiplied by 10**18.

funding_payments.balance_amount

Previous perp balance at the moment of payment +amount of perps locked in LPs (exclusive of payment amount).

funding_payments.rate_x18

Perp funding rate at the moment of payment, multiplied by 10**18.

funding_payments.oracle_price_x18

Oracle price for the perp product at the moment of payment, multiplied by 10**18.

next_idx

Id of the next payment snapshot. Use this as max_idx on a subsequent call to get the next page. This will be null when there are no more records.

API Rate limits