Open the exchange. Useful if you are making a custom script.
exports['LuxuCEX']:OpenCEX()
GetAllPlayerAssets
Get assets from all players
Server
local Players_CEX_Assets = exports['LuxuCEX']:GetAllPlayerAssets(identifier) -- returns: {{identifier: char:331415a231, assets:{"BTC":10,"ETH":100,....}}}
GetPlayerAssets
Get a specified player's cex assets
Server
local PlayerCEXassets = exports['LuxuCEX']:GetPlayerAssets(identifier) -- returns: {"BTC":10,"ETH":100,....}
UpdatePlayerAssets
Updates a crypto balance
Server
-- Updates a player's assets in the database.-- @param data A table containing the following fields:-- - identifier (string): The player's identifier.-- - crypto (string): The asset to update (e.g. BTC, ETH, etc.).-- - amount (number): The amount to update.-- - operation (string): The operation to perform (add, remove, or set).-- @return true if the operation was successful, nil otherwise.exports['LuxuCEX']:UpdatePlayerAssets(data)-- Example usage:local data = { identifier ="HHT94466", -- string: The player's identifier. crypto ="BTC", -- string: The asset to update. amount =1231234, -- number: The amount to update. operation ="set" -- string: The operation to perform.}local success = exports['LuxuCEX']:UpdatePlayerAssets(data) -- returns true or nil****if success then-- do something...else-- do something...end