Hi,
Can’t get trade updates for crypto orders/positions using the GoLand SDK.
The only events that seem to be streamed are canceled
orders, whereas new
, fill
etc. doesn’t seem to be picked up by the handler.
Note: This works fine for regular 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)