Skip to content

Official SDKs

Python and TypeScript clients that wrap the REST API and the WebSocket stream, so you skip writing the HTTP calls by hand.

The official SDKs cover the same REST endpoints and the same WebSocket stream documented on this site. Each one is a thin wrapper with no runtime dependencies, and every method returns the same JSON shape the API sends.

Python

Package name on PyPI is dino-markets. Requires Python 3.9 or later.

pip install dino-markets
from dino_markets import Dino

client = Dino()  # reads DINO_API_KEY, or pass api_key= directly

markets = client.markets(sport="baseball")
arbs = client.find_arbitrage(sport="baseball", limit=20)
history = client.history(markets["markets"][0]["id"])

Streaming needs the stream extra, which pulls in centrifuge-python, and a Basic or Pro key. A Free key's stream_token() call raises PlanError (402) before any socket opens.

pip install "dino-markets[stream]"

TypeScript

Package name on npm is dino-markets. Built on the native fetch API, so it runs in Node 18+, Deno, Bun, and the browser with no bundler polyfill.

npm install dino-markets
import { Dino } from "dino-markets";

const dino = new Dino(); // reads DINO_API_KEY, or pass { apiKey: "..." }

const { markets } = await dino.markets({ sport: "baseball" });
const arbs = await dino.findArbitrage({ sport: "baseball", limit: 20 });
const history = await dino.history(markets[0].id);

Streaming needs the optional centrifuge peer dependency and a Basic or Pro key. A Free key's streamToken() call throws PlanError (402) instead of opening a socket.

npm install centrifuge

Errors

Both SDKs raise a typed error for every non-2xx response: AuthenticationError on 401, PlanError on 402, RateLimitError on 429 with the retry delay attached, and ServerError on 5xx, all subclasses of a shared DinoError.

Resources

Python package: PyPI and source on GitHub. TypeScript package: npm and source on GitHub. A Colab notebook walks the Python SDK end to end with no local setup.

Informational data. Not investment advice. You trade on your own venue accounts at your own risk.