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

Url/api/v1/users/me/projects

Method

GET

  • 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:

Project nameID

AAVE Deposits & Borrows v2

15

Balancer Weighted Pools Trade Volumes

16

Curve 3pool Volumes

17

Get list of expressions in project

Returns list of expressions in the selected project

Url/api/v1/projects/PROJECT_ID/expressions

Method

GET

  • 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]

Expression nameID

aave_deposits_volume

71

wbtc_deposits_volume

70

usdc_deposits_volume

69

dai_deposits_volume

68

weth_deposits_volume

67

usdt_deposits_volume

66

usdt_borrows_volume

72

dai_borrows_volume

73

weth_borrows_volume

74

usdc_borrows_volume

75

wbtc_borrows_volume

76

aave_borrows_volume

77

16 Project’s expressions [BALANCER]

Expression nameID

bal_sell_volume_usd

82

17 Project’s expressions [CURVE]

Expression nameID

dai_volume_usd

78

usdc_volume_usd

79

usdt_volume_usd

80

total_volume_usd

81

Generate data for the selected expression

Method to generate datasets for the selected expression

Url/api/v1/expressions/EXPRESSION_ID/proofs_ds/by_days?from_date=XXX&to_date=XXX

Method

GET

Url args

from_date must be less than to_date

from_dateYYYY-MM-DDmin_value: 2023-12-20

to_date

YYYY-MM-DD

max_value: 2024-04-07

  • 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