Skip to main content

LineService

A list of all methods in the LineService service. Click on the method name to view detailed information about that method.

MethodsDescription
line_straight_v1_getReturns latest line.
line_parlay_v2_postReturns parlay lines and calculate odds. For placing round robin bets, must be used with /v2/bets/parlay.
line_teaser_v1_postValidates a teaser bet prior to submission. Returns bet limit and price on success.
line_special_v1_getReturns special lines and calculate odds.

line_straight_v1_get

Returns latest line.

  • HTTP Method: GET
  • Endpoint: /v1/line

Parameters

NameTypeRequiredDescription
league_idintLeague Id.
handicapfloatThis is needed for SPREAD, TOTAL_POINTS and TEAM_TOTAL_POINTS bet types
odds_formatLineStraightV1GetOddsFormatFormat in which we return the odds. Default is American.
sport_idintSport identification
event_idintEvent identification
period_numberintThis represents the period of the match. Please check Get Periods endpoint for the list of currently supported periods per sport.
bet_typeLineStraightV1GetBetTypeBet Type
teamLineStraightV1GetTeamChosen team type. This is needed only for SPREAD, MONEYLINE and TEAM_TOTAL_POINTS bet types
sideLineStraightV1GetSideChosen side. This is needed only for TOTAL_POINTS and TEAM_TOTAL_POINTS

Return Type

LineResponse

Example Usage Code Snippet

from pinnacle_link import PinnacleLink, Environment
from pinnacle_link.models import LineStraightV1GetOddsFormat, LineStraightV1GetBetType, LineStraightV1GetTeam, LineStraightV1GetSide

sdk = PinnacleLink(
username="YOUR_USERNAME",
password="YOUR_PASSWORD",
base_url=Environment.DEFAULT.value
)

result = sdk.line.line_straight_v1_get(
league_id=1,
handicap=4.58,
odds_format="American",
sport_id=0,
event_id=1,
period_number=0,
bet_type="SPREAD",
team="Team1",
side="OVER"
)

print(result)

line_parlay_v2_post

Returns parlay lines and calculate odds. For placing round robin bets, must be used with /v2/bets/parlay.

  • HTTP Method: POST
  • Endpoint: /v2/line/parlay

Parameters

NameTypeRequiredDescription
request_bodyParlayLinesRequestThe request body.

Return Type

ParlayLinesResponseV2

Example Usage Code Snippet

from pinnacle_link import PinnacleLink, Environment
from pinnacle_link.models import ParlayLinesRequest

sdk = PinnacleLink(
username="YOUR_USERNAME",
password="YOUR_PASSWORD",
base_url=Environment.DEFAULT.value
)

request_body = ParlayLinesRequest(
odds_format="American",
legs=[
{
"unique_leg_id": "uniqueLegId",
"event_id": 0,
"period_number": 3,
"leg_bet_type": "SPREAD",
"team": "Team1",
"side": "OVER",
"handicap": 8.22
}
]
)

result = sdk.line.line_parlay_v2_post(request_body=request_body)

print(result)

line_teaser_v1_post

Validates a teaser bet prior to submission. Returns bet limit and price on success.

  • HTTP Method: POST
  • Endpoint: /v1/line/teaser

Parameters

NameTypeRequiredDescription
request_bodyLinesRequestTeaserThe request body.

Return Type

TeaserLinesResponse

Example Usage Code Snippet

from pinnacle_link import PinnacleLink, Environment
from pinnacle_link.models import LinesRequestTeaser

sdk = PinnacleLink(
username="YOUR_USERNAME",
password="YOUR_PASSWORD",
base_url=Environment.DEFAULT.value
)

request_body = LinesRequestTeaser(
teaser_id=6,
odds_format="American",
legs=[
{
"leg_id": "legId",
"event_id": 1,
"period_number": 7,
"bet_type": "SPREAD",
"team": "Team1",
"side": "OVER",
"handicap": 0.14
}
]
)

result = sdk.line.line_teaser_v1_post(request_body=request_body)

print(result)

line_special_v1_get

Returns special lines and calculate odds.

  • HTTP Method: GET
  • Endpoint: /v1/line/special

Parameters

NameTypeRequiredDescription
odds_formatLineSpecialV1GetOddsFormatFormat the odds are returned in. [American, Decimal, HongKong, Indonesian, Malay]
special_idintId of the special.
contestant_idintId of the contestant.
handicapinthandicap of the contestant. As contestant's handicap is a mutable property, it may happened that line/special returns status:SUCCESS, but with the different handicap from the one that client had at the moment of calling the line/special. One can specify handicap parameter in the request and if the contestant's handicap changed, it would return status:NOT_EXISTS. This way line/special is more aligned to how /line works.

Return Type

SpecialLineResponse

Example Usage Code Snippet

from pinnacle_link import PinnacleLink, Environment
from pinnacle_link.models import LineSpecialV1GetOddsFormat

sdk = PinnacleLink(
username="YOUR_USERNAME",
password="YOUR_PASSWORD",
base_url=Environment.DEFAULT.value
)

result = sdk.line.line_special_v1_get(
odds_format="American",
special_id=4,
contestant_id=2,
handicap=5
)

print(result)

Build Your Own SDKs with  liblab

Build developer friendly SDKs in minutes from your APIs

Start for Free →