Getting Started with API Access
Welcome to the BettorEdge API! This guide will help you get set up with API access so you can programmatically trade on BettorEdge Markets.
What is the BettorEdge API?
The BettorEdge API allows you to:
- View available markets and liquidity
- Place and sell orders programmatically
- Check your portfolio and positions
- Manage your account balance
- Automate your trading strategies
Important: API access is not enabled by default. You'll need to request access from our support team to get started.
Step 1: Request API Access
To enable API access on your account, you'll need to contact BettorEdge support:
Option 1: In-App Support
- Open the BettorEdge mobile app
- Navigate to Settings → Support
- Submit a support request for API access
- Mention that you'd like to enable API access on your account
Option 2: Email Support
Send an email to support@bettoredge.com with:
- Subject: "API Access Request"
- Your BettorEdge username or email
- Brief description of your intended use case (optional but helpful)
Response Time: Our team typically responds within 1-2 business days.
Step 2: Check Your API Access Status
After requesting access, you can programmatically check if API access has been enabled on your account.
Checking Your Status
Once you have your credentials, you can call the Get Player Profile endpoint to check your api_enabled status:
- cURL
- JavaScript
- Python
curl -X GET https://proxy.bettoredge.com/players/v1/players/player/me \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
const response = await fetch('https://proxy.bettoredge.com/players/v1/players/player/me', {
headers: {
'Authorization': `Bearer ${accessToken}`
}
});
const data = await response.json();
console.log('API Enabled:', data.player.api_enabled);
response = requests.get(
'https://proxy.bettoredge.com/players/v1/players/player/me',
headers={
'Authorization': f'Bearer {access_token}'
}
)
data = response.json()
print('API Enabled:', data['player']['api_enabled'])
Response
Look for the api_enabled field in the player object:
API Access Enabled:
{
"message": "Success",
"player": {
"player_id": "player_abc123",
"username": "your_username",
"email": "you@example.com",
"api_enabled": true,
...
}
}
API Access Not Yet Enabled:
{
"message": "Success",
"player": {
"player_id": "player_abc123",
"username": "your_username",
"email": "you@example.com",
"api_enabled": false,
...
}
}
If api_enabled is false, your API access request is still pending or hasn't been submitted yet.
Step 3: Receive Your API Key
Once your account is enabled for API access, the BettorEdge team will provide you with:
- API Key - Required for all API requests
- Documentation - This is it! You're already here.
Using Your API Key
All API endpoints require your API key to be included in the request headers:
x-api-key: YOUR_API_KEY_HERE
Example Request:
curl -X GET https://proxy.bettoredge.com/markets/v1/markets/available \
-H "x-api-key: YOUR_API_KEY"
API Key Security
Important Security Practices:
- ✅ Store your API key securely (environment variables, secrets manager)
- ✅ Never commit API keys to source control
- ✅ Rotate your API key if it's been compromised
- ❌ Never share your API key publicly
- ❌ Never hardcode API keys in your application
Step 4: IP Whitelisting for Trading
While read-only endpoints (viewing markets, checking portfolio) only require an API key, placing orders requires IP whitelisting to ensure compliance with legal trading locations.
What Requires IP Whitelisting?
| Endpoint Type | API Key Only | Requires IP Whitelist |
|---|---|---|
| Get Available Markets | ✅ | ❌ |
| Get Portfolio | ✅ | ❌ |
| Get Balance | ✅ | ❌ |
| Place Order | ✅ | ✅ |
| Sell Order | ✅ | ✅ |
Why IP Whitelisting?
IP whitelisting ensures that real money trading only occurs from locations where it's legally permitted. This protects both you and BettorEdge by ensuring compliance with local regulations.
How to Whitelist Your IP
To enable trading from your IP address:
- Determine your public IP address (visit https://whatismyipaddress.com)
- Contact support via email: support@bettoredge.com
- Provide:
- Your BettorEdge username
- Your public IP address(es) to whitelist
- Your location (country/state)
Multiple IPs: If you'll be trading from multiple locations (office, home, etc.), provide all IP addresses that need whitelisting.
What Happens Without Whitelisting?
If you attempt to place or sell orders from a non-whitelisted IP, you'll receive an error response:
{
"error": "IP address not authorized for trading",
"message": "Please contact support to whitelist your IP address"
}
API Access Levels
Here's a summary of what you can do at each access level:
Read-Only Access
Requirements: API key only
Capabilities:
- View available markets and liquidity
- Check your portfolio positions
- Get your account balance
- View your order history
Good for: Monitoring markets, tracking performance, building dashboards
Trading Access
Requirements: API key + Whitelisted IP address
Capabilities:
- Everything in Read-Only Access
- Place buy orders
- Sell positions
- Automated trading strategies
Good for: Algorithmic trading, automated strategies, programmatic order placement
Next Steps
Now that you understand how to get API access, you're ready to start using the BettorEdge API!
Continue Learning:
- Authenticate and Make Your First Call - Learn how to authenticate with your credentials
- Understanding Liquidity - Learn how to find markets and build order hashes
- Place Your First Order - Start trading via the API
Quick Reference:
- Support Email: support@bettoredge.com
- In-App Support: Settings → Support
- Base URL:
https://proxy.bettoredge.com - Check API Status:
GET /players/v1/players/player/me(look forapi_enabled)
Have questions? Contact support@bettoredge.com for assistance with API access, IP whitelisting, or any other questions.