Docs
Coverage MatrixDocumentationRelease LogLog InContact Us

Push Draft Trades

NBA Push Draft Trades retrieves summary details of all in-draft trades in real-time.

Syntax

https://api.sportradar.com/draft/nba/{access_level}/stream/en/trades/subscribe?api_key={your_api_key}

Replace the placeholders with the following path parameters:

ParameterDescription
access_levelDefines the access level of your API key as Production (production), Trial (trial), or Simulation (simulation).
your_api_keyYour API key.

Optional Query String Parameters

In addition to the URL parameters listed above, you can filter the information with one or more of the following optional query string parameters.

📘

Note

Optional query string parameters must be added after your API key with an ampersand (&). If you are filtering for more than one result, separate the results with a comma (,) and no spaces.

Replace placeholders with the following query parameters:

ParameterDescription
draftDraft id expressed as: sd:draft:{draft_id}.
Example: draft=sd:draft:e04e45a4-7a76-470c-a3ee-ed6bd56583f1

Code Samples

require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://api.sportradar.com/draft/nba/trial/stream/en/trades/subscribe?api_key={your_api_key}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
import requests
import json

r = requests.get("https://api.sportradar.com/trades/nba/trial/stream/en/picks/subscribe",
    params = {'api_key': 'your_api_key'},
    allow_redirects=False)

redirect_url = r.headers['Location']
r = requests.get(redirect_url, stream=True)

for line in r.iter_lines():
    # filter out keep-alive new lines
    if line:
        decoded_line = line.decode('utf-8')
        print(json.loads(decoded_line))
curl -L GET 'api.sportradar.us/draft/nba/trial/stream/en/trades/subscribe?api_key={your_api_key}'

Samples with Query String Params

require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://api.sportradar.com/draft/nba/trial/stream/en/trades/subscribe?api_key={your_api_key}&draft=sd:draft:e04e45a4-7a76-470c-a3ee-ed6bd56583f1&league=NBA")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
import requests
import json

r = requests.get("https://api.sportradar.com/draft/nba/trial/stream/en/trades/subscribe",
    params = {'api_key': 'your_api_key', 'draft': 'sd:draft:e04e45a4-7a76-470c-a3ee-ed6bd56583f1', 'league': 'NBA'},
    allow_redirects=False)

redirect_url = r.headers['Location']
r = requests.get(redirect_url, stream=True)

for line in r.iter_lines():
    # filter out keep-alive new lines
    if line:
        decoded_line = line.decode('utf-8')
        print(json.loads(decoded_line)
curl -L GET 'api.sportradar.us/draft/nba/trial/stream/en/trades/subscribe?api_key={your_api_key}&draft=sd:draft:e04e45a4-7a76-470c-a3ee-ed6bd56583f1&league=NBA'

Response Sample

The above commands return json like this.


Data Points

Draft Info:
AttributeParent ElementTypeDescription
end_datedraftDateEnd date of a draft
ex. 2022-06-23
iddraftGUIDUnique ID of a draft
ex. 01c63362-299c-48a0-b725-63fa18fca261
start_datedraftDateStart date of a draft
ex. 2022-06-23
statusdraftStringStatus of a draft
scheduled, inprogress, complete, closed
yeardraftIntegerYear of a draft
Trade Info:
AttributeParent ElementTypeDescription
idtradeGUIDUnique ID of a trade
ex. bced26d2-2b01-41f8-8d1c-7db9e926f758
sequencetradeIntegerSequence number of a trade
ex. 1652884083078
completetradeBooleanSignifies a trade is complete
aliastransactions - to_team / from_teamStringTrade team alias
ex. MIN (Minnesota)
idtransactionsGUIDUnique ID of a trade
ex. 86f84e62-684b-4667-a9c7-5ccb26b9962a
idtransactions - to_team / from_teamGUIDUnique ID of a trade team
ex. 583eca2f-fb46-11e1-82cb-f4ce4684ea4c
markettransactions - to_team / from_teamStringTrade team market name
ex. Minnesota
nametransactions - to_team / from_teamStringTrade team name
ex. Timberwolves
Pick Info:
AttributeParent ElementTypeDescription
amountitemsStringAmount of trade compensation
iditemsStringUnique ID of a draft item
typeitemsStringType of a draft item
coach, future_pick, money, player, pick
rounditem - future_pickIntegerFuture pick round number
yearitem - future_pickIntegerFuture pick draft year
iditems - pickGUIDUnique ID of a draft pick
ex. ca6b8dae-e835-49e4-9638-b30cdd3969a8
numberitems - pickIntegerNumber of a draft pick within a round
supplementalitems - pickBooleanSignifies a supplemental draft pick
overallitems - pickIntegerOverall number of a draft pick
Round Info:
AttributeParent ElementTypeDescription
end_datepick - roundDateEnd date of a round
ex. 2022-06-23
idpick - roundGUIDUnique ID of a round
ex. 27b93f2c-95fb-4ba6-80ea-d50c95f7d1a4
numberpick - roundIntegerNumber of a round
start_datepick - roundDateStart date of a round
ex. 2022-06-23
statusroundStringStatus of a round
ex. closed
Broadcast:
AttributeParent ElementTypeDescription
channelbroadcastStringName of the draft's broadcast channel
networkbroadcastStringName of the draft's broadcast network
ex. ABC, ESPN
League:
AttributeParent ElementTypeDescription
aliasdraft - leagueStringAlias of a league
ex. NBA
iddraft - leagueGUIDUnique ID of a league
ex. 4353138d-4c22-4396-95d8-5f587d2df25c
namedraft - leagueStringName of a league
ex. NBA
Metadata:
AttributeParent ElementTypeDescription
draftmetadataGUIDUnique ID of a draft
ex. sd:draft:e04e45a4-7a76-470c-a3ee-ed6bd56583f1
leaguemetadataStringAlias of a league
ex. NBA
localemetadataStringLanguage code
ex. en (English)
operationmetadataStringOperation of an update
update, delete
versionmetadataStringVersion of the API
ex. v7