SLM.Games
  • Welcome
  • Introduction
  • Supported Tokens
  • Tokenomics
    • SLM
    • XSLM
  • NFT+
    • Levels
    • Recipes
  • Affiliate Program
  • Partner Program
  • Integrate Your Own Casino
  • Bonus And Airdrop
  • API
  • ⚒️Roadmap
  • Provably Fair
    • Fairness Verification
    • Implementation
      • poker cards
  • Policies
    • Terms and Condition
    • Privacy Policy
    • Self-Exclusion Policy
    • Contact Us
  • 🌐Website
  • 🐦Twitter
  • 🗞️Telegram News
  • 💬Telegram Chat
  • 📈PancakeSwap
Powered by GitBook
On this page
  • Installation
  • Get Start
  • API

Was this helpful?

API

Installation

  • Using npm:

  npm i api.slm.games
  • Using yarn

  yarn add api.slm.games

Get Start

import api from "api.slm.games";

const token = "GET YOUR TOKEN FROM PROFILE PAGE";

async function main() {
  const ins = new api("https://api.slm.games", token);
  const info = await ins.userGetInfo();
  console.log(info);
}

main()
  .then(() => process.exit(0))
  .catch((error) => {
    console.error(error);
    process.exit(1);
  });
  • And Don't show it to anyone

  • Token Expiration By default, the token for API is valid for 86400 seconds (24 hours).

    We recommend that you refresh token expiration by call userGetInfo API every minute;

API

  • userGetInfo Get current user's information

    const info = await ins.userGetInfo();
  • walletGetBalance Get balance of symbol

    const balance = await ins.walletGetBalance("SLM");
  • diceBet Bet on dice game

    const rsp = await ins.diceBet("over", 50, "SLM", 100)
  • crashBet

    Bet on crash game

    const rsp = await ins.crashBet(2.0, "SLM", 100)

PreviousBonus And AirdropNextRoadmap

Last updated 2 years ago

Was this helpful?

API Token You can get API Token from

https://slm.games/profile