List Transfers

List of Transfers

Returns deposits and withdrawals for a wallet. Transfers data sorted in descending order by ID.

// Get List of transfer transaction based on wallet id.
let listOfTransfers = await walletInstance
.Transfers({
  pageNumber: 1,// pagination - Increment by 1
  limit: 50 // Optional - If you are not set limit value then sdk will set default 50 value.
});

console.log("list Of Transafer Transaction : => ", JSON.stringify(listOfTransfers));
// Get List of transfer transaction based on wallet id.
let listOfTransfers:TransferTransactionWrapper[] = await walletInstance
.Transfers({
  pageNumber: 1,// pagination - Increment by 1
  limit: 50 // Optional - If you are not set limit value then sdk will set default 50 value.
});

console.log("list Of Transfer  Transaction : => ", JSON.stringify(listOfTransfers));

Parameter:

Params

Data Type

Description

pageNumber

Integer

View a specific number of rows of the page.

Limit

Integer

Restrict the number of rows to be returned. This optional parameter is not mandatory. If you do not pass this parameter value then SDK will set the default value as 50.

You will get the following response from the transfers method. It is JSON representation Only.

[
  {
      "coin":"LTC",
      "id":"27171",
      "wallet":296,
      "txid":"c823faeb339a766a6d8b87c98143b0178b3f67a9706d3218b55c5dc31018ac06",
      "date":"2021-12-27T06:02:14.000Z",
      "value":"-0.00001000",
      "valueString":"-0.00001000",
      "baseValue":-0.00001,
      "baseValueString":"-0.00001000",
      "feeString":"0.00003390",
      "usd":"-0.00466",
      "walletType":"pipeline",
      "inputs":[
         {
            "address":"3JnfuDG7WYk8zZv4YJvxfr7Dr59umBoXWC",
            "amount":"0.00948980",
            "isMine":true,
            "wallet":{
               "id":296,
               "name":"Deposit LTC",
               "type":"pipeline",
               "config":"2of4",
               "status":1,
               "balance":"0.00944590",
               "balanceusd":"4.40367858",
               "raw":null,
               "issynced":false,
               "walletpath":null,
               "walletidentifier":"3JnfuDG7WYk8zZv4YJvxfr7Dr59umBoXWC",
               "coin":"LTC",
               "chain":"LTC",
               "parentchain":"UTXO",
               "subtype":"deposit",
               "orgid":1
            }
         }
      ],
      "outputs":[
         {
            "address":"1EAvg7B4nPhTXe2nc568AXm85WKz1pfQB",
            "amount":"0.00001000",
            "isMine":false
         },
         {
            "address":"3JnfuDG7WYk8zZv4YJvxfr7Dr59umBoXWC",
            "amount":"0.00944590",
            "isMine":true,
            "wallet":{
               "id":296,
               "name":"Deposit LTC",
               "type":"pipeline",
               "config":"2of4",
               "status":1,
               "balance":"0.00944590",
               "balanceusd":"4.40367858",
               "raw":null,
               "issynced":false,
               "walletpath":null,
               "walletidentifier":"3JnfuDG7WYk8zZv4YJvxfr7Dr59umBoXWC",
               "coin":"LTC",
               "chain":"LTC",
               "parentchain":"UTXO",
               "subtype":"deposit",
               "orgid":1
            }
         }
      ]
   }
]

Full Example

import { CoinsEnum,LiminalEnvironment, LiminalJs } from "@lmnl/liminaljs";

const main = async () => {
    try {
        // Instance of Liminal Js
        let liminalJs = new LiminalJs(LiminalEnvironment.test);
        await liminalJs
            .Authenticate({
                clientId: "YOUR_CLIENT_ID",
                clientSecret: "YOUR_CLIENT_SECRET"
            })
            .AuthenticateWithAccessToken();

        // Get Wallet Instance
        let walletInstance = await liminalJs
            .Coin(CoinsEnum.ltc)
            .Wallets()
            .Get({ walletId: 296 });
      
                // Get List of transfer transaction based on wallet id.
        let listOfTransfers = await walletInstance
            .Transfers({
            pageNumber: 1,// pagination - Increment by 1
            limit: 50 // Optional - If you are not set limit value then sdk will set default 50 value.
        });
    }
    catch (ex) {
        throw ex;
    }
};
main().then((resolve) => console.log("Complete")).catch((error) => console.log(error));
import {
    CoinsEnum,
    LiminalEnvironment,
    LiminalJs,
    TransferTransactionWrapper,
    Wallet
} from "@lmnl/liminaljs"

const main = async (): Promise<void> => {
    try {
        // Instance of Liminal Js
        let liminalJs = new LiminalJs(LiminalEnvironment.test);
        await liminalJs
            .Authenticate({
                clientId: "YOUR_CLIENT_ID",
                clientSecret: "YOUR_CLIENT_SECRET"
            })
            .AuthenticateWithAccessToken();

        // Get Wallet Instance
        let walletInstance: Wallet = await liminalJs
            .Coin(CoinsEnum.ltc)
            .Wallets()
            .Get({ walletId: 296 });

       // Get List of transfer transaction based on wallet id.
        let listOfTransfers:TransferTransactionWrapper[] = await walletInstance
            .Transfers({
                pageNumber: 1,// pagination - Increment by 1
                limit: 50 // Optional - If you are not set limit value then sdk will set default 50 value.
            });

        console.log("list Of Transafer Transaction : => ", JSON.stringify(listOfTransfers));

    }
    catch (ex) {
        throw ex;
    }
}

main().then((resolve) => console.log("Complete")).catch((error) => console.log(error));

Did this page help you?