Check Your Portfolio
This guide will walk you through checking your portfolio and understanding your positions and open orders on BettorEdge.
Prerequisites
- Completed authentication and obtained a Bearer token
- Placed at least one order (see the Place Your First Order Guide)
What is a Portfolio?
Your portfolio shows all your current activity on BettorEdge Markets, organized by order context hash:
- Positions - Filled orders where you own contracts in a market outcome
- Resting Orders - Open orders (both buys and sells) waiting to be matched
- Closed Orders - Cancelled or completed orders
Each order context hash in your portfolio contains all your activity for that specific market outcome.
Understanding Key Concepts
Positions
- Created when an order gets filled (matched with another trader)
- You own contracts that will pay $1.00 each if you win
- Capital is committed and at risk
Resting Buy Orders
- Open buy orders waiting in the market to be filled
- No contracts owned yet
- Capital is reserved (called) but not yet fully committed
- Can be cancelled before they fill
Resting Sell Orders
- Open sell orders for positions you own
- Selling contracts you already have
- Waiting for a buyer to match your price
Step 1: Get Your Portfolio
Make an authenticated request to retrieve your portfolio:
- cURL
- JavaScript
- Python
curl -X GET https://proxy.bettoredge.com/markets/v1/portfolio/me \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
const response = await fetch('https://proxy.bettoredge.com/markets/v1/portfolio/me', {
headers: {
'Authorization': `Bearer ${accessToken}`
}
});
const data = await response.json();
console.log('Your portfolio:', data);
response = requests.get(
'https://proxy.bettoredge.com/markets/v1/portfolio/me',
headers={
'Authorization': f'Bearer {access_token}'
}
)
data = response.json()
print('Your portfolio:', data)
Step 2: Understanding the Response
Response Structure
The portfolio is organized by order context hash as keys. Each hash contains all your activity for that specific market:
{
"message": "Success",
"player_id": "player_abc123",
"portfolio": {
"team:lakers_nuggets_20240115:12345:over:athlete:2954:26.5": {
"title": "LeBron James over 26.5 points",
"resting_buys": 100,
"resting_buy_price": 0.60,
"resting_buys_potential_winnings": 166.67,
"resting_buy_orders": [
{
"order_id": "order_xyz789",
"open_amt": 100,
"price": 0.60,
"order_type": "limit",
"collar_pct": 0,
"called_amt": 0,
"expire_datetime": "2024-01-15T18:00:00Z"
}
],
"resting_sells": 0,
"resting_sell_price": 0,
"resting_expected_cash": 0,
"resting_sells_potential_winnings": 0,
"resting_sell_orders": [],
"closed_buy_orders": [],
"position": 99.45,
"contracts": 153,
"potential_winnings": 153.00,
"position_price": 0.65,
"cash_from_sales": 0,
"delayed_cash": 0,
"positions": [
{
"position_id": "pos_abc123",
"order_id": "order_filled_456",
"position": 99.45,
"price": 0.65,
"potential_winnings": 153.00
}
]
}
}
}
Breaking Down Each Market Entry
For each order context hash in your portfolio, you'll see:
Market Information
| Field | Description | Example |
|---|---|---|
| title | Human-readable market description | "LeBron James over 26.5 points" |
Resting Buy Orders
| Field | Description |
|---|---|
| resting_buys | Total amount tied up in open buy orders |
| resting_buy_price | Average price of your resting buy orders |
| resting_buys_potential_winnings | Potential payout if all buy orders fill and win |
| resting_buy_orders | Array of individual open buy orders |
Buy Order Object:
- order_id - Unique order identifier
- open_amt - Amount in USD that is still unfilled (waiting to be matched)
- price - Your limit price
- order_type - "limit", "market", or "h2h"
- collar_pct - Collar percentage (for advanced order types)
- called_amt - Amount in USD that has been filled (matched with another trader)
- expire_datetime - When the order expires
- challenger (optional) - For head-to-head orders
Note: open_amt + called_amt = total order amount - Together they represent your original order size.
Resting Sell Orders
| Field | Description |
|---|---|
| resting_sells | Total amount of positions you're selling |
| resting_sell_price | Average price of your resting sell orders |
| resting_expected_cash | Expected cash if all sell orders fill |
| resting_sells_potential_winnings | Remaining potential winnings if sells don't fill |
| resting_sell_orders | Array of individual open sell orders |
Sell Order Object:
- order_id - Unique order identifier
- open_amt - Amount of position still being sold
- selling_position_id - Which position is being sold
- order_type - "limit" or "market"
- price - Your sell price
- collar_pct - Collar percentage
- cash_rcvd - Cash received so far
- expire_datetime - When the order expires
Current Positions
| Field | Description |
|---|---|
| position | Total stake (cost basis) of your current positions |
| contracts | Number of contracts you own |
| potential_winnings | Payout if you win (contracts × $1.00) |
| position_price | Average price you paid per contract |
| cash_from_sales | Cash received from selling positions |
| delayed_cash | Profit from sales held until market settles (see explanation below) |
| positions | Array of individual positions |
Understanding delayed_cash:
When you sell a position for a profit, that profit is held in delayed_cash until the market settles. This ensures markets can reconcile to zero if needed.
Example:
- You buy Lakers to win for $10
- You sell it for $12 (making $2 profit)
- The $2 profit goes into
delayed_cash
If the market results in no-bet/draw (void):
- All positions are voided and returned at cost
- You get back your original $10
- The $2 profit in
delayed_cashis not released (it's voided)
If the market settles normally (Lakers win or lose):
- The $2 in
delayed_cashis released back to your balance - You keep your $2 profit from the sale
This mechanism ensures all markets reconcile to $0 and prevents profit-taking before a market outcome is determined.
Position Object:
- position_id - Unique position identifier
- order_id - Original order that created this position
- position - Your stake (cost basis) in this position
- price - Price you paid
- potential_winnings - Payout if you win
- challenger (optional) - For head-to-head markets
Understanding Your Capital
For each market in your portfolio:
Capital in Resting Buys
Capital Reserved = resting_buys
This is money set aside for open buy orders that haven't filled yet.
Capital in Positions
Capital at Risk = position
This is money already spent on filled positions.
Total Capital per Market
Total Committed = resting_buys + position
Analyzing Your Portfolio
Calculate Total Exposure
See how much capital you have across all markets:
const data = await response.json();
const portfolioEntries = Object.values(data.portfolio);
const totalExposure = portfolioEntries.reduce((sum, market) => {
return sum + market.resting_buys + market.position;
}, 0);
console.log(`Total capital committed: $${totalExposure.toFixed(2)}`);
Calculate Total Potential Profit
See your maximum profit if everything wins:
const totalPotentialProfit = portfolioEntries.reduce((sum, market) => {
const restingBuyProfit = market.resting_buys_potential_winnings - market.resting_buys;
const positionProfit = market.potential_winnings - market.position;
return sum + restingBuyProfit + positionProfit;
}, 0);
console.log(`Potential profit if all win: $${totalPotentialProfit.toFixed(2)}`);
Find Markets with Open Orders
See which markets have resting orders:
const marketsWithOrders = Object.entries(data.portfolio)
.filter(([hash, market]) =>
market.resting_buy_orders.length > 0 || market.resting_sell_orders.length > 0
);
console.log(`Markets with open orders: ${marketsWithOrders.length}`);
marketsWithOrders.forEach(([hash, market]) => {
console.log(` ${market.title}`);
console.log(` Buy orders: ${market.resting_buy_orders.length}`);
console.log(` Sell orders: ${market.resting_sell_orders.length}`);
});
Find Your Biggest Positions
See where most of your capital is committed:
const sortedByPosition = Object.entries(data.portfolio)
.filter(([_, market]) => market.position > 0)
.sort(([_, a], [__, b]) => b.position - a.position);
console.log('Top 5 positions by capital:');
sortedByPosition.slice(0, 5).forEach(([hash, market]) => {
console.log(` ${market.title}: $${market.position.toFixed(2)}`);
console.log(` Contracts: ${market.contracts}`);
console.log(` Potential payout: $${market.potential_winnings.toFixed(2)}`);
});
Example: Complete Portfolio Entry
Here's what a complete market entry looks like with both positions and open orders:
"team:lakers_nuggets_20240115:12345:over:athlete:2954:28.5": {
"title": "LeBron James over 28.5 points",
// You have $50 in open buy orders at $0.58
"resting_buys": 50,
"resting_buy_price": 0.58,
"resting_buys_potential_winnings": 86.21,
"resting_buy_orders": [
{
"order_id": "order_123",
"open_amt": 50,
"price": 0.58,
"order_type": "limit",
"collar_pct": 0,
"called_amt": 0,
"expire_datetime": "2024-01-15T18:00:00Z"
}
],
// You already own 100 contracts (cost $65)
"position": 65,
"contracts": 100,
"potential_winnings": 100.00,
"position_price": 0.65,
"positions": [
{
"position_id": "pos_456",
"order_id": "order_789",
"position": 65,
"price": 0.65,
"potential_winnings": 100.00
}
],
// No sell orders currently
"resting_sells": 0,
"resting_sell_orders": [],
// No closed orders
"closed_buy_orders": []
}
Summary:
- $50 waiting to buy more at $0.58
- $65 already invested in 100 contracts
- Total exposure: $115
- If buy order fills and you win everything: $186.21 payout = $71.21 profit
Next Steps
Now that you understand your portfolio:
- Get Your Balance - See your available funds
- Browse More Markets - Find new opportunities
- Cancel Open Orders - Manage your resting orders (API documentation coming soon)
Need help? Check out the Portfolio API Reference for detailed endpoint documentation.