Skip to main content
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.
api-key: YOUR_AUTHORIZATION_TOKEN

Game Integration Flow

Step 1: Request Game URL

To access any game, make a POST request to the external user endpoint:
POST {BASE_URL}/api/external-user/
api-key: YOUR_AUTHORIZATION_TOKEN
Content-Type: application/json
Body Parameters
gameName
string
required
Game identifier from the available games list
name
string
required
Player’s display name
userId
string
required
Unique user identifier from your system

Step 2: Receive Game URL

{
  "url": "https://game-url-here.com"
}

Step 3: Embed Game

Use the returned URL to embed the game in your frontend as an iframe:
<iframe 
  src="RECEIVED_GAME_URL" 
  width="100%" 
  height="600px"
  frameborder="0">
</iframe>

Available Games

Stock offers the following games for integration:
Game NameAPI IdentifierDescription
DerbyderbyHorse racing simulation game
Stock Slotsstock_slotsStock market themed slot machine
Stock Jackpotstock_jackpotProgressive jackpot with stock theme
Seven Up Downseven_up_downPrediction-based card game
Head Tailhead_tailClassic coin flip game
Wheel of Fortunewheel_of_fortuneSpinning wheel luck game
AviatoraviatorFlight-based multiplier game
DicediceTraditional 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

Keep your authorization token secure and never expose it in client-side code

User Authentication

Implement proper user authentication on your platform

HTTPS Required

Ensure HTTPS is used for all API communications

Support

For technical support, integration assistance, or to obtain your base URL and authorization token, please contact the Stock Games integration team.