exchange

package
v0.0.0-...-83dca6d Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exchange

type Exchange struct{}

Exchange implements all required methods for Wrapper

func (Exchange) AccountInformation

func (e Exchange) AccountInformation(ctx context.Context, exch string, assetType asset.Item) (account.Holdings, error)

AccountInformation returns account information (balance etc) for requested exchange

func (Exchange) CancelOrder

func (e Exchange) CancelOrder(ctx context.Context, exch, orderID string, cp currency.Pair, a asset.Item) (bool, error)

CancelOrder wrapper to cancel order on exchange

func (Exchange) DepositAddress

func (e Exchange) DepositAddress(exch, chain string, currencyCode currency.Code) (depositAddr *deposit.Address, err error)

DepositAddress gets the address required to deposit funds for currency type

func (Exchange) Exchanges

func (e Exchange) Exchanges(enabledOnly bool) []string

Exchanges returns slice of all current exchanges

func (Exchange) GetExchange

func (e Exchange) GetExchange(exch string) (exchange.IBotExchange, error)

GetExchange returns IBotExchange for exchange or error if exchange is not found

func (Exchange) IsEnabled

func (e Exchange) IsEnabled(exch string) bool

IsEnabled returns if requested exchange is enabled or disabled

func (Exchange) OHLCV

func (e Exchange) OHLCV(ctx context.Context, exch string, pair currency.Pair, item asset.Item, start, end time.Time, interval kline.Interval) (kline.Item, error)

OHLCV returns open high low close volume candles for requested exchange/pair/asset/start & end time

func (Exchange) Orderbook

func (e Exchange) Orderbook(ctx context.Context, exch string, pair currency.Pair, item asset.Item) (*orderbook.Base, error)

Orderbook returns current orderbook requested exchange, pair and asset

func (Exchange) Pairs

func (e Exchange) Pairs(exch string, enabledOnly bool, item asset.Item) (*currency.Pairs, error)

Pairs returns either all or enabled currency pairs

func (Exchange) QueryOrder

func (e Exchange) QueryOrder(ctx context.Context, exch, orderID string, pair currency.Pair, assetType asset.Item) (*order.Detail, error)

QueryOrder returns details of a valid exchange order

func (Exchange) SubmitOrder

func (e Exchange) SubmitOrder(ctx context.Context, submit *order.Submit) (*order.SubmitResponse, error)

SubmitOrder submit new order on exchange

func (Exchange) Ticker

func (e Exchange) Ticker(ctx context.Context, exch string, pair currency.Pair, item asset.Item) (*ticker.Price, error)

Ticker returns ticker for provided currency pair & asset type

func (Exchange) WithdrawalCryptoFunds

func (e Exchange) WithdrawalCryptoFunds(ctx context.Context, request *withdraw.Request) (string, error)

WithdrawalCryptoFunds withdraw funds from exchange to requested Crypto source

func (Exchange) WithdrawalFiatFunds

func (e Exchange) WithdrawalFiatFunds(ctx context.Context, bankAccountID string, request *withdraw.Request) (string, error)

WithdrawalFiatFunds withdraw funds from exchange to requested fiat source

Jump to

Keyboard shortcuts

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