# GET Account

## Get a specific account by name

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

**Headers**

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

**Path Parameters**

<table><thead><tr><th width="165">Name</th><th width="112">Type</th><th width="134">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>account</code></td><td>string</td><td><mark style="color:red;">Required</mark></td><td>Name of account in NT8</td></tr></tbody></table>

**Code Examples**

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

```python
import requests

token = 'my-secret-token'

url = "https://app.crosstrade.io/v1/api/accounts/Sim101"
headers = {
    "Authorization": f"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
{
    "id": 2,
    "name": "Sim101",
    "displayName": "Sim101",
    "primaryUser": null,
    "provider": "Simulator",
    "denomination": "UsDollar",
    "status": "Enabled",
    "dailyLossLimit": 0.0,
    "minCashValue": 0.0,
    "maxOrderSize": 0,
    "maxPositionSize": 0,
    "connection": "NinjaTrader.Cbi.Connection",
    "connectionStatus": "Connected",
    "lastTransactionSum": 0.0,
    "item": {
        "buyingPower": 0.0,
        "cashValue": 100565.00000000285,
        "commission": 0.0,
        "dailyLossLimit": 0.0,
        "dailyProfitTrigger": 0.0,
        "excessInitialMargin": 103502.50000000285,
        "excessIntradayMargin": 103502.50000000285,
        "excessMaintenanceMargin": 100000.0,
        "excessPositionMargin": 100000.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": 103502.50000000285,
        "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": 2937.5,
        "weeklyLossLimit": 0.0,
        "weeklyProfitLoss": 0.0,
        "weeklyProfitTrigger": 0.0
    },
    "success": true
}
```

{% endtab %}

{% tab title="400" %}

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

{% endtab %}
{% endtabs %}

#### WebSocket API

This request can also be made over the WebSocket API. The `account` path parameter is passed inside `args`.

```json
{
  "action": "rpc",
  "id": "my-request-id",
  "api": "GetAccount",
  "args": {
    "account": "Sim101"
  }
}
```
