# GET Accounts Summary

## Get list of all accounts

<mark style="color:green;">`GET`</mark> `/v1/api/accounts/snapshot`

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Code Examples**

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

```python
import requests

url = "https://app.crosstrade.io/v1/api/accounts/snapshot"
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

try:
    response = requests.get(url, headers=headers)
    print(f"Response Code: {response.status_code}, Response Text: {response.text}")
except Exception as e:
    print(f"An error occurred: {e}")
```

{% endtab %}
{% endtabs %}

***

**Response**

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

```json
{
    "type": "snapshot",
    "timestamp": "2025-03-10T07:53:13.0908809-07:00",
    "epoch": 1741618393090,
    "accounts": [
        {
            ...,
            "account": {
                "id": 15,
                "name": "Sim110",
                "type": "NinjaTrader.Cbi.Account",
                "displayName": "Sim110",
                "primaryUser": null,
                "provider": "Simulator",
                "denomination": "UsDollar",
                "status": "Enabled",
                "isAccountFlat": false,
                "dailyLossLimit": 0.0,
                "minCashValue": 0.0,
                "maxOrderSize": 0,
                "maxPositionSize": 0,
                "connection": "NinjaTrader.Cbi.Connection",
                "connectionStatus": "Connected",
                "lastTransactionSum": 0.0,
                "item": {
                    "buyingPower": 0.0,
                    "cashValue": 153772.375,
                    "commission": 0.0,
                    "dailyLossLimit": 0.0,
                    "dailyProfitTrigger": 0.0,
                    "excessInitialMargin": 0.0,
                    "excessIntradayMargin": 0.0,
                    "excessMaintenanceMargin": 0.0,
                    "excessPositionMargin": 0.0,
                    "fee": 0.0,
                    "grossRealizedProfitLoss": 0.0,
                    "initialMargin": 0.0,
                    "intradayMargin": 0.0,
                    "longOptionValue": 0.0,
                    "longStockValue": 0.0,
                    "lookAheadMaintenanceMargin": 0.0,
                    "maintenanceMargin": 0.0,
                    "netLiquidation": 154185.375,
                    "netLiquidationByCurrency": 0.0,
                    "positionMargin": 0.0,
                    "realizedProfitLoss": 0.0,
                    "shortOptionValue": 0.0,
                    "shortStockValue": 0.0,
                    "sodCashValue": 0.0,
                    "sodLiquidatingValue": 0.0,
                    "totalCashBalance": 0.0,
                    "trailingMaxDrawdown": 0.0,
                    "unrealizedProfitLoss": 412.99999999999727,
                    "weeklyLossLimit": 0.0,
                    "weeklyProfitLoss": 0.0,
                    "weeklyProfitTrigger": 0.0
                }
            },
            "positions": [
                {
                    "type": "NinjaTrader.Cbi.Position",
                    "account": "Sim110",
                    "instrument": "MGC 12-25",
                    "instrumentType": "Future",
                    "marketPosition": "Long",
                    "quantity": 1,
                    "averagePrice": 2916.8,
                    "marketPrice": 2958.1,
                    "unrealizedProfitLoss": 412.99999999999727
                }
            ]
        }
    ],
    "success": true
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}

#### WebSocket API

This request can also be made over the WebSocket API.

```json
{
  "action": "rpc",
  "id": "my-request-id",
  "api": "GetAccountSummary",
  "args": {}
}
```
