futures

package
v0.0.0-...-cdbd259 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIURL = "https://futures.kraken.com/derivatives"
)

Variables

This section is empty.

Functions

func Marshal

func Marshal(data interface{}) string

Types

type FutAccountsResult

type FutAccountsResult struct {
	Error    []string `json:"error"`
	Result   string
	Accounts struct {
		Fi_xbtusd struct {
			Type      string
			Auxiliary struct {
				USD     float64
				PV      float64
				Pnl     float64
				Af      float64
				Funding float64
			}
			MarginRequirements struct {
				Im float64
				Mm float64
				Lt float64
				Tt float64
			}
			TriggerEstimates struct {
				Im float64
				Mm float64
				Lt float64
				Tt float64
			}
			Balances struct {
				XBT float64
			}
			Currency string
		}
	}
	ServerTime time.Time
}

type KrakenResponse

type KrakenResponse struct {
	Error  []string    `json:"error"`
	Result interface{} `json:"result"`
}

type RestApiClient

type RestApiClient struct {
	// contains filtered or unexported fields
}

func NewRestApi

func NewRestApi(key, secret string) *RestApiClient

func NewRestApiWithClient

func NewRestApiWithClient(key, secret string, httpClient *http.Client) *RestApiClient

func (*RestApiClient) Accounts

func (api *RestApiClient) Accounts() (interface{}, error)

func (*RestApiClient) Instruments

func (api *RestApiClient) Instruments() (interface{}, error)

Jump to

Keyboard shortcuts

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