# API Refference

Starch Industries uses a REST API to ensure compatibility with multiple systems and programming languages.

<mark style="color:blue;">`GET`</mark> `https://starch.one/leaderboard`

Get HTML leaderboard

{% tabs %}
{% tab title="200: OK HTML" %}

```javascript
<center>
    <h2>Miner Leaderboard - Weekly</h2>
    <table>
        <tr>
            <td>Rank</td>
            <td>Miner ID</td>
            <td>Blocks</td>
        </tr>
        <tr>
            <td>#1</td>
            <td>7B6876B0</td>
            <td>202</td>
        </tr>
        <tr>
            <td>#2</td>
            <td>1F37564D</td>
            <td>171</td>
        </tr>
        <tr>
            <td>#3</td>
            <td>D648B174</td>
            <td>158</td>
        </tr>
        <tr>
            <td>#4</td>
            <td>D071B96B</td>
            <td>143</td>
        </tr>
        <tr>
            <td>#5</td>
            <td>95BE74D4</td>
            <td>76</td>
        </tr>
        <tr>
            <td>#6</td>
            <td>226B475B</td>
            <td>68</td>
        </tr>
        <tr>
            <td>#7</td>
            <td>9505395B</td>
            <td>57</td>
        </tr>
        <tr>
            <td>#8</td>
            <td>1B242D26</td>
            <td>56</td>
        </tr>
        <tr>
            <td>#9</td>
            <td>1B8AAB2A</td>
            <td>52</td>
        </tr>
        <tr>
            <td>#10</td>
            <td>C0DF61D0</td>
            <td>44</td>
        </tr>
    </table>
</center>
```

{% endtab %}
{% endtabs %}

<mark style="color:blue;">`GET`</mark> `https://starch.one/api/info`

Get blockchain status

{% tabs %}
{% tab title="200: OK JSON" %}

```javascript
{
    "blocks": 48195,
    "count": 3,
    "difficulty": 1,
    "miners": 36,
    "rewards": 50
}
```

{% endtab %}
{% endtabs %}

<mark style="color:blue;">`GET`</mark> `https://starch.one/api/mine`

Get hash and difficulty from the last minted block

{% tabs %}
{% tab title="200: OK JSON" %}

```javascript
{
    "last_hash": "b0a1f56f6e4cc7f52b6fe8566e2031910e1f5c48088ddc82c83dce7cc9bf60be",
    "max": 1.1579206583003989e+77
}
```

{% endtab %}
{% endtabs %}

<mark style="color:green;">`POST`</mark> `https://starch.one/api/status`

Get starch miner status

#### Request Body

| Name                                      | Type   | Description |
| ----------------------------------------- | ------ | ----------- |
| minerID<mark style="color:red;">\*</mark> | String |             |

{% tabs %}
{% tab title="201: Created JSON" %}

```javascript
{
    "amount": 7800.0,
    "blocks": 154,
    "difficulty": 1
}
```

{% endtab %}
{% endtabs %}

<mark style="color:green;">`POST`</mark> `https://starch.one/api/solved`

Send solved cryptographic puzzle and new block data

#### Request Body

| Name                                      | Type   | Description |
| ----------------------------------------- | ------ | ----------- |
| newHash<mark style="color:red;">\*</mark> | String |             |
| color<mark style="color:red;">\*</mark>   | String |             |
| minerID<mark style="color:red;">\*</mark> | String |             |

{% tabs %}
{% tab title="201: Created JSON" %}

```javascript
{
    "success": "True"
}
```

{% endtab %}

{% tab title="201: Created JSON" %}

```javascript
{
    "success": "False"
}
```

{% endtab %}
{% endtabs %}


---

# 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://abstract-potato.gitbook.io/starch-industries-docs/api-refference.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.
