# Balance Sheet

This API retrieves the balance sheet for a specific company, identified by its company code (`cocode`). The balance sheet provides detailed financial information about the company's assets, liabilities, and equity. The `reportType` parameter allows users to specify the type of balance sheet report they wish to retrieve (e.g., S - Single or C - Consolidated).

**Note:** `cocode` can be obtained from the Search Stock or Company Basic Detail API.

**Endpoint**

```
https://connects.torusdigital.com/api/v1/balansheet/{cocode}/{reportType}
```

**Request Parameter**

<table><thead><tr><th width="181">Name</th><th width="128">Mandatory</th><th>Description</th></tr></thead><tbody><tr><td>cocode</td><td>Y</td><td>The unique company code identifier.</td></tr><tr><td>reportType</td><td>Y</td><td>The type of report to retrieve. Report type (S - Single or C - Consolidated)</td></tr></tbody></table>

**Request**

{% tabs %}
{% tab title="curl" %}
{% code title="cURL" overflow="wrap" lineNumbers="true" %}

```javascript
curl -X 'GET' \
  'https://connects.torusdigital.com/api/v1/balansheet/{cocode}/{reportType}' \
  -H 'accept: application/json'
```

{% endcode %}
{% endtab %}

{% tab title="Java" %}
{% code title="Java-Unirest" fullWidth="false" %}

```java
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://connects.torusdigital.com/api/v1/balansheet/{cocode}/{reportType}")
  .header("Content-Type", "application/json")
  .asString();
```

{% endcode %}
{% endtab %}

{% tab title="Go" %}
{% code title="Go-Native" overflow="wrap" lineNumbers="true" fullWidth="true" %}

```go
package main

import (
	"fmt"
	"io/ioutil"
	"net/http"
	"strings"
)

func main() {
	url := "https://connects.torusdigital.com/api/v1/balansheet/{cocode}/{reportType}"
	method := "GET"

	client := &http.Client{}
	req, err := http.NewRequest(method, url, nil)

	if err != nil {
		fmt.Println(err)
		return
	}
	req.Header.Add("Content-Type", "application/json")

	res, err := client.Do(req)
	if err != nil {
		fmt.Println(err)
		return
	}
	defer res.Body.Close()

	body, err := ioutil.ReadAll(res.Body)
	if err != nil {
		fmt.Println(err)
		return
	}
	fmt.Println(string(body))
}
```

{% endcode %}
{% endtab %}

{% tab title="JavaScript" %}
{% code title="JavaScript-jQuery" overflow="wrap" lineNumbers="true" %}

```javascript
var settings = {
  "url": "https://connects.torusdigital.com/api/v1/balansheet/{cocode}/{reportType}",
  "method": "GET",
  "timeout": 0,
  "headers": {
    "Content-Type": "application/json"
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
```

{% endcode %}
{% endtab %}
{% endtabs %}

**Response**

```json
[
  {
    "COLUMNNAME": "Fixed Assets",
    "YearData": {
      "Y202003": 318805,
      "Y202103": 318903,
      "Y202203": 255021,
      "Y202303": 305686,
      "Y202403": 316968
    }
  },
  {
    "COLUMNNAME": "Total Non Current Assets",
    "YearData": {
      "Y202003": 805045,
      "Y202103": 662954,
      "Y202203": 656276,
      "Y202303": 619203,
      "Y202403": 697018
    }
  },
  {
    "COLUMNNAME": "Total Current Assets",
    "YearData": {
      "Y202003": 166654,
      "Y202103": 210719,
      "Y202203": 222398,
      "Y202303": 303457,
      "Y202403": 262625
    }
  },
  {
    "COLUMNNAME": "TOTAL ASSETS",
    "YearData": {
      "Y202003": 971699,
      "Y202103": 873673,
      "Y202203": 878674,
      "Y202303": 922660,
      "Y202403": 959643
    }
  },
  {
    "COLUMNNAME": "Total Shareholder's Fund",
    "YearData": {
      "Y202003": 391215,
      "Y202103": 474483,
      "Y202203": 471527,
      "Y202303": 479078,
      "Y202403": 515096
    }
  }
]
```

**Response Parameter**

<table><thead><tr><th width="172">Parameters</th><th>Description</th></tr></thead><tbody><tr><td>COLUMNNAME</td><td>The specific financial metric reported in the balance sheet (e.g., Fixed Assets, Total Assets).</td></tr><tr><td>YearData</td><td>A key-value pair containing the year (<code>Yyyyy03</code>) as the key and the corresponding financial value.</td></tr><tr><td>Y20XX03</td><td>Financial data for the fiscal year ending in March 20XX.</td></tr></tbody></table>
