novigapi (Python)
A small Python client for novigapi.com, a read-only Novig market data API, plus pure-Python devig helpers and three runnable examples.
Novig has an official trading API and free daily CSVs. novigapi.com is the read-only data layer on top: no account, names resolved, intraday line history, fair prices and alerts. This package talks to novigapi.com. To place orders or read a Novig account, use the official Novig API documented at docs.novig.com.
Independent. Not affiliated with, endorsed by or sponsored by Novig.
- Standard library only (
urllib,json). Python 3.8 or later. No dependencies. - MIT licensed.
Install
pip install novigapi
On PyPI: https://pypi.org/project/novigapi/ . Source: https://github.com/novigapi/novigapi-python
Tests need no key, no network and no pytest: python3 tests/run.py (pytest also works).
Quickstart
Get a free key at novigapi.com/sign-up (Free plan: 100 credits a month, 20 requests a minute), then:
export NOVIGAPI_KEY=nv_...
from novigapi import NovigAPI, devig, prob_to_american
api = NovigAPI() # reads NOVIGAPI_KEY
page = api.markets(league="NFL", status="open", limit=20)
for market in page["data"]:
print(market["market_id"], market.get("description"))
fair = api.fair_price(page["data"][0]["market_id"])
print(fair["data"], fair["meta"].get("formula"))
# Devig any two prices (probabilities from 0 to 1)
print(devig([0.5238, 0.5238], "shin")) # [0.5, 0.5]
print(prob_to_american(0.40)) # 150.0
Every method returns the JSON envelope {"data": ..., "meta": {...}}. List endpoints page with cursor; api.iter_rows("markets", league="NBA") follows meta.next_cursor for you.
Methods
| Method | Endpoint |
|---|---|
markets(league, event_id, market_type, player, team, status, limit, cursor) |
GET /markets |
events(league, status, limit, cursor) |
GET /events |
market(market_id) |
GET /markets/{id} |
orderbook(market_id) |
GET /orderbook/{id} |
trades(market_id, since, limit, cursor) |
GET /trades |
ohlc_daily(market_id, date) |
GET /ohlc/daily |
fair_price(market_id) |
GET /fair-price |
line_history(market_id or outcome_id, since, until) |
GET /line-history |
player_props(league, player) |
GET /player-props |
players(league, q), teams(league), leagues() |
GET /players, /teams, /leagues |
results(league, market_id, graded, since) |
GET /results |
market_summary(date, since, league, market_type, kind) |
GET /market-summary/daily |
ev(league, min_edge, min_prob, books, sort, ...) |
GET /ev (FanDuel and DraftKings vs the Novig fair price) |
arbitrage(type, league, min_profit) |
GET /arbitrage (Production and up) |
compare(market_id) |
GET /compare/{market_id} |
bulk_csv(dataset, ...) |
GET /bulk/csv (Production and up), returns CSV text |
clv(market_id, player, league, date, settled, since, until) |
GET /clv |
line_moves(league, market_id, kind, since, min_delta_pp) |
GET /line-moves |
Base URL https://novigapi.com/api/v1. Auth header Authorization: Bearer nv_.... Full reference: novigapi.com/docs.
Errors and limits
Any non-2xx response raises NovigAPIError with status, code and message. A 429 raises RateLimitError, which also carries the fields from the 429 body:
from novigapi import NovigAPI, RateLimitError
import time
api = NovigAPI()
try:
api.markets(league="NBA")
except RateLimitError as err:
print(err.code, err.plan, err.limit, err.reset_at, err.upgrade_url)
if err.code == "RATE_LIMITED" and err.retry_after:
time.sleep(err.retry_after)
RATE_LIMITED is the per-minute limit and sends Retry-After. QUOTA_EXCEEDED means the month's credits are used; there are no automatic overage charges.
Devig helpers
novigapi.devig has four methods as pure functions with docstrings: multiplicative, additive, power and shin, plus american_to_prob, prob_to_american, decimal_to_prob, prob_to_decimal, overround and hold. novigapi.taker_fee(price, contracts, coefficient=0.06) returns Novig's taker fee, coefficient x p x (1 - p) x contracts, per docs.novig.com (checked 12 Nov 2026).
Worked example, -300 / +240 (implied 75.00% and 29.41%, 4.41% overround):
| Method | Favourite | Longshot |
|---|---|---|
| Multiplicative | 71.83% (-255) | 28.17% (+255) |
| Additive | 72.79% (-268) | 27.21% (+268) |
| Power | 73.31% (-275) | 26.69% (+275) |
| Shin | 72.79% (-268) | 27.21% (+268) |
With two outcomes, Shin and additive agree. The no-vig calculator runs the same four methods in the browser.
Examples
python examples/devig_board.py --league NFL --method shin # devig every two-sided market in a league
python examples/arb_scanner.py --league NBA # combined price below $1 after the taker fee
python examples/clv_backtest.py --start 2026-08-04 --end 2026-11-11 # no key needed
devig_board.pylists open two-way markets for a league and prints the fair probability and fair American odds of each side.arb_scanner.pyadds the taker fee to each leg,0.06 x p x (1 - p)per $1 of payout (pregame game-market fills are fee-free; the default charges every leg, the conservative case), and reports any pair that costs less than $1. Pass--other prices.csvto pair a Novig side with a price you collected from another venue.clv_backtest.pystreams Novig's own dailymarkets.csvfiles fromhttps://data.novig.com/reporting/trade-data/<date>/markets.csvand compares an entry price (the opening print, or yours via--bets) with theclosecolumn. It needs no API key and saves nothing to disk. Pass--resultswithmarket_id,wonto score open against close with the Brier score, or--martingaleto test, without any results, whether one day's move predicts the next day's.
Tests:
pip install -e ".[test]"
pytest tests -q
Data notes
- Prices are probabilities. Novig shows them as percentages: 54% is 0.54.
- Novig's book holds bids only. The ask on an outcome is 1 minus the best bid on the other outcome.
- REST data on paid plans is at most about 10 seconds old; the stream pushes changes within 5 to 30 seconds.
- Novig's daily CSVs start in early August 2026 and carry no player or team names; novigapi.com joins the names.
License
MIT. Copyright (c) 2026 Stunning Couches LLC.
Independent. Not affiliated with, endorsed by or sponsored by Novig.
Metadata
Release files for novigapi 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| novigapi-0.1.1.tar.gz | 16.0 kB | With provenance | Details for novigapi-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| novigapi-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for novigapi-0.1.1-py3-none-any.whl |
Total release size: 28.7 kB
Release files / novigapi-0.1.1.tar.gz
| Download URL | novigapi-0.1.1.tar.gz |
|---|---|
| Size | 16.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6b614d3733e43d3dd5a711bfc993073cf70ce3ba4424e4be6a613fd4fc4527f5
|
|
BLAKE2b-256 checksum How to use checksums |
e704adeba27fcbcc54a66771984320e71a22865c3a6c47ada629855cfc2724e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logRelease files / novigapi-0.1.1-py3-none-any.whl
| Download URL | novigapi-0.1.1-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d9f657381a54ef55702749468ef8b0535f7ab2e5ed2c4f5151c7d2f4e3f6b50e
|
|
BLAKE2b-256 checksum How to use checksums |
4d158beddbd2afa1423659c02c4d28368707fc7c97508683a93f9d2fae707bf0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logSecurity for novigapi 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for novigapi-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.