😎Wallet API

This API endpoints contains docs for retrieving chart data for wallet revenue and wallet holdings.

Route: /wallet/revenue

Parameters:

  • sort: Sort order of the results, which can be either asc (ascending) or desc (descending). The default sorting order is desc.

  • format (day, week, month, all) to group data based on the format specified. default is all

  • date (timestamp in seconds) to get the result for a particular date. If used with month. It returns the data for the specific month given in the timestamp and so forth. Npte: When using this with custom duration, it should be the same value as end.

  • category (revenue, balance): To specify how the data should be returned, as either a data of incoming revenue or historical balance. The default is revenue.

  • type (unique, cumulative): To specify if you want individual data or cumulative data. The default is unique.

  • chain: Blockchain chain identifier. Acceptable values are 1, 56, 137, or 900.

  • token: Token type. Acceptable values are eth, bnb, matic, sol, usdt, usdc, or dai.

  • start: The start date if using custom date range in unixtimesamp seconds (This overrides duration)

  • end: The enddate if using custom date range in unixtimesamp seconds (This overrides duration)

  • duration: The duration period for the data, accepted are

    1yr, 6mon, 3mon 1mon, 30d (default), 7d, 24h, 6h, 30m, 5m, 1m

Authentication:

No authentication is needed to access this endpoint.

Response:

The response contains an array of revenue data objects, each representing a specific timeframe and containing the following information:

Note: The results is giving in asc order, that means that if you request chart for a week. You would get the result per day, starting from the first day to the last day, that there was a balance change.

  • id: ID of the revenue data.

  • token: Token type associated with the revenue.

  • chain: Blockchain chain identifier.

  • balance: Balance associated with the revenue.

  • usd: Equivalent balance in USD.

  • date: Timestamp of the revenue data.

  • data: Additional data related to the revenue.

Error Handling:

If the request is invalid or missing required parameters, the endpoint returns an error indicating the missing parameters. Additionally, if the requested data is being synchronized, it returns an error indicating that the data is syncing.

Route: /wallet/holding

This endpoint retrieves the holdings of a wallet across specified blockchain chains. The data includes the quantity, percentage of total holdings, and USD value for each token held in the wallet.

Parameters:

  • chain:

    • Description: Specifies the blockchain chain(s) for which to retrieve holdings.

    • Type: String

    • Acceptable Values: 1, 56, 137, 900, all

      • 1 for Ethereum

      • 56 for Binance Smart Chain

      • 137 for Polygon

      • 900 for Solana

      • all to include all supported chains

    • Default Value: 1 (Ethereum)

    • Required: No

Request Example:

GET /wallet/holding?chain=all

Response:

The response contains an array of objects, each representing a specific token held in the wallet. The structure of each object includes:

  • name:

    • Description: The name of the token.

    • Type: String

  • symbol:

    • Description: The symbol of the token.

    • Type: String

  • quantity:

    • Description: The quantity of the token held in the wallet.

    • Type: Number

  • percentage:

    • Description: The percentage of the total holdings represented by this token.

    • Type: Number

    • Calculation: Calculated as (100 / total quantity of all tokens) * quantity of this token

  • usd_value:

    • Description: The equivalent value of the token in USD.

    • Type: Number

    • Calculation: Calculated as quantity of this token * current USD value of this token

Response Example:

{
  "status": true,
  "data": [
    {
      "name": "Ethereum",
      "symbol": "ETH",
      "quantity": 10.5,
      "percentage": 40.2,
      "usd_value": 31500
    },
    {
      "name": "Binance Coin",
      "symbol": "BNB",
      "quantity": 50,
      "percentage": 30.1,
      "usd_value": 15000
    },
    {
      "name": "Polygon",
      "symbol": "MATIC",
      "quantity": 1000,
      "percentage": 20.5,
      "usd_value": 5000
    },
    {
      "name": "Solana",
      "symbol": "SOL",
      "quantity": 25,
      "percentage": 9.2,
      "usd_value": 2500
    }
  ]
}

Error Handling:

  • Unsupported Chain:

    • Condition: If the specified chain is not supported.

    • Response:

      {
        "status": false,
        "error": "Unsupported chain"
      }
  • Missing or Invalid Parameters:

    • Condition: If required parameters are missing or invalid.

    • Response:

      {
        "status": false,
        "error": "Missing or invalid parameters"
      }

Last updated