Constants
SDK constants including API URLs, token mints, and defaults
Constants
The SDK exports various constants for API endpoints, token addresses, and default values.
Import
API URLs
Default (Development)
These are the default URLs used when no environment is specified:
| Constant | Value | Description |
|---|---|---|
METADATA_API_BASE_URL | https://dev-prediction-markets-api.dflow.net/api/v1 | Development metadata API. No API key required. |
TRADE_API_BASE_URL | https://dev-quote-api.dflow.net | Development trade API. No API key required. |
WEBSOCKET_URL | wss://dev-prediction-markets-api.dflow.net/api/v1/ws | Development WebSocket. No API key required. |
Production
| Constant | Value | Description |
|---|---|---|
PROD_METADATA_API_BASE_URL | https://prediction-markets-api.dflow.net/api/v1 | Production metadata API. Requires API key. |
PROD_TRADE_API_BASE_URL | https://quote-api.dflow.net | Production trade API. Requires API key. |
PROD_WEBSOCKET_URL | wss://prediction-markets-api.dflow.net/api/v1/ws | Production WebSocket. Requires API key. |
Deprecated
These constants are deprecated and will be removed in a future version:
| Constant | Note |
|---|---|
DEV_METADATA_API_BASE_URL | Use METADATA_API_BASE_URL instead |
DEV_TRADE_API_BASE_URL | Use TRADE_API_BASE_URL instead |
DEV_WEBSOCKET_URL | Use WEBSOCKET_URL instead |
Token Mints
| Constant | Description | Value |
|---|---|---|
USDC_MINT | USDC token mint on Solana | EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v |
SOL_MINT | Native SOL (wrapped) mint | So11111111111111111111111111111111111111112 |
Trading Defaults
| Constant | Value | Description |
|---|---|---|
DEFAULT_SLIPPAGE_BPS | 50 | Default slippage tolerance (0.5%) |
OUTCOME_TOKEN_DECIMALS | 6 | Decimal places for outcome tokens |
Limits
| Constant | Value | Description |
|---|---|---|
MAX_BATCH_SIZE | 100 | Maximum items in batch requests |
MAX_FILTER_ADDRESSES | 200 | Maximum addresses in filter requests |