alpacahq / alpacahq/Alpaca-API

request body format is invalid

Offen
#260 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Keine Sprachdaten
Sterne
173
Forks
17
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

**Describe the bug**
Cannot place a bracket buy order. I am trying to set a market buy with no profit taking.

**To Reproduce**
Steps to reproduce the behavior:
```
if signal == 'BUY':
api.submit_order(
symbol=ticker,
qty=1,
side="buy",
type="market",
time_in_force="gtc",
# limit_price=None,
# stop_price=None,
# extended_hours=False,
# client_order_id=None,
order_class="bracket",
take_profit="99999",
stop_loss="0",
# trail_price=None,
# trail_percent=None
)
```

**Expected behavior**
runs selling trade when signal received.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: Windows 11
- Version: Python 3.8.19

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.