Skip to content

ValentinTrinque/enclave-go

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

enclave-go

This is an unofficial Go SDK for Enclave Markets and the interface is subject to change.

It provides a simple interface for interacting with the spot market Enclave API.

Installation

go get github.com/Enclave-Markets/enclave-go

Usage

package main

import (
	"github.com/Enclave-Markets/enclave-go/apiclient"
)

func main() {

	client, err := apiclient.NewApiClientFromEnv("sandbox")
	if err != nil {
		return
	}

	client.WithApiKey(
		os.Getenv("ENCLAVE_KEY"),
		os.Getenv("ENCLAVE_SECRET"),
	)

	client.WaitForEndpoint()
	_, err = client.Hello()
	if err != nil {
		return
	}
}

Examples

An example of interacting with a spot market on Enclave's sandbox environment can be found in main.go and can be run using:

export ENCLAVE_KEY="YOUR_API_KEY"
export ENCLAVE_SECRET="YOUR_API_SECRET"
go run ./...

API keys for Enclave's sandbox environment can be found here by first connecting a wallet and then accessing account settings.

Support

Supports Go 1.22+

About

Enclave Markets Go SDK

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%