Markets
Market and order management endpoints.
Base URL: https://proxy.bettoredge.com
Get All Markets
GET markets/v1/markets/all
Get all markets with optional status filter
Authentication: Required - Include Bearer token in Authorization header
Authorization: Bearer <token>
Query Parameters
- status (optional) (
string | undefined)- Optional status filter ('active' | 'inactive')
Response
Status: 200 OK
Body: GetAllMarketsResponse
Example Response
{
"message": "example",
"markets": [
{
"market_id": "example",
"event_type": "tournament",
"level": "team",
"description": "example",
"type": "Spread",
"trade_side": "example",
"length": "half",
"stat": "example",
"status": "active",
"external_mapping": {
"external_source": "sportradar",
"external_type": "example",
"external_id": "example",
"league_id": "example",
"live": true,
"pre_event": true,
"active": true
},
"side_options": [
{
"side": "example",
"label": "example",
"id_source": "team",
"parseable_title": "example"
}
],
"length_variable": 100,
"max_order": 100,
"lock_probability": true,
"market_group": "main",
"stat_label": "example",
"description_override": true,
"suggested": true,
"resolver_timing": "example",
"supported_positions": "example",
"var_1_required": true,
"show_side_option": true,
"resolver": "example",
"create_datetime": null,
"last_update_datetime": null
}
]
}
Response Properties
- message (
string) - markets (
MarketProps[])- market_id (
string) - Unique market identifier - event_type (
"tournament" | "team" | "match") - Type of event this market applies to - level (
"team" | "event" | "exotic" | "athlete" | "h2h") - Market level/scope - description (
string) - Human-readable market description - type (
"Spread" | "Winner" | "Total" | "Stat") - Market type category - trade_side (
string) - Trading side configuration - length (
"half" | "inning" | "full_game") - Game length this market covers - stat (
string) - Statistic being tracked (points, rebounds, yards, etc.) - status (
"active" | "inactive") - Whether market is actively trading - external_mapping (optional) (
ExternalMarketMapProps[] | undefined) - Optional external market mappings for odds providers- external_source (
"sportradar" | "bet_scope") - External provider name - external_type (
string) - External market type identifier - external_id (
string) - External market ID - league_id (
string) - League ID for this mapping - live (
boolean) - Whether this mapping applies to live markets - pre_event (
boolean) - Whether this mapping applies to pre-event markets - active (
boolean) - Whether this mapping is active
- external_source (
- side_options (
MarketSideOptionProps[]) - Available sides/options for this market- side (
string) - Side identifier (over/under, home/away, yes/no, etc.) - label (
string) - Display label for this side - id_source (
"team" | "exotic" | "athlete" | "side") - Source of the ID for this side - parseable_title (
string) - Parseable title template for generating market names
- side (
- length_variable (optional) (
number | undefined) - Optional variable value for configurable markets - max_order (optional) (
number | undefined) - Maximum order size allowed - lock_probability (optional) (
boolean | undefined) - Whether probability display should be locked - market_group (
"main" | "team_stat" | "player_stat" | "team_total" | "player_total" | "other") - Market grouping category for UI organization - stat_label (optional) (
string | undefined) - Optional custom label for the stat - description_override (optional) (
boolean | undefined) - Whether to use custom description instead of generated - suggested (optional) (
boolean | undefined) - Whether this is a suggested/featured market - resolver_timing (optional) (
string | undefined) - When the market resolver runs (live, post-game, etc.) - supported_positions (optional) (
string[] | undefined) - Optional supported player positions for this market - var_1_required (optional) (
boolean | undefined) - Whether variable selection is required - show_side_option (optional) (
boolean | undefined) - Whether to show side option selector - resolver (optional) (
string | undefined) - Market resolver identifier - create_datetime (
any) - Timestamp when market was created - last_update_datetime (
any) - Timestamp of last update
- market_id (
Error Responses
- Error if the request fails
Get Available Markets
GET markets/v1/markets/available
Get available markets with optional league filter
Authentication: Required - Include Bearer token in Authorization header
Authorization: Bearer <token>
Query Parameters
- league_ids (optional) (
string | undefined)- Optional comma-separated league IDs to filter by
Response
Status: 200 OK
Body: GetAvailableMarketsResponse
Example Response
{
"message": "example",
"available_markets": [
{
"league_id": "example",
"contests": {
"contest_type": "example",
"contest_id": "example",
"contest_title": "example",
"contest_hash": "example",
"scheduled_datetime": "example",
"teams": "123abc",
"team_id": "example",
"image_url": "example",
"name": "example"
}
}
]
}
Response Properties
- message (
string) - available_markets (
MarketLiquidityProps[])- league_id (
string) - League ID - contests (
{ contest_type: string; contest_id: string; contest_title: string; contest_hash: string; scheduled_datetime: string; teams: { side?: string | undefined; team_id: string; image_url?: string | undefined; name: string; }[]; markets: { market_id: string; market_description: string; variable_required: boolean; variable_options: number[]; level: "team" | "athlete" | "contest"; side_type: "team" | "exotic" | "athlete" | "side"; is_spread_market: boolean; multiple_participants: boolean; liquidity: number; volume: number; active: boolean; market_hash: string; side_type_options: { athletes: { athlete_id: string; name: string; position: string; image: string; }[]; teams: { team_id: string; name: string; image: string; }[]; }; sides: { side: string; side_type: "team" | "athlete" | "side"; market_side_hash: string; liquidities: { order_context_hash: string; variable: number; title: string; side_type: string; side_id: string; price: number; available: number; }[]; }[]; }[]; }[]) - Array of contests with their markets and liquidity
- league_id (
Error Responses
- Error if the request fails
Place Order
POST markets/v1/orders/order/place
Place an order
Authentication: Required - Include Bearer token in Authorization header
Authorization: Bearer <token>
Request Body
Type: PlaceOrderRequest
Example Request
{
"order_context_hash": "example",
"price": 100,
"amount": 100,
"market_type": "FOR_MONEY",
"expire_time": null
}
Request Properties
- order_context_hash (
string) - price (
number) - amount (
number) - market_type (
"FOR_MONEY") - expire_time (optional) (
any)
Response
Status: 200 OK
Body: OrderContextProps
Example Response
{
"placement_status": "success",
"message": "example",
"error": "example",
"order_context": {
"order_ids": [],
"position_ids": [],
"title": "example",
"price": 100,
"amount": 100,
"order_context_hash": "example",
"status": "approved"
}
}
Response Properties
- placement_status (
"success" | "failed") - Status of the order action - message (
string) - error (optional) (
string | undefined) - If failed to place, error message to explain the issue - order_context (optional) (
{ order_ids: string[]; position_ids: string[]; title: string; price: number; amount: number; order_context_hash: string; status: "approved" | "cancelled" | "closed"; } | undefined) - Order Details
Error Responses
- Error if the request fails or user is not authenticated
Sell Order
POST markets/v1/orders/order/sell
Sell an order
Authentication: Required - Include Bearer token in Authorization header
Authorization: Bearer <token>
Request Body
Type: SellOrderRequest
Example Request
{
"order_context_hash": "example",
"price": 100,
"amount": 100,
"expire_time": null
}
Request Properties
- order_context_hash (
string) - price (
number) - amount (
number) - expire_time (optional) (
any)
Response
Status: 200 OK
Body: OrderContextProps
Example Response
{
"placement_status": "success",
"message": "example",
"error": "example",
"order_context": {
"order_ids": [],
"position_ids": [],
"title": "example",
"price": 100,
"amount": 100,
"order_context_hash": "example",
"status": "approved"
}
}
Response Properties
- placement_status (
"success" | "failed") - Status of the order action - message (
string) - error (optional) (
string | undefined) - If failed to place, error message to explain the issue - order_context (optional) (
{ order_ids: string[]; position_ids: string[]; title: string; price: number; amount: number; order_context_hash: string; status: "approved" | "cancelled" | "closed"; } | undefined) - Order Details
Error Responses
- Error if the request fails or user is not authenticated
Get My Portfolio
GET markets/v1/portfolio/me
Get my portfolio
Authentication: Required - Include Bearer token in Authorization header
Authorization: Bearer <token>
Response
Status: 200 OK
Body: GetMyPortfolioResponse
Example Response
{
"message": "example",
"player_id": "example",
"portfolio": {
"[key": "example",
"resting_buys": 100,
"resting_buy_price": 100,
"resting_buys_potential_winnings": 100,
"resting_sells": 100,
"resting_expected_cash": 100,
"resting_sell_price": 100,
"resting_sells_potential_winnings": 100,
"resting_buy_orders": "123abc",
"open_amt": 100,
"price": 100,
"order_type": "h2h",
"collar_pct": 100,
"called_amt": 100,
"expire_datetime": null,
"challenger": "example"
}
}
Response Properties
- message (
string) - player_id (
string) - portfolio (
{ [key: string]: { title: string; resting_buys: number; resting_buy_price: number; resting_buys_potential_winnings: number; resting_sells: number; resting_expected_cash: number; resting_sell_price: number; resting_sells_potential_winnings: number; resting_buy_orders: { order_id: string; open_amt: number; price: number; order_type: "h2h" | "market" | "limit"; collar_pct: number; called_amt: number; expire_datetime: any; challenger?: string | undefined; }[]; resting_sell_orders: { order_id: string; open_amt: number; selling_position_id: string; order_type: "market" | "limit"; price: number; collar_pct: number; cash_rcvd: number; expire_datetime: any; }[]; closed_buy_orders: { order_id: string; status: "cancelled" | "closed"; order_type: "h2h" | "market" | "limit"; collar_pct: number; price: number; called_amt: number; returned_amt: number; challenger?: string | undefined; }[]; position: number; contracts: number; potential_winnings: number; position_price: number; cash_from_sales: number; delayed_cash: number; positions: { position_id: string; order_id: string; position: number; price: number; potential_winnings: number; challenger?: string | undefined; }[]; }; })
Error Responses
- Error if the request fails or user is not authenticated