package module
Version: v0.2.0 Latest Latest

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

Go to latest
Published: Jan 28, 2019 License: Apache-2.0 Imports: 5 Imported by: 0



Golang bindings for Lykke API




View Source
const (
	MarketSpot = "Spot"
	MarketMt   = "Mt"
View Source
const (
	TmSec    = "Sec"
	TmMinute = "Minute"
	TmMin5   = "Min5"
	TmMin15  = "Min15"
	TmMin30  = "Min30"
	TmHour   = "Hour"
	TmHour4  = "Hour4"
	TmHour6  = "Hour6"
	TmHour12 = "Hour12"
	TmDay    = "Day"
	TmWeek   = "Week"
	TmMonth  = "Month"
View Source
const (
	PriceBid    = "Bid"
	PriceAsk    = "Ask"
	PriceMid    = "Mid"
	PriceTrades = "Trades"


This section is empty.


This section is empty.


type CandleData

type CandleData struct {
	Ts             time.Time       `json:"dateTime"`
	Open           decimal.Decimal `json:"open"`
	Low            decimal.Decimal `json:"low"`
	High           decimal.Decimal `json:"high"`
	Close          decimal.Decimal `json:"close"`
	Volume         float64         `json:"volume"`
	OppositeVolume float64         `json:"oppositeVolume"`

CandleData contains candle info.

type CandlesHistoryInfo

type CandlesHistoryInfo struct {
	AssetPair string    `json:"assetPair"`
	Period    string    `json:"period"`
	DateFrom  time.Time `json:"dateFrom"`
	DateTo    time.Time `json:"dateTo"`
	Type      string    `json:"type"`

CandlesHistoryInfo contains common fields for candles requests and responses.

type CandlesHistoryResp

type CandlesHistoryResp struct {
	Data []CandleData `json:"data"`

CandlesHistoryResp is a response for '/Candles/history' EP.

type DictEntry

type DictEntry struct {
	ID               string `json:"id"`
	Name             string `json:"name"`
	Accuracy         int    `json:"accuracy"`
	InvertedAccuracy int    `json:"invertedAccuracy"`
	BaseAssetID      string `json:"baseAssetId"`
	QuotingAssetId   string `json:"quotingAssetId"`

DictEntry is a description of an asset.

type Dictionary

type Dictionary []DictEntry

Dictionary is an array if assets on some market.

type Public

type Public struct {
	// contains filtered or unexported fields

Public is a client for public API

func NewPublic

func NewPublic() *Public

NewPublic returns new Public client.

func (*Public) AssetPairs

func (p *Public) AssetPairs() *assetPairs

AssetPairs returns '/AssetPairs' EP accessor.

func (*Public) Candles

func (p *Public) Candles() *candles

Candles returns '/Candles/history' EP accessor.

type RateEntry added in v0.2.0

type RateEntry struct {
	ID  string          `json:"id"`
	Ask decimal.Decimal `json:"ask"`
	Bid decimal.Decimal `json:"bid"`

RateEntry is an ask/bid pair for some asset.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL