alpacahq / alpacahq/alpaca-trade-api-go
No trade updates for crypto orders/positions
- Langage dominant
- Go
- Étoiles
- 429
- Forks
- 118
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Hi,
Ver: `github.com/alpacahq/alpaca-trade-api-go/v2 v2.5.0`
Seems that trade updates using the `client.StreamTradeUpdates()` functionality differ quite a bit from stocks to crypto.
For stocks I would be notified of any `new`, `rejected`, `fill` etc. type of events, doesn't seem to be the case for crypto where I've only been able to get `canceled` events.
Is there a different implementation for crypto streams? Or are the events different for crypto? (the [docs](https://alpaca.markets/docs/api-references/trading-api/streaming/) doesn't give a clear indication about this)
NOTE: The code below works fine for stocks
```
// Start the trade client
client := alpaca.NewClient(alpaca.ClientOpts{
ApiKey: "***",
ApiSecret: "***",
BaseURL: "https://paper-api.alpaca.markets",
RetryLimit: 100,
RetryDelay: 5 * time.Second,
})
handler := func(tu alpaca.TradeUpdate) {
fmt.Printf("NEW EVENT: %+v\n", tu)
}
err := client.StreamTradeUpdates(context.Background(), handler)
```
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.