For partner API requirements and webhook implementations, visit the Web Hooks page.
Overview
Stock provides a comprehensive game integration API that allows third-party vendors to seamlessly integrate our games into their websites. This documentation outlines the simple integration process for accessing and displaying our games through iframe embedding.Getting Started
To integrate Stock games into your platform, you’ll need:- A base URL provided by Stock
- An authorization token for API access
Authentication
All API requests must include an authorization token in the request headers. This token will be manually provided by Stock during the onboarding process.Game Integration Flow
Step 1: Request Game URL
To access any game, make a POST request to the external user endpoint:Game identifier from the available games list
Player’s display name
Unique user identifier from your system
Step 2: Receive Game URL
Step 3: Embed Game
Use the returned URL to embed the game in your frontend as an iframe:Available Games
Stock offers the following games for integration:| Game Name | API Identifier | Description |
|---|---|---|
| Derby | derby | Horse racing simulation game |
| Stock Slots | stock_slots | Stock market themed slot machine |
| Stock Jackpot | stock_jackpot | Progressive jackpot with stock theme |
| Seven Up Down | seven_up_down | Prediction-based card game |
| Head Tail | head_tail | Classic coin flip game |
| Wheel of Fortune | wheel_of_fortune | Spinning wheel luck game |
| Aviator | aviator | Flight-based multiplier game |
| Dice | dice | Traditional dice rolling game |
Integration Requirements
iframe Support
Ensure your website can display iframes
Error Handling
Implement proper error handling for API requests
Token Management
Store and securely manage your authorization token
Data Validation
Validate user data before sending requests
Security Considerations
User Authentication
Implement proper user authentication on your platform
HTTPS Required
Ensure HTTPS is used for all API communications