Skip to main content

GetWarehouseTransactions

warning

This export is only available for serverside!

Export Syntax
exports['dream_cryptomining']:GetWarehouseTransactions(WarehouseId) -- Returns a table with data

Parameter

  1. WarehouseId (String) -> The Warehouse-Id. See Getallwarehouses.md

Response

Response Table
{
"TRANSACTIONID": {
"id": int, -- TransactionId
"warehouse": int, -- WarehouseId
"assigned": int, -- AssignedId
"transactionId": string -- TransactionId (e.g. T994826)
"type": string, -- [income, outgoing]
"status": string, -- [pending, complete]
"kwh": float, -- Kwh amount
"server": int, -- Server amount
"amount": int, -- 💸 Amount
"date": string, -- Formated Date (DD.MM.YYYY HH:MM)
"created_at": float, -- Unix Timestamp
"updated_at": float, -- Unix Timestamp
},
...
}
Example Export
local WarehouseTransactions = exports['dream_cryptomining']:GetWarehouseTransactions("WAREHOUSEID")

-- 🎉 This will loop the warehouse transactions
for key, value in pairs(WarehouseTransactions) do
print(value.type) -- 📌 Transaction Type
print(value.status) -- ✉️ Transaction Status
print(value.amount) -- 💸 Transaction Amount

-- 💬 Use all other variables...
end