Lines Service

Description

The DBS Lines Service provides for querying the opening, closing, current, and current & previous lines in a variety of ways. All lines may be requested, but note that due to the volume of data returned in such a request, it's better to add to the query: a list of sports books, event IDs or a league ID and/or a timestamp may be added so that only the line deltas — or changes — are returned that occurred since that time.

One strategy is to query the service once for all lines, and then at fixed intervals, query the service but use the timestamp from the last response as the time stamp value for your next query. You'll only receive lines that have changed in that time frame, i.e. from the time of the last request, (or whatever timestamp value is given on the TimeStamp element) to the current request.

Available Queries

Line Types

  • Opening
  • Current
  • Current and Previous
  • Closing

Queries within Line Types

  • All Lines
  • Lines for one or more sports books
  • Lines for a league
  • Lines for one or more events
  • Lines since a timestamp (changes)

These queries are typically used in combination to provide for a narrower search: lines for a league and a set of books; line changes since a given time; line changes for a sports book or a list of sports books, etc.

WSDL Location

http://feeds.donbest.com/webservices/lines.wsdl

Request

Request Format

Note: This shows an OpeningLinesRequest, but the requests are similar for the other line types.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:lin="http://donbest.com/schemas/lines">
   <soapenv:Header>
      <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken wsu:Id="UsernameToken-1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:Username>myUsername</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">MyPassword</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soapenv:Header>
   <soapenv:Body>
      <lin:OpeningLinesRequest>
         <!--Optional:-->
         <lin:BookIds>
            <!--1 or more repetitions:-->
            <lin:BookId>?</lin:BookId>
         </lin:BookIds>
         <!--Optional:-->
         <lin:EventIds>
            <!--1 or more repetitions:-->
            <lin:EventId>?</lin:EventId>
         </lin:EventIds>
         <!--Optional:-->
         <lin:LeagueId>?</lin:LeagueId>
         <!--Optional:-->
         <lin:TimeStamp>?</lin:TimeStamp>
      </lin:OpeningLinesRequest>
   </soapenv:Body>
</soapenv:Envelope>

Request Parameters

Parameter Element Descriptions

Sending an 'empty' request — a request with no elements except the request itself — will return all lines for a given request. For performance reasons, and to minimize processing and bandwidth, it will be necessary to add certain optional request elements to narrow the search.

Element Description Optional
BookIds a container for a list of one or more BookId elements - narrows the search to those books yes
BookId sports book id - returns lines for that books only yes
EventIds a container for a list of one or more EventId elements - narrows the search to those events yes
EventId an event id - returns lines for that event only yes
LeagueId the league id - returns lines for that particular league. Mutually exclusive with Events. yes
TimeStamp returns lines that have changed since this timestamp yes

Parameter Combinations

The table below shows parameter combinations along with the associated query. Note that for each valid combination listed below, an optional TimeStamp parameter may be added to the original query to only retrieve deltas since that timestamp.

Parameter Combination Valid Query Description
no parameters yes all lines - all events, all books
TimeStamp yes lines changes since timestamp
BookIds/BookId, TimeStamp yes lines for all events for each book
BookIds/BookId, EventIds/EventId, TimeStamp yes lines for each event for each book
BookIds/BookId, LeagueId, TimeStamp yes lines for each event in the league for each book
BookIds/BookId, EventIds/EventId, LeagueId, TimeStamp no N/A
EventIds/EventId, TimeStamp yes lines for each event for all books
EventIds/EventId, LeagueId, TimeStamp no N/A
LeagueId, TimeStamp yes lines for each event in the league for all books

Note: LeagueId and EventId are mutually exclusive and cannot be specified in the same request - you may specify multiple events or a league, but not both.

Example Requests

Response

Response Format

<nameSOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header>
      <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken wsu:Id="UsernameToken-1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:Username>myUsername</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">MyPassword</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soapenv:Header>
   <SOAP-ENV:Body>
      <lin:LinesResponse time="2010-02-15T18:21:35Z" xmlns:lin="http://donbest.com/schemas/lines">
         <lin:Event date="2010-02-17T00:05:00Z" id="120963" league="nba" leagueId="3" name="New Jersey @ Charlotte">
            <lin:Odds>
               <lin:Book id="1" name="The Greek">
                  <lin:PeriodOdds linePeriod="FG" lineType="current" timeStamp="2010-02-15T15:14:04Z">
                     <lin:Spread awayPoints="11.5" awayPrice="-110" homePoints="-11.5" homePrice="-110"/>
                     <lin:Total overPrice="-110" points="186.0" underPrice="-110"/>
                     <lin:Combined awayDisplay="186" homeDisplay="11½"/>
                  </lin:PeriodOdds>
               </lin:Book>
            </lin:Odds>
         </lin:Event>
      </lin:LinesResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License