Skip to main content

All about bets, place bets, get your bet history or current bet status. # Authentication Please note that API has restriction that client password can be maximum up 10 characters long. API uses HTTP Basic access authentication. You need to send Authorization HTTP Request header: `Authorization: Basic <Base64 value of UTF-8 encoded username:password >` Example: `Authorization: Basic U03MyOT23YbzMDc6d3c3O1DQ1`

Project description

Pinnacle Python SDK 1.0.0

Welcome to the Pinnacle SDK documentation. This guide will help you get started with integrating and using the Pinnacle SDK in your project.

Versions

  • API version: 4.0.0
  • SDK version: 1.0.0

About the API

All about bets, place bets, get your bet history or current bet status. # Authentication Please note that API has restriction that client password can be maximum up 10 characters long. API uses HTTP Basic access authentication. You need to send Authorization HTTP Request header: Authorization: Basic <Base64 value of UTF-8 encoded username:password > Example: Authorization: Basic U03MyOT23YbzMDc6d3c3O1DQ1

Table of Contents

Setup & Configuration

Supported Language Versions

This SDK is compatible with the following versions: Python >= 3.7

Installation

To get started with the SDK, we recommend installing using pip:

pip install pinnacle-bets-client

Authentication

Basic Authentication

The Pinnacle API uses Basic Authentication.

You need to provide your username and password when initializing the SDK.

Setting the Username and Password

When you initialize the SDK, you can set the username and password as follows:

Pinnacle(
    username="YOUR_USERNAME",
    password="YOUR_PASSWORD"
)

If you need to set or update the username and password after initializing the SDK, you can use:

sdk.set_basic_auth("YOUR_USERNAME", "YOUR_PASSWORD")

Services

The SDK provides various services to interact with the API.

Below is a list of all available services with links to their detailed documentation:
Name
PlaceBetsService
GetBetsService
BettingStatusService

Models

The SDK includes several models that represent the data structures used in API requests and responses. These models help in organizing and managing the data efficiently.

Below is a list of all available models with links to their detailed documentation:
Name Description
PlaceBetRequest Request to place a bet.
PlaceStraightBetResponse
PlaceParlayBetRequest Request to place a bet
PlaceParlayBetResponse
PlaceTeaserBetRequest
PlaceTeaserBetResponse
MultiBetRequestSpecialBetRequest
MultiBetResponseSpecialBetResponse
GetBetsByTypeResponseV4
Betlist
BetStatuses
SortDir
BetsGetBetsByTypeV4BetType
BettingStatusResponse
OddsFormat Bet odds format.
AMERICAN = American odds format,
DECIMAL = Decimal (European) odds format,
HONGKONG = Hong Kong odds format,
INDONESIAN = Indonesian odds format,
MALAY = Malaysian odds format
PlaceBetRequestWinRiskStake Whether the stake amount is risk or win amount.
FillType NORMAL - bet will be placed on specified stake.
FILLANDKILL - If the stake is over the max limit, bet will be placed on max limit, otherwise it will be placed on specified stake.
FILLMAXLIMIT - bet will be places on max limit, stake amount will be ignored. Please note that maximum limits can change at any moment, which may result in risking more than anticipated. This option is replacement of isMaxStakeBet from v1/bets/place'
PlaceBetRequestBetType Bet type.
Team Team type.
PlaceBetRequestSide Side type.
PlaceStraightBetResponseStatus Status of the response.
PlaceStraightBetResponseErrorCode If Status is PROCESSED_WITH_ERROR, errorCode will be in the response.

ALL_BETTING_CLOSED = Betting is not allowed at this moment. This may happen during system maintenance,
ALL_LIVE_BETTING_CLOSED = Live betting is not allowed at this moment. This may happen during system maintenance,
ABOVE_EVENT_MAX = Bet cannot be placed because client exceeded allowed maximum of risk on a line,
ABOVE_MAX_BET_AMOUNT = Stake is above allowed maximum amount,
BELOW_MIN_BET_AMOUNT = Stake is below allowed minimum amount,
BLOCKED_BETTING = Betting is suspended for the client,
BLOCKED_CLIENT = Client is no longer active,
INSUFFICIENT_FUNDS = Bet is submitted by a client with insufficient funds,
INVALID_COUNTRY = Client country is not allowed for betting,
INVALID_EVENT = Invalid eventid,
INVALID_ODDS_FORMAT = If a bet was submitted with the odds format that is not allowed for the client,
LINE_CHANGED = Bet is submitted on a line that has changed,
OFFLINE_EVENT = Bet is submitted on an event that is offline or the submitted line is not offered at the moment due to points/handicap change or the submitted bet type is just not offered at the moment,
PAST_CUTOFFTIME = Bet is submitted on a game after the betting cutoff time,
RED_CARDS_CHANGED = Bet is submitted on a live soccer event with changed red card count,
SCORE_CHANGED = Bet is submitted on a live soccer event with changed score,
TIME_RESTRICTION = Bet is submitted within too short of a period from the same bet previously placed by a client,
DUPLICATED_REQUEST = Request with the same uniqueRequestId was already processed. Please set the new value if you still want the request to be processed,
INCOMPLETE_CUSTOMER_BETTING_PROFILE = System configuration issue,
INVALID_CUSTOMER_PROFILE = System configuration issue,
LIMITS_CONFIGURATION_ISSUE = System configuration issue,
RESPONSIBLE_BETTING_LOSS_LIMIT_EXCEEDED = Client has reached his total loss limit,
RESPONSIBLE_BETTING_RISK_LIMIT_EXCEEDED = Client has reached his total risk limit,
SYSTEM_ERROR_3 = Unexpected error,
LICENCE_RESTRICTION_LIVE_BETTING_BLOCKED - Live betting blocked due to licence restrictions,
BETTING_SUSPENDED - Due to anomalous market circumstances bets are not currently being accepted on this line. Try again with next LineId.
ParlayLegRequest
RoundRobinOptions
ParlayLegRequestLegBetType Only SPREAD, MONEYLINE and TOTAL_POINTS are supported.
ParlayLegRequestSide Chosen side type. This is needed only for TOTAL_POINTS bet type.
PlaceParlayBetResponseStatus Status of the response.
PlaceParlayBetResponseErrorCode When Status is PROCESSED_WITH_ERROR, provides a code indicating the specific problem.


ABOVE_MAX_BET_AMOUNT = Stake is above allowed maximum amount,
ALL_BETTING_CLOSED = Betting is not allowed at this moment,
BELOW_MIN_BET_AMOUNT = Stake is below allowed minimum amount,
BLOCKED_BETTING = Betting is suspended for the client,
BLOCKED_CLIENT = Client is no longer active,
INSUFFICIENT_FUNDS = Bet is submitted by a client with insufficient funds,
INVALID_COUNTRY = Client country is not allowed for betting,
INVALID_LEGS = One or more legs are invalid,
INVALID_ODDS_FORMAT = If a bet was submitted with the odds format that is not allowed for the client,
INVALID_ROUND_ROBIN_OPTIONS = Round robin options are invalid (i.e. does not match with number of legs),
ROUND_ROBIN_DISALLOWED = Round robin is disallowed for one of the leagues,
TOO_MANY_LEGS = Maximum of 10 legs can be specified,
TOO_FEW_LEGS = At least 2 legs are required for Parlay,
RESPONSIBLE_BETTING_LOSS_LIMIT_EXCEEDED = Client has reached his total loss limit,
RESPONSIBLE_BETTING_RISK_LIMIT_EXCEEDED = Client has reached his total risk limit,
INVALID_REQUEST = Request has invalid parameters,
DUPLICATED_REQUEST = Request with the same uniqueRequestId was already processed. Please set the new value if you still want the request to be processed,
SYSTEM_ERROR_3 = Unexpected error
RoundRobinOptionWithOdds
ParlayLegResponse
RoundRobinOption
ParlayLegResponseStatus Status of the request.
ParlayLegResponseErrorCode When Status is PROCESSED_WITH_ERROR, provides a code indicating the specific problem.

CANNOT_PARLAY_LIVE_GAME = The wager is placed on Live game,
CORRELATED = The leg is correlated with another one,
EVENT_NO_LONGER_AVAILABLE_FOR_BETTING = The event is no longer offered,
EVENT_NOT_OFFERED_FOR_PARLAY = The event is not offered for parlaying,
INVALID_EVENT = Live betting is not allowed at this moment,
INVALID_LEG_BET_TYPE = Leg bet type is not accepted for parlaying. Accepted values are SPREAD, MONEYLINE, TOTAL_POINTS,
INVALID_PARLAY_BET = The leg did not validated due to error on Parlay Bet. Check the error PlaceParlayBet response for error details,
LINE_CHANGED = Bet is submitted on a line that has changed,
LINE_DOES_NOT_BELONG_TO_EVENT = LineId does not match the EventId specified in the request,
LISTED_PITCHERS_SELECTION_ERROR = If bet was submitted with pitcher1MustStart and/or pitcher2MustStart parameters with values that are not allowed,
ODDS_NO_LONGER_OFFERED_FOR_PARLAY_1 = Due to line change odds are not offered for parlaying,
ODDS_NO_LONGER_OFFERED_FOR_PARLAY_2 = Due to line change odds are not offered for parlaying,
ODDS_NO_LONGER_OFFERED_FOR_PARLAY_3 = Due to line change odds are not offered for parlaying,
OFFLINE_EVENT = Bet is submitted on an event that is offline or with incorrect lineId,
PAST_CUTOFFTIME = Bet is submitted on a game after the betting cutoff time,
SYSTEM_ERROR_1 = Unexpected error,
SYSTEM_ERROR_2 = Unexpected error,
SYSTEM_ERROR_3 = Unexpected error,
LINE_IS_NOT_AVAILABLE = Line is not available for the specified Parlay Leg,
PERIOD_IS_DISALLOWED_FOR_SAME_GAME_PARLAY = Period is not allowed to be parlayed on a same event,
BETTING_SUSPENDED - Due to anomalous market circumstances bets are not currently being accepted on this line. Try again with next LineId.
TeaserBetLeg
TeaserBetLegBetType Leg bet type can be SPREAD or TOTAL_POINTS
TeaserBetLegSide Chosen side type. This is needed only for TOTAL_POINTS bet type.
PlaceTeaserBetResponseErrorCode When Status is PROCESSED_WITH_ERROR, provides a code indicating the specific problem.

ABOVE_MAX_BET_AMOUNT = Bet is above the maximum allowed,
ALL_BETTING_CLOSED = The wagering is disabled in the system (not related to a customer),
BELOW_MIN_BET_AMOUNT = Bet is below the minimum allowed,
BLOCKED_BETTING = Betting is suspended for the client,
BLOCKED_CLIENT = Customer is inactive in the system,
DOUBLE_HIT = The website submitted the same bet more than once,
DUPLICATE_CLIENT_REFERENCE_ID = The teaser unique id and/or one of the leg unique id are the same,
INCOMPLETE_CUSTOMER_BETTING_PROFILE = The customer does not exist,
INSUFFICIENT_FUNDS = The risk amount is above the customer’s available balance,
INVALID_COUNTRY = Current location is proscribed,
INVALID_CUSTOMER_PROFILE = Either the customer does not exist OR the customer business rules are not verified,
INVALID_LEGS = One or more legs are not verified,
INVALID_REQUEST = Teaser request is not valid,
ODDS_FORMAT_MISMATCH = Agent customer’s odds format differs from wager request odds format,
TEASER_DOES_NOT_EXIST = Teaser does not exist in the system,
SAME_EVENT_ONLY_REQUIRED = Legs required to be for the same game only. Specified in the Teaser Specifications,
SYSTEM_ERROR_1 = System error,
SYSTEM_ERROR_2 = System error,
SYSTEM_ERROR_3 = System error,
TOO_FEW_LEGS = Legs count is below Min Picks specified in the Teaser Specifications,
TOO_MANY_LEGS = Legs count is above Max Picks specified in the Teaser Specifications,
DUPLICATED_REQUEST = Request with the same uniqueRequestId was already processed. Please set the new value if you still want the request to be processed,
RESPONSIBLE_BETTING_LOSS_LIMIT_EXCEEDED = Client has reached his total loss limit,
RESPONSIBLE_BETTING_RISK_LIMIT_EXCEEDED = Client has reached his total risk limit
PlaceTeaserBetLegResponse
PlaceTeaserBetLegResponseErrorCode When Status is PROCESSED_WITH_ERROR, provides a code indicating the specific problem.

CANNOT_TEASER_LIVE_GAME = Teaser is not allowed on a live game,
CHECK_TEASER_ERROR = The teaser is invalid, check the teaser error for more details,
INVALID_EVENT = The game is not found in the system,
INVALID_LEG_BET = The wager is not verified,
INVALID_LEG_BET_TYPE = Wager type is not “teasable”, can be either Spread or Total,
LINE_CHANGED = Wager is placed on a line that has changed,
LINE_DOES_NOT_BELONG_TO_EVENT = There was no game found for the wager,
OFFLINE_EVENT = Either the game is offline OR there was no game found for the wager,
PAST_CUTOFFTIME = Wager is placed on a game after the cutoff time,
POINTS_ARE_NOT_ADJUSTED = The teaser points were not adjusted,
SYSTEM_ERROR_1 = System error,
SYSTEM_ERROR_2 = System error,
WAGER_DATA_MISSING = Wager is denied due to insufficient information available for validation,
LINE_IS_NOT_AVAILABLE = Line is not available for the specified Teaser Leg,
TEASER_IS_NOT_ENABLED = Teaser is not available for the specified leg,
BETTING_SUSPENDED - Due to anomalous market circumstances bets are not currently being accepted on this line. Try again with next LineId.
SpecialBetRequest
SpecialBetRequestWinRiskStake Whether the stake amount is risk or win amount.
SpecialBetResponse
SpecialBetResponseStatus Status of the request.
SpecialBetResponseErrorCode When Status is PROCESSED_WITH_ERROR, provides a code indicating the specific problem.

ALL_BETTING_CLOSED = Betting is not allowed at this moment. This may happen during system maintenance.
ABOVE_MAX_BET_AMOUNT = Stake is above allowed maximum amount,
BELOW_MIN_BET_AMOUNT = Stake is below allowed minimum amount,
BLOCKED_BETTING = Betting is suspended for the client,
BLOCKED_CLIENT = Client is no longer active,
CONTEST_NOT_FOUND = Incorrect contest id provided or contest is no longer available,
DUPLICATED_REQUEST = UniqueRequestId must be unique for each bet,
INCOMPLETE_CUSTOMER_BETTING_PROFILE = Customer profile could not be loaded,
INSUFFICIENT_FUNDS = Bet is submitted by a client with insufficient funds,
INVALID_COUNTRY = Client country is not allowed for betting,
INVALID_REQUEST = Special bet request is not valid,
LINE_CHANGED = Bet is submitted on a line that has changed,
PAST_CUTOFFTIME = Bet is submitted on a game after the betting cutoff time,
RESPONSIBLE_BETTING_LOSS_LIMIT_EXCEEDED = Self-imposed loss limit exceeded,
RESPONSIBLE_BETTING_RISK_LIMIT_EXCEEDED = Self-imposed risk limit exceeded,
SYSTEM_ERROR_1 = Unexpected error,
SYSTEM_ERROR_2 = Unexpected error,
UNIQUE_REQUEST_ID_REQUIRED = UniqueRequestId is missing,
INVALID_CUSTOMER_PROFILE = System configuration issue,
BETTING_SUSPENDED - Due to anomalous market circumstances bets are not currently being accepted on this line. Try again with next LineId.
StraightBetV4
ParlayBet
TeaserBet
SpecialBet
ManualBet
StraightBetV4BetStatus Bet Status.

ACCEPTED = Bet was accepted.
PUSHED = Bet was pushed.
CANCELLED = Bet is cancelled as per Pinnacle betting rules.
LOST = The bet is settled as lose.
PENDING_ACCEPTANCE = This status is reserved only for live bets. If a live bet is placed during danger zone or live delay is applied, it will be in PENDING_ACCEPTANCE , otherwise in ACCEPTED status. From this status bet can go to ACCEPTED or NOT_ACCEPTED status.
REFUNDED = When an event is cancelled or when the bet is settled as push, the bet will have REFUNDED status.
NOT_ACCEPTED = Bet was not accepted. Bet can be in this status only if it was previously in PENDING_ACCEPTANCE status.
WON = The bet is settled as won.
HALF_WON_HALF_PUSHED = The bet is settled as half won half pushed. Only for asian handicap bets.
HALF_LOST_HALF_PUSHED = The bet is settled as half lost half pushed. Only for asian handicap bets.
StraightBetV4BetType Bet type.
CancellationReason Possible keys :
_ correctTeam1Id
_ correctTeam2Id
_ correctListedPitcher1
_ correctListedPitcher2
_ correctSpread
_ correctTotalPoints
_ correctTeam1TotalPoints
_ correctTeam2TotalPoints
_ correctTeam1Score
_ correctTeam2Score
_ correctTeam1TennisSetsScore
_ correctTeam2TennisSetsScore
StraightBetV4Side Side type.
CancellationDetailsItem
ParlayBetBetStatus Bet Status.

ACCEPTED = Bet was accepted.
CANCELLED = Bet is cancelled as per Pinnacle betting rules.
LOST = The bet is settled as lose.
PENDING_ACCEPTANCE = This status is reserved only for live bets. If a live bet is placed during danger zone or live delay is applied, it will be in PENDING_ACCEPTANCE , otherwise in ACCEPTED status. From this status bet can go to ACCEPTED or REJECTED status.
REFUNDED = When an event is cancelled or when the bet is settled as push, the bet will have REFUNDED status.
NOT_ACCEPTED = Bet was not accepted. Bet can be in this status only if it was previously in PENDING_ACCEPTANCE status.
WON = The bet is settled as won.
PARTIAL_WON - If gross payout is greater than the stake. Only for parlays with the asian handicap legs.
PARTIAL_LOST - If gross payout is less or equal to the stake. Only for parlays with the asian handicap legs.
ParlayLeg
ParlayLegLegBetType Parlay leg type.
ParlayLegLegBetStatus Parlay Leg status.
CANCELLED = The leg is canceled- the stake on this leg will be transferred to the next one. In this case the leg will be ignored when calculating the winLoss.
LOST = The leg is a loss or a push-lose. When Push-lose happens, the half of the stake on the leg will be pushed to the next leg, and the other half will be a lose. This can happen only when the leg is placed on a quarter points handicap.
PUSHED = The leg is a push - the stake on this leg will be transferred to the next one. In this case the leg will be ignored when calculating the winLoss.
REFUNDED = The leg is refunded - the stake on this leg will be transferred to the next one. In this case the leg will be ignored when calculating the winLoss.
WON = The leg is a won or a push-won. When Push-won happens, the half of the stake on the leg will be pushed to the next leg, and the other half is won. This can happen only when the leg is placed on a quarter points handicap.
HALF_WON_HALF_PUSHED = The bet is settled as half won half pushed. Only for asian handicap legs.
HALF_LOST_HALF_PUSHED = The bet is settled as half lost half pushed. Only for asian handicap legs.
ParlayLegSide Side type.
TeaserBetBetStatus Bet Status.

ACCEPTED = Bet was accepted,
CANCELLED = Bet is cancelled as per Pinnacle betting rules,
LOSE = The bet is settled as lose,
REFUNDED = When an event is cancelled or when the bet is settled as push, the bet will have REFUNDED status,
WON = The bet is settled as won
TeaserLeg
TeaserLegLegBetType Teaser leg type.
TeaserLegLegBetStatus CANCELLED = The leg is canceled- the stake on this leg will be transferred to the next one. In this case the leg will be ignored when calculating the winLoss,
LOSE = The leg is a loss or a push-lose. When Push-lose happens, the half of the stake on the leg will be pushed to the next leg, and the other half will be a lose. This can happen only when the leg is placed on a quarter points handicap,
PUSHED = The leg is a push - the stake on this leg will be transferred to the next one. In this case the leg will be ignored when calculating the winLoss,
REFUNDED = The leg is refunded - the stake on this leg will be transferred to the next one. In this case the leg will be ignored when calculating the winLoss,
WON = The leg is a won or a push-won. When Push-won happens, the half of the stake on the leg will be pushed to the next leg, and the other half is won. This can happen only when the leg is placed on a quarter points handicap
TeaserLegSide Side type.
SpecialBetBetStatus Bet Status.
ACCEPTED = Bet was accepted,
CANCELLED = Bet is cancelled as per Pinnacle betting rules,
LOSE = The bet is settled as lose,
REFUNDED = When an event is cancelled or when the bet is settled as push, the bet will have REFUNDED status,
WON = The bet is settled as won
PUSHED = The bet is settled as a push.
ManualBetBetStatus Bet Status.

ACCEPTED = Bet was accepted,
CANCELLED = Bet is cancelled as per Pinnacle betting rules,
LOSE = The bet is settled as lose,
REFUNDED = When an event is cancelled or when the bet is settled as push, the bet will have REFUNDED status,
WON = The bet is settled as won
BettingStatusResponseStatus Betting status.

License

This SDK is licensed under the MIT License.

See the LICENSE file for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pinnacle-bets-client-1.0.0.tar.gz (58.9 kB view details)

Uploaded Source

Built Distribution

pinnacle_bets_client-1.0.0-py3-none-any.whl (79.8 kB view details)

Uploaded Python 3

File details

Details for the file pinnacle-bets-client-1.0.0.tar.gz.

File metadata

  • Download URL: pinnacle-bets-client-1.0.0.tar.gz
  • Upload date:
  • Size: 58.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.17

File hashes

Hashes for pinnacle-bets-client-1.0.0.tar.gz
Algorithm Hash digest
SHA256 53a268f23ed8d6b970995d48d3d29dec56053df0b4585c208a09e05008e0988a
MD5 cc75b196372f9d859ffad5a10ffa8535
BLAKE2b-256 ae74f2b51aa857d1177e24cb9b5402c0634e44d90b2ea97139f08055bbf30e21

See more details on using hashes here.

File details

Details for the file pinnacle_bets_client-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pinnacle_bets_client-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e84fd5ed19a0f668662599e7d584c3e79f9b88a04a59f3fb6281257c3566ed7e
MD5 2e01c93198c031cb29793f55b8e7ef9c
BLAKE2b-256 887d6677fb904aabe8d1fa81ebe9fa2b11d86f139aca18f09afbe795b17cae2d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page