alpacahq / alpaca-py

The Official Python SDK for Alpaca API
https://alpaca.markets/sdks/python/getting_started.html
Apache License 2.0
605 stars 149 forks source link

[Question]: a bracket order for crypto is not supported #505

Open w-jamil opened 2 months ago

w-jamil commented 2 months ago

Question form pre-submit checklist.

Question

I am unable to find example of submitting a crypto bracket order. I tried this but once cancel other is not allowed. Can you please help with this?

hiohiohio commented 2 months ago

@w-jamil crypto supports simple order_class orders only currently. So, bracket order is not supported. Please refer to order_class of the API reference below. ref. https://docs.alpaca.markets/reference/postorder

order_class string
The order classes supported by Alpaca vary based on the order's security type. The following provides a comprehensive breakdown of the supported order classes for each category:

Equity trading: simple (or ""), oco, oto, bracket.
Options trading: simple (or "").
Crypto trading: simple (or "").