github.com/bitfinexcom/bitfinex-api-go@v0.0.0-20210608095005-9e0b26f200fb/examples/v2/rest-delete-pulse/main.go (about)

     1  package main
     2  
     3  import (
     4  	"fmt"
     5  	"log"
     6  	"os"
     7  
     8  	"github.com/bitfinexcom/bitfinex-api-go/v2/rest"
     9  )
    10  
    11  // Set BFX_API_KEY and BFX_API_SECRET:
    12  //
    13  // export BFX_API_KEY=<your-api-key>
    14  // export BFX_API_SECRET=<your-api-secret>
    15  //
    16  // you can obtain it from https://www.bitfinex.com/api
    17  
    18  func main() {
    19  	key := os.Getenv("BFX_API_KEY")
    20  	secret := os.Getenv("BFX_API_SECRET")
    21  
    22  	c := rest.
    23  		NewClient().
    24  		Credentials(key, secret)
    25  
    26  	deleted, err := c.Pulse.DeletePulse("437b5b44-0f7d-4638-baff-3bbf6966482d")
    27  	if err != nil {
    28  		log.Fatal(err)
    29  	}
    30  
    31  	fmt.Printf("Deleted: %d\n", deleted)
    32  }