exchange

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssetService

type AssetService struct {
	Client *binance.Client
	// contains filtered or unexported fields
}

AssetService represents the service for Asset API.

https://github.com/adshao/go-binance https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md

func NewAssetService

func NewAssetService() *AssetService

NewAssetService returns assets exchange service.

func (*AssetService) Depth

func (s *AssetService) Depth()

Depth returns the order book depth request.

https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md#order-book

func (*AssetService) Interval

func (s *AssetService) Interval(interval string) *AssetService

Interval set interval.

func (*AssetService) Klines

func (s *AssetService) Klines() (klines types.Klines, err error)

Klines returns the klines request.

https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md#klinecandlestick-data

func (*AssetService) NewClient

func (s *AssetService) NewClient() *AssetService

NewClient initialize an API client with API key and secret key.

func (*AssetService) Symbol

func (s *AssetService) Symbol(symbol string) *AssetService

Symbol set symbol.

type MetricService

type MetricService struct {
	Client *coinmarketcap.Client
}

MetricService represents the service for CoinMarketCap API.

https://github.com/miguelmota/go-coinmarketcap https://pro.coinmarketcap.com/api/v1#

func NewMetricService

func NewMetricService() *MetricService

NewMetricService returns metrics exchange service.

func (*MetricService) NewClient

func (s *MetricService) NewClient() *MetricService

NewClient initialize an API client instance with API key.

func (*MetricService) PriceConversion

func (s *MetricService) PriceConversion(amount float64, symbol, convert string) float64

PriceConversion returns an amount of one currency into multiple cryptocurrencies or fiat currencies at the same time using the latest market averages.

https://coinmarketcap.com/api/documentation/v1/#operation/getV1ToolsPriceconversion

Jump to

Keyboard shortcuts

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