github.com/bitfinexcom/bitfinex-api-go@v0.0.0-20210608095005-9e0b26f200fb/tests/integration/v1/order_test.go (about)

     1  package tests
     2  
     3  // Test api client return error messages.
     4  /*
     5  // This test always fails unless the caller provides a X-BFX-APIKEY.  Commented in favor of mocked tests.
     6  func TestFailCreateOrder(t *testing.T) {
     7  	_, err := client.Orders.Create("BTCUSD", 1, 299.0, bitfinex.OrderTypeExchangeLimit)
     8  
     9  	if err.Error() != "POST https://api.bitfinex.com/v1/order/new: 400 Invalid order: not enough exchange balance for 1.0 BTCUSD at 299.0" {
    10  		t.Fatalf("OrderBook.Get() returned error: %v", err)
    11  	}
    12  }
    13  */