Files
m3o-go/examples/forex/history/getPreviousClose.go
2021-10-29 06:38:17 +00:00

18 lines
316 B
Go
Executable File

package example
import (
"fmt"
"os"
"github.com/go.m3o.com/forex"
)
// Returns the data for the previous close
func GetPreviousClose() {
forexService := forex.NewForexService(os.Getenv("M3O_API_TOKEN"))
rsp, err := forexService.History(&forex.HistoryRequest{
Symbol: "GBPUSD",
})
fmt.Println(rsp, err)
}