enclave-go

command module
v0.0.0-...-62bb9cc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 7 Imported by: 0

README

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+

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL