- Official implementation
- REST API
- WebSockets API
go get github.com/bitfinexcom/bitfinex-api-go
package main
import (
"fmt"
"github.com/bitfinexcom/bitfinex-api-go/v1"
)
func main() {
client := bitfinex.NewClient().Auth("api-key", "api-secret")
info, err := client.Account.Info()
if err != nil {
fmt.Println(err)
} else {
fmt.Println(info)
}
}
func main() {
client := bitfinex.NewClient().Auth("api-key", "api-secret")
}
order, err := client.Orders.Create(bitfinex.BTCUSD, -0.01, 260.99, bitfinex.ORDER_TYPE_EXCHANGE_LIMIT)
if err != nil {
return err
} else {
return order
}
See examples and doc.go for more examples.
All integration tests are stored in tests/integration
directory. Because these tests are running using live data, there is a much higher probability of false positives in test failures due to network issues, test data having been changed, etc.
Run tests using:
export BFX_API_KEY="api-key"
export BFX_API_SECRET="api-secret"
go test -v ./tests/integration
- Fork it (https://github.com/bitfinexcom/bitfinex-api-go/fork)
- Create your feature branch (`git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request