Account Abstraction
API Reference
Gas Tank
(Individual) Get Gas Tank Top-Up History

Get Smart Account Top-Up History

Overview

This API endpoint allows you to retrieve the top-up history for a specific smart account owner. It provides details of each top-up transaction, including status and amount.

  • HTTP Method: GET
  • Endpoint: {{BASE_URL}}/api/v1/smart-account/:ownerId/topUp/history

Request Parameters

  • ownerId (required): The unique identifier of the smart account owner whose top-up history is being requested.

Request Headers

  • X-CLIENT-ID: (required): Client ID which was generated when registering in Xellar Account Abstraction API Service Dashboard.
  • X-SIGNATURE: (required): Calculated signature, please refer to Authorization section.
  • X-TIMESTAMP: (required): Request timestamp in RFC3339 format.

Example Request Syntax

curl -X GET -H "Content-Type: application/json" \
-H "x-client-id: $YOUR_CLIENT_ID" \
-H "x-signature: $CALCULATED_SIGNATURE" \
-H "x-timestamp: $TIMESTAMP" \
"{{BASE_URL}}/api/v1/smart-account/:ownerId/topUp/history"

Response

The response will include a JSON object with the following properties:

  • status (number): The HTTP status code of the response (e.g., 200 for success).
  • message (string): A message indicating the result of the request.
  • data (array): An array of objects, each representing a top-up transaction with the following properties:
    • id (string): The unique identifier of the top-up transaction.
    • createdAt (string): The timestamp when the top-up was created.
    • updatedAt (string|null): The timestamp when the top-up was last updated, if applicable.
    • clientId (string): The client ID associated with the top-up.
    • ownerId (string): The owner ID of the smart account.
    • txHash (string): The transaction hash of the top-up.
    • network (string): The network on which the top-up was executed.
    • chainId (number): The chain ID of the network.
    • poolAddress (string): The address of the pool used for the top-up.
    • amount (string): The amount of tokens involved in the top-up.
    • tokenAddress (string): The address of the token used for the top-up.
    • status (string): The status of the top-up (e.g., "success").
    • failReason (string): The reason for failure, if any.

Example Response

{
  "status": 200,
  "message": "success remake signature",
  "data": [
    {
      "id": "67754bc76ce23e75734d7d26",
      "createdAt": "2025-01-01T14:05:59.134Z",
      "updatedAt": null,
      "clientId": "19eb9738-dc52-493a-a602-b4d08f946bba",
      "ownerId": "67662b98c2bcde64641ccb45",
      "txHash": "0x....",
      "network": "sepolia",
      "chainId": 11155111,
      "poolAddress": "0x....",
      "amount": "10000000000000000",
      "tokenAddress": "0x....",
      "status": "success",
      "failReason": ""
    }
  ]
}