You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following links are available in-app under **Profile -> Open account** and may qualify users for trading-fee rebates depending on venue policies.
636
+
The following links are available in-app under **Profile → Open account** or **Broker Accounts → Open account**, and may qualify users for trading-fee rebates depending on venue policies.
'description': 'Wait time for limit order fill before switching to market order'
650
650
},
651
+
{
652
+
'key': 'SPOT_CLOSE_SAFETY_RATIO',
653
+
'label': 'Spot Close Safety Ratio',
654
+
'type': 'number',
655
+
'default': '0.998',
656
+
'description': 'When closing spot long, sell qty is capped to (exchange free base × this ratio), then floored to lot step. Lower if full close fails due to fees (valid range 0.9–1.0).'
657
+
},
658
+
{
659
+
'key': 'SPOT_OPEN_QUOTE_BUFFER',
660
+
'label': 'Spot Open Quote Buffer',
661
+
'type': 'number',
662
+
'default': '0.995',
663
+
'description': 'Fraction of USDT/notional used on spot open (reserve headroom for buy fees). Example 0.995 uses 99.5% of allocated quote (valid range 0.9–1.0).'
QuantDinger **connection test** and live orders use the **REST Trading API** (`TradingClient.get_account()`), **not** the market-data WebSocket at `wss://stream.data.alpaca.markets/...`.
138
+
139
+
If you see Alpaca error **code 400 / invalid syntax** from the [streaming docs](https://docs.alpaca.markets/us/docs/streaming-market-data#authentication), that is almost always from a **WebSocket client** (custom script, another app, or a chart feed), not from `/api/alpaca/connect` or `/strategies/test-connection`.
140
+
141
+
Common causes:
142
+
143
+
| Issue | Fix |
144
+
|-------|-----|
145
+
| Subscribe before auth | After `connected`, send `{"action":"auth","key":"...","secret":"..."}` within 10s |
146
+
| Wrong JSON shape | Use `action` + channel keys, e.g. `{"action":"subscribe","trades":["AAPL"]}`|
147
+
| Invalid symbol | US stocks: `AAPL` (no `BTC/USDT`). Crypto: `BTC/USD` (Alpaca does **not** use `BTC/USDT`) |
148
+
| Class shares |`BRK/B` → `BRK.B` for REST; do not treat as a crypto pair |
149
+
150
+
This module normalizes symbols (`symbols.py`): `BTC/USDT` → `BTC/USD` for crypto, `BRK/B` → `BRK.B` for equities.
151
+
135
152
## Limitations / TODO
136
153
137
154
-[ ] No bracket orders yet (Alpaca supports them; not yet wrapped)
0 commit comments