Skip to content

Conversation

@PedroBinotto
Copy link
Contributor

@PedroBinotto PedroBinotto commented Dec 17, 2025

Removed Endpoints

  • Removed accountPower from item queries
  • Removed votingPowerHistory from item queries
  • Removed accountPowers from list queries
  • Removed votingPowerHistorys from list queries
  • Removed historicalVotingPowers from rest queries

Added/Reorganized Endpoints

  • Renamed votingPowers to historicalVotingPowers
  • Added new votingPowers endpoint
  • Added votingPowerByAccountId endpoint
  • Added votingPowerVariationsByAccountId endpoint

Changelog

  • [Additions] New API endpoints (REST):
    • votingPowerByAccountId:
      method: "get",
      operationId: "votingPowerByAccountId",
      path: "/voting-powers/{accountId}",
      summary: "Get account powers",
      description: "Returns voting power information for a specific address (account)",
      
      • Input:
        • accountId (required param): index by account address;
      • Output:
        • Resulting item, including { accountId, votingPower, votesCount, proposalsCount, delegationsCount };
    • votingPowers:
      method: "get",
      operationId: "votingPowers",
      path: "/voting-powers",
      summary: "Get voting powers",
      description: "Returns sorted and paginated account voting power records",
      
      • Input:
        • addresses (optional param): filter by address (array);
        • fromValue (optional param): filter by minimum voting power;
        • toValue (optional param): filter by maximum voting power;
        • limit (optional param);
        • skip (pagination param);
        • orderDirection (pagination param);
      • Output:
        • items: Array of resulting items, including { accountId, votingPower, votesCount, proposalsCount, delegationsCount };
        • totalCount: total number of hits given filter parameters;
    • votingPowerVariationsByAccountId:
      method: "get",
      operationId: "votingPowerVariationsByAccountId",
      path: "/voting-powers/{accountId}/variations",
      summary: "Get top changes in voting power for a given period for a single account",
      description: "Returns a the changes to voting power by period and accountId",
      
      • Input:
        • accountId (required param): index by account address;
        • days (required param): variation period;
      • Output:
        • data: Resulting item, including { accountId, previousVotingPower, currentVotingPower, absoluteChange, percentageChange };
        • period: Time period data relating to the query, containing { days, startTimestamp, endTimestamp };
    • historicalVotingPower: (RENAME) old votingPowers endpoint;
  • [Deletions] Removed API endpoints (GQL Queries):
    • Query.accountPower (ponder auto-generated):
      • Mapped references to query:
        • GetAccountPower GQL Query:
          • useVoterInfo react hook:
            • ProposalSection.tsx;
        • GetDelegatorVotingPowerDetails:
          • useVotingPower react hook:
            • useVotingPowerData react hook:
              • VotingPower.tsx;
          • VotingPowerTable.tsx;
    • Query.accountPowers (ponder auto-generated):
      • Mapped references to query:
        • GetDelegates GQL Query:
          • useDaoOverviewData react hook:
            • DaoOverviewSection.tsx;
          • useDelegates react hook:
            • Delegates.tsx;
        • GetDelegatesCount GQL Query:
          • useDelegates react hook:
            • Delegates.tsx;
        • GetVetoCouncilVotingPower GQL Query:
          • useVetoCouncilVotingPower react hook:
            • AttackCostBarChart.tsx;
    • Query.votingPowerHistory (ponder auto-generated):
      • Mapped references to query:
        • N/A;
    • Query.votingPowerHistorys (ponder auto-generated):
      • Mapped references to query:
        • GetDelegateDelegationHistory GQL Query (dead code);
        • GetDelegateDelegationHistoryDeltaRange GQL Query (dead code);
        • GetDelegateDelegationHistoryGraph GQL Query:
          • useDelegateDelegationHistoryGraph react hook:
            • VotingPowerVariationGraph.tsx;
    • Query.historicalVotingPower (old endpoint):
      • Mapped references to query:
        • GetHistoricalVotingAndActivity GQL Query:
          • useDelegates react hook:
            • Delegates.tsx;
        • GetVotingPowerChange GQL Query:
          • useVotes react hook:
            • TabsVotedContent.tsx;

Resource correspondence

Migration from the old queries to the new REST endpoints could me implemented according to the following relation:

Old New
Query.accountPower votingPowerByAccountId(/voting-powers/{address})
Query.accountPowers votingPowers(/voting-powers)
Query.votingPowers historicalVotingPowers(/voting-powers/{address}/historical)
Query.votingPowerHistorys historicalVotingPowers(/voting-powers/{address}/historical)
Query.historicalVotingPower votingPowerVariationsByAccountId(/voting-powers/{address}/variations)
OpenAPI Spec
{
  "openapi": "3.0.2",
  ...
  },
  "paths": {
    ...
    "/voting-powers/{accountId}/historical": {
      "get": {
        "operationId": "historicalVotingPowers",
        "summary": "Get voting power changes",
        "description": "Returns a list of voting power changes",
        "tags": [
          "proposals"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "accountId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "default": 0
            },
            "required": false,
            "name": "skip",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "timestamp",
                "delta"
              ],
              "default": "timestamp"
            },
            "required": false,
            "name": "orderBy",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "desc"
            },
            "required": false,
            "name": "orderDirection",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "minDelta",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "maxDelta",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved voting power changes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "transactionHash": {
                            "type": "string"
                          },
                          "daoId": {
                            "type": "string"
                          },
                          "accountId": {
                            "type": "string"
                          },
                          "votingPower": {
                            "type": "string"
                          },
                          "delta": {
                            "type": "string"
                          },
                          "timestamp": {
                            "type": "string"
                          },
                          "logIndex": {
                            "type": "number"
                          },
                          "delegation": {
                            "type": "object",
                            "nullable": true,
                            "properties": {
                              "from": {
                                "type": "string"
                              },
                              "value": {
                                "type": "string"
                              },
                              "to": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "from",
                              "value",
                              "to"
                            ]
                          },
                          "transfer": {
                            "type": "object",
                            "nullable": true,
                            "properties": {
                              "value": {
                                "type": "string"
                              },
                              "from": {
                                "type": "string"
                              },
                              "to": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "value",
                              "from",
                              "to"
                            ]
                          }
                        },
                        "required": [
                          "transactionHash",
                          "daoId",
                          "accountId",
                          "votingPower",
                          "delta",
                          "timestamp",
                          "logIndex",
                          "delegation",
                          "transfer"
                        ]
                      }
                    },
                    "totalCount": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "items",
                    "totalCount"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/voting-powers/variations": {
      "get": {
        "operationId": "votingPowerVariations",
        "summary": "Get top changes in voting power for a given period",
        "description": "Returns a mapping of the biggest changes to voting power associated by delegate address",
        "tags": [
          "proposals"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "7d",
                "30d",
                "90d",
                "180d",
                "365d"
              ],
              "default": "90d"
            },
            "required": false,
            "name": "days",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "default": 0
            },
            "required": false,
            "name": "skip",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "desc"
            },
            "required": false,
            "name": "orderDirection",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved voting power changes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "period": {
                      "type": "object",
                      "properties": {
                        "days": {
                          "type": "string"
                        },
                        "startTimestamp": {
                          "type": "string"
                        },
                        "endTimestamp": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "days",
                        "startTimestamp",
                        "endTimestamp"
                      ]
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "accountId": {
                            "type": "string"
                          },
                          "previousVotingPower": {
                            "type": "string",
                            "nullable": true
                          },
                          "currentVotingPower": {
                            "type": "string"
                          },
                          "absoluteChange": {
                            "type": "string"
                          },
                          "percentageChange": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "accountId",
                          "currentVotingPower",
                          "absoluteChange",
                          "percentageChange"
                        ]
                      }
                    }
                  },
                  "required": [
                    "period",
                    "items"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/voting-powers/{accountId}/variations": {
      "get": {
        "operationId": "votingPowerVariationsByAccountId",
        "summary": "Get top changes in voting power for a given period for a single account",
        "description": "Returns a the changes to voting power by period and accountId",
        "tags": [
          "proposals"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "accountId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "7d",
                "30d",
                "90d",
                "180d",
                "365d"
              ],
              "default": "90d"
            },
            "required": false,
            "name": "days",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved voting power changes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "period": {
                      "type": "object",
                      "properties": {
                        "days": {
                          "type": "string"
                        },
                        "startTimestamp": {
                          "type": "string"
                        },
                        "endTimestamp": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "days",
                        "startTimestamp",
                        "endTimestamp"
                      ]
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "accountId": {
                          "type": "string"
                        },
                        "previousVotingPower": {
                          "type": "string",
                          "nullable": true
                        },
                        "currentVotingPower": {
                          "type": "string"
                        },
                        "absoluteChange": {
                          "type": "string"
                        },
                        "percentageChange": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "accountId",
                        "currentVotingPower",
                        "absoluteChange",
                        "percentageChange"
                      ]
                    }
                  },
                  "required": [
                    "period",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/voting-powers": {
      "get": {
        "operationId": "votingPowers",
        "summary": "Get voting powers",
        "description": "Returns sorted and paginated account voting power records",
        "tags": [
          "proposals"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "default": 0
            },
            "required": false,
            "name": "skip",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "desc"
            },
            "required": false,
            "name": "orderDirection",
            "in": "query"
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "default": []
            },
            "required": false,
            "name": "addresses",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "fromValue",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "toValue",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved voting power changes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "accountId": {
                            "type": "string"
                          },
                          "votingPower": {
                            "type": "string"
                          },
                          "votesCount": {
                            "type": "number"
                          },
                          "proposalsCount": {
                            "type": "number"
                          },
                          "delegationsCount": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "accountId",
                          "votingPower",
                          "votesCount",
                          "proposalsCount",
                          "delegationsCount"
                        ]
                      }
                    },
                    "totalCount": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "items",
                    "totalCount"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/voting-powers/{accountId}": {
      "get": {
        "operationId": "votingPowerByAccountId",
        "summary": "Get account powers",
        "description": "Returns voting power information for a specific address (account)",
        "tags": [
          "proposals"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "accountId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved voting power changes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accountId": {
                      "type": "string"
                    },
                    "votingPower": {
                      "type": "string"
                    },
                    "votesCount": {
                      "type": "number"
                    },
                    "proposalsCount": {
                      "type": "number"
                    },
                    "delegationsCount": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "accountId",
                    "votingPower",
                    "votesCount",
                    "proposalsCount",
                    "delegationsCount"
                  ]
                }
              }
            }
          }
        }
      }
    },
  },
}

Tests and resources

  • votingPowerByAccountId(/voting-powers/{address});
  • votingPowers(/voting-powers);
  • historicalVotingPowers(/voting-powers/{address}/historical);
  • votingPowerVariationsByAccountId(/voting-powers/{address}/variations);

Results

Comparisons between old GQL query and the new endpoints which are meant to replace them;

votingPowerByAccountId (NEW)

Gateway request
# GET /voting-powers/0x000000000A38444e0a6E37d3b630d7e855a7cb13
query MyQuery {
  votingPowerByAccountId(accountId: "0x000000000A38444e0a6E37d3b630d7e855a7cb13") {
    accountId
    delegationsCount
    proposalsCount
    votesCount
    votingPower
  }
}
Result
{
  "data": {
    "votingPowerByAccountId": {
      "accountId": "0x000000000A38444e0a6E37d3b630d7e855a7cb13",
      "delegationsCount": 1,
      "proposalsCount": 0,
      "votesCount": 1,
      "votingPower": "1783790000006622"
    }
  }
}

Query.accountPower (OLD)

Gateway request
query MyQuery {
  accountPower(accountId: "0x000000000A38444e0a6E37d3b630d7e855a7cb13") {
    accountId
    delegationsCount
    votesCount
    votingPower
    proposalsCount
  }
}
Result
{
  "data": {
    "accountPower": {
      "accountId": "0x000000000A38444e0a6E37d3b630d7e855a7cb13",
      "delegationsCount": 1,
      "votesCount": 1,
      "votingPower": "1783790000006622",
      "proposalsCount": 0
    }
  }
}

votingPowers (NEW)

Gateway request
# GET /voting-powers?limit=5&orderDirection=desc&
query MyQuery {
  votingPowers(orderDirection: desc, limit: "5") {
    items {
      votingPower
      votesCount
      proposalsCount
      delegationsCount
      accountId
    }
    totalCount
  }
}
Result
{
  "data": {
    "votingPowers": {
      "items": [
        {
          "votingPower": "267414384691624597148554",
          "votesCount": 43,
          "proposalsCount": 2,
          "delegationsCount": 3058,
          "accountId": "0x5BFCB4BE4d7B43437d5A0c57E908c048a4418390"
        },
        {
          "votingPower": "176308937034873177539710",
          "votesCount": 16,
          "proposalsCount": 0,
          "delegationsCount": 12,
          "accountId": "0x89EdE5cBE53473A64d6C8DF14176a0d658dAAeDC"
        },
        {
          "votingPower": "148927242710759529646046",
          "votesCount": 6,
          "proposalsCount": 0,
          "delegationsCount": 6616,
          "accountId": "0x81b287c0992B110ADEB5903Bf7E2d9350C80581a"
        },
        {
          "votingPower": "148250938061618473036422",
          "votesCount": 49,
          "proposalsCount": 30,
          "delegationsCount": 3746,
          "accountId": "0xb8c2C29ee19D8307cb7255e1Cd9CbDE883A267d5"
        },
        {
          "votingPower": "133320061155642493700635",
          "votesCount": 48,
          "proposalsCount": 4,
          "delegationsCount": 3672,
          "accountId": "0x809FA673fe2ab515FaA168259cB14E2BeDeBF68e"
        }
      ],
      "totalCount": 38523
    }
  }
}

Query.accountPowers (OLD)

Gateway request
query MyQuery {
  accountPowers(orderDirection: "desc", orderBy: "votingPower", limit: 5) {
    items {
      accountId
      votingPower
      delegationsCount
      proposalsCount
      votesCount
    }
  }
}
Result
{
  "data": {
    "accountPowers": {
      "items": [
        {
          "accountId": "0x5BFCB4BE4d7B43437d5A0c57E908c048a4418390",
          "votingPower": "267414384691624597148554",
          "delegationsCount": 3058,
          "proposalsCount": 2,
          "votesCount": 43
        },
        {
          "accountId": "0x89EdE5cBE53473A64d6C8DF14176a0d658dAAeDC",
          "votingPower": "176308937034873177539710",
          "delegationsCount": 12,
          "proposalsCount": 0,
          "votesCount": 16
        },
        {
          "accountId": "0x81b287c0992B110ADEB5903Bf7E2d9350C80581a",
          "votingPower": "148927242710759529646046",
          "delegationsCount": 6616,
          "proposalsCount": 0,
          "votesCount": 6
        },
        {
          "accountId": "0xb8c2C29ee19D8307cb7255e1Cd9CbDE883A267d5",
          "votingPower": "148250938061618473036422",
          "delegationsCount": 3746,
          "proposalsCount": 30,
          "votesCount": 49
        },
        {
          "accountId": "0x809FA673fe2ab515FaA168259cB14E2BeDeBF68e",
          "votingPower": "133320061155642493700635",
          "delegationsCount": 3672,
          "proposalsCount": 4,
          "votesCount": 48
        }
      ]
    }
  }
}

historicalVotingPowers (NEW)

Gateway request
# /voting-powers/0x5BFCB4BE4d7B43437d5A0c57E908c048a4418390/historical?limit=5&orderBy=timestamp&orderDirection=desc
query MyQuery {
  historicalVotingPowers(
    accountId: "0x5BFCB4BE4d7B43437d5A0c57E908c048a4418390"
    orderBy: timestamp
    orderDirection: desc
    limit: "5"
  ) {
    items {
      accountId
      timestamp
      votingPower
      transactionHash
    }
  }
}
Result
{
  "data": {
    "historicalVotingPowers": {
      "items": [
        {
          "accountId": "0x5BFCB4BE4d7B43437d5A0c57E908c048a4418390",
          "timestamp": "1767151691",
          "votingPower": "267414384691624597148554",
          "transactionHash": "0x96dbaf919143da978504741a84baac4d0339cdf175aaaee9d95b70bb2ea5c9f1"
        },
        {
          "accountId": "0x5BFCB4BE4d7B43437d5A0c57E908c048a4418390",
          "timestamp": "1765958711",
          "votingPower": "267598373912943037612426",
          "transactionHash": "0x4a29ebcaa9445f543623d8ca568720ffaf67ecf18f1c9fdf86a90056aa1d59f7"
        },
        {
          "accountId": "0x5BFCB4BE4d7B43437d5A0c57E908c048a4418390",
          "timestamp": "1765903091",
          "votingPower": "267598375474906363275797",
          "transactionHash": "0x3ae3052863f799e434ab06f4b74975ec529eb6a5f6cc4c730ce1ce8b2738e80c"
        },
        {
          "accountId": "0x5BFCB4BE4d7B43437d5A0c57E908c048a4418390",
          "timestamp": "1764634235",
          "votingPower": "267598420405292324701326",
          "transactionHash": "0xc28c7d17d5c4c76c8575c88c625a54bd2f3e3ff3a552fe2486e192cc92c406a5"
        },
        {
          "accountId": "0x5BFCB4BE4d7B43437d5A0c57E908c048a4418390",
          "timestamp": "1764536003",
          "votingPower": "266598355403093993883907",
          "transactionHash": "0xdb379e148f6f91efc35ebb9b902a3dbc640c3c23c6cd4315d3fbca6c2e4f8ba8"
        }
      ]
    }
  }
}

Query.votingPowers (OLD)

Gateway request
query MyQuery {
  votingPowers(
    account: "0x5BFCB4BE4d7B43437d5A0c57E908c048a4418390"
    orderBy: timestamp
    orderDirection: desc
    limit: "5"
  ) {
    items {
      accountId
      timestamp
      transactionHash
      votingPower
    }
  }
}
Result
{
  "data": {
    "votingPowers": {
      "items": [
        {
          "accountId": "0x5BFCB4BE4d7B43437d5A0c57E908c048a4418390",
          "timestamp": "1767151691",
          "transactionHash": "0x96dbaf919143da978504741a84baac4d0339cdf175aaaee9d95b70bb2ea5c9f1",
          "votingPower": "267414384691624597148554"
        },
        {
          "accountId": "0x5BFCB4BE4d7B43437d5A0c57E908c048a4418390",
          "timestamp": "1765958711",
          "transactionHash": "0x4a29ebcaa9445f543623d8ca568720ffaf67ecf18f1c9fdf86a90056aa1d59f7",
          "votingPower": "267598373912943037612426"
        },
        {
          "accountId": "0x5BFCB4BE4d7B43437d5A0c57E908c048a4418390",
          "timestamp": "1765903091",
          "transactionHash": "0x3ae3052863f799e434ab06f4b74975ec529eb6a5f6cc4c730ce1ce8b2738e80c",
          "votingPower": "267598375474906363275797"
        },
        {
          "accountId": "0x5BFCB4BE4d7B43437d5A0c57E908c048a4418390",
          "timestamp": "1764634235",
          "transactionHash": "0xc28c7d17d5c4c76c8575c88c625a54bd2f3e3ff3a552fe2486e192cc92c406a5",
          "votingPower": "267598420405292324701326"
        },
        {
          "accountId": "0x5BFCB4BE4d7B43437d5A0c57E908c048a4418390",
          "timestamp": "1764536003",
          "transactionHash": "0xdb379e148f6f91efc35ebb9b902a3dbc640c3c23c6cd4315d3fbca6c2e4f8ba8",
          "votingPower": "266598355403093993883907"
        }
      ]
    }
  }
}

historicalVotingPowers (NEW)

  • Results are the same as the previous test;

Query.votingPowerHistorys (OLD)

  • Results are the same as the previous test (votingPowerHistorys functions the same as the old votingPowers (current historicalVotingPower));

votingPowerVariationsByAccountId (NEW)

Gateway request
# /voting-powers/0x5BFCB4BE4d7B43437d5A0c57E908c048a4418390/variations?days=90d
query MyQuery {
  votingPowerVariationsByAccountId(
    accountId: "0x5BFCB4BE4d7B43437d5A0c57E908c048a4418390"
    days: _90d
  ) {
    data {
      previousVotingPower
      accountId
    }
  }
}
Result
{
  "data": {
    "votingPowerVariationsByAccountId": {
      "data": {
        "previousVotingPower": "209882708507009072668209",
        "accountId": "0x5BFCB4BE4d7B43437d5A0c57E908c048a4418390"
      }
    }
  }
}

historicalVotingPower (OLD)

Gateway request
query MyQuery {
  historicalVotingPower(
    addresses: "0x5BFCB4BE4d7B43437d5A0c57E908c048a4418390"
    days: _90d
  ) {
    address
    votingPower
  }
}
Result
{
  "data": {
    "historicalVotingPower": [
      {
        "address": "0x5BFCB4BE4d7B43437d5A0c57E908c048a4418390",
        "votingPower": "209882708507009072668209"
      }
    ]
  }
}

@vercel
Copy link

vercel bot commented Dec 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
anticapture Ready Ready Preview, Comment Jan 19, 2026 5:31pm
anticapture-storybook Ready Ready Preview, Comment Jan 19, 2026 5:31pm

Request Review

@PedroBinotto PedroBinotto changed the title Chore/port power query to rest [DEV-200] Implement voting power rest endpoint Dec 22, 2025
@vercel vercel bot temporarily deployed to Preview – anticapture-storybook December 22, 2025 15:04 Inactive
@pikonha pikonha added the enhancement Improving an already existing feature label Jan 6, 2026
…eries

Voting Power REST hook integration
@pikonha pikonha merged commit 52a80e0 into dev Jan 19, 2026
4 checks passed
@pikonha pikonha deleted the chore/port-power-query-to-rest branch January 19, 2026 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improving an already existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants