ftx

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PairTypeSpot   = "spot"
	PairTypeFuture = "future"
)
View Source
const (
	Endpoint = "https://ftx.com/api"
)
View Source
const (
	PairStatusOnline = "online"
)
View Source
const (
	QuoteSymbol = "USD"
)

Variables

This section is empty.

Functions

func DecodeResponse

func DecodeResponse(resp *resty.Response) ([]byte, error)

func New

func New() core.Exchange

func Request

func Request(ctx context.Context) *resty.Request

func UnmarshalResponse

func UnmarshalResponse(resp *resty.Response, v interface{}) error

Types

type Error

type Error struct {
	Success bool   `json:"success"`
	Message string `json:"error,omitempty"`
}

func (*Error) Error

func (err *Error) Error() string

type Pair

type Pair struct {
	Name          string  `json:"name,omitempty"`
	Enabled       bool    `json:"enabled"`
	Restricted    bool    `json:"restricted"`
	PostOnly      bool    `json:"postOnly"`
	Last          float64 `json:"last"`
	Bid           float64 `json:"bid"`
	Ask           float64 `json:"ask"`
	Price         float64 `json:"price"`
	Type          string  `json:"type,omitempty"`
	BaseCurrency  string  `json:"baseCurrency,omitempty"`
	QuoteCurrency string  `json:"quoteCurrency,omitempty"`
	Underlying    string  `json:"underlying,omitempty"`
}

func (Pair) IsOnline added in v1.0.6

func (pair Pair) IsOnline() bool

type PairStatus

type PairStatus string

type Pairs added in v1.0.6

type Pairs []*Pair

Jump to

Keyboard shortcuts

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