Skip to content

igaskin/go-gemini

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-gemini

unoffcial go client for Gemini

GoDoc

Features

  • Authentication
  • Submit Buy and Sell Orders

Requirements

  • Go >= 1.15

Installation

go get github.com/igaskin/go-gemini

Examples

package main

import (
	"context"
	"fmt"

	"github.com/igaskin/go-gemini/gemini"
)

func main() {
    // set environment variables
    // GEMINI_API_KEY
    // GEMINI_API_SECRET
	client := gemini.NewClient()
	ctx := context.Background()

	resp, err := client.NewOrder(ctx, &gemini.NewOrderInput{
		Symbol:    "ethusd",
		Side:      "BUY",
		Amount:    ".001",
		OrderType: "exchange limit",
		Account:   "primary",
		Price:     "9999999",
		Options:   []string{"immediate-or-cancel"},
	})

	if err != nil {
		fmt.Println(err)
	}

	fmt.Printf("%+v\n", resp)
}

About

unoffcial go client for Gemini

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published