Files
m3o-go/examples/stock/orderBook/orderBookHistory/main.go
2021-12-09 15:06:12 +00:00

22 lines
408 B
Go
Executable File

package main
import (
"fmt"
"os"
"go.m3o.com/stock"
)
// Get the historic order book and each trade by timestamp
func main() {
stockService := stock.NewStockService(os.Getenv("M3O_API_TOKEN"))
rsp, err := stockService.OrderBook(&stock.OrderBookRequest{
Date: "2020-10-01",
End: "2020-10-01T11:00:00Z",
Limit: 3,
Start: "2020-10-01T10:00:00Z",
Stock: "AAPL",
})
fmt.Println(rsp, err)
}