> For the complete documentation index, see [llms.txt](https://docs.hydromancer.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hydromancer.xyz/readme/rest-api/historical-data/userfunding.md).

# userFunding

Get a users' funding payment history.

{% hint style="info" %}
**Data available from 28-07-2025**
{% endhint %}

## POST Request

<table><thead><tr><th width="107.333251953125">Field</th><th width="119">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>type</code></td><td>string</td><td>Must be <code>"userFunding"</code></td></tr><tr><td><code>user</code></td><td>string</td><td>Ethereum address (0x-prefixed, 42 characters)</td></tr><tr><td><code>startTime</code></td><td>int</td><td>Start time in ms (inclusive)</td></tr><tr><td><code>endTime</code></td><td>int</td><td>End time in ms (optional)</td></tr></tbody></table>

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST https://api.hydromancer.xyz/info \
  -H "Authorization: Bearer $HYDROMANCER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "userFunding",
    "user": "0x0000000000000000000000000000000000000000",
    "startTime": 0
  }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import os

response = requests.post(
    'https://api.hydromancer.xyz/info',
    json={
        'type': 'userFunding',
        'user': '0x0000000000000000000000000000000000000000',
        'startTime': 0
    },
    headers={
        'Authorization': f'Bearer {os.environ.get("HYDROMANCER_API_KEY")}',
        'Content-Type': 'application/json'
    }
)

print(response.json())
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
import axios from 'axios';

try {
    const response = await axios.post('https://api.hydromancer.xyz/info', {
        type: 'userFunding',
        user: '0x0000000000000000000000000000000000000000',
        startTime: 0
    }, {
        headers: {
            'Authorization': `Bearer ${process.env.HYDROMANCER_API_KEY}`,
            'Content-Type': 'application/json'
        }
    });

    console.log(response.data);
} catch (error) {
    console.error('Error:', error.message);
}
```

{% endtab %}
{% endtabs %}

***

## Response Fields

| Field               | Type   | Description                                |
| ------------------- | ------ | ------------------------------------------ |
| `time`              | int    | Timestamp (ms)                             |
| `hash`              | string | Transaction hash                           |
| `delta`             | object | Funding payment details                    |
| `delta.type`        | string | Always `"funding"`                         |
| `delta.coin`        | string | Asset symbol                               |
| `delta.usdc`        | string | USDC amount of funding payment             |
| `delta.szi`         | string | Position size at time of funding           |
| `delta.fundingRate` | string | Funding rate applied                       |
| `delta.nSamples`    | int    | Number of samples (null if not applicable) |

<details>

<summary>Response</summary>

```json
[
    {
        "time": 1754064000066,
        "hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "delta": {
            "type": "funding",
            "coin": "BTC",
            "usdc": "0.014419",
            "szi": "-0.01",
            "fundingRate": "0.0000125",
            "nSamples": null
        }
    }
]
```

</details>
