github.com/bitfinexcom/bitfinex-api-go@v0.0.0-20210608095005-9e0b26f200fb/tests/integration/v1/order_book_test.go (about) 1 package tests 2 3 import ( 4 "testing" 5 ) 6 7 func TestOrderBook(t *testing.T) { 8 order_book, err := client.OrderBook.Get("BTCUSD", 10, 10, true) 9 10 if err != nil { 11 t.Fatalf("OrderBook.Get() returned error: %v", err) 12 } 13 14 if len(order_book.Bids) == 0 { 15 t.Fatal("Order book should contain Bids") 16 } 17 if len(order_book.Asks) == 0 { 18 t.Fatal("Order book should contain Asks") 19 } 20 }