Maru Portal API Endpoint

Basics:

API URL https://portal.maru.network

BEARER: request from Maru Team

API docs

Get available projects

Returns projects for current user

  • CURL example

    curl --location --request GET '<https://portal.maru.network/api/v1/users/me/projects>' \\
    --header 'Authorization: Bearer XXX' \\
    
  • Response example

    {
      "page_size": 0,
      "page_number": 0,
      "total_items": 0,
      "total_pages": 0,
      "data": [
        {
          "name": "string",
          "block_range": "string",
          "description": "string",
          "is_private": true,
          "created_at": "2024-04-11T09:46:12.489Z",
          "updated_at": "2024-04-11T09:46:12.489Z",
          "id": 0,
          "stars_count": 0,
          "is_demo": true,
          "user": {
            "id": 0,
            "avatar_url": "string",
            "username": "string"
          },
          "expression_count": 0,
          "tags": [
            {
              "name": "string",
              "id": 0
            }
          ]
        }
      ]
    }

Current available projects:

Get list of expressions in project

Returns list of expressions in the selected project

  • CURL example

    curl --location --request GET '<https://portal.maru.network/api/v1/projects/15/expressions>' \\
    --header 'Authorization: Bearer XXX' \\
    
  • Response example

    {
      "compound_expressions": [
        {
          "id": 0,
          "created_at": "2024-04-11T09:51:26.440Z",
          "updated_at": "2024-04-11T09:51:26.440Z",
          "version": 0,
          "raw_data": "string",
          "name": "string",
          "project_id": 0,
          "contract_address": "string",
          "aggregate_operation": null,
          "event": "string",
          "data_source": "expressions",
          "filter_data": null,
          "topics": [
            "string"
          ]
        }
      ],
      "event_data_expressions": [
        {
          "id": 0,
          "created_at": "2024-04-11T09:51:26.440Z",
          "updated_at": "2024-04-11T09:51:26.440Z",
          "version": 0,
          "raw_data": "string",
          "name": "string",
          "project_id": 0,
          "contract_address": "string",
          "aggregate_operation": "ave",
          "event": "string",
          "data_source": "event_data",
          "filter_data": "string",
          "topics": [
            "string"
          ]
        }
      ]
    }

15 Project’s expressions [AAVE]

16 Project’s expressions [BALANCER]

17 Project’s expressions [CURVE]

Generate data for the selected expression

Method to generate datasets for the selected expression

Url args

from_date must be less than to_date

  • CURL example

    curl --location --request GET '<https://portal.maru.network/api/v1/expressions/EXPRESSION_ID/proofs_ds/by_days?from_date=2024-03-25&to_date=2024-04-02>' \\
    --header 'Authorization: Bearer XXX' 
  • Response example

    {
        "2024-04-01": {
            "plonky2_inputs": {
                "block_start": "0xeb3e2f981aec318bfae22624fbc4e894069f9d9ec846cdacea6f0c5efebb07a8",
                "block_end": "0xda4994cc1ffb6a292abec1faabdacc36f4b1872983aff365c9a3bc78a8d345c7",
                "value": "0x00000000000000000000000000000000000000000000000000000f7aa8a02802"
            },
            "user_inputs": {
                "block_number_start": 19557289,
                "block_number_end": 19564408,
                "value": 17019489495042
            },
            "proof": {}
        },
        "2024-04-02": {
            "plonky2_inputs": {
                "block_start": "0x41c9e7f83ae23686adb0538d0f7e09afa7fad488ba5c74a33c8b5dd5d2aa2f00",
                "block_end": "0xa7618a4c35d1231d6d3f76f8ab6f2769d9590085f1debab80e62737a175753d8",
                "value": "0x0000000000000000000000000000000000000000000000000000056cf9bf8bc0"
            },
            "user_inputs": {
                "block_number_start": 19564409,
                "block_number_end": 19571531,
                "value": 5965604686784
            },
            "proof": {}
        }
    }

Create expression

Update expression

Last updated