API Reference

The Jock MKT API allows for programmatic interaction with the Jock MKT trading platform from your own custom applications. Our API includes both REST-based endpoints and a number of websocket-based streaming endpoints for receiving live updates that will be released in the coming weeks. We require all API traffic to be passed via a secure HTTPS connection.

Overview

The Jock MKT REST API uses standard HTTP verbs and URL structures, form-encoded request bodies, and returns responses as JSON. Both the REST API and streaming endpoints use common object definitions whose types are described below.

Rate Limiting

All traffic to the Jock MKT API is rate-limited per user account. The current API rate limit is 250 requests per minute for all endpoints. API endpoints that create or modify orders are limited to 10 requests per minute.

Latest Version

The Jock MKT API is available as a beta preview of our upcoming v1 release. While we will make every effort to not make backwards-incompatible changes, such changes are possible.

If you would like to send feedback such as bug reports and feature requests to the Jock MKT API platform team, please reach out to us via email.

Getting Started

If you have not yet received Jock MKT API credentials, you must first register as a Jock MKT developer.

Base URL
https://api.jockmkt.net/v1

Authentication

The Jock MKT API uses API keys and secrets for authentication when communicating with our API. API keys will have the prefix jm_key_.

It is very important that you keep your API keys and secrets secure. Do not share or post your API credentials in any place that could be publicly viewable, and never commit it to a source code repository such as Github.

To make an authenticated request utilizing your API key, you must use your key and secret to obtain an access_token. Once you receive an access token, you'll pass it as a bearer token to authenticate requests made to our API.

Requests that are sent without an access token, or with a token that is not active at the time of the API call, will fail due to lack of authorization. See errors for more information.

Routes
post
/oauth/tokens

Creating a Token

Body Parameters

grant_typestring

The type of OAuth grant that is desired. Always client_credentials when creating tokens from external services with an API key and secret.

keystring

The API key given to you by Jock MKT with prefix jm_key_.

secretstring

The API secret key given to you by Jock MKT.

Response

Returns a newly created session if the request succeeds; use the access_token to make subsequent API requests. Returns an error if there is a problem creating the session.

Request
$ curl -X POST https://api.jockmkt.net/v1/oauth/tokens \
-d grant_type=client_credentials \
-d key=jm_api_xxx \
-d secret=xxx
Response
{
status: "success",
session: {
access_token: "eyJhbGciOiJIUz...",
object: "session",
created_at: 1595293126482,
expired_at: 1595293126482
}
}

Errors

The Jock MKT API uses standard HTTP response codes to indicate whether or not the request succeeded. If an API request does not succeed, the API will return information about the means of failure in the HTTP response code and via an error field passed in the response.

Successful requests will always return a 200 OK status code and a success response in the response body's status field. All other requests return with error in the body's status field.

Invalid requests return a 400 Bad Request status code. The error body parameter will be bad_request to indicate that the request could not be performed as sent (e.g. if a required parameter was not included).

Requests that lack valid authorization return a 401 Not Authorized status code. The error body parameter will be not_authorized.

Requests are formatted correctly but fail return a 402 Request Failed status code. In most cases, the error body parameter will provide a more precise reason for failure, including insufficient_funds, event_status to help with debugging, however, some failure cases will default to returning request_failed if a more helpful response cannot be generated.

Requests that refer to resources that Jock MKT cannot locate return a 404 Not Found status code. The error body parameter will be not_found.

Requests that are made in excess of an account's rate limiting return a 429 Rate Limited status code. The error body parameter will be not_found.

Requests that fail due to an issue with the Jock MKT platform return a 50x Internal Error status code. The error body parameter will be internal_error.

Error Response — 401 Not Authorized
{
status: "error",
error: "not_authorized"
}
Error Response — 402 Request Failed
{
status: "error",
error: "insufficient_funds"
}

Account

The Account object includes information about the authenticated account that is linked to your API credentials, including important biographic and gameplay information, such as your eligibility to compete in cash markets.

Routes
get
/account

Account Object

Attributes

idstring

Unique identifier for the account with prefix acct_.

objectstring

The name of the object, helpful for cases where you may receive multiple types of objects via the same endpoint. Always account for this object type.

emailstring

The email address of the account.

first_namestringoptional

The first name of the user to whom the account belongs, if available.

last_namestringoptional

The last name of the user to whom the account belongs, if available.

display_namestring

The publicly-viewable display name for this account.

statusstring

The status of this account. Accounts in good standing and without restriction will have the active status flag.

If your account has a status other than active, you should reach out to Jock MKT support.

languagestring

The language associated with this account. This field will always return en.

created_atnumber

A timestamp representing the time that the account was created.

updated_atnumber

A timestamp representing the last time that any fields associated with this balance may have changed.

The Account Object
{
id: "acct_sh4is33Jd9J3dc8J",
object: "account",
email: "user@jockmkt.com",
first_name: "John",
last_name: "Smith",
display_name: "jockmkt",
status: "active",
language: "en",
created_at: 1595293126482,
updated_at: 1595293126482
}

Fetch Account

Retrieve information about the authenticated account.

Query Parameters

includestringoptional

One or more optional fields related to the retrieved object, formatted as comma-separated strings within [] square brackets. Defaults to no inclusions.

For the Account object, you may request that balances and positions be included in the response. Including balances will attach the account's current Balance objects. Including positions will attach the account's current Position objects, if any.

Response

Returns the Account object for the authenticated user in the account field of the response body if the request succeeds. Returns an error if there is a problem retrieving the Account.

Request
$ curl https://api.jockmkt.net/v1/account \
-H "Authorization: Bearer <access_token>"
Response
{
status: "success",
account: {
id: "act_sh4is33Jd9J3dc8J",
object: "account",
email: "user@jockmkt.com",
first_name: "John",
last_name: "Smith",
display_name: "jockmkt",
status: "active",
language: "en",
created_at: "2021-04-10T02:04:46+00:00",
updated_at: "2021-04-10T02:04:46+00:00"
}
}

Balances

The Balance object represents your account's balance in a particular currency.

Jock MKT accounts will always report a balance in United States Dollars, and may report additional contest chip balances if you have joined a contest event that has not yet paid out prizes.

Routes
get
/balances

The Balance Object

Attributes

currencystring

Unique identifier for the balance.

When the balance has a type of fiat, the currency will be a three-letter lowercase ISO currency code (e.g. usd). When the balance has a type of contest, the currency is a contest chip currency and will have the prefix cur_.

objectstring

The name of the object, helpful for cases where you may receive multiple types of objects via the same endpoint. Always balance for this object type.

typestring

The type of the currency, either fiat or contest.

totalnumber

The total amount of currency owned. This amount includes all funds that have been cleared into your account. This amount does not factor in amounts held against open orders or to meet other obligations.

pendingnumber

The total amount of currency that is currently pending clearance either to or from your account. This amount includes deposited funds that have not become available to spend, or funds that have been cleared to be withdrawn but have not yet been cleared to your bank.

buying_powernumber

The total amount of currency that can be spent. This amount represents your total currency balance less any funds that are held against open orders and short obligations.

updated_atnumber

A timestamp representing the last time that any fields associated with this balance may have changed.

archivedtrueoptional

Whether or not the balance has been archived. Contest currencies are archived at the conclusion of the prize payout process, after which they are no longer reported as user balances.

This field is only present and set to true in streaming scenarios and is never visible via the API.

The Balance Object — Fiat
{
currency: "usd",
object: "balance",
type: "fiat",
total: 1413.12,
pending: 400,
buying_power: 1044.59,
updated_at: 1595293126482
}
The Balance Object — Contest
{
currency: "cur_xxx",
object: "balance",
type: "contest",
total: 459.4822,
pending: 0,
buying_power: 102.1134,
updated_at: 1595293126482
}

Fetch Balances

Retrieve active balances for the authenticated user.

Query Parameters

updated_afternumberoptional

Restricts the response to include only balance objects whose updated_at timestamps are greater than the passed value.

Response

Returns the active list of Balance objects for the authenticated user in the balances field of the response body if the request succeeds. Returns an error if there is a problem retrieving the list of Balance objects.

Request
$ curl https://api.jockmkt.net/v1/balances \
-H "Authorization: Bearer <access_token>"
Response
{
status: "success",
count: 1,
balances: [
{
currency: "usd",
object: "balance",
type: "fiat",
total: 1034.56,
buying_power: 984.22,
pending: 200,
updated_at: 1595806459464
}
]
}

Teams

The Team object provides metadata about the real-world organization that is associated with a player, such as the Boston Red Sox or the Arizona Cardinals, and are unique per league.

Teams are only available for leagues that have a logical team structure.

Routes
get
/teams/:team_id
get
/teams

The Team Object

Attributes

idstring

Unique identifier for the team.

objectstring

The name of the object, helpful for cases where you may receive multiple types of objects via the same endpoint. Always team for this object type.

namestring

The human-readable name of this team.

leaguestring

The league that this entity is associated with. One of nba, nfl, nhl or mlb.

abbreviationstring

The abbreviated name for this team.

locationstring

The geographic location that the team originates from.

sportradar_idstringoptional

An identifier to assist in linking Jock MKT ids to the id systems of other data providers.

The Team Object
{
id: "team_8fe94ef0d1f0a00e1285301c4092650f",
object: "team",
name: "49ers",
league: "nfl",
abbreviation: "SF",
location: "San Francisco",
sportradar_id: "f0e724b0-4cbf-495a-be47-013907608da9"
}

Fetch Team

Fetch a single Team object by its unique identifier.

Query Parameters

This request does not support any query parameters.

Response

Returns the Team object for the given id. Returns an error if there is a problem retrieving the Team.

Request
$ curl https://api.jockmkt.net/v1/teams/team_8fe94ef0d1f0a00e1285301c4092650f \
-H "Authorization: Bearer <access_token>"
Response
{
status: "success",
team: {
id: "team_8fe94ef0d1f0a00e1285301c4092650f",
object: "team",
name: "49ers",
league: "nfl",
abbr: "SF",
location: "San Francisco",
sportradar_id: "f0e724b0-4cbf-495a-be47-013907608da9"
}
}

Fetch Teams

Retrieve a list of Team objects. This query always returns Team objects in ascending order by league and name.

Query Parameters

idsstringoptional

One or more ids to filter the response by; comma-separated values inside [] brackets.

leaguestringoptional

The league to retrieve teams for. If you do not include a league, the query will return teams for all leagues.

startintegeroptional

The first Team entity to return. Defaults to 0.

limitintegeroptional

The number of records to return, an integer from 1 to 100. Defaults to 20.

Response

Returns a list of Team objects, filtered and sorted according to any passed query parameters. Returns an error if there is a problem retrieving the Team entities.

Request
$ curl https://api.jockmkt.net/v1/teams \
-H "Authorization: Bearer <access_token>" \
-d "league=nfl" \
-d "start=18" \
-d "limit=1"
Response
{
status: "success",
start: 18,
limit: 1,
count: 32,
teams: [
{
id: "team_8fe94ef0d1f0a00e1285301c4092650f",
object: "team",
name: "49ers",
league: "nfl",
abbr: "SF",
location: "San Francisco",
sportradar_id: "f0e724b0-4cbf-495a-be47-013907608da9"
}
]
}

Entities

Entities refer to real-world players that take part in one or more games, accruing stats that, when translated to fantasy points, provide the basis for Jock MKT event scoring.

Each entity includes a league field to indicate the type of biographical information to expect for the player. Depending on the associated league, an entity may include an attached Team entity indicating current team affiliation.

Routes
get
/entities/:entity_id
get
/entities

The Entity Object

Attributes

idstring

Unique identifier for the entity with prefix en_.

objectstring

The name of the object, helpful for cases where you may receive multiple types of objects via the same endpoint. Always entity for this object type.

namestring

The full or common human-readable name for this entity.

first_namestringoptional

The formal first name for this entity.

preferred_namestringoptional

The preferred name for this entity, when available, used when a player is better known by a name other than their first name.

last_namestringoptional

The last name for this entity.

leaguestring

The league that this entity is associated with.

statusstringoptional

The entity's current status within their league.

positionstringoptional

The player's position.

collegestringoptional

The college that the player attended.

rookie_yearnumberoptional

The player's rookie year.

heightstringoptional

The player's height in inches.

weightnumberoptional

The player's weight in pounds.

jersey_numberstringoptional

The player's jersey number.

collegestringoptional

The college that the player attended.

rookie_yearnumberoptional

The year that the player first entered their league.

debutstringoptional

The year that the player first appeared in their league.

turned_prostringoptional

The year that the player turned professional. Only present for entities with a league of pga.

handednessstringoptional

The player's primary shooting side. Only present for entities with a league of nhl.

sportradar_idstringoptional

An id to use for mapping entities from the Jock MKT platform to the id system in use by an external data provider.

updated_atnumber

A timestamp representing the last time that any fields associated with this object may have changed.

The Entity Object - NFL
{
id: "en_6025693d374b384994316c1e13f40416",
object: "entity",
name: "Tom Brady",
first_name: "Tom",
preferred_name: "Tom",
last_name: "Brady",
league: "nfl",
status: "active",
jersey_number: "12",
position: "QB",
rookie_year: 2000,
college: "Michigan",
birthdate: "1977-08-03",
sportradar_id: "41c44740-d0f6-44ab-8347-3b5d515e5ecf",
current_team_id: "team_8fe94ef0d1f0a00e1285301c4092650f",
updated_at: 1622208358799
}
The Entity Object - NBA
{
id: "en_953b227a97f4290aed5f55ba10d15cfe",
object: "entity",
name: "Luka Doncic",
league: "nba",
first_name: "Luka",
preferred_name: "Luka",
last_name: "Doncic",
position: "PG",
height: 79,
weight: 230,
birthdate: "1999-02-28",
jersey_number: "77",
college: "77",
rookie_year: 2018,
status: "active",
sportradar_id: "d2ee92e9-3e72-45eb-b156-2dc5adc1e6f7",
current_team_id: "team_0aba5fce9c221722e6b28868fa646dd0",
updated_at: 1623004800411
}

Fetch Entity

Fetch a single Entity object by its unique identifier.

Query Parameters

includestringoptional

One or more optional fields related to the retrieved object, formatted as comma-separated strings within [] square brackets. Defaults to no inclusions.

For the Entity object, only team is an expandable field, which returns the related Team object. If there is no related Team object, this query parameter has no effect.

Response

Returns the Entity object for the given id. Returns an error if there is a problem retrieving the Entity.

Request
$ curl https://api.jockmkt.net/v1/entities/ent_6025693d374b384994316c1e13f40416 \
-H "Authorization: Bearer <access_token>" \
-d "include=[team]"
Response
{
status: "success",
entity: {
id: "en_6025693d374b384994316c1e13f40416",
object: "entity",
name: "Tom Brady",
first_name: "Tom",
preferred_name: "Tom",
last_name: "Brady",
league: "nfl",
status: "active",
jersey_number: "12",
position: "QB",
rookie_year: 2000,
college: "Michigan",
birthdate: "1977-08-03",
sportradar_id: "41c44740-d0f6-44ab-8347-3b5d515e5ecf",
updated_at: 1622208358799,
current_team_id: "team_8fe94ef0d1f0a00e1285301c4092650f",
current_team: {
id: "team_8fe94ef0d1f0a00e1285301c4092650f",
object: "team",
name: "Bucaneers",
league: "nfl",
abbr: "TB",
location: "Tampa Bay",
sportradar_id: "f0e724b0-4cbf-495a-be47-013907608da9"
}
}
}

Fetch Entities

Retrieve a list of Entity objects. This query always returns Entity objects in ascending order by id.

Query Parameters

leaguestringoptional

The league to retrieve entities for. If you do not include a league, the query will return entities from all leagues.

includestringoptional

One or more optional fields related to the retrieved object, formatted as comma-separated strings within [] square brackets. Defaults to no inclusions.

For the Entity object, only team is an expandable field, which returns the related Team object. If there is no related Team object, this query parameter has no effect.

updated_afternumberoptional

Restricts the response to include only entity objects whose updated_at timestamps are greater than the passed value.

startintegeroptional

The first Entity object to return. Defaults to 0.

limitintegeroptional

The number of objects to return, an integer from 1 to 100. Defaults to 20.

Response

Returns a list of Entity objects, filtered and sorted according to any passed query parameters. Returns an error if there is a problem retrieving the Entity objects.

Request
$ curl https://api.jockmkt.net/v1/entities \
-H "Authorization: Bearer <access_token>"
-d "start=3286"
-d "limit=2"
-d "include=[team]"
Response
{
status: "success",
start: 3286,
limit: 2,
count: 9871,
entities: [
{
id: "en_6022ca624de334d267308997f5ba733a",
object: "entity",
name: "Dmitry Orlov",
league: "nhl",
first_name: "Dmitry",
preferred_name: "Dmitry",
last_name: "Orlov",
position: "D",
sportradar_id: "436af78e-0f24-11e2-8525-18a905767e44",
jersey_number: "9",
handedness: "L",
height: 71,
weight: 208,
birthdate: "1991-07-23",
rookie_year: 2011,
status: "active",
updated_at: 1622207808229,
current_team_id: "team_6021a24eed8d65d55141f30494460d7c",
team: {
id: "team_6021a24eed8d65d55141f30494460d7c",
object: "team",
league: "nhl",
name: "Capitals",
location: "Washington",
abberviation: "WSH",
sportradar_id: "4417eede-0f24-11e2-8525-18a905767e44"
}
},
{
id: "en_6022ca625160de611c29fb1aee317ced",
object: "entity",
name: "Zdeno Chara",
league: "nhl",
current_team_id: "team_6021a24eed8d65d55141f30494460d7c",
first_name: "Zdeno",
preferred_name: "Zdeno",
last_name: "Chara",
position: "D",
sportradar_id: "42edc16b-0f24-11e2-8525-18a905767e44",
jersey_number: "33",
handedness: "L",
height: 81,
weight: 250,
birthdate: "1977-03-18",
rookie_year: 1997,
status: "active",
updated_at: 1622207808236,
team: {
id: "team_6021a24eed8d65d55141f30494460d7c",
object: "team",
league: "nhl",
name: "Capitals",
location: "Washington",
abberviation: "WSH",
sportradar_id: "4417eede-0f24-11e2-8525-18a905767e44"
}
}
]
}

Games

Games describe real-world events, matches, games, races and tournaments that Entity objects may compete in to earn fantasy points.

Jock MKT provides certain limited information about upcoming games, such as tee times for pga tournaments and expected lineups for mlb games. During the game, Jock MKT may provide game state information such as current clock, period, and quarter information.

Games begin their lifecycle with an upcoming scheduled status, and move to in_progress once gameplay begins. Both scheduled and in_progress games may become delayed, and move to in_progress if gameplay resumes.

Games that have completed, but have not yet had their statistics finalized, carry the complete status, moving to final once finalized by the associated league.

A game that becomes cancelled will not be played. A game that is postponed or suspended may be played or resumed at a later date depending on league rules. A game that is pending_review has gone final and is experiencing a statistical update.

Routes
get
/games
get
/games/:game_id

The Game Object

Attributes

idstring

Unique identifier for the game with prefix game_.

objectstring

The name of the object, helpful for cases where you may receive multiple types of objects via the same endpoint. Always game for this object type.

namestring

The human-readable name of this game.

leaguestring

The league that this entity is associated with.

scheduled_startnumber

The time at which this game is expected to start.

statusstring

The current status of the game. One of scheduled, in_progress, cancelled, complete, delayed, final, pending_review, postponed, or suspended.

homeobjectoptional

Data about the current game state for the home team, for sports with opposing teams, such as the number of timeouts left or current score.

awayobjectoptional

Data about the current game state for the away team, for sports with opposing teams, such as the number of runs scored.

stateobjectoptional

Information about the current state of the game, such as current round or clock information, depending on the game's league.

venueobjectoptional

Information about the location where the game is scheduled to be played.

weatherobjectoptional

Information about the expected conditions at the location where the game is scheduled to be played, for games with a league with outdoor play.

sportradar_idstringoptional

An identifier to assist in linking Jock MKT ids to the id systems of other data providers.

updated_atnumber

A timestamp representing the last time that any fields associated with this game changed.

The Game Object — Upcoming NBA
{
id: "game_60bb686586eaf95a5e8dafa3823d89cb",
object: "game",
name: "Atlanta Hawks at Philadelphia 76ers",
league: "nba",
scheduled_start: 1623195000000,
status: "scheduled",
home: {
team_id: "team_de200b98559735706b2e4cc581bf65ef"
},
away: {
team_id: "team_4d7379c8d756e5a15190c56b550778a8"
},
sportradar_id: "9511cce9-968e-49db-a390-bc8c34723310",
updated_at: 1622894959574
}
The Game Object — Completed MLB
{
id: "game_60491e1b599f7a94fd9ddee451d5c39e",
object: "game",
name: "Brewers at Cubs",
league: "mlb",
scheduled_start: 1617819600000,
venue: {
type: "outdoor"
},
home: {
team_id: "team_7794cd2467d00887730e9ad5ed9af850",
runs: 2,
hits: 3,
errors: 2
},
away: {
team_id: "team_57fdb82200b94944212259fb4253890d",
runs: 4,
hits: 8,
errors: 1
},
state: {
last_inning: 10,
duration: "3:32",
double_header: false
},
amount_completed: 1,
status: "final",
sportradar_id: "3a51c137-eaf5-4d5f-b7f5-755e0cb43e2a",
updated_at: 1622208216671
}

Fetch Game

Fetch a single Game object by its unique identifier.

Query Parameters

This request does not support any query parameters.

Response

Returns the Game object for the given id. Returns an error if there is a problem retrieving the Game.

Request
$ curl https://api.jockmkt.net/v1/games/game_60bb686586eaf95a5e8dafa3823d89cb \
-H "Authorization: Bearer <access_token>"
Response
{
status: "success",
game: {
id: "game_60bb686586eaf95a5e8dafa3823d89cb",
object: "game",
name: "Atlanta Hawks at Philadelphia 76ers",
league: "nba",
scheduled_start: 1623195000000,
status: "in_progress",
home: {
team_id: "team_de200b98559735706b2e4cc581bf65ef",
points: 77
},
away: {
team_id: "team_4d7379c8d756e5a15190c56b550778a8",
points: 70
},
state: {
clock: "4:59",
quarter: 3
},
sportradar_id: "9511cce9-968e-49db-a390-bc8c34723310",
updated_at: 1623201948475
}
}

Fetch Games

Retrieve a list of Game objects. This query always returns Game objects in descending order by scheduled start time.

Query Parameters

idsstringoptional

One or more ids to filter the response by; comma-separated values inside [] brackets.

leaguestringoptional

The league to retrieve games for. If you do not include a league, the query will return games for all leagues.

startintegeroptional

The offset of the first Game entity to return. Defaults to 0.

limitintegeroptional

The number of records to return, an integer from 1 to 100. Defaults to 20.

Response

Returns a list of Game objects, filtered and sorted according to any passed query parameters. Returns an error if there is a problem retrieving the Game entities.

Request
$ curl https://api.jockmkt.net/v1/games \
-H "Authorization: Bearer <access_token>" \
-d "league=nba" \
-d "start=376" \
-d "limit=1"
Response
{
status: "success",
start: 376,
limit: 1,
count: 944,
games: [
{
id: "game_60bb686586eaf95a5e8dafa3823d89cb",
object: "game",
name: "Atlanta Hawks at Philadelphia 76ers",
league: "nba",
scheduled_start: 1623195000000,
status: "in_progress",
home: {
team_id: "team_de200b98559735706b2e4cc581bf65ef",
points: 77
},
away: {
team_id: "team_4d7379c8d756e5a15190c56b550778a8",
points: 70
},
state: {
clock: "4:59",
quarter: 3
},
sportradar_id: "9511cce9-968e-49db-a390-bc8c34723310",
updated_at: 1623201948475
}
]
}

Game Logs

Game logs provide a means to report statistical information for the performance of an individual player, or Entity, in a particular Game and for a particular Team, if applicable for the associated league.

Game logs may report Jock MKT stat projections, used to calculate projected fantasy points and compute Tradeable rank prior to the opening of an event's IPO. Stats may not be updated in real time and are not finalized for scoring until the underlying game moves to a final status.

Routes
get
/game_logs

The Game Log Object

Attributes

idstring

Unique identifier for the game log with prefix gl_.

objectstring

The name of the object, helpful for cases where you may receive multiple types of objects via the same endpoint. Always game_log for this object type.

entity_idstring

The unique identifier for the player whose game stats are represented in the included stats fields.

game_idstring

The unique identifier for the games where the underlying stats are being projected and scored.

team_idstringoptional

The unique identifier for the Team that the given Entity is expected to play for during the game, if supported for the Entity and Game league.

created_atnumber

A timestamp representing the first time that coverage began for the given player in the given game.

scheduled_startnumber

The time at which this game is expected to start.

projected_statsobjectoptional

The stats expected to be scored by the indicated Entity in the given Game. This value is set prior to game start and should not be used as the basis for automated trading.

statsobjectoptional

The stats scored by the indicated Entity in the given Game to date, provided from our data partners.

updated_atnumber

A timestamp representing the last time that any fields associated with this event changed.

The Game Log Object — NBA Entity
{
id: "gl_60bb6999a8e249b713a5e63b7e68551a",
object: "game_log",
entity_id: "en_12d0c14aa5dfd232a0298a737f5a59fc",
game_id: "game_60bb6865db77b27f567fbf8923e400f9",
team_id: "team_a6917fcb35a29ee9de8c00be7e36f5ae",
created_at: 1623101400000,
scheduled_start: 1623101400000,
stats: {
blocks: 1,
points: 18,
steals: 0,
assists: 4,
minutes: "30:47",
rebounds: 11,
turnovers: 3,
field_goals_att: 15,
free_throws_att: 7,
field_goals_made: 8,
free_throws_made: 2,
three_points_att: 3,
three_points_made: 0,
defensive_rebounds: 10,
offensive_rebounds: 1
},
projected_stats: {
blocks: 1.246,
points: 29.251,
steals: 1.383,
assists: 6.346,
rebounds: 13.099,
turnovers: 3.762,
field_goals_att: 20.032,
free_throws_att: 9.49,
field_goals_made: 10.622,
free_throws_made: 6.579,
three_points_att: 4.64,
three_points_made: 1.428,
defensive_rebounds: 10.862,
offensive_rebounds: 2.237
},
updated_at: 1623101400000
}

Fetch Game Logs

Fetch a list of GameLog object by its unique identifier.

Query Parameters

idsstringoptional

One or more ids to filter the response by; comma-separated values inside [] brackets.

entity_idstringoptional

Restricts the response to include GameLog objects with the given Entity id.

game_idstringoptional

Restricts the response to include GameLog objects with the given Game id.

includestringoptional

One or more optional fields related to the retrieved object, formatted as comma-separated strings within [] square brackets. Defaults to no inclusions.

For the GameLog object, you may request that entity, game, and team be included in the response.

updated_afternumberoptional

Restricts the response to include only entity objects whose updated_at timestamps are greater than the passed value.

startintegeroptional

The first Event entity to return. Defaults to 0.

limitintegeroptional

The number of records to return, an integer from 1 to 100. Defaults to 20.

Response

Returns the GameLog object for the given id. Returns an error if there is a problem retrieving the GameLog.

Request
$ curl https://api.jockmkt.net/v1/game_logs \
-H "Authorization: Bearer <access_token>" \
-d "entity_id=en_67c8368a3905f8beee69393ccec854e5" \
-d "start=1" \
-d "limit=2"
Response
{
status: "success",
start: 1,
limit: 2,
count: 43,
game_logs: [
{
id: "gl_60cde7f973f9e00674785e5e144a802b",
entity_id: "en_67c8368a3905f8beee69393ccec854e5",
game_id: "game_60cde69ee06e791b99ed71e6013fc4a7",
team_id: "team_b24eab7ad40329a6c2d98499001984d6",
scheduled_start: 1624582800000,
created_at: 1624107001233,
updated_at: 1624558204057,
projected_stats: {
blocks: 1.369,
points: 16.203,
steals: 0.725,
assists: 1.656,
rebounds: 13.239,
turnovers: 1.788,
field_goals_att: 11.532,
free_throws_att: 3.108,
field_goals_made: 6.895,
free_throws_made: 2.283,
three_points_att: 0.535,
three_points_made: 0.13,
defensive_rebounds: 9.032,
offensive_rebounds: 4.207
}
},
{
id: "gl_60cde7f94a68aae2e74fab1f0d26d526",
entity_id: "en_67c8368a3905f8beee69393ccec854e5",
game_id: "game_60cde69e487d52b6dc42900fbcafb60d",
team_id: "team_b24eab7ad40329a6c2d98499001984d6",
scheduled_start: 1624410000000,
created_at: 1624107001226,
updated_at: 1624421727959,
stats: {
blocks: 1,
points: 24,
steals: 1,
assists: 1,
minutes: "34:32",
rebounds: 14,
turnovers: 1,
field_goals_att: 15,
free_throws_att: 1,
field_goals_made: 12,
free_throws_made: 0,
three_points_att: 0,
three_points_made: 0,
defensive_rebounds: 11,
offensive_rebounds: 3
},
projected_stats: {
blocks: 1.33,
points: 17.604,
steals: 0.78,
assists: 2.109,
rebounds: 13.43,
turnovers: 1.941,
field_goals_att: 12.487,
free_throws_att: 3.384,
field_goals_made: 7.477,
free_throws_made: 2.516,
three_points_att: 0.55,
three_points_made: 0.134,
defensive_rebounds: 9.331,
offensive_rebounds: 4.099
}
}
]
}

Events

Users of the Jock MKT platform compete head-to-head against other players in events that are created and managed by Jock MKT. Events include a slate of entities who may compete in one or more real-world events, earning stats eligible for scoring. Events also include information on fixed, guaranteed payouts that Jock MKT will issue at the conclusion of the event.

The Jock MKT platform includes two event types. In market events, players create orders and receive payouts in USD, which can be withdrawn at any time. In contest events, players must first "buy-in" to the event, where they receive a fixed number of chips that are used to play the event. At the conclusion of contest events, players have their chip balance liquidated and prizes are paid-out in USD according to the published prize list for the contest.

Events lock to changes approximately sixty minutes prior to the opening of the event IPO. Until the event locks, events are subject to change at any time, including changing included entities, games, and payout and prize schedules.

Routes
get
/events/:event_id
get
/events/:event_id/payouts
get
/events/:event_id/games
get
/events/:event_id/tradeables
get
/events

The Event Object

Attributes

idstring

Unique identifier for the event.

objectstring

The name of the object, helpful for cases where you may receive multiple types of objects via the same endpoint. Always event for this object type.

namestring

The human-readable name for this event.

descriptionstring

The human-readable description for this event.

typestring

The type of event, either market or contest.

statusstring

This event's current status, one of scheduled, cancelled, halted, ipo, ipo_closed, live, live_closed, payouts_completed or prizes_paid. Contest events may have any status, while market events may have any status other than contest_paid (markets conclude with the payouts_completed status, while contests undergo an additional prize payout step and progress from payouts_completed to prizes_paid).

State transitions occur sequentially between scheduled, ipo, ipo_closed, live, live_closed, payouts_completed and prizes_paid (for contests). Events may become cancelled before their IPO closes. Events that have not yet become closed to live trading may be halted if required.

leaguestring

The league associated with this event.

currencystring

The currency identifier for the currency used for gameplay in the event. Always usd for market events. For contest events, a unique currency identifier for the contest chips in use for the event.

updated_atnumber

A timestamp representing the last time that any fields associated with this event changed.

scoring_methodstring

A unique identifier for the scoring method in use by the event.

ipo_open_atnumber

The time when the event will open for IPO orders.

live_at_estimatednumber

The time when the event is expected to be open to live trading. The IPO ends at an unpublished time a few minutes prior the live at time.

close_at_estimatednumber

The time when the event is expected to close to live trading. The event closes to live trading after games that are included in the event have progressed to a closed state and data collection completes (this means, for example, that a MLB game that has progressed to a suspended status, even though the game may continue play at a later date.)

starting_bidnumber

The minimum bid required for all orders in the event.

min_ticknumber

The minimum amount that an order's limit price must be over an existing price in order for it to be accepted as greater than an existing order at the lower price.

ipo_completed_atnumberoptional

The time that the IPO concluded and the event opened for live trading.

live_close_atnumberoptional

The time that the event closed for live trading.

payouts_completed_atnumberoptional

The time that all payouts were completed for the event.

contest.entry_currencystringoptional

The currency that is required to buy-in to the event. Present for contest events.

contest.entry_costnumberoptional

The amount of entry_currency that will be deducted from a user's account in order to join the contest. Present for contest events.

contest.initial_amountnumberoptional

The number of chips received for buying into the contest. Present for contest events.

contest.min_usersnumberoptional

The minimum number of users required for the event to take place. Present for contest events.

contest.max_usersnumberoptional

The maximum number of users that will be allowed to join the event. Present for contest events.

contest.usersnumberoptional

The number of users who have joined the contest. Present for contest events.

contest.prize_currencynumberoptional

The currency that will be awarded as prizes for the event. Present for contest events.

contest.prize_amountnumberoptional

The total prize pool available to win in the contest. Present for contest events.

contest.prize_strategystringoptional

The manner in which prizes are awarded to users who take part in the contest. Present for contest events.

When fixed, see fixed_prizes for prize levels. When chop_the_pot, prizes are allocated according to the percentage of total chip ownership at the conclusion of the event for each player.

contest.bots_exempt_from_prizesbooleanoptional

Whether or not Jock MKT market making bots are eligible to win prizes. Present for contest events.

contest.updated_atnumberoptional

The amount of entry_currency that will be deducted from a user's account in order to join the contest. Present for contest events.

contest.fixed_prizesnumber[]optional

The fixed prize schedule. Present for contest events with prize_strategy of fixed.

contest.contest_paid_atnumberoptional

The time that prize payouts were completed. Present for contest events.

The Event Object — Market / Scheduled
{
id: "evt_60dbec530d2197a973c5dddcf6f65e12",
object: "event",
name: "NBA Daily Market 4/9",
description: "Daily market for NBA trading",
type: "market",
status: "scheduled",
league: "nba",
currency: "usd",
scoring_method: "nba_v1",
ipo_open_at: 1623101400000,
live_at_estimated: 1623108600000,
close_at_estimated: 1623125700000,
starting_bid: 1,
min_tick: 0.01,
amount_completed: 1,
updated_at: 1623042010467
}
The Event Object — Contest / Prizes Paid
{
id: "evt_60baf6cd7702cd2291f303d971787271",
object: "event",
name: "$50 NBA Daily Contest 6/6",
description: "Free-to-play daily NBA contest",
type: "contest",
status: "prizes_paid",
league: "nba",
currency: "cur_60baf6cd7702cd2291f303d971787271",
updated_at: 1623020176965,
scoring_method: "nba_v1",
ipo_open_at: 1622995200000,
live_at_estimated: 1622998800000,
close_at_estimated: 1623015900000,
starting_bid: 1,
min_tick: 0.01,
ipo_completed_at: 1622998696309,
payouts_completed_at: 1623020159030,
live_close_at: 1623019154326,
amount_completed: 1,
contest: {
entry_cost: 0,
entry_currency: "usd",
initial_amount: 250,
min_users: 1,
max_users: 500,
users: 250,
prize_amount: 50,
prize_currency: "usd",
prize_strategy: "fixed",
bots_exempt_from_prizes: false,
contest_paid_at: 1623020176968,
fixed_prizes: [
15,
10,
5,
5,
5,
5,
5
],
updated_at: 1623020176965
}
}

The Tradeable Object

Attributes

idstring

Unique identifier for the tradeable.

objectstring

The name of the object, helpful for cases where you may receive multiple types of objects via the same endpoint. Always tradeable for this object type.

leaguestring

The league associated with the entity connected to this Tradeable.

entity_idstring

The unique identifier of the entity that is referenced by the tradeable. This entity represents the player who accrues stats during the lifecycle of the event.

event_idstring

The unique identifier of the event to which this tradeable will earn fantasy points for.

points.projectednumber

The number of points that Jock MKT projects the Tradeable to score during the event. This value is frozen when the event locks to updates approximately sixty minutes before IPO opens.

This projection is provided for display purposes only.

points.scorednumberoptional

The number of points that the Tradeable has scored during games included in the event to date based on data from our upstream data partners. This value is subject to change until the event that the Tradeable belongs to closes to live trading.

rank.projectednumber

The pre-rank associated with this Tradeable based on the number of fantasy points that Jock MKT projects the underlying entity to score in games included in the event compared to other Tradeables in the event. This value serves as the tiebreaker if two Tradeables score the same number of fantasy points during an event.

This value is frozen when the event locks to updates approximately sixty minutes before IPO opens.

rank.finalnumberoptional

The final rank for this Tradeable based on the number of points scored by the underlying Entity during the event, and the basis for the Tradeable's payout and final price.

price.iponumberoptional

The amount that the Tradeable was purchased at during the event's IPO.

price.highnumberoptional

The highest price that the Tradeable has traded for during the event.

price.lownumberoptional

The lowest price that the Tradeable has traded for during the event.

price.lastnumberoptional

The last price that users have paid for the Tradeable.

price.bidnumberoptional

The current highest bid price for the Tradeable from users in the event.

price.asknumberoptional

The current lowest ask price for the Tradeable from users in the event.

price.finalnumberoptional

The payout that is associated with the player at the conclusion of the event.

statsobjectoptional

The stats that the underlying entity has accumulated in one or more games.

updated_atnumber

A timestamp representing the last time that any fields associated with this object changed.

The Tradeable Object
{
id: "tdbl_60baf6cd7702cd22fcc6299cf30b55e3",
object: "tradeable",
league: "nba",
entity_id: "ent_fcc6299cf30b55e3c176491d2a7fc96c",
event_id: "evt_60baf6cd7702cd2291f303d971787271",
points: {
projected: 34.87,
scored: 44.5
},
rank: {
projected: 7,
final: 6
},
price: {
ipo: 10,
high: 13.42,
low: 9.80,
last: 10,
estimated: 12,
bid: 11.16,
ask: 13.1,
final: 12
},
stats: [
{
blocks: 1,
points: 17,
steals: 4,
assists: 10,
game_id: "game_60b8e6cda67055269f842767439d10d8",
minutes: "37:13",
rebounds: 4,
turnovers: 5,
field_goals_att: 7,
free_throws_att: 10,
field_goals_made: 7,
free_throws_made: 3,
three_points_att: 0,
three_points_made: 0,
defensive_rebounds: 4,
offensive_rebounds: 0
}
],
updated_at: 1623019169614
}

The Event Payout Object

Attributes

positionnumber

The one-indexed position that will receive the payout.

amountnumber

The amount that a share of a player in the given position will be paid out for.

The Event Payout Object
{
position: 1,
amount: 25
}

Fetch Event

Retrieve information about the specified event.

Query Parameters

includestringoptional

One or more optional fields related to the retrieved object, formatted as comma-separated strings within [] square brackets. Defaults to no inclusions.

For the Event object, you may request that games, payouts, tradeables, and tradeables.entity be included in the response.

Response

Returns the Event object for the event specified by the event_id. Returns an error if there is a problem retrieving the Event.

Request
$ curl https://api.jockmkt.net/v1/events/evt_60dbec530d2197a973c5dddcf6f65e12 \
-H "Authorization: Bearer <access_token>"
Response
{
status: "success",
event: {
id: "evt_60dbec530d2197a973c5dddcf6f65e12",
object: "event",
name: "NBA Daily Market 4/9",
description: "Daily market for NBA trading",
type: "market",
status: "scheduled",
league: "nba",
currency: "usd",
scoring_method: "nba_v1",
ipo_open_at: 1623101400000,
live_at_estimated: 1623108600000,
close_at_estimated: 1623125700000,
starting_bid: 1,
min_tick: 0.01,
amount_completed: 1,
updated_at: 1623042010467
}
}

Fetch Event Payouts

Retrieve the list of payouts to be made at the conclusion of an event.

Query Parameters

This route does not support any query parameters.

Response

Returns a list of event payouts for the event specified by the event_id. Returns an error if there is a problem retrieving the payouts.

Request
$ curl https://api.jockmkt.net/v1/events/evt_60dbec530d2197a973c5dddcf6f65e12/payouts \
-H "Authorization: Bearer <access_token>"
Response
{
status: "success",
count: 3,
payouts: [
{
position: 1,
amount: 25
},
{
position: 2,
amount: 15
},
{
position: 3,
amount: 1
}
]
}

Fetch Event Games

Retrieve a list of Game objects. This query always returns Game objects in ascending order by scheduled start time.

Query Parameters

This route does not support any query parameters.

Response

Returns a list of Game objects. Returns an error if there is a problem retrieving the Game entities.

Request
$ curl https://api.jockmkt.net/v1/events/evt_60dbec530d2197a973c5dddcf6f65e12/games \
-H "Authorization: Bearer <access_token>"
Response
{
status: "success",
count: 3,
games: [
{
id: "game_60bb686586eaf95a5e8dafa3823d89cb",
object: "game",
name: "Atlanta Hawks at Philadelphia 76ers",
league: "nba",
scheduled_start: 1623195000000,
status: "in_progress",
home: {
team_id: "team_de200b98559735706b2e4cc581bf65ef",
points: 77
},
away: {
team_id: "team_4d7379c8d756e5a15190c56b550778a8",
points: 70
},
state: {
clock: "4:59",
quarter: 3
},
sportradar_id: "9511cce9-968e-49db-a390-bc8c34723310",
updated_at: 1623201948475
},
...
]
}

Fetch Event Tradeables

Retrieve the list of Tradeables that will accrue points and receive payouts for the event.

Query Parameters

This route does not support any query parameters.

Response

Returns a list of Tradeable objects for the event specified by the event_id. Returns an error if there is a problem retrieving the list of Tradeables.

Request
$ curl https://api.jockmkt.net/v1/events/evt_60dbec530d2197a973c5dddcf6f65e12/tradeables \
-H "Authorization: Bearer <access_token>"
Response
{
status: "success",
count: 48,
tradeables: [
{
id: "tdbl_60baf6cd7702cd22fcc6299cf30b55e3",
object: "tradeable",
league: "nba",
entity_id: "ent_fcc6299cf30b55e3c176491d2a7fc96c",
event_id: "evt_60dbec530d2197a973c5dddcf6f65e12",
points: {
projected: 34.87,
scored: 44.5
},
rank: {
projected: 7,
final: 6
},
price: {
ipo: 10,
high: 13.42,
low: 9.80,
last: 10,
estimated: 12,
bid: 11.16,
ask: 13.1,
final: 12
},
stats: [
{
blocks: 1,
points: 17,
steals: 4,
assists: 10,
game_id: "game_60b8e6cda67055269f842767439d10d8",
minutes: "37:13",
rebounds: 4,
turnovers: 5,
field_goals_att: 7,
free_throws_att: 10,
field_goals_made: 7,
free_throws_made: 3,
three_points_att: 0,
three_points_made: 0,
defensive_rebounds: 4,
offensive_rebounds: 0
}
],
updated_at: 1623019169614
},
...
]
}

Fetch Events

Retrieve a list of Event objects. This query always returns Event objects in descending order of the event's published live market open time.

Query Parameters

idsstringoptional

One or more ids to filter the response by; comma-separated values inside [] brackets.

leaguestringoptional

The league to retrieve events for. If you do not include a league, the query will return events for all leagues.

startintegeroptional

The first Event entity to return. Defaults to 0.

limitintegeroptional

The number of records to return, an integer from 1 to 100. Defaults to 20.

Response

Returns a list of Event objects, filtered and sorted according to any passed query parameters. Returns an error if there is a problem retrieving the Event entities.

Request
$ curl https://api.jockmkt.net/v1/events \
-H "Authorization: Bearer <access_token>" \
-d "league=nba" \
-d "start=14" \
-d "limit=1"
Response
{
status: "success",
start: 14,
limit: 1,
count: 504,
teams: [
{
id: "evt_60dbec530d2197a973c5dddcf6f65e12",
object: "event",
name: "NBA Daily Market 4/9",
description: "Daily market for NBA trading",
type: "market",
status: "scheduled",
league: "nba",
currency: "usd",
scoring_method: "nba_v1",
ipo_open_at: 1623101400000,
live_at_estimated: 1623108600000,
close_at_estimated: 1623125700000,
starting_bid: 1,
min_tick: 0.01,
amount_completed: 1,
updated_at: 1623042010467
}
]
}

Entries

An Entry describes metadata about an account's involvement in a particular Event.

You must join an event by using the Create Entry endpoint prior to being able to place an order for an event's Tradeables. Creating an Entry may cause an account debit if the event being joined is a paid-entry contest. Joining a contest event and paying the associated join fee cannot be undone.

Reported leaderboard data is updated periodically during events and may not reflect real-time pricing and statistical data.

At the conclusion of an event's live trading, Jock MKT liquidates outstanding positions and awards the associated payout. Once an event progresses to payouts_completed status, payout information becomes available for a given entry.

Routes
post
/entries
get
/entries/:entry_id
get
/entries

The Entry Object

Attributes

idstring

Unique identifier for the entry with prefix ent_.

objectstring

The name of the object, helpful for cases where you may receive multiple types of objects via the same endpoint. Always entry for this object type.

event_idstring

The unique identifier for the event that was joined with this entry.

leaderboard.amountnumberoptional

The latest leaderboard value for all positions that have been entered into for the given event. For market events, the leaderboard amount is the overall plus/minus, including projected values for active positions, for all positions that a user has ever held, including positions that a user has exited. For contest events, the leaderboard amount is the estimated contest chip balance, including projected values for active positions.

leaderboard.positionnumberoptional

The current ranking of the leaderboard amount value compared to all other users in the event.

leaderboard.is_tiednumberoptional

Whether or not the leaderboard position is tied. If tied, all tied users are reported at the lowest tied position.

favoritesstring[]optional

One or more Tradeable ids that have been favorited.

updated_atnumber

A timestamp representing the last time that any fields associated with this object may have changed.

The Entry Object
{
id: "ent_xxcmfcy7as6brxzzp0h31gf4n3yjfvja",
object: "entry",
event_id: "evt_6088dddc7ba8dc77202465794379c4fc",
leaderboard: {
position: 66,
is_tied: false,
amount: 284.6884
},
updated_at: 1619847684011
}

Create Entry

Body Parameters

event_idstring

The unique identifier of the Event being joined. An event must be in an eligible status to be joined (scheduled and ipo for both market and contest events, and ipo_closed and live for market events).

Joining a contest event will cause the authenticated account to have its usd balance debited for the amount indicated for the given event's contest entry_cost.

Response

Returns a newly created Entry object if the request succeeds. Returns an error if there is a problem creating the Order.

Request
$ curl -X POST https://api.jockmkt.net/v1/entries \
-H "Authorization: Bearer <access_token>" \
-d event_id=evt_60d00ec7fa5095e235f6183a7fbda141
Response
{
status: "success",
entry: {
id: "ent_jdmk8k78as822gwsqg7zp0yavs8uapbj",
object: "entry",
event_id: "evt_60d00ec7fa5095e235f6183a7fbda141",
updated_at: 1624249724797
}
}

Fetch Entry

Fetch a single Entry object by its unique identifier. You may request an Entry by either its id or its associated event id.

Query Parameters

includestringoptional

One or more optional fields related to the retrieved object, formatted as comma-separated strings within [] square brackets. Defaults to no inclusions.

For the Entry object, you may request that event, payouts, and payouts.tradeable be included in the response.

Response

Returns the Entry object for the given id.

Returns an error if there is a problem retrieving the Entry.

Request
$ curl https://api.jockmkt.net/v1/entries/evt_60cebd539f0ae1374d36308ae7207b8d \
-H "Authorization: Bearer <access_token>"
Response
{
status: "success",
entry: {
id: "ent_ovel4wg02y6oosmguk7l1u54tdrr75iu",
object: "entry",
event_id: "evt_60cebd539f0ae1374d36308ae7207b8d",
leaderboard: {
position: 205,
is_tied: false,
amount: 158.4614
},
updated_at: 1624298880870
}
}

Fetch Entries

Retrieve a list of Entry objects. This query returns Entry objects in descending order by event status and join time.

Query Parameters

idsstringoptional

One or more ids to filter the response by; comma-separated values inside [] brackets.

includestringoptional

One or more optional fields related to the retrieved object, formatted as comma-separated strings within [] square brackets. Defaults to no inclusions.

For the Entry object, you may request that event, payouts, and payouts.tradeable be included in the response.

startintegeroptional

The first Event entity to return. Defaults to 0.

limitintegeroptional

The number of records to return, an integer from 1 to 100. Defaults to 20.

Response

Retrieve a list of Entry objects sorted in descending order.

Request
$ curl https://api.jockmkt.net/v1/entries \
-H "Authorization: Bearer <access_token>" \
-d "include=[payouts]"
Response
{
status: "success",
start: 0,
limit: 20,
count: 4,
entries: [
{
id: "ent_d1gxcbspq2mwordwx31pyesvqo4tgia8",
object: "entry",
event_id: "evt_60c8112e447658e91f53cc3d2645f71a",
favorites: [
"tdbl_60c8112e447658e992a366f55dc75d93"
],
updated_at: 1623814961163
},
{
id: "ent_b008y9xt0cz29dyu8j5z2iu7u9sy4p82",
object: "entry",
event_id: "evt_60a511fcaaaf89935dcff4e954661a20",
updated_at: 1621478855191
},
{
id: "ent_6gd034maghzhjd7jkrpl8569j2irg6c6",
object: "entry",
event_id: "evt_6092185abff11d0f82d94c99733751ae",
updated_at: 1620450794410
},
{
id: "ent_xxcmfcy7as6brxzzp0h31gf4n3yjfvja",
object: "entry",
event_id: "evt_6088dddc7ba8dc77202465794379c4fc",
leaderboard: {
position: 66,
is_tied: false,
amount: 284.6884
},
updated_at: 1619847684011,
payouts: [
{
tradeable_id: "tdbl_6088dddc7ba8dc77da4bddbbc347c31f",
quantity: 2,
price: 25,
cost_basis: 15.16,
cost_basis_all_time: 15.16,
proceeds_all_time: 50
}
]
}
]
}

Orders

An order represents a request to purchase or sell a given number of shares in a particular Tradeable at a particular price. Creating orders will immediately affect the buying_power of the currency that a particular event is based on (usd for market events and a specific contest currency for contest events) to ensure that a user's balance is sufficient should the order be filled by our matching algorithm.

The order lifecycle begins with the acknowledgment of the order being accepted by Jock MKT, indicated by the created status applied to new orders.

Once an order has been seen by the allocation and match services, it will update with an accepted status should it remain open after an initial allocation or match run. The order will remain accepted until the order moves to a final status.

During the IPO event phase, orders projected to receive allocations remain accepted with a non-zero projected_quantity. If the order is outbid, its status moves to outbid and will receive no additional updates. Winning IPO orders become filled should they receive allocations at the conclusion of the IPO process.

During the live bidding phase, orders that are accepted may be filled or partly filled at any time due to order activity of other users. If an order receives its requested allocation, the order becomes final with a filled status. If you request to cancel an order and its cancellation is processed before the order receives its requested quantity, the order becomes final with a cancelled status.

Orders that remain open as an event closes are expired by the system.

Routes
post
/orders
get
/orders/:order_id
delete
/orders/:order_id
get
/orders

The Order Object

Attributes

idstring

Unique identifier for the order.

objectstring

The name of the object, helpful for cases where you may receive multiple types of objects via the same endpoint. Always order for this object type.

tradeable_idstring

The identifier for the Tradeable that the order is being made for.

event_idstring

The identifier of the event in which the Tradeable is taking part.

entity_idstring

The identifier of the underlying Entity that earns stats in one or more games during the event.

statusstring

The current status of the order. One of created, accepted, filled, outbid, cancelled, outbid, or expired.

sidestring

The side of the order. One of buy or sell.

typestring

The type of order. Always limit.

phasestring

The event phase during which the order is eligible to be executed. One of ipo or live.

quantitynumber

The number of shares that are being requested to be purchased or sold. Must be a positive integer.

created_atnumber

The time at which Jock MKT created and confirmed the order as ellgible for processing.

filled_quantitynumberoptional

The number of shares that have been filled on an order to date.

projected_quantitynumberoptional

The number of shares that this order is projected to receive if the IPO were to happen immediately. Present for orders with a phase of ipo that remain in an accepted status.

limit_pricenumber

The price set by the user as their maximum (for buy orders) or minimum (for sell orders) in order for the order to be executed.

cost_basisnumberoptional

The amount of event currency that has been spent to purchase shares in the order. Present for buy orders.

proceedsnumberoptional

The amount of event currency that has been received for selling shares in the order. Present for sell orders.

fee_paidnumberoptional

The amount of event currency that has been spent on fees for this order.

accepted_atnumberoptional

The time at which the order exchange received a newly created order and performed an initial match.

filled_atnumberoptional

The time at which the order was filled on all requested shares. Valid only for orders with status filled.

outbid_atnumberoptional

The time at which the order became fully outbid. Valid only for orders with phase ipo.

expired_atnumberoptional

The time at which the order ended eligibility to be filled during live trading.

Orders that remain open through the conclusion of an event are automatically expired.

cancellation_requested_atnumberoptional

The time at which a user requested the order be cancelled.

cancelled_atnumberoptional

The time at which the Jock MKT platform confirmed an order that was requested to be cancelled was actually cancelled and closed. Valid only for orders with phase live and status cancelled.

updated_atnumber

A timestamp representing the last time that any fields associated with this game changed.

The Order Object — Live Limit Buy
{
id: "ord_601b5ad6538ec34875ee1687c4a657f8",
tradeable_id: "tdbl_60178af63330f2627a763361bd2f9a08",
entity_id: "ent_7a763361bd2f9a08d45221e45221558b",
event_id: "evt_60178af63330f262d40d2650671bdac5",
status: "filled",
side: "buy",
type: "limit",
phase: "live",
time_in_force: "gtc",
quantity: 10,
limit_price: 8,
cost_basis: 74,
fee_paid: 1.48,
filled_quantity: 10,
created_at: 1612405462467,
updated_at: 1614303565270,
accepted_at: 1612405463464,
filled_at: 1612405463464
}

Create Order

Body Parameters

tradeable_idstring

The unique identifier of the Tradeable being bought or sold.

sidestring

Whether the order is to purchase or sell shares, either buy or sell.

typestring

The type of order being created, always limit.

phasestring

The event phase during which the order may be filled, either ipo or live. Orders must be created during the event phase indicated; orders for the live market cannot be submitted during the event's IPO.

quantitynumber

The number of shares to buy or sell, depending on the order's side. Must be a positive integer.

limit_pricenumber

The minimum or maximum price at which shares may be filled for the order. Buy orders are filled at or under the limit price. Sell orders are filled at or below the limit price.

Limit prices are limited to two decimal points.

Response

Returns a newly created Order object if the request succeeds. Returns an error if there is a problem creating the Order.

Orders that are created do not yet contain information regarding whether the order has been matched with other orders or if any fills have been made. Perform a subsequent request for the order or use a suitable streaming endpoint to receive updates throughout the order's lifecycle.

Request
$ curl -X POST https://api.jockmkt.net/v1/orders \
-H "Authorization: Bearer <access_token>" \
-d tradeable_id=tdbl_60178af63330f2627a763361bd2f9a08 \
-d side=buy \
-d type=limit \
-d phase=ipo \
-d quantity=12 \
-d limit_price=13.44
Response
{
status: "success",
order: {
id: "ord_601b5ad6538ec34875ee1687c4a657f8",
tradeable_id: "tdbl_60178af63330f2627a763361bd2f9a08",
entity_id: "ent_7a763361bd2f9a08d45221e45221558b",
event_id: "evt_60178af63330f262d40d2650671bdac5",
status: "created",
side: "buy",
type: "limit",
phase: "ipo",
quantity: 12,
limit_price: 13.44,
created_at: 1612405462467,
updated_at: 1612405462467
}
}

Cancel Order

Body Parameters

This request does not support any body parameters.

Response

Returns the Order object that is now pending cancellation confirmation. Returns an error if there is a problem handling the cancellation request (for example, if the order is no longer in a cancellable state).

Cancellations are supported only for orders with phase live with status accepted. IPO orders may not be cancelled once created.

Request
$ curl -X DELETE https://api.jockmkt.net/v1/orders/ord_601b5ad6538ec34875ee1687c4a657f8 \
-H "Authorization: Bearer <access_token>"
Response
{
status: "success",
order: {
id: "ord_601b5ad6538ec34875ee1687c4a657f8",
tradeable_id: "tdbl_60178af63330f2627a763361bd2f9a08",
entity_id: "ent_7a763361bd2f9a08d45221e45221558b",
event_id: "evt_60178af63330f262d40d2650671bdac5",
status: "accepted",
side: "buy",
type: "limit",
phase: "live",
quantity: 20,
limit_price: 6,
cost_basis: 50,
fee_paid: 1.0,
filled_quantity: 10,
created_at: 1612405462467,
updated_at: 1612405483464,
accepted_at: 1612405463464,
cancellation_requested_at: 1612405483464
}
}

Fetch Order

Fetch a single Order object by its unique identifier.

Query Parameters

This request does not support any query parameters.

Response

Returns the Order object for the given id. Returns an error if there is a problem retrieving the Order.

Request
$ curl https://api.jockmkt.net/v1/orders/ord_601b5ad6538ec34875ee1687c4a657f8 \
-H "Authorization: Bearer <access_token>"
Response
{
status: "success",
order: {
id: "ord_601b5ad6538ec34875ee1687c4a657f8",
tradeable_id: "tdbl_60178af63330f2627a763361bd2f9a08",
entity_id: "ent_7a763361bd2f9a08d45221e45221558b",
event_id: "evt_60178af63330f262d40d2650671bdac5",
status: "filled",
side: "buy",
type: "limit",
phase: "live",
time_in_force: "gtc",
quantity: 10,
limit_price: 8,
cost_basis: 74,
fee_paid: 1.48,
filled_quantity: 10,
created_at: 1612405462467,
updated_at: 1614303565270,
accepted_at: 1612405463464,
filled_at: 1612405463464
}
}

Fetch Orders

Retrieve a list of Order objects for the authenticated account. This query always returns Order objects in descending order by their created at timestamp.

Query Parameters

idsstringoptional

One or more ids to filter the response by; comma-separated values inside [] brackets.

event_idstringoptional

An optional event to restrict orders to.

activebooleanoptional

When true, returns only objects that may receive additional fills (e.g. orders whose status is either created or accepted).

updated_afternumberoptional

Restricts the response to include only orders whose updated_at timestamps are greater than the passed value.

startintegeroptional

The first Order object to return. Defaults to 0.

limitintegeroptional

The number of objects to return, an integer from 1 to 100. Defaults to 20.

Response

Returns a list of Order objects, filtered and sorted according to any passed query parameters. Returns an error if there is a problem retrieving the Order objects.

Request
$ curl https://api.jockmkt.net/v1/orders \
-H "Authorization: Bearer <access_token>" \
-d "event_id=evt_60178af63330f262d40d2650671bdac5" \
-d "limit=1"
Response
{
status: "success",
start: 0,
limit: 20
count: 1,
orders: [
{
id: "ord_601b5ad6538ec34875ee1687c4a657f8",
tradeable_id: "tdbl_60178af63330f2627a763361bd2f9a08",
entity_id: "ent_7a763361bd2f9a08d45221e45221558b",
event_id: "evt_60178af63330f262d40d2650671bdac5",
status: "filled",
side: "buy",
type: "limit",
phase: "live",
time_in_force: "gtc",
quantity: 10,
limit_price: 8,
cost_basis: 74,
fee_paid: 1.48,
filled_quantity: 10,
created_at: 1612405462467,
updated_at: 1614303565270,
accepted_at: 1612405463464,
filled_at: 1612405463464
}
]
}

Positions

The Position object represents your account's position in a particular Tradeable.

Routes
get
/positions

The Position Object

Attributes

tradeable_idstring

Unique identifier for the position and the corresponding id of the Tradeable object that the position is in.

objectstring

The name of the object, helpful for cases where you may receive multiple types of objects via the same endpoint. Always position for this object type.

event_idstring

The id of the Event that the underlying Tradeable is taking part in.

bought_countinteger

The total number of shares that have ever been purchased for this Tradeable, either during IPO or live trading.

sold_countinteger

The total number of shares that have ever been sold for this Tradeable during live trading. This count does not include shares that were offered for sale but were not sold.

quantityinteger

The total quantity of shares currently owned.

buy_interestinteger

The total number of shares that are being bid on via open buy orders.

sell_interestinteger

The total number of shares that are being offered via open sell orders.

cost_basisnumber

The total amount spent to acquire shares of this Tradeable that are actively owned. The currency used to acquire the shares can be found by examining the corresponding event's currency field. This amount does not include any fees paid to acquire the shares.

cost_basis_all_timenumber

The total amount spent to acquire shares of this Tradeable irrespective of whether or not the shares are currently owned. The currency used to acquire the shares can be found by examining the corresponding event's currency field. This amount does not include any fees paid to acquire the shares.

proceeds_all_timenumber

The total proceeds gained when selling shares of this Tradeable irrespective of whether or not the shares were ever repurchased. The currency collected for the sale of the shares can be found by examining the corresponding event's currency field. This amount does not include any fees paid to sell the shares.

updated_atnumber

A timestamp representing the last time that any fields associated with this object may have changed.

The Position Object
{
tradeable_id: "tdbl_60178af63330f2627a763361bd2f9a08",
object: "position",
event_id: "evt_60178af63330f262d40d2650671bdac5",
bought_count: 19,
sold_count: 4,
quantity: 15,
buy_interest: 0,
sell_interest: 7,
cost_basis: 76.44,
cost_basis_all_time: 102.8,
proceeds_all_time: 60,
updated_at: 1614303565270
}

Fetch Positions

Retrieve active positions for the authenticated user.

Query Parameters

updated_afternumberoptional

Restricts the response to include only position objects whose updated_at timestamps are greater than the passed value.

Response

Returns the active list of Position objects for the authenticated user in the positions field of the response body if the request succeeds. Returns an error if there is a problem retrieving the list of Position objects.

Request
$ curl https://api.jockmkt.net/v1/positions \
-H "Authorization: Bearer <access_token>"
Response
{
status: "success",
count: 1,
positions: [
{
tradeable_id: "tdbl_60178af63330f2627a763361bd2f9a08",
object: "position",
event_id: "evt_60178af63330f262d40d2650671bdac5",
estimated_price: 14.89,
bought_count: 19,
sold_count: 4,
available: 15,
selling_power: 8,
cost_basis: 76.44,
cost_basis_all_time: 102.8,
proceeds_all_time: 60,
updated_at: 1614303565270
}
]
}

Account Activity

Account activity consists of multiple types of user actions that may cause a change in one or more user balances.

The account activity endpoint provides a means of retrieving recent account history, including all contest joins, orders, payouts, and contest prizes that have occured for the authenticated user.

Routes
get
/account/activity

Contest Join Object

Attributes

idstring

Unique identifier for the account activity with prefix aact_.

objectstring

The type of account activity. Always account_activity:contest_join for this activity type.

event_idstring

The unique identifier for the contest event that was joined.

debit.currencystring

The currency that was used to enter the contest event. Always usd.

debit.amountstring

The amount of currency that was spent to join the contest event.

credit.currencystring

The contest currency grant that was made upon event entry.

credit.amountstring

The amount of contest currency granted to the user for the event entry.

created_atnumber

A timestamp representing the time that the event was joined.

The Account Activity — Contest Join Object
{
id: "aact_rx14ungx9heyrnykn6vxauou9eh81r5a",
object: "account_activity:contest_join",
event_id: "evt_60d2b1d329bc7a7eb2132c9792c89a61",
debit: {
currency: "usd",
amount: 0
},
credit: {
currency: "cur_60d2b1d329bc7a7eb2132c9792c89a61",
amount: 250
},
created_at: 1624580270386
}

Order Object

Attributes

idstring

Unique identifier for the account activity with prefix aact_.

objectstring

The type of account activity. Always account_activity:order for this activity type.

order_idstring

The identifier of the order that was created.

created_atnumber

A timestamp representing the time that the order was created.

The Account Activity — Order Object
{
id: "aact_60d52bdb7a764cfe73aa326b0d67f768",
object: "account_activity:order",
order_id: "ord_601b5ad6538ec34875ee1687c4a657f8",
created_at: 1624583130174
}

Payout Object

Attributes

idstring

Unique identifier for the account activity with prefix aact_.

objectstring

The type of account activity. Always account_activity:payout for this activity type.

payoutsobject[]

The list of Payout objects that were made.

created_atnumber

A timestamp representing the time that the payouts were made and positions were liquidated.

The Account Activity — Payout Object
{
id: "aact_60d52bdb7a764cfe73aa326b0d67f763",
object: "account_activity:payout",
payouts: [],
created_at: 1624583130174
}

Contest Prize Object

Attributes

idstring

Unique identifier for the account activity with prefix aact_.

objectstring

The type of account activity. Always account_activity:contest_prize for this activity type.

event_idstring

The unique identifier for the contest event that was joined.

credit.currencystring

The currency type that was used to grant the contest prize.

credit.amountstring

The amount of the contest prize made in the given currency.

created_atnumber

A timestamp representing the time that the contest prize was awarded.

The Account Activity — Contest Prize Object
{
id: "aact_60d52bdb7a764cfe73aa326b0d67f763",
object: "account_activity:contest_prize",
event_id: "evt_60d2b1d329bc7a7eb2132c9792c89a61",
credit: {
currency: 'usd',
amount: 20
},
created_at: 1624583130174
}

Bonus Object

Attributes

idstring

Unique identifier for the account activity with prefix aact_.

objectstring

The type of account activity. Always account_activity:bonus for this activity type.

credit.currencystring

The currency that the bonus was given in.

credit.amountstring

The amount of the bonus that was credited in the indicated currency.

created_atnumber

A timestamp representing the time that the bonus was granted.

The Account Activity — Bonus Object
{
id: "aact_60d52bdb7a764cfe73aa326b0d67f763",
object: "account_activity:bonus",
credit: {
currency: "usd",
amount: 10
},
bonus: {
code: "RICKRUNGOOD10",
description: "Referral Bonus"
},
created_at: 1624583130174
}

Deposit Object

Attributes

idstring

Unique identifier for the account activity with prefix aact_.

objectstring

The type of account activity. Always account_activity:deposit for this activity type.

statusstring

The status of the deposit attempt. One of created, in_progress, completed, failed or reversed.

credit.currencystring

The currency being deposited. Always usd.

credit.amountstringoptional

The amount of the deposit attempt, if the attempt progresses to an amount being selected.

created_atnumber

A timestamp representing the time that the deposit attempt began.

The Account Activity — Deposit Object
{
id: "aact_60d52bdb7a764cfe73aa326b0d67f768",
object: "account_activity:deposit",
status: "completed",
credit: {
currency: "usd",
amount: 100
},
created_at: 1624583130174
}

Withdrawal Object

Attributes

idstring

Unique identifier for the account activity with prefix aact_.

objectstring

The type of account activity. Always account_activity:withdrawal for this activity type.

statusstring

The status of the deposit attempt. One of created, in_progress, completed, failed or reversed.

debit.currencystring

The currency being withdrawl. Always usd.

debit.amountstring

The amount of the withdrawal attempt.

created_atnumber

A timestamp representing the time that the withdrawal attempt began.

The Account Activity — Withdrawal Object
{
id: "aact_60d52bdb7a764cfe73aa326b0d67f769",
object: "account_activity:withdrawal",
status: "completed",
debit: {
currency: "usd",
amount: 80
},
created_at: 1624583130174
}

Fetch Account Activity

Retrieve a list of Order objects for the authenticated account. This query always returns Order objects in descending order by their created at timestamp.

Query Parameters

startintegeroptional

The first account activity object to return. Defaults to 0.

limitintegeroptional

The number of records to return, an integer from 1 to 100. Defaults to 20.

Response

Returns a list of account activity objects in descending order of the activity's created_at timestamp. Returns an error if there is a problem retrieving the account activity objects.

Request
$ curl https://api.jockmkt.net/v1/account/activity \
-H "Authorization: Bearer <access_token>"
Response
{
status: "success",
count: 3,
activity: [
{
id: "aact_60d52bdb7a764cfe73aa326b0d67f768",
object: "account_activity:deposit",
status: "created",
credit: {
currency: "usd",
amount: 400
},
created_at: 1624583130174
},
{
id: "aact_60d52139eeda3af55dc06d59628f5c80",
object: "account_activity:order",
order_id: "ord_60d521394ef0e52151c3c4ec68ac65f7",
created_at: 1624580408867
},
{
id: "aact_rx14ungx9heyrnykn6vxauou9eh81r5a",
object: "account_activity:contest_join",
event_id: "evt_60d2b1d329bc7a7eb2132c9792c89a61",
debit: {
currency: "usd",
amount: 0
},
credit: {
currency: "cur_60d2b1d329bc7a7eb2132c9792c89a61",
amount: 250
},
created_at: 1624580270386
}
]
}