Developers

How to call the API.

Diamond uses X-Api-Key. Sports and casino use X-Aggregator-Key. Video pages also accept ?key=. Full request/response PDF-style guide: /api-guide/.

01

First calls

export KEY=your_key
export API=https://api.linkapi.tech

curl -s -H "X-Api-Key: $KEY" "$API/api/v1/me"
curl -s -H "X-Api-Key: $KEY" "$API/api/v1/events/cricket"
curl -s -H "X-Aggregator-Key: $KEY" "$API/api/sports/latest"
curl -s -H "X-Aggregator-Key: $KEY" "$API/api/sports/4/$GMID/livetv"
curl -s -H "X-Aggregator-Key: $KEY" "$API/api/casino/all"
curl -s -H "X-Aggregator-Key: $KEY" "$API/api/casino/superover/data"
02

Live video

JSON first. A ready player if you do not want to build one.

JSON

GET /api/sports/{etid}/{gmid}/livetv
GET /api/v1/tv/cricket/{gmid}
GET /api/casino/{gtype}/video

Player and redirect

GET /api/sports/{etid}/{gmid}/embed?key=
GET /api/sports/{etid}/{gmid}/watch?key=
GET /api/casino/{gtype}/embed?key=
03

Settlement & results

Sports results use Diamond Result (settlement only). Casino has its own results helpers.

# Sports match-odd / bookmaker / fancy
curl -s -H "X-Api-Key: $KEY" "$API/api/v1/result/match-odd/cricket/$GMID"
curl -s -H "X-Api-Key: $KEY" "$API/api/v1/result/bookmaker/cricket/$EVENT_ID"
curl -s -H "X-Api-Key: $KEY" "$API/api/v1/result/fancy/cricket/$EVENT_ID"

# Casino last results / rules / overlay
curl -s -H "X-Aggregator-Key: $KEY" "$API/api/casino/teen20/results"
curl -s -H "X-Aggregator-Key: $KEY" "$API/api/casino/teen20/rules"
curl -s -H "X-Aggregator-Key: $KEY" "$API/api/casino/teen20/overlay"
04

Sockets

wss://api.linkapi.tech/ws/odds?key=$KEY&auto=1
wss://api.linkapi.tech/ws/casino?key=$KEY
wss://api.linkapi.tech/ws/scorecard?key=$KEY&eventId=EVENT_ID

Request & response guide · OpenAPI · cheat sheet