API 8: Unsubscribe Market

Updated on November 5, 2025
  • Endpoint: POST /api/v1/unsubscribe
  • Description: Unsubscribes one or more market IDs to stop receiving odds updates.
  • Method: POST

Request Sample

{
  "data": [
    "4.123456-BM",
    "1.789456-OE"
  ]
}

Response Sample

{
  "status": 1,
  "message": "Unsubscribed from market: 4.123456-BM,1.789456-OE"
}

Glossary of Response Keys

KeyFull NameData TypeDescription
statusstatusCodeINTIndicates success (e.g., 1 = success, 0 = failure)
messagemessageSTRINGConfirmation message with market IDs that were unsubscribed

Format is identical to the Subscribe API, except the action verb is “Unsubscribed”.

Health Check Route

  • Endpoint: GET /health
  • Purpose: To verify that the SDK server is running and responding as expected.

Request Sample

GET /health HTTP/1.1
Host: localhost:3000

Response Sample

{
  "message": "AppSocket Server is running"
}

✅ Use this route for basic uptime monitoring, readiness probes, or automated deployment validation scripts.