Files
services/examples/stock/quote/go/getAStockQuote.go
2021-09-16 12:52:36 +01:00

17 lines
317 B
Go
Executable File

package example
import (
"fmt"
"github.com/micro/services/clients/go/stock"
"os"
)
// Get the last quote for the stock
func GetAstockQuote() {
stockService := stock.NewStockService(os.Getenv("MICRO_API_TOKEN"))
rsp, err := stockService.Quote(&stock.QuoteRequest{
Symbol: "AAPL",
})
fmt.Println(rsp, err)
}