rest

package
v0.0.0-...-cdfdfff Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const ENDPOINT = "https://ftx.com/api"

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Status  int
	Message string
}

APIError return the api error

func (APIError) Error

func (e APIError) Error() string

Error return the error message

type Client

type Client struct {
	Auth *auth.Config

	HTTPC       *fasthttp.Client
	HTTPTimeout time.Duration
}

func New

func New(auth *auth.Config) *Client

func (*Client) AcceptOpQuote

func (*Client) Balances

func (*Client) BalancesAll

func (*Client) CancelAll

func (*Client) CancelByID

CancelByID do cancel with triggerOrderID > clientID > orderID.

func (*Client) CancelOpQuote

func (*Client) Candles

func (*Client) Coins

func (*Client) DepositAddress

func (*Client) Fills

func (p *Client) Fills(req *fills.Request) (*fills.Response, error)

func (*Client) Funding

func (p *Client) Funding(req *funding.Request) (*funding.Response, error)

func (*Client) Future

func (*Client) Futures

func (*Client) Information

func (*Client) Leverage

func (*Client) LvBalances

func (*Client) LvToken

func (*Client) LvTokens

func (*Client) Markets

func (*Client) ModifyOrder

ModifyOrder use ClientID or OrderID, prioritize ClientID if has ClientID. if has clientID, use by_client_id modify. else if has orderID, use modify. the order's queue priority will be reset, and the order ID of the modified order will be different from that of the original order.

func (*Client) MyOpQuotes

func (*Client) OpFills

func (*Client) OpPositions

func (*Client) OpTrades

func (*Client) OpenOrder

func (*Client) OrderHistories

func (p *Client) OrderHistories(req *orders.RequestForHistories) (*orders.ResponseForHistories, error)

func (*Client) OrderStatus

func (*Client) OrderTriggers

func (*Client) Orderbook

func (*Client) PlaceOrder

send order

func (*Client) Positions

func (*Client) Rates

func (*Client) Stats

func (*Client) SubAccounts

SubAccount

func (*Client) Trades

func (*Client) Withdraw

type Requester

type Requester interface {
	Path() string
	Method() string
	Query() string
	Payload() []byte
}

type Response

type Response struct {
	Result  interface{} `json:"result,omitempty"`
	Error   string      `json:"error,omitempty"`
	Success bool        `json:"success"`
}

Directories

Path Synopsis
private
public

Jump to

Keyboard shortcuts

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