Pinnacle888 API - 投注 API 参考(Bets API) (1.0.0)

Download OpenAPI specification:Download

关于投注的一切:下单、查询投注历史或当前投注状态。

认证

API 使用 HTTP Basic 访问认证。需在请求头中发送 Authorization:

Authorization: Basic <UTF-8 编码的 "用户名:密码" 的 Base64 值>

示例:

Authorization: Basic U03MyOT23YbzMDc6d3c3O1DQ1

下单投注

下单选式投注 - v2

下单选式投注(让分 SPREAD、独赢 MONEYLINE、总分 TOTAL_POINTS、队伍总分 TEAM_TOTAL_POINTS)。

请注意:当状态为 PENDING_ACCEPTANCE 且应用了滚球延迟时,响应中不会包含 betId。客户端需通过 uniqueRequestId 调用 /bets 来查询投注是否已被 ACCEPTED。

详见 如何在滚球赛事上下注?

Authorizations:
basicAuth
Request Body schema: application/json
oddsFormat
string (OddsFormat)
Enum: "AMERICAN" "DECIMAL" "HONGKONG" "INDONESIAN" "MALAY"

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

uniqueRequestId
string <uuid>

下单请求的唯一 ID,用于支持幂等请求。

acceptBetterLine
boolean

当盘口变化对客户有利时是否接受该投注。

stake
number <double>

amount in client’s currency.

winRiskStake
string
Enum: "WIN" "RISK"

投注金额是风险金额还是盈利金额。

lineId
integer <int64>

盘口标识。

altLineId
integer or null <int64>

备用盘口标识。

pitcher1MustStart
boolean

仅棒球。指主队(Team1)先发投手。仅 MONEYLINE 投注类型可设,其他类型须为 TRUE。

pitcher2MustStart
boolean

仅棒球。指客队(Team2)先发投手。仅 MONEYLINE 投注类型可设,其他类型须为 TRUE。

fillType
string
Default: "NORMAL"
Enum: "NORMAL" "FILLANDKILL" "FILLMAXLIMIT"

NORMAL - 按指定金额下注。
FILLANDKILL - 若金额超过最大限额则按最大限额下注,否则按指定金额下注。
FILLMAXLIMIT - 按最大限额下注,忽略指定金额。注意最大限额可能随时变动,可能导致风险高于预期。此选项替代 v1/bets/place 的 isMaxStakeBet。

sportId
integer <int32>
eventId
integer <int64>
periodNumber
integer <int32>
betType
string
Enum: "MONEYLINE" "TEAM_TOTAL_POINTS" "SPREAD" "TOTAL_POINTS"

投注类型。

team
string
Enum: "TEAM1" "TEAM2" "DRAW"

队伍类型。

side
string or null
Enum: "OVER" "UNDER"

方向类型(大/小)。

handicap
number <double>

SPREAD、TOTAL_POINTS、TEAM_TOTAL_POINTS 类型的可选参数。

Responses

Request samples

Content type
application/json
{
  • "oddsFormat": "DECIMAL",
  • "uniqueRequestId": "D5CC50E4-284D-4D50-8D49-429BDC4F2A48",
  • "acceptBetterLine": true,
  • "stake": 10.5,
  • "winRiskStake": "RISK",
  • "lineId": 420921914,
  • "altLineId": null,
  • "pitcher1MustStart": true,
  • "pitcher2MustStart": true,
  • "fillType": "NORMAL",
  • "sportId": 29,
  • "eventId": 757504261,
  • "periodNumber": 0,
  • "betType": "MONEYLINE",
  • "team": "TEAM1",
  • "side": null,
  • "handicap": 1
}

Response samples

Content type
application/json
{
  • "status": "ACCEPTED",
  • "errorCode": null,
  • "uniqueRequestId": "D5CC50E4-284D-4D50-8D49-429BDC4F2A48",
  • "straightBet": {
    }
}

下串关投注 - v2

Authorizations:
basicAuth
Request Body schema: application/json

串关投注请求体。

uniqueRequestId
string <uuid>

This unique id of the place bet requests. This is to support idempotent requests.

acceptBetterLine
boolean

当盘口变化对客户有利时是否接受该投注。

riskAmount
number <double>

Amount in client’s currency. It is always risk amount when placing Parlay bets NOTE: If round robin options is used this amount will apply for all parlays so actual amount wagered will be riskAmount X number of Parlays.

oddsFormat
string (OddsFormat)
Enum: "AMERICAN" "DECIMAL" "HONGKONG" "INDONESIAN" "MALAY"

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

Array of objects (ParlayLegRequest)

Collection of parlay legs.

roundRobinOptions
Array of strings
Items Enum: "Parlay" "TwoLegRoundRobin" "ThreeLegRoundRobin" "FourLegRoundRobin" "FiveLegRoundRobin" "SixLegRoundRobin" "SevenLegRoundRobin" "EightLegRoundRobin"

Responses

Request samples

Content type
application/json
{
  • "uniqueRequestId": "A9EB2EB1-13A5-4600-9F1B-4859379CDEC4",
  • "acceptBetterLine": true,
  • "riskAmount": 10.5,
  • "oddsFormat": "DECIMAL",
  • "legs": [
    ],
  • "roundRobinOptions": [
    ]
}

Response samples

Content type
application/json
{
  • "status": "ACCEPTED",
  • "errorCode": null,
  • "betId": 759629245,
  • "uniqueRequestId": "D5CC50E4-284D-4D50-8D49-429BDC4F2A48",
  • "roundRobinOptionWithOdds": [
    ],
  • "maxRiskStake": 0,
  • "minRiskStake": 0,
  • "validLegs": [
    ],
  • "invalidLegs": [
    ],
  • "parlayBet": {
    }
}

下过关投注(Teaser)- v1

Authorizations:
basicAuth
Request Body schema: application/json

过关投注(PlaceTeaser)请求体。

uniqueRequestId
string <uuid>

Client generated GUID for uniquely identifying the bet.

teaserId
integer <int32>

Unique identifier. Teaser details can be retrieved from a call to Get Teaser Groups endpoint.

oddsFormat
string (OddsFormat)
Enum: "AMERICAN" "DECIMAL" "HONGKONG" "INDONESIAN" "MALAY"

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

winRiskStake
string

投注金额是风险金额还是盈利金额。

stake
number <double>

amount in client’s currency.

Array of objects (TeaserBetLeg)

Collection of legs.

Responses

Request samples

Content type
application/json
{
  • "uniqueRequestId": "10924E23-A2FE-4317-BFFD-80504675F554",
  • "teaserId": 0,
  • "oddsFormat": "DECIMAL",
  • "winRiskStake": "string",
  • "stake": 0,
  • "legs": [
    ]
}

Response samples

Content type
application/json
{
  • "status": "string",
  • "errorCode": "ABOVE_MAX_BET_AMOUNT",
  • "betId": 0,
  • "uniqueRequestId": "10924E23-A2FE-4317-BFFD-80504675F554",
  • "price": 0,
  • "riskAmount": 0,
  • "winAmount": 0,
  • "winRiskStake": "string",
  • "invalidLegs": [
    ],
  • "validLegs": [
    ],
  • "teaserBet": {
    }
}

下特殊投注 - v2

Authorizations:
basicAuth
Request Body schema: application/json

特殊投注请求体。

Array of objects (SpecialBetRequest)

The individual bets.

Responses

Request samples

Content type
application/json
{
  • "bets": [
    ]
}

Response samples

Content type
application/json
{
  • "bets": [
    ]
}

下单选式投注 - v4

Place straight bet (SPREAD, MONEYLINE, TOTAL_POINTS, TEAM_TOTAL_POINTS).

Please note when the status is PENDING_ACCEPTANCE and if the live delay was applied, the response will not have betId. Client would have to call /bets by uniqueRequestId to check the status if the bet was ACCEPTED.

For more details please see How to place a bet on live events?

Authorizations:
basicAuth
Request Body schema: application/json
oddsFormat
string (OddsFormat)
Enum: "AMERICAN" "DECIMAL" "HONGKONG" "INDONESIAN" "MALAY"

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

uniqueRequestId
string <uuid>

下单请求的唯一 ID,用于支持幂等请求。

acceptBetterLine
boolean

当盘口变化对客户有利时是否接受该投注。

stake
number <double>

amount in client’s currency.

winRiskStake
string
Enum: "WIN" "RISK"

投注金额是风险金额还是盈利金额。

lineId
integer <int64>

盘口标识。

altLineId
integer or null <int64>

备用盘口标识。

pitcher1MustStart
boolean

仅棒球。指主队(Team1)先发投手。仅 MONEYLINE 投注类型可设,其他类型须为 TRUE。

pitcher2MustStart
boolean

仅棒球。指客队(Team2)先发投手。仅 MONEYLINE 投注类型可设,其他类型须为 TRUE。

fillType
string
Default: "NORMAL"
Enum: "NORMAL" "FILLANDKILL" "FILLMAXLIMIT"

NORMAL - 按指定金额下注。
FILLANDKILL - 若金额超过最大限额则按最大限额下注,否则按指定金额下注。
FILLMAXLIMIT - 按最大限额下注,忽略指定金额。注意最大限额可能随时变动,可能导致风险高于预期。此选项替代 v1/bets/place 的 isMaxStakeBet。

sportId
integer <int32>
eventId
integer <int64>
periodNumber
integer <int32>
betType
string
Enum: "MONEYLINE" "TEAM_TOTAL_POINTS" "SPREAD" "TOTAL_POINTS"

投注类型。

team
string
Enum: "TEAM1" "TEAM2" "DRAW"

队伍类型。

side
string or null
Enum: "OVER" "UNDER"

方向类型(大/小)。

handicap
number <double>

SPREAD、TOTAL_POINTS、TEAM_TOTAL_POINTS 类型的可选参数。

Responses

Request samples

Content type
application/json
{
  • "oddsFormat": "DECIMAL",
  • "uniqueRequestId": "D5CC50E4-284D-4D50-8D49-429BDC4F2A48",
  • "acceptBetterLine": true,
  • "stake": 10.5,
  • "winRiskStake": "RISK",
  • "lineId": 420921914,
  • "altLineId": null,
  • "pitcher1MustStart": true,
  • "pitcher2MustStart": true,
  • "fillType": "NORMAL",
  • "sportId": 29,
  • "eventId": 757504261,
  • "periodNumber": 0,
  • "betType": "MONEYLINE",
  • "team": "TEAM1",
  • "side": null,
  • "handicap": 1
}

Response samples

Content type
application/json
{
  • "status": "ACCEPTED",
  • "errorCode": null,
  • "uniqueRequestId": "D5CC50E4-284D-4D50-8D49-429BDC4F2A48",
  • "betId": 759629245,
  • "win": 5.5,
  • "risk": 10.5,
  • "price": 2.5,
  • "points": 1
}

下串关投注 - v4

Authorizations:
basicAuth
Request Body schema: application/json

串关投注请求体。

uniqueRequestId
string <uuid>

This unique id of the place bet requests. This is to support idempotent requests.

acceptBetterLine
boolean

当盘口变化对客户有利时是否接受该投注。

riskAmount
number <double>

Amount in client’s currency. It is always risk amount when placing Parlay bets NOTE: If round robin options is used this amount will apply for all parlays so actual amount wagered will be riskAmount X number of Parlays.

oddsFormat
string (OddsFormat)
Enum: "AMERICAN" "DECIMAL" "HONGKONG" "INDONESIAN" "MALAY"

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

Array of objects (ParlayLegRequest)

Collection of parlay legs.

roundRobinOptions
Array of strings
Items Enum: "Parlay" "TwoLegRoundRobin" "ThreeLegRoundRobin" "FourLegRoundRobin" "FiveLegRoundRobin" "SixLegRoundRobin" "SevenLegRoundRobin" "EightLegRoundRobin"

Responses

Request samples

Content type
application/json
{
  • "uniqueRequestId": "A9EB2EB1-13A5-4600-9F1B-4859379CDEC4",
  • "acceptBetterLine": true,
  • "riskAmount": 10.5,
  • "oddsFormat": "DECIMAL",
  • "legs": [
    ],
  • "roundRobinOptions": [
    ]
}

Response samples

Content type
application/json
{
  • "status": "ACCEPTED",
  • "errorCode": null,
  • "betId": 759629245,
  • "uniqueRequestId": "D5CC50E4-284D-4D50-8D49-429BDC4F2A48",
  • "roundRobinOptionWithOdds": [
    ],
  • "validLegs": [
    ],
  • "invalidLegs": [
    ],
  • "wagers": [
    ]
}

下过关投注(Teaser)- v4

Authorizations:
basicAuth
Request Body schema: application/json

过关投注(PlaceTeaser)请求体。

uniqueRequestId
string <uuid>

Client generated GUID for uniquely identifying the bet.

teaserId
integer <int32>

Unique identifier. Teaser details can be retrieved from a call to Get Teaser Groups endpoint.

oddsFormat
string (OddsFormat)
Enum: "AMERICAN" "DECIMAL" "HONGKONG" "INDONESIAN" "MALAY"

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

winRiskStake
string

投注金额是风险金额还是盈利金额。

stake
number <double>

amount in client’s currency.

Array of objects (TeaserBetLeg)

Collection of legs.

Responses

Request samples

Content type
application/json
{
  • "uniqueRequestId": "10924E23-A2FE-4317-BFFD-80504675F554",
  • "teaserId": 0,
  • "oddsFormat": "DECIMAL",
  • "winRiskStake": "string",
  • "stake": 0,
  • "legs": [
    ]
}

Response samples

Content type
application/json
{
  • "status": "string",
  • "errorCode": "ABOVE_MAX_BET_AMOUNT",
  • "betId": 0,
  • "uniqueRequestId": "10924E23-A2FE-4317-BFFD-80504675F554",
  • "price": 0,
  • "risk": 0,
  • "win": 0,
  • "winRiskStake": "string",
  • "invalidLegs": [
    ],
  • "validLegs": [
    ]
}

下特殊投注 - v4

Authorizations:
basicAuth
Request Body schema: application/json

特殊投注请求体。

Array of objects (SpecialBetRequest)

The individual bets.

Responses

Request samples

Content type
application/json
{
  • "bets": [
    ]
}

Response samples

Content type
application/json
{
  • "bets": [
    ]
}

查询投注

查询投注 - v3

返回投注列表。

按时间范围查询进行中投注:

https://api.pinnacle888.com/v3/bets?betlist=RUNNING&fromDate=2017-11-21T00:00:00Z&toDate=2017-11-29T00:00:00Z

进行中投注按 placedAt 时间查询。

按时间范围查询已结算投注:

https://api.pinnacle888.com/v3/bets?betlist=SETTLED&fromDate=2015-12-28T00:00:00Z&toDate=2015-12-29T00:00:00Z

已结算投注按 settledAt 时间查询。 https://api.pinnacle888.com/v3/bets?betlist=SETTLED&fromDate=2017-11-20T00:00:00Z&toDate=2017-11-23T00:00:00Z

按时间范围查询已结算的已取消投注:

https://api.pinnacle888.com/v3/bets?betList=SETTLED&fromDate=2018-03-01&toDate=2018-03-28&betStatuses=CANCELLED

按投注 ID 查询:

https://api.pinnacle888.com/v3/bets?betIds=775856112,775856113,775856114

按 uniqueRequestIds 查询:

https://api.pinnacle888.com/v3/bets?uniqueRequestIds=62335222-dae4-479a-8c05-46440ccdd3bb,42335222-dae4-479a-8c05-46440ccdd3bb
Authorizations:
basicAuth
query Parameters
betlist
string
Enum: "SETTLED" "RUNNING" "ALL"

返回的投注列表类型。当提交 betIds 时不需要此参数。

betStatuses
Array of strings
Items Enum: "WON" "LOSE" "CANCELLED" "REFUNDED" "NOT_ACCEPTED" "ACCEPTED" "PENDING_ACCEPTANCE"

返回的投注状态类型。仅在与 betlist 一起使用时生效,作为附加筛选条件。

fromDate
string

查询时间段的开始日期。当提交 betlist 参数时必填。开始日期最多可追溯 30 天。格式为 ISO8601,可仅填日期或日期时间。

toDate
string

查询时间段的结束日期。当提交 betlist 参数时必填。格式为 ISO8601,可仅填日期或日期时间。toDate 为不包含边界,即不能等于 fromDate。

sortDir
string
Default: "ASC"
Enum: "ASC" "DESC"

按 postedAt/settledAt 的排序方向。仅在使用日期范围查询时生效。

pageSize
integer
Default: 1000

每页条数,最大 1000。仅在使用日期范围查询时生效。

fromRecord
integer
Default: 0

结果起始记录(含)。仅在使用日期范围查询时生效。获取下一页时设为 toRecord+1。

betIds
Array of integers <int64> [ items <int64 > ]

逗号分隔的投注 ID 列表。提交 betIds 时无需其他参数。最多 100 个 ID。适用于所有未结算投注及最近 30 天内结算的投注。

uniqueRequestIds
Array of strings

逗号分隔的 uniqueRequestIds 列表,用于查询之前下的选式投注。若指定则优先级最高,其他参数均被忽略。最多 10 个 ID。若有 betId 建议用 betIds 查询;无 betId 时使用 uniqueRequestIds。主要有两种情况:

  1. 在带滚球延迟的滚球赛事上下注时,下单响应不返回 betId,客户端可用 uniqueRequestIds 查询投注状态。
  2. 网络异常导致客户端不确定下单请求结果时。空响应表示投注未成功。详见 去重说明

注意:按 uniqueRequestIds 查询仅支持选式投注和特殊投注,且仅限投注下单后 30 分钟内。

betType
Array of strings
Items Enum: "SPREAD" "MONEYLINE" "TOTAL_POINTS" "TEAM_TOTAL_POINTS" "SPECIAL" "PARLAY" "TEASER" "MANUAL"

逗号分隔的投注类型列表。

Responses

Response samples

Content type
application/json
{
  • "moreAvailable": true,
  • "pageSize": 1000,
  • "fromRecord": 0,
  • "toRecord": 0,
  • "straightBets": [
    ],
  • "parlayBets": [
    ],
  • "teaserBets": [
    ],
  • "specialBets": [
    ],
  • "manualBets": [
    ]
}

查询已结算投注 - v3

返回已结算的投注列表。

按时间范围查询已结算投注:

https://api.pinnacle888.com/v3/bets/settled?fromDate=2015-12-28T00:00:00Z&toDate=2015-12-29T00:00:00Z

按 uniqueRequestIds 查询已结算投注:

https://api.pinnacle888.com/v3/bets/settled?uniqueRequestIds=62335222-dae4-479a-8c05-46440ccdd3bb,42335222-dae4-479a-8c05-46440ccdd3bb
Authorizations:
basicAuth
query Parameters
eventId
integer <int64>

赛事标识。注意:按 eventId 查询仅支持投注结算后 90 天内。

specialId
integer <int64>

特殊盘口 ID。

fromDate
string

查询时间段的开始日期。当提交 betlist 参数时必填。开始日期最多可追溯 30 天。格式为 ISO8601,可仅填日期或日期时间。

toDate
string

查询时间段的结束日期。当提交 betlist 参数时必填。格式为 ISO8601,可仅填日期或日期时间。toDate 为不包含边界,即不能等于 fromDate。

sortDir
string
Default: "ASC"
Enum: "ASC" "DESC"

按 postedAt/settledAt 的排序方向。仅在使用日期范围查询时生效。

pageSize
integer
Default: 1000

每页条数,最大 1000。仅在使用日期范围查询时生效。

fromRecord
integer
Default: 0

结果起始记录(含)。仅在使用日期范围查询时生效。获取下一页时设为 toRecord+1。

uniqueRequestIds
Array of strings

逗号分隔的 uniqueRequestIds 列表,用于查询之前下的选式投注。若指定则优先级最高,其他参数均被忽略。最多 10 个 ID。若有 betId 建议用 betIds 查询;无 betId 时使用 uniqueRequestIds。主要有两种情况:

  1. 在带滚球延迟的滚球赛事上下注时,下单响应不返回 betId,客户端可用 uniqueRequestIds 查询投注状态。
  2. 网络异常导致客户端不确定下单请求结果时。空响应表示投注未成功。详见 去重说明

注意:按 uniqueRequestIds 查询仅支持选式投注,且仅限投注下单后 30 分钟内。

Responses

Response samples

Content type
application/json
{
  • "moreAvailable": true,
  • "pageSize": 1000,
  • "fromRecord": 0,
  • "toRecord": 0,
  • "straightBets": [
    ],
  • "parlayBets": [
    ],
  • "teaserBets": [
    ],
  • "specialBets": [
    ],
  • "manualBets": [
    ]
}

查询改分投注历史 - v1

返回与改分投注相关的历史数据。

按时间范围查询改分投注历史:

https://api.pinnacle888.com/v1/regrades/wager-history?fromDate=2024-04-01T00:00:00Z&toDate=2024-04-27T00:00:00Z

按投注 ID 查询改分投注历史:

https://api.pinnacle888.com/v1/regrades/wager-history?betIds=52454247
Authorizations:
basicAuth
query Parameters
betIds
Array of integers <int64> [ items <int64 > ]

逗号分隔的投注 ID 列表。提交 betIds 时无需其他参数。最多 100 个 ID。适用于最近 30 天内结算的所有投注。

fromDate
string

查询时间段的开始日期。未提交 betIds 时必填。开始日期最多可追溯 30 天。格式为 ISO8601,可仅填日期或日期时间。

toDate
string

查询时间段的结束日期。未提交 betIds 时必填。格式为 ISO8601,可仅填日期或日期时间。toDate 为不包含边界,即不能等于 fromDate。

sortDir
string
Default: "ASC"
Enum: "ASC" "DESC"

按 postedAt/settledAt 的排序方向。仅在使用日期范围查询时生效。

pageSize
integer
Default: 1000

每页条数,最大 1000。仅在使用日期范围查询时生效。

fromRecord
integer
Default: 0

结果起始记录(含)。仅在使用日期范围查询时生效。获取下一页时设为 toRecord+1。

Responses

Response samples

Content type
application/json
{
  • "moreAvailable": true,
  • "pageSize": 1000,
  • "fromRecord": 0,
  • "toRecord": 0,
  • "straightBets": [
    ],
  • "parlayBets": [
    ],
  • "teaserBets": [
    ],
  • "specialBets": [
    ],
  • "manualBets": [
    ]
}

投注状态

查询投注状态

返回当前投注状态。维护期间可能关闭投注,可调用此接口检查当前投注是否可用。

Authorizations:
basicAuth

Responses

Response samples

Content type
application/json
{
  • "status": "ALL_BETTING_ENABLED"
}