mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-11 18:44:26 +00:00
22 lines
423 B
Go
Executable File
22 lines
423 B
Go
Executable File
package example
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"go.m3o.com/stock"
|
|
)
|
|
|
|
// Get the historic order book and each trade by timestamp
|
|
func OrderBookHistory() {
|
|
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)
|
|
}
|