Chips Casino SDK
The following pages contain information on all the technical details of the chips framework and its services. We use a websocket transport for communication between server and client.
Getting Started
yarn add @chipsgg/openservice-ws-client
// ES5
const WebSocket = require("ws");
const Client = require("@chipsgg/openservice-ws-client");
//ES6 - browser
//websockets must be supported in browser
import Client from "@chipsgg/openservice-ws-client";
const channels = ["public", "private", "auth", "community"];
Client(WebSocket, { channels }).then(async ({ state, actions }) => {
// do somthing
await actions
.public("echo", { message: "hello world!" })
.then(console.log)
.catch(console.error);
await actions.community("on", { topic: "chats", path: ["public"] });
state.on("community.chats.public", console.log);
});
Walkthrough
To interact with the Chips.gg SDK in JavaScript, follow these steps:
1. Install the SDK:
yarn add @chipsgg/openservice-ws-client
2. Set Up the WebSocket Client: Import the necessary modules and establish a connection using the WebSocket protocol.
Here’s an example:
• Channels: Specify the channels to subscribe to, such as 'public', 'private', 'auth', and 'community'.
• Actions: Perform actions like sending an echo message or subscribing to a community chat topic.
• State Events: Listen for events on the subscribed channels and handle them accordingly.
// Import the WebSocket library and the Chips.gg client
const WebSocket = require("ws");
const Client = require("@chipsgg/openservice-ws-client");
// Define the channels you want to subscribe to
const channels = ["public", "private", "auth", "community"];
// Initialize the client
Client(WebSocket, { channels })
.then(async ({ state, actions }) => {
// Example action: Echo a message
try {
const response = await actions.public("echo", {
message: "hello world!",
});
console.log(response);
} catch (error) {
console.error(error);
}
// Subscribe to a community chat topic
try {
await actions.community("on", { topic: "chats", path: ["public"] });
state.on("community.chats.public", console.log);
} catch (error) {
console.error(error);
}
})
.catch(console.error);
3. Handle Actions and Events: Utilize the actions object to perform various operations provided by the SDK. For instance, to publish a chat message:
// Publish a chat message to the public channel
try {
const chatResponse = await actions.community("publishChatMessage", {
room: "public",
message: "Hello, Chips.gg community!",
});
console.log(chatResponse);
} catch (error) {
console.error(error);
}
// Listen for new chat messages in the public room
state.on("community.chats.public", (chatMessage) => {
console.log("New chat message:", chatMessage);
});
HTTP API - POST / GET
Public
- BASE API: https://api.chips.gg/prod/api
/public/getUser
// /public/getUser?userid=<userid>
{
"id": "e4c2ba09-e831-46b5-8cfc-7f8be7803efe",
"username": "tacyarg",
"nickname": null,
"avatar": "https://cdn.chips.gg/community/92aac4ae-ac84-4d11-a88b-bba352cea9b5.jpg",
"profileBannerURL": "https://cdn.chips.gg/community/7bddd479-4f35-442b-8d34-070b49fa9fc0.jpeg",
"profileMessage": "ello moto",
"muted": null,
"isAdmin": true,
"isMod": true,
"currency": "xrp",
"withdrawDisabled": false,
"created": 1594081844829
}
/public/getUserStats
// https://api.chips.gg/prod/api/public/getUserStats?userid=<userid>
{
"count": 4849,
"wins": 693,
"wageredUsd": 71266.371524,
"bonusesUsd": 3.85
}
/public/getUserVipRank
// https://api.chips.gg/prod/api/public/getUserVipRank?userid=<userid>
{
"exp": 3669637,
"level": 149,
"tier": 7,
"rank": "Collector II",
"baseLevelExp": 3625000,
"nextLevelExp": 3750000
}
public/getUserMostPlayedGames
// https://api.chips.gg/prod/api/public/getUserMostPlayedGames?userid=<userid>
[
{
"_id": "chipsgg-mines",
"slug": "chipsgg-mines",
"created": 1728668173166,
"tags": [
"originals",
"inhouse",
"mines"
],
"restrictions": [],
"images": {
"s2": "https://cdn.chips.gg/public/images/originals/mines.png",
"bg": "https://cdn.chips.gg/public/images/assets/backgrounds/cityscape.jpg"
},
"enabled": false,
"id": "chipsgg-mines",
"title": "Mines",
"producer": "chipsgg",
"provider": "chipsgg",
"category": "inhouse",
"rtp": 99,
"updated": 1728668985549,
"description": "Mines",
"reason": "Mines",
"stats": {
"wageredUsd": 55905.079713,
"profitMaxUsd": 3449.88,
"wageredMaxUsd": 1310.72,
"count": 113,
"wins": 25
}
},
{
"_id": "pragmaticplay-the-dog-house-megaways",
"slug": "pragmaticplay-the-dog-house-megaways",
"created": 1693926157141,
"tags": [
"bonusbuy",
"bonusrounds",
"slots",
"top",
"megaways"
],
"restrictions": [
"BS",
"BG",
"DK",
"FR",
"GI",
"IL",
"IT",
"LT",
"PH",
"PT",
"RO",
"ES",
"SE",
"UA",
"US",
"GB",
"ZA",
"TW",
"KP",
"CY",
"SG",
"LK",
"RS",
"AE"
],
"images": {
"s1": "https://cdn.hub88.io/relaxgaming/rlx_thedoghousemegaways-thumb.jpg",
"s2": "https://cdn.hub88.io/relaxgaming/rlx_thedoghousemegaways-thumb.jpg",
"s3": "https://cdn.hub88.io/relaxgaming/rlx_thedoghousemegaways-thumb.jpg",
"s4": "https://cdn.hub88.io/relaxgaming/rlx_thedoghousemegaways-thumb.jpg",
"bg": "https://cdn.hub88.io/pragmatic/bg/pgp_thedoghousemegaways.jpg"
},
"enabled": true,
"title": "The Dog House Megaways",
"description": "# The Dog House Megaways Slot Review\n\n## Introduction\n\n\"The Dog House Megaways\" is a vibrant slot game developed by Pragmatic Play, released in August 2020. This game is an enhanced version of the original \"The Dog House\" slot, incorporating the popular Megaways mechanic to offer up to 117,649 ways to win. Set in a cheerful suburban backdrop, the game features charming canine characters and engaging gameplay elements.\n\n## Game Features and Bonuses\n\n- **Reels and Rows**: 6 reels with 2 to 7 rows per reel, varying on each spin due to the Megaways system.\n- **Paylines**: Up to 117,649 ways to win, depending on the number of symbols per reel.\n- **Special Features**:\n - **Wild Symbol**: Depicted as a dog house, it substitutes for all symbols except the scatter and appears on reels 2, 3, 4, and 5.\n - **Multiplier Wilds**: Wilds come with random multipliers of 2x or 3x, which apply to any win they are part of. Multiple wild multipliers in a winning combination are added together, enhancing potential payouts.\n - **Scatter Symbol**: Represented by a paw print, landing 3 or more scatters triggers the Free Spins feature.\n - **Free Spins**: Players can choose between two modes:\n - **Sticky Wilds Free Spins**: A set number of free spins with sticky wilds that remain in place for the duration of the feature.\n - **Raining Wilds Free Spins**: A set number of free spins with a random number of wilds added to the reels on each spin.\n\n## Game Statistics\n\n- **Release Date**: August 2020.\n- **Game Type**: Video slot.\n- **Reels and Paylines**: 6 reels with up to 117,649 ways to win.\n- **Max Payout (Max Win)**: Up to 12,000 times the bet.\n- **RTP Percentage (Return To Player)**: 96.55%.\n- **Volatility Level**: High.\n\n## Game Mechanics and Features\n\n\"The Dog House Megaways\" utilizes the Megaways mechanic, providing a dynamic gaming experience with each spin.\n\n**Unique Features**:\n\n- **Megaways Mechanic**: Each reel can display between 2 to 7 symbols per spin, resulting in up to 117,649 ways to win.\n\n- **Free Spins Options**: Players can choose between Sticky Wilds or Raining Wilds free spins, allowing for strategic decisions based on personal preferences.\n\n**Strategies and Tips**:\n\n- **Choosing Free Spins Mode**: Select the Sticky Wilds option if you prefer the potential for larger, less frequent wins, as wilds remain in place throughout the feature. Opt for Raining Wilds if you favor more consistent payouts with random wilds appearing on each spin.\n\n- **Manage Bankroll**: Due to the high volatility, it's advisable to manage your bankroll carefully, as big wins may be spaced out between periods of smaller payouts.\n\n## Comparison to Other Games\n\nPragmatic Play has developed several games with similar themes and mechanics:\n\n- **The Dog House**: The original version with a 5x3 reel setup and 20 paylines, featuring sticky wilds during free spins.\n\n- **The Dog House Multihold**: An iteration that introduces multiple reel sets and the potential for increased winning opportunities.\n\n**Key Similarities**:\n\n- **Theme**: All games share a charming canine theme with vibrant graphics and engaging soundtracks.\n\n- **Bonus Features**: Each game includes free spins with variations of wild mechanics, enhancing the excitement during bonus rounds.\n\n**Key Differences**:\n\n- **Game Mechanics**: \"The Dog House Megaways\" utilizes the Megaways system, offering up to 117,649 ways to win, while the original and Multihold versions have fixed paylines.\n\n- **Free Spins Options**: The Megaways version allows players to choose between Sticky Wilds and Raining Wilds free spins, providing a customizable gaming experience.\n\n## Conclusion\n\n\"The Dog House Megaways\" offers an engaging and dynamic gaming experience, combining the beloved canine theme with the popular Megaways mechanic.\n\n**Strengths**:\n\n- **High Winning Potential**: With up to 117,649 ways to win and a maximum payout of 12,000 times the bet, players have the opportunity for substantial rewards.\n\n- **Engaging Bonus Features**: The choice between two free spins modes adds a layer of strategy and personalization to the gameplay.\n\n**Weaknesses**:\n\n- **High Volatility**: May not appeal to players seeking frequent, smaller wins, as payouts can be less consistent.\n\nThis game is recommended for players who enjoy high-volatility slots with customizable bonus features and a charming, lighthearted theme.\n\n## Meta Description\n\nExperience \"The Dog House Megaways\" by Pragmatic Play, a high-volatility slot featuring up to 117,649 ways to win. Choose between Sticky Wilds or Raining Wilds free spins for a personalized gaming adventure with a maximum payout of 12,000 times your bet. ",
"producer": "pragmaticplay",
"provider": "pragmaticplay",
"category": "Video Slots",
"id": "pragmaticplay-the-dog-house-megaways",
"blocked_countries": [
"BS",
"BG",
"DK",
"FR",
"GI",
"IL",
"IT",
"LT",
"PH",
"PT",
"RO",
"ES",
"SE",
"UA",
"US",
"GB",
"ZA",
"TW",
"KP",
"CY",
"SG",
"LK",
"RS",
"AE"
],
"certifications": [
"CURACAO"
],
"demo_game_support": true,
"features": [
"Bonus Buy",
"Bonus Rounds"
],
"freebet_support": true,
"game_code": "pgp_thedoghousemegaways",
"game_id": 7311,
"hit_ratio": "26.00",
"languages": [
"eng",
"rus",
"nld",
"fra",
"deu",
"ita",
"spa",
"por",
"srp",
"dan",
"lit",
"lav",
"slk",
"est",
"ces",
"hun",
"kor",
"ell",
"tur",
"jpn",
"vie",
"tha",
"ron",
"msa",
"zho",
"swe",
"fin",
"nor",
"ind",
"pol",
"bul"
],
"name": "The Dog House Megaways",
"paylines": 117649,
"phoenix_jackpot_support": false,
"platforms": [
"GPL_DESKTOP",
"GPL_MOBILE"
],
"product": "pragmaticplay",
"release_date": "2020-08-13",
"rtp": "96.55",
"technology": [
"HTML5"
],
"theme": [
"pets",
"animals",
"cute",
"cartoon"
],
"url_background": "https://cdn.hub88.io/pragmatic/bg/pgp_thedoghousemegaways.jpg",
"url_thumb": "https://cdn.hub88.io/relaxgaming/rlx_thedoghousemegaways-thumb.jpg",
"volatility": 6,
"aggrigator": "hub88",
"identifier": "pgp_thedoghousemegaways",
"updated": 1734620448948,
"reason": "asd",
"stats": {
"wageredUsd": 9814.995919,
"profitMaxUsd": 688,
"wageredMaxUsd": 4.999999,
"count": 2236,
"wins": 233
}
},
...
]