alpacahq / alpacahq/alpaca-trade-api-go
No trade updates for crypto orders/positions
- 主要语言
- Go
- 星标
- 429
- 派生
- 118
- PR 合并指标
- 30 天内没有已合并 PR
描述
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)
```
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。