# userNonFundingLedgerUpdates

{% 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>"userNonFundingLedgerUpdates"</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": "userNonFundingLedgerUpdates",
    "user": "0x0000000000000000000000000000000000000000",
    "startTime": 0
  }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import os

response = requests.post(
    'https://api.hydromancer.xyz/info',
    json={
        'type': 'userNonFundingLedgerUpdates',
        'user': '0x0000000000000000000000000000000000000000'
    },
    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: 'userNonFundingLedgerUpdates',
        user: '0x0000000000000000000000000000000000000000'
    }, {
        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 | Ledger update details (fields vary by `delta.type`, see delta types below)              |
| `delta.type`           | string | Type of ledger update (e.g. `"send"`, `"deposit"`, `"withdraw"`, `"liquidation"`, etc.) |
| `delta.amount`         | string | Transfer amount (present on most delta types)                                           |
| `delta.token`          | string | Token symbol                                                                            |
| `delta.usdc`           | string | USDC amount (used by some delta types instead of `amount`)                              |
| `delta.usdcValue`      | string | USD value of the transfer                                                               |
| `delta.user`           | string | Sender/source user address                                                              |
| `delta.destination`    | string | Destination address                                                                     |
| `delta.destinationDex` | string | Destination DEX (e.g. `"spot"`)                                                         |
| `delta.sourceDex`      | string | Source DEX (e.g. `"spot"`)                                                              |
| `delta.fee`            | string | Fee amount                                                                              |
| `delta.feeToken`       | string | Fee token symbol                                                                        |
| `delta.nativeTokenFee` | string | Native token fee amount                                                                 |
| `delta.nonce`          | int    | Transaction nonce (null if not applicable)                                              |

<details>

<summary>Response</summary>

```json
[
    {
        "time": 1764256235694,
        "hash": "0xdc02464296095090dd7c04304bdac40205640028310c6f627fcaf195550d2a7b",
        "delta": {
            "amount": "0.00710881",
            "destination": "0x0000000000000000000000000000000000000000",
            "destinationDex": "spot",
            "fee": "",
            "feeToken": "",
            "nativeTokenFee": "",
            "nonce": null,
            "sourceDex": "spot",
            "token": "LIQUID",
            "type": "send",
            "usdcValue": "0.001473",
            "user": "0x9eff7b0c989f52003c0868b5353290d277196e6d"
        }
    }
]
```

</details>

<details>

<summary>All possible delta types</summary>

**withdraw**

```json
{
  "type": "withdraw",
  "usdc": "1000.0",
  "nonce": 12345,
  "fee": "1.5"
}
```

**deposit**

```json
{
  "type": "deposit",
  "usdc": "1000.0"
}
```

**vaultCreate**

```json
{
  "type": "vaultCreate",
  "vault": "0x...",
  "usdc": "10000.0",
  "fee": "10.0"
}
```

**vaultDeposit**

```json
{
  "type": "vaultDeposit",
  "vault": "0x...",
  "usdc": "5000.0"
}
```

**vaultWithdraw**

```json
{
  "type": "vaultWithdraw",
  "vault": "0x...",
  "user": "0x...",
  "requestedUsd": "1000.0",
  "commission": "10.0",
  "closingCost": "5.0",
  "basis": "995.0",
  "netWithdrawnUsd": "985.0"
}
```

**vaultDistribution**

```json
{
  "type": "vaultDistribution",
  "vault": "0x...",
  "usdc": "100.0"
}
```

**vaultLeaderCommission**

```json
{
  "type": "vaultLeaderCommission",
  "user": "0x...",
  "usdc": "50.0"
}
```

**liquidation**

```json
{
  "type": "liquidation",
  "liquidatedNtlPos": "10000.0",
  "accountValue": "-500.0",
  "leverageType": "Cross",
  "liquidatedPositions": [
    {
      "coin": "ETH",
      "szi": "-5.0"
    }
  ]
}
```

**internalTransfer**

```json
{
  "type": "internalTransfer",
  "usdc": "1000.0",
  "user": "0x...",
  "destination": "0x...",
  "fee": "0.0"
}
```

**subAccountTransfer**

```json
{
  "type": "subAccountTransfer",
  "usdc": "500.0",
  "user": "0x...",
  "destination": "0x..."
}
```

**spotTransfer**

```json
{
  "type": "spotTransfer",
  "token": "USDC",
  "amount": "1000.0",
  "usdcValue": "1000.0",
  "user": "0x...",
  "destination": "0x...",
  "fee": "1.5",
  "nativeTokenFee": "0.1",
  "nonce": 12345,
  "feeToken": "USDC"
}
```

**spotGenesis**

```json
{
  "type": "spotGenesis",
  "token": "HYPE",
  "amount": "1000000.0"
}
```

**rewardsClaim**

```json
{
  "type": "rewardsClaim",
  "amount": "100.0",
  "token": "USDC"
}
```

**accountClassTransfer**

```json
{
  "type": "accountClassTransfer",
  "usdc": "1000.0",
  "toPerp": true
}
```

**accountActivationGas**

```json
{
  "type": "accountActivationGas",
  "amount": "0.1",
  "token": "ETH"
}
```

**perpDexClassTransfer**

```json
{
  "type": "perpDexClassTransfer",
  "amount": "1000.0",
  "token": "USDC",
  "dex": "hyperliquid",
  "toPerp": true
}
```

**deployGasAuction**

```json
{
  "type": "deployGasAuction",
  "token": "ETH",
  "amount": "0.5"
}
```

**cStakingTransfer**

```json
{
  "type": "cStakingTransfer",
  "amount": "1000.0",
  "isDeposit": true,
  "token": "HYPE"
}
```

**send**

```json
{
  "type": "send",
  "amount": "100.0",
  "destination": "0x...",
  "destinationDex": "",
  "fee": "1.0",
  "feeToken": "USDC",
  "nativeTokenFee": "0.1",
  "nonce": 12345,
  "sourceDex": "",
  "token": "USDC",
  "usdcValue": "100.0",
  "user": "0x..."
}
```

**activateDexAbstraction**

```json
{
  "type": "activateDexAbstraction",
  "dex": "hyperliquid",
  "token": "USDC",
  "amount": "10.0"
}
```

**borrowLend**

```json
{
  "type": "borrowLend",
  "token": "USDC",
  "operation": "supply",
  "amount": "5000.0",
  "interestAmount": "12.5"
}
```

**borrowLendBackstopLiquidation**

```json
{
  "type": "borrowLendBackstopLiquidation",
  "token": "USDC",
  "balanceChange": "-500.0"
}
```

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hydromancer.xyz/readme/rest-api/historical-data/usernonfundingledgerupdates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
