coinbase

package
v4.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAssetQuotes

func GetAssetQuotes(client resty.Client, symbols []string) []c.AssetQuote

GetAssetQuotes issues a HTTP request to retrieve quotes from the Coinbase API

Types

type Response

type Response struct {
	Products []ResponseQuote `json:"products"`
}

Response represents the container object from the API response

type ResponseQuote

type ResponseQuote struct {
	Symbol         string `json:"base_display_symbol"`
	ShortName      string `json:"base_name"`
	Price          string `json:"price"`
	PriceChange24H string `json:"price_percentage_change_24h"`
	Volume24H      string `json:"volume_24h"`
	High24H        string `json:"high_24h"`
	Low24H         string `json:"low_24h"`
	Open24H        string `json:"open_24h"`
	DisplayName    string `json:"display_name"`
	MarketState    string `json:"status"`
	Currency       string `json:"quote_currency_id"`
	ExchangeName   string `json:"product_venue"`
}

ResponseQuote represents a quote of a single product from the Coinbase API

Jump to

Keyboard shortcuts

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