Skip to Content
PredictorSDK

Every code example in the docs, run as written

We ran every snippet on the docs against the live API with the published SDKs, and fixed the ones that failed, printed the wrong thing or had gone stale.

Fix

We copied every code example in the docs, ran it against the live API with the published SDKs, and fixed what didn't work as written:

  • TypeScript examples are ES modules. They use top-level await, which fails in a project made with npm init until its package.json has "type": "module". The quickstart and the TypeScript SDK page now say so, and how to run them in a CommonJS project.
  • The Go quickstart prints prices. Step 4 printed pointer addresses, because Bid and Ask are pointers; it now prints the numbers.
  • The date examples stay current. The SDK pages' "tonight's games" examples used a fixed date that has passed; they now ask for today's games.
  • Empty player_prop_match. The player-prop guide said an empty value is a 400. Like an empty value of any other control parameter, it means the default, strict.
  • Refreshed examples. The rule-matrix excerpts on the game-line rules and player-prop guides show the values the API returns today (SX Bet now reads as voiding a tied NFL game), and the response-size table on filtering gives ranges that cover an NFL weekend.
  • AlphaArcade in the NBA. The Overview now lists AlphaArcade for NBA moneylines, which it matches when it lists a game.