Skip to content

halftime/Go-SportMarket-Sim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Mock sportmarket server

Based on sportmarket API

To be used as mock server during development of trading software before having the real pay-to-use API.

Features

  • POST /v1/sessions/

    • authenticate user & pass ; on success return session-id to client for future auth
  • GET /v1/sessions/<session_id>/

    • return user session metadata (if client provides valid session(-id) header)
  • Simulate Http API exceptions

    • 404 not found (invalid url)
    • 401 not authorized (session header missing/invalid)
    • 429 too many requests (api limit hit)
  • Websocket

    • receive WS on localhost
    • auth WS session_id /v1/stream/?token={sessionId}

Usage

cd main
go run main.go

HTTP server API

http://localhost:8080/v1

Websocket server

ws://localhost:8080/ws?token=session_testuser

Todo

  • Http betslips

    • POST & GET betslips /v1/betslips/
    • GET /v1/betslips/<betslip_id>/
    • POST /v1/betslips/<betslip_id>/refresh/
    • DELETE /v1/betslips/<betslip_id>/
  • Http orders

    • POST /v1/orders/
    • POST /v1/orders/batch/
    • GET /v1/orders/<order_id>/
    • GET /v1/orders/tracked//
    • POST /v1/orders/<order_id>/close/
    • POST /v1/orders/close_many/
    • POST /v1/orders/close_all/
    • GET /v1/orders/
    • GET /v1/orders/position/
    • GET /v1/orders/filters/ ...
  • Websocket

    • ..

Releases

No releases published

Packages

No packages published