Documentation Index
Fetch the complete documentation index at: https://docs.bluumfinance.com/llms.txt
Use this file to discover all available pages before exploring further.
This guide covers every order type, common patterns, and how to track order execution.
Market orders
Execute immediately at the current market price.
Buy by quantity
curl -X POST "$BASE_URL/trading/accounts/$ACCOUNT_ID/orders" \
-H "Authorization: Basic $AUTH" \
-H "Content-Type: application/json" \
-d '{
"symbol": "AAPL",
"side": "buy",
"type": "market",
"time_in_force": "day",
"qty": "10"
}'
Buy by dollar amount (fractional shares)
Invest exactly $1,000 in GOOGL — Bluum calculates the fractional quantity:
curl -X POST "$BASE_URL/trading/accounts/$ACCOUNT_ID/orders" \
-H "Authorization: Basic $AUTH" \
-H "Content-Type: application/json" \
-d '{
"symbol": "GOOGL",
"side": "buy",
"type": "market",
"time_in_force": "day",
"notional": "1000.00"
}'
notional is only available for market orders on fractionable assets.
Limit orders
Execute only at the specified price or better:
curl -X POST "$BASE_URL/trading/accounts/$ACCOUNT_ID/orders" \
-H "Authorization: Basic $AUTH" \
-H "Content-Type: application/json" \
-d '{
"symbol": "MSFT",
"side": "buy",
"type": "limit",
"time_in_force": "gtc",
"qty": "5",
"limit_price": "350.00",
"client_order_id": "my-limit-001"
}'
Stop orders
Trigger a market order when the price reaches the stop level:
# Stop-loss: sell if AAPL drops to $170
curl -X POST "$BASE_URL/trading/accounts/$ACCOUNT_ID/orders" \
-H "Authorization: Basic $AUTH" \
-H "Content-Type: application/json" \
-d '{
"symbol": "AAPL",
"side": "sell",
"type": "stop",
"time_in_force": "gtc",
"qty": "10",
"stop_price": "170.00"
}'
Trailing stop orders
The stop price follows the market price by a fixed offset:
# Sell if AAPL drops 5% from its peak
curl -X POST "$BASE_URL/trading/accounts/$ACCOUNT_ID/orders" \
-H "Authorization: Basic $AUTH" \
-H "Content-Type: application/json" \
-d '{
"symbol": "AAPL",
"side": "sell",
"type": "trailing_stop",
"time_in_force": "gtc",
"qty": "10",
"trail_percent": "5.0"
}'
Tracking order status
# Get a specific order
curl -X GET "$BASE_URL/trading/accounts/$ACCOUNT_ID/orders/$ORDER_ID" \
-H "Authorization: Basic $AUTH"
# List all orders
curl -X GET "$BASE_URL/trading/accounts/$ACCOUNT_ID/orders" \
-H "Authorization: Basic $AUTH"
Status progression
accepted → filled
│ │
│ partially_filled
│
canceled / rejected
Use webhooks (order.*) for real-time notifications:
curl -X POST "$BASE_URL/webhooks" \
-H "Authorization: Basic $AUTH" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-app.com/webhooks/bluum",
"events": ["order.*"]
}'
Order type comparison
| Type | Use case | Price guarantee | Fill guarantee |
|---|
market | Quick execution | No | High (during market hours) |
limit | Price control | Yes (or better) | No (may not fill) |
stop | Loss protection | No | No (triggers at stop price) |
trailing_stop | Dynamic stop | No | No (adjusts with market) |
Common errors
| Error | Cause | Resolution |
|---|
| Insufficient funds | Wallet balance too low | Deposit more funds |
| Market closed | Order placed outside trading hours | Use gtc or wait for market open |
| Invalid symbol | Asset not found or not tradable | Verify symbol with /assets/search |
| Invalid quantity | Zero, negative, or exceeds position size (for sells) | Check quantity and position |