This endpoint allows you to retrieve the account balance/ holdings for your merchant account. It provides essential information regarding the quantity of crypto tokens available, which can be critical for managing transactions and ensuring you have sufficient balance for processing payments.
HMAC SHA-256 signature generated using the API Secret Key to secure the request.
When using the API, ensure to include your API Key and generate the signature for the request payload using your API Secret. The tables provided above contain example values for illustration purposes only. Please refer to the code snippets for detailed instructions on how to sign the request and generate the signature properly.
Code Snippet
constaxios=require('axios');constcrypto=require('crypto');// Replace with your API Key and SecretconstapiKey='your-api-key';constapiSecret='your-api-secret';// Create query parameters (if any)constqueryParams='';// Create the HMAC SHA-256 signatureconstsignature= crypto.createHmac('sha256', apiSecret).update(queryParams).digest('hex');// Define headersconstheaders= {"X-TLP-APIKEY": apiKey,"X-TLP-SIGNATURE": signature};// Send the GET requestaxios.get("https://api.tylt.money/transactions/merchant/getAccountBalance", { headers }).then(response => {console.log("Response:",response.data); }).catch(error => {console.error('Error:',error.response ?error.response.data :error.message); });
import requestsimport jsonimport hmacimport hashlib# Replace with your API Key and Secretapi_key ='your-api-key'api_secret ='your-api-secret'# Create query parameters (if any)query_params =''# Create the HMAC SHA-256 signaturesignature = hmac.new(api_secret.encode(), query_params.encode(), hashlib.sha256).hexdigest()# Define headersheaders ={"X-TLP-APIKEY": api_key,"X-TLP-SIGNATURE": signature}# Send the GET requestresponse = requests.get("https://api.tylt.money/transactions/merchant/getAccountBalance", headers=headers)# Print the responseif response.status_code ==200:print("Response:", response.json())else:print(f"Failed with status code {response.status_code}: {response.text}")
constcrypto=require('crypto');// Replace with your API Key and SecretconstapiKey='your-api-key';constapiSecret='your-api-secret';// Create query parameters (if any)constqueryParams='';// Create the HMAC SHA-256 signatureconstsignature= crypto.createHmac('sha256', apiSecret).update(queryParams).digest('hex');// Define headersconstheaders= {"X-TLP-APIKEY": apiKey,"X-TLP-SIGNATURE": signature};// Send the GET requestfetch("https://api.tylt.money/transactions/merchant/getAccountBalance", { headers }).then(response =>response.json()).then(data =>console.log("Response:", data)).catch(error =>console.error('Error:', error));