Real-time funding payment notifications when funding settles on your positions.
Channel: funding
Authentication: Required
Overview
Funding is settled on your position whenever a trade touches the market — yours or anyone else's. This channel notifies you the moment a settlement happens, so you do not have to poll the REST API.
Subscribe
{
"method": "subscribe",
"params": {
"channel": "funding",
"market_ids": [1, 2]
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
market_ids | number[] | No | Filter by market IDs. Empty = all markets |
makers | string[] | No | Account filter. Omit it — an authenticated client is scoped to its own account |
Message Format
Update
Sent when a funding payment is settled on your position. There is no snapshot — funding payments are events, not state. Use the REST API for history.
{
"channel": "funding",
"type": "update",
"market_id": "1",
"data": {
"account": "0x793C87ED0186EcA29D0De98cF5c93e02fEBb8246",
"funding_payment": "-0.035893853717451273",
"position_size": "-0.005953",
"last_checkpoint": "-1162.288328274703627205",
"new_checkpoint": "-1156.258787922368456104"
},
"block_number": 19328394,
"log_index": 9,
"tx_hash": "0xfb04187ea6c5f7833140f55d94ce05a94657618d8b8ec724172bc0ce6148f4d8",
"worker_timestamp": "1786934151079017180"
}Update Message Fields
| Field | Type | Description |
|---|---|---|
channel | string | Always "funding" |
type | string | Always "update" |
market_id | string | Market ID |
data | object | Funding payment details |
block_number | number | Blockchain block number |
log_index | number | Log index within the block |
tx_hash | string | Transaction hash |
worker_timestamp | string | Server time in nanoseconds |
There is no timestamp or block_timestamp field on this channel.
Funding Payment Data Fields
| Field | Type | Description |
|---|---|---|
account | string | Account address |
funding_payment | string | Amount settled, decimal USDC. See sign convention below |
position_size | string | Signed position size at settlement, decimal (negative on a short) |
last_checkpoint | string | Position's previous accumulated-funding checkpoint, decimal |
new_checkpoint | string | Market's accumulated-funding checkpoint at settlement, decimal |
Every value on this channel is decimal, not wei
"-0.035893853717451273"is 0.0359 USDC received, not 3.6 × 10-20. Dividing by 1018 — as an earlier revision of this page instructed — is wrong.
Sign Convention
| Sign | Meaning |
|---|---|
positive | You paid funding (deducted from balance) |
negative | You received funding (added to balance) |
Example: Paying Funding
Long position while the funding rate is positive (longs pay shorts):
{
"funding_payment": "5.012345678901234567",
"position_size": "10.5"
}You paid 5.0123 USDC.
Example: Receiving Funding
Short position while the funding rate is positive:
{
"funding_payment": "-0.035893853717451273",
"position_size": "-0.005953"
}You received 0.0359 USDC.
Funding Calculation
funding_payment = (new_checkpoint - last_checkpoint) * position_size
All three inputs are already decimal, so no scaling is involved. Using the example above: (-1156.258787922368456104 − (−1162.288328274703627205)) × (−0.005953) = −0.03589…
When Funding Settles
Funding is calculated and broadcast when:
- You execute a trade (open, close, or modify a position)
- Someone else trades in the same market
The amount covers the period your position was held since its last checkpoint.
Examples
Subscribe to all funding payments
{
"method": "subscribe",
"params": {
"channel": "funding"
}
}Subscribe to specific markets
{
"method": "subscribe",
"params": {
"channel": "funding",
"market_ids": [1, 2]
}
}Unsubscribe
{
"method": "unsubscribe",
"params": {
"channel": "funding"
}
}Authentication
Authenticate before subscribing. The channel is meant to carry your own settlements only.