Traffic consumption is very high and non-friendly to mobile and web clients during using Pragmatic Play's live data Socket API.
Pragmatic Live Feed Aggregator aggregates all available live tables and delivers to web clients on demand in one big batch.
For running the app locally you just need to create .env
file in the project root directory with the following environment variables in it:
PRAGMATIC_FEED_WS_URL= The vendor WS URL
CASINO_ID= Casino's ID
TABLE_IDS= Comma-seperated tables IDs
CURRENCY_IDS= Comma-seperated Currency IDs
REDIS_PORT= Port to run and connect to Redis DB
SERVER_PORT= Port to run the HTTP server on
PUSHER_CHANNEL_ID= Pusher.com's channel ID
PUSHER_PERIOD_MINUTES= Period to push data into the pusher channel
PUSHER_APP_ID= Pusher.com's app ID
PUSHER_KEY= Pusher.com's app key
PUSHER_SECRET= Pusher.com's app secret
PUSHER_CLUSTER= Pusher.com's app cluster
docker-compose up
After running the app in Docker Compose, you need to open your favorite web browser and go to the following links:
-
All endpoints - SWAGGER UI
http://localhost:[PORT]/v1/swagger
-
Get the Pragmatic Live Feed aggregated data as a one big batch:
http://localhost:[PORT]/v1/tables
WherePORT
isSERVER_PORT
from the.env
file.
API success response:{ "data": [ { "tableAndCurrencyID": "100:200", "pragmaticTable": { "totalSeatedPlayers": 0, "last20Results": [ { "time": "", "result": 0, "color": "", "gameId": "", "powerUpList": [], "powerUpMultipliers": [] } ], "tableId": "", "tableName": "", "newTable": false, "languageSpecificTableInfo": "", "tableImage": "", "tableLimits": { "ranges": [], "minBet": 0, "maxBet": 0, "maxPlayers": 0 }, "dealer": { "name": "" }, "tableOpen": false, "tableType": "", "tableSubtype": "", "currency": "" } } ] }
-
Check the previous endpoint health:
http://localhost:[PORT]/v1/healthcheck
WherePORT
isSERVER_PORT
from the.env
file.
API success response:{ "status": "available", "system_info": { "version": "1.0.0" } }