pinnacle_bets
v1.0.0
Published
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 Autho
Downloads
4
Readme
PinnacleBets TypeScript SDK 1.0.0
Welcome to the PinnacleBets SDK documentation. This guide will help you get started with integrating and using the PinnacleBets 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: TypeScript >= 4.8.4
Installation
To get started with the SDK, we recommend installing using npm
:
npm install pinnacle_bets
Authentication
Basic Authentication
The PinnacleBets 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:
const sdk = new PinnacleBets({ username: 'YOUR_USERNAME', password: 'YOUR_PASSWORD' });
If you need to set or update the username and password after initializing the SDK, you can use:
const sdk = new PinnacleBets();
sdk.username = 'YOUR_USERNAME';
sdk.password = 'YOUR_PASSWORD';
Services
The SDK provides various services to interact with the API.
| 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.
| 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.