SDK v1.0

Moltrade Integration Docs

Everything you need to integrate the Moltrade SDK into any HTML page. Copy the prompt below and send it to an AI to build your page instantly.

API SDK <script src="https://moltrade.app/sdk.php"></script>
Required HTML IDs
Wallet Connection
ID
Element
Description
connect
<button>
Connect/disconnect button. Text changes to shortened address after connecting.
wallet-addr-display
any
Displays the connected wallet address.
balance
any
Displays the BNB balance of the connected wallet.
msgerro
any
Error and status messages (approval, deposit, failures).
Deposit Form
ID
Element
Description
amountInput
<input number>
USDT amount field. Used by approve, deposit and preview functions.
referinput
<input hidden>
Stores the referral address. Auto-filled from URL ?ref= parameter.
referid
any
Shows "You are invited by: 0x1234...abcd" when a ref is present.
Approve Step
ID
Element
Description
approve-label
<span>
Must be a <span> inside the approve <button>. Changes to "Approving..." and "✓ APPROVED".
approve-limit
any
Displays the USDT amount being approved.
Confirm Deposit Step
ID
Element
Description
buyText
<span>
Must be a <span> inside the deposit <button>. Changes to "Depositing..." and "✓ CONFIRMED".
confirm-status
any
Shows ⏳ PENDING... / ✅ CONFIRMED / ❌ FAILED during transaction.
Dashboard
ID
Element
Description
lock
any
Total deposited. e.g. "250.00 USDT"
db-claimable
any
Live claimable earnings. Auto-updates every second after wallet connects.
sexc
any
Total already claimed/withdrawn.
refe
any
Referral earnings. e.g. "5.00 USDT"
ref-earned
any
Referral earnings with $ prefix. e.g. "$5.00"
rewards
any
Claim button label. Auto-fills with "Claim $X.XX USDT".
claimBtnText
<span>
Span inside the claim button. Changes while processing.
withdrawBtnText
<span>
Span inside the withdraw button. Changes while processing.
lt-winrate
any
Win rate displayed in dashboard. Also update all elements with class="stat-winrate".
Deposit History & Withdraw
ID
Element
Description
selectOptions
<select>
Dropdown of user deposits. Auto-populated after wallet connects.
db-wd-id
any
Selected deposit ID.
db-wd-amt
any
Selected deposit amount.
db-wd-earn
any
Earnings on selected deposit.
db-wd-total
any
Total to receive (deposit + earnings).
db-history-tbody
<tbody>
Table body for deposit history. Auto-populated after wallet connects.
Referral
ID
Element
Description
referralLink
<input>
Auto-filled with "https://moltrade.app/?ref=0x..." after wallet connects.
refaddress
<input>
Connected wallet address used to build the referral link.
Copy Trade
ID
Element
Description
ct-lock-banner
any
Banner shown if user has less than 20 USDT deposited. Hide it initially.
ct-current-dep
any
Shows current deposit amount of user.
ct-missing
any
Shows how much more is needed to activate copy trade.
Global Functions
connectToWallet()
Connects MetaMask or WalletConnect. Auto-detects provider.
disconnectWallet()
Disconnects and resets all dashboard fields.
approveUSDT()
Sends ERC-20 approve TX for USDT spend on contract.
depositUSDT()
Executes the deposit transaction to the staking contract.
claimRewards()
Claims all available earnings to the wallet.
withdrawCapital()
Withdraws the selected deposit from selectOptions.
enableCopyTrade()
Enables copy trade mode on the contract.
disableCopyTrade()
Disables copy trade mode on the contract.
Minimum Working Example
HTML
<!-- Wallet --> <button id="connect" onclick="connectToWallet()">Connect Wallet</button> <p id="msgerro"></p> <!-- Deposit Form --> <input type="number" id="amountInput" placeholder="USDT amount"> <input type="hidden" id="referinput"> <p id="referid"></p> <!-- Approve --> <button onclick="approveUSDT()"> <span id="approve-label">APPROVE USDT</span> </button> <!-- Deposit --> <button onclick="depositUSDT()"> <span id="buyText">DEPOSIT</span> </button> <p id="confirm-status"></p> <!-- Dashboard --> <p>Deposited: <span id="lock">0</span></p> <p>Claimable: <span id="db-claimable">0</span></p> <p>Claimed: <span id="sexc">0</span></p> <p>Referrals: <span id="refe">0</span></p> <button onclick="claimRewards()"> <span id="claimBtnText">CLAIM</span> </button> <!-- Referral --> <input id="referralLink" readonly> <input id="refaddress" type="hidden"> <!-- SDK (always last) --> <script src="https://moltrade.app/sdk.php"></script>
Ready-to-Use AI Prompt

Copy this prompt and send it to Claude, ChatGPT or any AI to generate your custom page instantly. Replace the last line with your design description.

📋 Prompt — copy and send to any AI
Build a complete HTML page integrated with the Moltrade SDK. The SDK is loaded with a single tag: <script src="https://moltrade.app/sdk.php"></script> — it provides all functions automatically, no other JS files needed. The page MUST include the following HTML elements with these exact IDs: WALLET: - id="connect" → <button> — connect/disconnect wallet - id="msgerro" → any element — error and status messages - id="balance" → any element — BNB balance display DEPOSIT FORM: - id="amountInput" → <input type="number"> — USDT amount - id="referinput" → <input type="hidden"> — referral address - id="referid" → any element — shows referral inviter text APPROVE STEP: - id="approve-label" → <span> INSIDE a <button onclick="approveUSDT()"> - id="approve-limit" → any element — shows approval amount CONFIRM DEPOSIT STEP: - id="buyText" → <span> INSIDE a <button onclick="depositUSDT()"> - id="confirm-status" → any element — shows PENDING/CONFIRMED/FAILED DASHBOARD: - id="lock" → total deposited in USDT - id="db-claimable" → live claimable earnings (updates every second automatically) - id="sexc" → total already claimed - id="refe" → referral earnings - id="ref-earned" → referral earnings with $ prefix - id="rewards" → claim button label text - id="claimBtnText" → <span> inside <button onclick="claimRewards()"> - id="withdrawBtnText" → <span> inside <button onclick="withdrawCapital()"> - id="lt-winrate" → win rate display - class="stat-winrate" → all elements with this class also receive win rate WITHDRAW: - id="selectOptions" → <select> — deposit dropdown (auto-populated) - id="db-wd-id" → selected deposit ID - id="db-wd-amt" → selected deposit amount - id="db-wd-earn" → earnings on selected deposit - id="db-wd-total" → total to receive - id="db-history-tbody" → <tbody> — history table (auto-populated) REFERRAL: - id="referralLink" → <input readonly> — auto-filled with referral link - id="refaddress" → <input> — connected wallet address COPY TRADE: - id="ct-lock-banner" → banner shown when deposit < 20 USDT (start hidden) - id="ct-current-dep" → user current deposit - id="ct-missing" → how much more is needed - Buttons: <button onclick="enableCopyTrade()"> and <button onclick="disableCopyTrade()"> IMPORTANT RULES: 1. The <script src="https://moltrade.app/sdk.php"></script> tag must be the LAST script before </body> 2. Do NOT add any other Web3 or jQuery scripts — the SDK loads them automatically 3. The approve-label and buyText MUST be <span> elements inside their buttons, not the button itself 4. selectOptions and db-history-tbody start empty — they are auto-filled after wallet connects 5. ct-lock-banner should start with display:none DESIGN: [DESCRIBE YOUR DESIRED DESIGN HERE — e.g. "dark cyberpunk theme with neon green accents", "clean minimalist white dashboard", "futuristic trading terminal aesthetic"]
✓ Copied to clipboard!