mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-14 03:54:47 +00:00
17 lines
317 B
Go
Executable File
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)
|
|
}
|