> 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/metadata/margintable.md).

# marginTable

Returns the margin requirements table for a specific perpetual asset by index.

<table><thead><tr><th width="115">Field</th><th width="177">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>type</code></td><td>string</td><td>Must be <code>"marginTable"</code></td></tr><tr><td><code>id</code></td><td>int</td><td>Asset index (required)</td></tr></tbody></table>

## Request

{% 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": "marginTable",
    "id": 1
  }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import os
import json

response = requests.post(
    'https://api.hydromancer.xyz/info',
    json={
        'type': 'marginTable',
        'id': 1
    },
    headers={
        'Authorization': f'Bearer {os.environ["HYDROMANCER_API_KEY"]}',
        'Content-Type': 'application/json'
    }
)
print(json.dumps(response.json(), indent=2))
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
import axios from 'axios';

const response = await axios.post(
  'https://api.hydromancer.xyz/info',
  {
    type: 'marginTable',
    id: 1
  },
  {
    headers: {
      'Authorization': `Bearer ${process.env.HYDROMANCER_API_KEY}`,
      'Content-Type': 'application/json'
    }
  }
);

console.log(JSON.stringify(response.data, null, 2));
```

{% endtab %}
{% endtabs %}

***

## Response Fields

| Field                       | Type   | Description                                        |
| --------------------------- | ------ | -------------------------------------------------- |
| `description`               | string | Description of the margin table                    |
| `marginTiers`               | array  | List of margin tier objects                        |
| `marginTiers[].lowerBound`  | string | Lower bound of the notional position for this tier |
| `marginTiers[].maxLeverage` | int    | Maximum leverage allowed at this tier              |

<details>

<summary>Response</summary>

```json
{
  "description": "",
  "marginTiers": [
    {
      "lowerBound": "0.0",
      "maxLeverage": 1
    }
  ]
}
```

</details>
