Skip to content

Latest commit

 

History

History
55 lines (41 loc) · 901 Bytes

README.md

File metadata and controls

55 lines (41 loc) · 901 Bytes

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)
}