Get Transactions

Description

This endpoint retrieves a list of transactions for a specified wallet address, including details about the sender, receiver, and transaction status.

URL

https://api.zelf.world/api/mina/transactions/:address

Method

GET

Parameters

ParameterTypeDescription

address

string

The wallet address for which to retrieve transactions.

page

int

(Optional) The page number for paginated results (default is 0).

show

int

(Optional) The number of results to show per page (default is 10).

Headers

KeyValueRequiredDescription

Authorization

Bearer <token>

Yes

The authorization token for access.

Example Request

curl --location --request GET 'https://api.zelf.world/api/mina/transactions/B62qnEeb4KAp9WxdMxddHVtJ8gwfyJURG5BZZ6e4LsRjQKHNWqmgSWt?page=0&show=10' \
--header 'Authorization: Bearer <token>'

Example Response

{
  "data": [
    {
      "senderAddress": "B62qnEeb4KAp9WxdMxddHVtJ8gwfyJURG5BZZ6e4LsRjQKHNWqmgSWt",
      "senderName": "Zot",
      "senderImg": "https://strapi-dev.scand.app/uploads/Zot_afdc35d991.jpeg",
      "receiverAddress": "B62qoVxygiYzqRCj4taZDbRJGY6xLvuzoiLdY5CpGm7L9Tz5cj2Qr6i",
      "receiverName": null,
      "receiverImg": null,
      "type": "payment",
      "direction": "OUT",
      "account": "B62qoVxygiYzqRCj4taZDbRJGY6xLvuzoiLdY5CpGm7L9Tz5cj2Qr6i",
      "accountName": null,
      "accountImg": null,
      "transactionHash": "5JuvRkBHMNX5X4boo9tjYhdKyn1e14R6Dg3dMtnwvosnc3hjTg2K",
      "status": "Pending",
      "age": 1726083865238,
      "amount": 0.07726,
      "fee": 0.015639,
      "block": null,
      "stateHash": null,
      "memo": "ukr svin, oink oink",
      "alert": false,
      "nonce": 289145,
      "slot": null,
      "globalSlot": null,
      "sourceScam": {
        "scamId": null,
        "objectType": null,
        "onchainId": null,
        "defaultSecurityMessage": null,
        "securityMessage": null,
        "scamType": null
      },
      "receiverScam": {
        "scamId": null,
        "objectType": null,
        "onchainId": null,
        "defaultSecurityMessage": null,
        "securityMessage": null,
        "scamType": null
      }
    }
  ]
}

Response Details

  • senderAddress: The wallet address of the transaction sender.

  • senderName: The name of the sender, if available.

  • senderImg: The profile image URL of the sender, if available.

  • receiverAddress: The wallet address of the transaction receiver.

  • receiverName: The name of the receiver, if available.

  • receiverImg: The profile image URL of the receiver, if available.

  • type: The type of transaction (e.g., payment).

  • direction: The direction of the transaction (e.g., OUT for sending, IN for receiving).

  • account: The wallet account involved in the transaction.

  • accountName: The name associated with the account (if applicable).

  • accountImg: The profile image associated with the account (if applicable).

  • transactionHash: The hash of the transaction on the blockchain.

  • status: The current status of the transaction (e.g., Pending).

  • age: The age of the transaction (in milliseconds).

  • amount: The amount of currency involved in the transaction.

  • fee: The transaction fee associated with the transfer.

  • block: The block number associated with the transaction (if confirmed).

  • stateHash: The state hash at the time of the transaction (if available).

  • memo: A memo or note attached to the transaction.

  • alert: A boolean indicating if any alerts were triggered.

  • nonce: The transaction nonce.

  • slot: The slot associated with the transaction (if available).

  • globalSlot: The global slot associated with the transaction (if available).

  • sourceScam: Details about the source account, including scam information.

  • receiverScam: Details about the receiver account, including scam information.

Error Responses

Status CodeDescription

401

Unauthorized. Invalid or missing token.

404

Not Found. The address does not exist.

500

Internal Server Error. An error occurred on the server.

Node.js - Axios Example

const axios = require('axios');

let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://api.zelf.world/api/mina/transactions/B62qnEeb4KAp9WxdMxddHVtJ8gwfyJURG5BZZ6e4LsRjQKHNWqmgSWt?page=0&show=10',
  headers: {
    'Authorization': 'Bearer <token>'
  }
};

axios.request(config)
  .then((response) => {
    console.log(JSON.stringify(response.data));
  })
  .catch((error) => {
    console.log(error);
  });

Status Codes

CodeDescription

200

Success. The transaction data is returned.

400

Bad Request. Invalid address or query parameters.

401

Unauthorized. Invalid authorization token.

404

Not Found. Address does not exist.

500

Internal Server Error.

Notes

  • Ensure that the address provided is valid and in the correct format.

  • Use page and show parameters for pagination, especially if there are many transactions associated with the address.

  • The API requires an Authorization token for access.

Last updated