mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-14 11:03:53 +00:00
26 lines
452 B
Go
26 lines
452 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
"os"
|
|
|
|
maxapi "github.com/c9s/bbgo/pkg/exchange/max/maxapi"
|
|
)
|
|
|
|
func main() {
|
|
key := os.Getenv("MAX_API_KEY")
|
|
secret := os.Getenv("MAX_API_SECRET")
|
|
|
|
maxRest := maxapi.NewRestClient(maxapi.ProductionAPIURL)
|
|
maxRest.Auth(key, secret)
|
|
|
|
orders, err := maxRest.OrderService.All("maxusdt", 100, 1, maxapi.OrderStateDone)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
|
|
for _, order := range orders {
|
|
log.Printf("%+v", order)
|
|
}
|
|
}
|