Documentation ¶
Index ¶
- Constants
- type AveragePriceRequest
- type BookService
- type CancelOrderMultiRequest
- type CandleService
- func (c *CandleService) History(symbol string, resolution common.CandleResolution) (*candle.Snapshot, error)
- func (c *CandleService) HistoryWithQuery(symbol string, resolution common.CandleResolution, start common.Mts, ...) (*candle.Snapshot, error)
- func (c *CandleService) Last(symbol string, resolution common.CandleResolution) (*candle.Candle, error)
- type Client
- func NewClient() *Client
- func NewClientWithHttpDo(httpDo func(c *http.Client, r *http.Request) (*http.Response, error)) *Client
- func NewClientWithSynchronousNonce(sync Synchronous, nonce utils.NonceGenerator) *Client
- func NewClientWithSynchronousURLNonce(sync Synchronous, url string, nonce utils.NonceGenerator) *Client
- func NewClientWithURL(url string) *Client
- func NewClientWithURLHttpDo(base string, ...) *Client
- func NewClientWithURLHttpDoNonce(base string, ...) *Client
- func NewClientWithURLNonce(url string, nonce utils.NonceGenerator) *Client
- func (c *Client) Credentials(key string, secret string) *Client
- func (c *Client) NewAuthenticatedRequest(permissionType common.PermissionType, refURL string) (Request, error)
- func (c *Client) NewAuthenticatedRequestWithBytes(permissionType common.PermissionType, refURL string, data []byte) (Request, error)
- func (c *Client) NewAuthenticatedRequestWithData(permissionType common.PermissionType, refURL string, ...) (Request, error)
- type ClientOrderIDs
- type CurrenciesService
- type DepositInvoiceRequest
- type DerivativesService
- type ErrorResponse
- type ForeignExchangeRateRequest
- type FundingService
- func (fs *FundingService) CancelOffer(fc *fundingoffer.CancelRequest) (*notification.Notification, error)
- func (fs *FundingService) Credits(symbol string) (*fundingcredit.Snapshot, error)
- func (fs *FundingService) CreditsHistory(symbol string) (*fundingcredit.Snapshot, error)
- func (fs *FundingService) KeepFunding(args KeepFundingRequest) (*notification.Notification, error)
- func (fs *FundingService) Loans(symbol string) (*fundingloan.Snapshot, error)
- func (fs *FundingService) LoansHistory(symbol string) (*fundingloan.Snapshot, error)
- func (fs *FundingService) OfferHistory(symbol string) (*fundingoffer.Snapshot, error)
- func (fs *FundingService) Offers(symbol string) (*fundingoffer.Snapshot, error)
- func (fs *FundingService) SubmitOffer(fo *fundingoffer.SubmitRequest) (*notification.Notification, error)
- func (fs *FundingService) Trades(symbol string) (*fundingtrade.Snapshot, error)
- type GetTickerHistPayload
- type GroupOrderIDs
- type HttpTransport
- type InvoiceService
- type KeepFundingRequest
- type LedgerService
- type MarketService
- type Nickname
- type OrderIDs
- type OrderMultiOpsRequest
- type OrderOps
- type OrderService
- func (s *OrderService) All() (*order.Snapshot, error)
- func (s *OrderService) AllHistory() (*order.Snapshot, error)
- func (s *OrderService) CancelOrderMulti(args CancelOrderMultiRequest) (*notification.Notification, error)
- func (s *OrderService) CancelOrderMultiOp(orderID int) (*notification.Notification, error)
- func (s *OrderService) CancelOrdersMultiOp(ids OrderIDs) (*notification.Notification, error)
- func (s *OrderService) GetByOrderId(orderID int64) (o *order.Order, err error)
- func (s *OrderService) GetBySymbol(symbol string) (*order.Snapshot, error)
- func (s *OrderService) GetHistoryByOrderId(orderID int64) (o *order.Order, err error)
- func (s *OrderService) GetHistoryBySymbol(symbol string) (*order.Snapshot, error)
- func (s *OrderService) OrderMultiOp(ops OrderOps) (*notification.Notification, error)
- func (s *OrderService) OrderNewMultiOp(onr order.NewRequest) (*notification.Notification, error)
- func (s *OrderService) OrderTrades(symbol string, orderID int64) (*tradeexecutionupdate.Snapshot, error)
- func (s *OrderService) OrderUpdateMultiOp(our order.UpdateRequest) (*notification.Notification, error)
- func (s *OrderService) SubmitCancelOrder(oc *order.CancelRequest) error
- func (s *OrderService) SubmitOrder(onr *order.NewRequest) (*notification.Notification, error)
- func (s *OrderService) SubmitUpdateOrder(our *order.UpdateRequest) (*notification.Notification, error)
- type PlatformService
- type PositionService
- type PulseService
- func (ps *PulseService) AddComment(p *pulse.Pulse) (*pulse.Pulse, error)
- func (ps *PulseService) AddPulse(p *pulse.Pulse) (*pulse.Pulse, error)
- func (ps *PulseService) DeletePulse(pid string) (int, error)
- func (ps *PulseService) PublicPulseHistory(limit int, end common.Mts) ([]*pulse.Pulse, error)
- func (ps *PulseService) PublicPulseProfile(nickname Nickname) (*pulseprofile.PulseProfile, error)
- func (ps *PulseService) PulseHistory() ([]*pulse.Pulse, error)
- type Request
- func NewRequest(refURL string) Request
- func NewRequestWithBytes(refURL string, data []byte) Request
- func NewRequestWithData(refURL string, data map[string]interface{}) (Request, error)
- func NewRequestWithDataMethod(refURL string, data []byte, method string) Request
- func NewRequestWithMethod(refURL string, method string) Request
- type Response
- type StatsService
- func (ss *StatsService) CreditSizeHistory(symbol string, side common.OrderSide) ([]*stats.Stat, error)
- func (ss *StatsService) CreditSizeLast(symbol string, side common.OrderSide) (*stats.Stat, error)
- func (ss *StatsService) FundingHistory(symbol string) ([]*stats.Stat, error)
- func (ss *StatsService) FundingLast(symbol string) (*stats.Stat, error)
- func (ss *StatsService) PositionHistory(symbol string, side common.OrderSide) ([]*stats.Stat, error)
- func (ss *StatsService) PositionLast(symbol string, side common.OrderSide) (*stats.Stat, error)
- func (ss *StatsService) SymbolCreditSizeHistory(fundingSymbol string, tradingSymbol string) ([]*stats.Stat, error)
- func (ss *StatsService) SymbolCreditSizeLast(fundingSymbol string, tradingSymbol string) (*stats.Stat, error)
- type StatusService
- type Synchronous
- type TickerHistoryService
- type TickerService
- type TradeService
- func (s *TradeService) AccountAll() (*tradeexecutionupdate.Snapshot, error)
- func (s *TradeService) AccountAllWithSymbol(symbol string) (*tradeexecutionupdate.Snapshot, error)
- func (s *TradeService) AccountHistoryWithQuery(symbol string, start common.Mts, end common.Mts, limit common.QueryLimit, ...) (*tradeexecutionupdate.Snapshot, error)
- func (s *TradeService) PublicHistoryWithQuery(symbol string, start common.Mts, end common.Mts, limit common.QueryLimit, ...) (*trade.Snapshot, error)
- type WalletService
- func (ws *WalletService) CreateDepositAddress(wallet, method string) (*notification.Notification, error)
- func (ws *WalletService) DepositAddress(wallet, method string) (*notification.Notification, error)
- func (s *WalletService) SetCollateral(symbol string, amount float64) (bool, error)
- func (ws *WalletService) Transfer(from, to, currency, currencyTo string, amount float64) (*notification.Notification, error)
- func (s *WalletService) Wallet() (*wallet.Snapshot, error)
- func (ws *WalletService) Withdraw(wallet, method string, amount float64, address string) (*notification.Notification, error)
Constants ¶
const (
DERIV_TYPE = "deriv"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AveragePriceRequest ¶
AveragePriceRequest data structure for constructing average price query params
type BookService ¶
type BookService struct {
Synchronous
}
func (*BookService) All ¶
func (b *BookService) All(symbol string, precision common.BookPrecision, priceLevels int) (*book.Snapshot, error)
All - retrieve all books for the given symbol with the given precision at the given price level see https://docs.bitfinex.com/reference#rest-public-books for more info
type CancelOrderMultiRequest ¶
type CancelOrderMultiRequest struct { OrderIDs OrderIDs `json:"id,omitempty"` GroupOrderIDs GroupOrderIDs `json:"gid,omitempty"` ClientOrderIDs ClientOrderIDs `json:"cid,omitempty"` All int `json:"all,omitempty"` }
CancelOrderMultiRequest - data structure for constructing cancel order multi request payload
type CandleService ¶
type CandleService struct {
Synchronous
}
CandleService manages the Candles endpoint.
func (*CandleService) History ¶
func (c *CandleService) History(symbol string, resolution common.CandleResolution) (*candle.Snapshot, error)
History - retrieves all candles (Max=1000) with the given symbol and the given candle resolution See https://docs.bitfinex.com/reference#rest-public-candles for more info
func (*CandleService) HistoryWithQuery ¶
func (c *CandleService) HistoryWithQuery( symbol string, resolution common.CandleResolution, start common.Mts, end common.Mts, limit common.QueryLimit, sort common.SortOrder, ) (*candle.Snapshot, error)
HistoryWithQuery - retrieves all candles (Max=1000) that fit the given query criteria See https://docs.bitfinex.com/reference#rest-public-candles for more info
func (*CandleService) Last ¶
func (c *CandleService) Last(symbol string, resolution common.CandleResolution) (*candle.Candle, error)
Last - retrieve the last candle for the given symbol with the given resolution See https://docs.bitfinex.com/reference#rest-public-candles for more info
type Client ¶
type Client struct { // service providers Candles CandleService Orders OrderService Positions PositionService Trades TradeService Tickers TickerService TickersHistory TickerHistoryService Currencies CurrenciesService Platform PlatformService Book BookService Wallet WalletService Ledgers LedgerService Stats StatsService Status StatusService Derivatives DerivativesService Funding FundingService Pulse PulseService Invoice InvoiceService Market MarketService Synchronous // contains filtered or unexported fields }
func NewClientWithHttpDo ¶
func NewClientWithHttpDo(httpDo func(c *http.Client, r *http.Request) (*http.Response, error)) *Client
Create a new Rest client with a custom http handler
func NewClientWithSynchronousNonce ¶
func NewClientWithSynchronousNonce(sync Synchronous, nonce utils.NonceGenerator) *Client
Create a new Rest client with a synchronous HTTP handler and a custom nonce generaotr
func NewClientWithSynchronousURLNonce ¶
func NewClientWithSynchronousURLNonce(sync Synchronous, url string, nonce utils.NonceGenerator) *Client
Create a new Rest client with a synchronous HTTP handler and a custom base url and nonce generator
func NewClientWithURL ¶
Create a new Rest client with a custom base url
func NewClientWithURLHttpDo ¶
func NewClientWithURLHttpDo(base string, httpDo func(c *http.Client, r *http.Request) (*http.Response, error)) *Client
Create a new Rest client with a custom base url and HTTP handler
func NewClientWithURLHttpDoNonce ¶
func NewClientWithURLHttpDoNonce(base string, httpDo func(c *http.Client, r *http.Request) (*http.Response, error), nonce utils.NonceGenerator) *Client
Create a new Rest client with a custom base url, HTTP handler and none generator
func NewClientWithURLNonce ¶
func NewClientWithURLNonce(url string, nonce utils.NonceGenerator) *Client
Create a new Rest client with a custom nonce generator
func (*Client) Credentials ¶
Set the clients credentials in order to make authenticated requests
func (*Client) NewAuthenticatedRequest ¶
func (c *Client) NewAuthenticatedRequest(permissionType common.PermissionType, refURL string) (Request, error)
Create a new authenticated GET request with the given permission type and endpoint url For example permissionType = "r" and refUrl = "/orders" then the target endpoint will be https://api.bitfinex.com/v2/auth/r/orders/:Symbol
func (*Client) NewAuthenticatedRequestWithBytes ¶
func (c *Client) NewAuthenticatedRequestWithBytes(permissionType common.PermissionType, refURL string, data []byte) (Request, error)
Create a new authenticated POST request with the given permission type,endpoint url and data (bytes) as the body For example permissionType = "r" and refUrl = "/orders" then the target endpoint will be https://api.bitfinex.com/v2/auth/r/orders/:Symbol
func (*Client) NewAuthenticatedRequestWithData ¶
func (c *Client) NewAuthenticatedRequestWithData(permissionType common.PermissionType, refURL string, data map[string]interface{}) (Request, error)
Create a new authenticated POST request with the given permission type,endpoint url and data (map[string]interface{}) as the body For example permissionType = "r" and refUrl = "/orders" then the target endpoint will be https://api.bitfinex.com/v2/auth/r/orders/:Symbol
type ClientOrderIDs ¶
type ClientOrderIDs [][]interface{}
type CurrenciesService ¶
type CurrenciesService struct { Synchronous // contains filtered or unexported fields }
CurrenciesService manages the conf endpoint.
func (*CurrenciesService) Conf ¶
func (cs *CurrenciesService) Conf(label, symbol, unit, explorer, pairs bool) ([]currency.Conf, error)
Conf - retreive currency and symbol service configuration data see https://docs.bitfinex.com/reference#rest-public-conf for more info
type DepositInvoiceRequest ¶
type DepositInvoiceRequest struct { Currency string `json:"currency,omitempty"` Wallet string `json:"wallet,omitempty"` Amount string `json:"amount,omitempty"` }
DepositInvoiceRequest - data structure for constructing deposit invoice request payload
type DerivativesService ¶
type DerivativesService struct { Synchronous // contains filtered or unexported fields }
OrderService manages data flow for the Order API endpoint
type ErrorResponse ¶
type ErrorResponse struct { Response *Response Message string `json:"message"` Code int `json:"code"` }
In case if API will wrong response code ErrorResponse will be returned to caller
func (*ErrorResponse) Error ¶
func (r *ErrorResponse) Error() string
type ForeignExchangeRateRequest ¶
type ForeignExchangeRateRequest struct { FirstCurrency string `json:"ccy1"` SecondCurrency string `json:"ccy2"` }
ForeignExchangeRateRequest data structure for constructing foreign exchange rate request payload
type FundingService ¶
type FundingService struct { Synchronous // contains filtered or unexported fields }
FundingService manages the Funding endpoint.
func (*FundingService) CancelOffer ¶
func (fs *FundingService) CancelOffer(fc *fundingoffer.CancelRequest) (*notification.Notification, error)
Submits a request to cancel the given offer see https://docs.bitfinex.com/reference#cancel-funding-offer for more info
func (*FundingService) Credits ¶
func (fs *FundingService) Credits(symbol string) (*fundingcredit.Snapshot, error)
Retreive all of the active credits used in positions see https://docs.bitfinex.com/reference#rest-auth-funding-credits for more info
func (*FundingService) CreditsHistory ¶
func (fs *FundingService) CreditsHistory(symbol string) (*fundingcredit.Snapshot, error)
Retreive all of the past in-active credits used in positions see https://docs.bitfinex.com/reference#rest-auth-funding-credits-hist for more info
func (*FundingService) KeepFunding ¶
func (fs *FundingService) KeepFunding(args KeepFundingRequest) (*notification.Notification, error)
KeepFunding - toggle to keep funding taken. Specify loan for unused funding and credit for used funding. see https://docs.bitfinex.com/reference#rest-auth-keep-funding for more info
func (*FundingService) Loans ¶
func (fs *FundingService) Loans(symbol string) (*fundingloan.Snapshot, error)
Retreive all of the active funding loans see https://docs.bitfinex.com/reference#rest-auth-funding-loans for more info
func (*FundingService) LoansHistory ¶
func (fs *FundingService) LoansHistory(symbol string) (*fundingloan.Snapshot, error)
Retreive all of the past in-active funding loans see https://docs.bitfinex.com/reference#rest-auth-funding-loans-hist for more info
func (*FundingService) OfferHistory ¶
func (fs *FundingService) OfferHistory(symbol string) (*fundingoffer.Snapshot, error)
Retreive all of the past in-active funding offers see https://docs.bitfinex.com/reference#rest-auth-funding-offers-hist for more info
func (*FundingService) Offers ¶
func (fs *FundingService) Offers(symbol string) (*fundingoffer.Snapshot, error)
Retreive all of the active fundign offers see https://docs.bitfinex.com/reference#rest-auth-funding-offers for more info
func (*FundingService) SubmitOffer ¶
func (fs *FundingService) SubmitOffer(fo *fundingoffer.SubmitRequest) (*notification.Notification, error)
Submits a request to create a new funding offer see https://docs.bitfinex.com/reference#submit-funding-offer for more info
func (*FundingService) Trades ¶
func (fs *FundingService) Trades(symbol string) (*fundingtrade.Snapshot, error)
Retreive all of the matched funding trades see https://docs.bitfinex.com/reference#rest-auth-funding-trades-hist for more info
type GetTickerHistPayload ¶
type GroupOrderIDs ¶
type GroupOrderIDs []int
type HttpTransport ¶
type HttpTransport struct { BaseURL *url.URL HTTPClient *http.Client // contains filtered or unexported fields }
func (HttpTransport) Request ¶
func (h HttpTransport) Request(req Request) ([]interface{}, error)
type InvoiceService ¶
type InvoiceService struct { Synchronous // contains filtered or unexported fields }
InvoiceService manages Invoice endpoint
func (*InvoiceService) GenerateInvoice ¶
func (is *InvoiceService) GenerateInvoice(payload DepositInvoiceRequest) (*invoice.Invoice, error)
GenerateInvoice generates a Lightning Network deposit invoice Accepts DepositInvoiceRequest type as argument https://docs.bitfinex.com/reference#rest-auth-deposit-invoice
type KeepFundingRequest ¶
KeepFundingRequest - data structure for constructing keep funding request payload
type LedgerService ¶
type LedgerService struct { Synchronous // contains filtered or unexported fields }
LedgerService manages the Ledgers endpoint.
type MarketService ¶
type MarketService struct { Synchronous // contains filtered or unexported fields }
func (*MarketService) AveragePrice ¶
func (ms *MarketService) AveragePrice(pld AveragePriceRequest) ([]float64, error)
AveragePrice Calculate the average execution price for Trading or rate for Margin funding. See: https://docs.bitfinex.com/reference#rest-public-calc-market-average-price
func (*MarketService) ForeignExchangeRate ¶
func (ms *MarketService) ForeignExchangeRate(pld ForeignExchangeRateRequest) ([]float64, error)
ForeignExchangeRate - Calculate the exchange rate between two currencies See: https://docs.bitfinex.com/reference#rest-public-calc-foreign-exchange-rate
type OrderMultiOpsRequest ¶
type OrderMultiOpsRequest struct {
Ops OrderOps `json:"ops"`
}
OrderMultiOpsRequest - data structure for constructing order multi ops request payload
type OrderService ¶
type OrderService struct { Synchronous // contains filtered or unexported fields }
OrderService manages data flow for the Order API endpoint
func (*OrderService) All ¶
func (s *OrderService) All() (*order.Snapshot, error)
Retrieves all of the active orders See https://docs.bitfinex.com/reference#rest-auth-orders for more info
func (*OrderService) AllHistory ¶
func (s *OrderService) AllHistory() (*order.Snapshot, error)
Retrieves all past orders See https://docs.bitfinex.com/reference#orders-history for more info
func (*OrderService) CancelOrderMulti ¶
func (s *OrderService) CancelOrderMulti(args CancelOrderMultiRequest) (*notification.Notification, error)
CancelOrderMulti cancels multiple orders simultaneously. Orders can be canceled based on the Order ID, the combination of Client Order ID and Client Order Date, or the Group Order ID. Alternatively, the body param 'all' can be used with a value of 1 to cancel all orders. see https://docs.bitfinex.com/reference#rest-auth-order-cancel-multi for more info
func (*OrderService) CancelOrderMultiOp ¶
func (s *OrderService) CancelOrderMultiOp(orderID int) (*notification.Notification, error)
CancelOrderMultiOp cancels order. Accepts orderID to be canceled. see https://docs.bitfinex.com/reference#rest-auth-order-multi for more info
func (*OrderService) CancelOrdersMultiOp ¶
func (s *OrderService) CancelOrdersMultiOp(ids OrderIDs) (*notification.Notification, error)
CancelOrdersMultiOp cancels multiple orders simultaneously. Accepts a slice of order ID's to be canceled. see https://docs.bitfinex.com/reference#rest-auth-order-multi for more info
func (*OrderService) GetByOrderId ¶
func (s *OrderService) GetByOrderId(orderID int64) (o *order.Order, err error)
Retrieve an active order by the given ID See https://docs.bitfinex.com/reference#rest-auth-orders for more info
func (*OrderService) GetBySymbol ¶
func (s *OrderService) GetBySymbol(symbol string) (*order.Snapshot, error)
Retrieves all of the active orders with for the given symbol See https://docs.bitfinex.com/reference#rest-auth-orders for more info
func (*OrderService) GetHistoryByOrderId ¶
func (s *OrderService) GetHistoryByOrderId(orderID int64) (o *order.Order, err error)
Retrieve a single order in history with the given id See https://docs.bitfinex.com/reference#orders-history for more info
func (*OrderService) GetHistoryBySymbol ¶
func (s *OrderService) GetHistoryBySymbol(symbol string) (*order.Snapshot, error)
Retrieves all past orders with the given symbol See https://docs.bitfinex.com/reference#orders-history for more info
func (*OrderService) OrderMultiOp ¶
func (s *OrderService) OrderMultiOp(ops OrderOps) (*notification.Notification, error)
OrderMultiOp - send Multiple order-related operations. Please note the sent object has only one property with a value of a slice of slices detailing each order operation. see https://docs.bitfinex.com/reference#rest-auth-order-multi for more info
func (*OrderService) OrderNewMultiOp ¶
func (s *OrderService) OrderNewMultiOp(onr order.NewRequest) (*notification.Notification, error)
OrderNewMultiOp creates new order. Accepts instance of order.NewRequest see https://docs.bitfinex.com/reference#rest-auth-order-multi for more info
func (*OrderService) OrderTrades ¶
func (s *OrderService) OrderTrades(symbol string, orderID int64) (*tradeexecutionupdate.Snapshot, error)
Retrieves the trades generated by an order See https://docs.bitfinex.com/reference#orders-history for more info
func (*OrderService) OrderUpdateMultiOp ¶
func (s *OrderService) OrderUpdateMultiOp(our order.UpdateRequest) (*notification.Notification, error)
OrderUpdateMultiOp updates order. Accepts instance of order.UpdateRequest see https://docs.bitfinex.com/reference#rest-auth-order-multi for more info
func (*OrderService) SubmitCancelOrder ¶
func (s *OrderService) SubmitCancelOrder(oc *order.CancelRequest) error
Submit a request to cancel an order with the given Id see https://docs.bitfinex.com/reference#cancel-order for more info
func (*OrderService) SubmitOrder ¶
func (s *OrderService) SubmitOrder(onr *order.NewRequest) (*notification.Notification, error)
Submit a request to create a new order see https://docs.bitfinex.com/reference#submit-order for more info
func (*OrderService) SubmitUpdateOrder ¶
func (s *OrderService) SubmitUpdateOrder(our *order.UpdateRequest) (*notification.Notification, error)
Submit a request to update an order with the given id with the given changes see https://docs.bitfinex.com/reference#order-update for more info
type PlatformService ¶
type PlatformService struct {
Synchronous
}
func (*PlatformService) Status ¶
func (p *PlatformService) Status() (bool, error)
Retrieves the current status of the platform see https://docs.bitfinex.com/reference#rest-public-platform-status for more info
type PositionService ¶
type PositionService struct { Synchronous // contains filtered or unexported fields }
PositionService manages the Position endpoint.
func (*PositionService) All ¶
func (s *PositionService) All() (*position.Snapshot, error)
All - retrieves all of the active positions see https://docs.bitfinex.com/reference#rest-auth-positions for more info
func (*PositionService) Claim ¶
func (s *PositionService) Claim(cp *position.ClaimRequest) (*notification.Notification, error)
Claim - submits a request to claim an active position with the given id see https://docs.bitfinex.com/reference#claim-position for more info
type PulseService ¶
type PulseService struct { Synchronous // contains filtered or unexported fields }
func (*PulseService) AddComment ¶
AddComment submits pulse comment see https://docs.bitfinex.com/reference#rest-auth-pulse-add
func (*PulseService) AddPulse ¶
AddPulse submits pulse message see https://docs.bitfinex.com/reference#rest-auth-pulse-add
func (*PulseService) DeletePulse ¶
func (ps *PulseService) DeletePulse(pid string) (int, error)
DeletePulse removes your pulse message. Returns 0 if no pulse was deleted and 1 if it was see https://docs.bitfinex.com/reference#rest-auth-pulse-del
func (*PulseService) PublicPulseHistory ¶
PublicPulseHistory returns latest pulse messages. You can specify an end timestamp to view older messages. see https://docs.bitfinex.com/reference#rest-public-pulse-hist
func (*PulseService) PublicPulseProfile ¶
func (ps *PulseService) PublicPulseProfile(nickname Nickname) (*pulseprofile.PulseProfile, error)
PublicPulseProfile returns details for a specific Pulse profile https://docs.bitfinex.com/reference#rest-public-pulse-profile
func (*PulseService) PulseHistory ¶
func (ps *PulseService) PulseHistory() ([]*pulse.Pulse, error)
PulseHistory allows you to retrieve your pulse history. see https://docs.bitfinex.com/reference#rest-auth-pulse-hist
type Request ¶
type Request struct { RefURL string // ref url Data []byte // body data Method string // http method Params url.Values // query parameters Headers map[string]string }
Request is a wrapper for standard http.Request. Default method is POST with no data.
func NewRequest ¶
Create new POST request with an empty body as payload
func NewRequestWithBytes ¶
Create a new POST request with the given bytes as body
func NewRequestWithData ¶
Create a new POST request with the given data (map[string]interface{}) as body
func NewRequestWithDataMethod ¶
Create a new request with a given method (POST | GET) with bytes as body
func NewRequestWithMethod ¶
Create a new request with the given method (POST | GET)
type StatsService ¶
type StatsService struct { Synchronous // contains filtered or unexported fields }
StatsService manages the Stats endpoint.
func (*StatsService) CreditSizeHistory ¶
func (ss *StatsService) CreditSizeHistory(symbol string, side common.OrderSide) ([]*stats.Stat, error)
Retrieves platform statistics for credit size history see https://docs.bitfinex.com/reference#rest-public-stats for more info
func (*StatsService) CreditSizeLast ¶
Retrieves platform statistics for credit size last see https://docs.bitfinex.com/reference#rest-public-stats for more info
func (*StatsService) FundingHistory ¶
func (ss *StatsService) FundingHistory(symbol string) ([]*stats.Stat, error)
Retrieves platform statistics for funding history see https://docs.bitfinex.com/reference#rest-public-stats for more info
func (*StatsService) FundingLast ¶
func (ss *StatsService) FundingLast(symbol string) (*stats.Stat, error)
Retrieves platform statistics for funding last see https://docs.bitfinex.com/reference#rest-public-stats for more info
func (*StatsService) PositionHistory ¶
func (ss *StatsService) PositionHistory(symbol string, side common.OrderSide) ([]*stats.Stat, error)
Retrieves platform statistics for position history see https://docs.bitfinex.com/reference#rest-public-stats for more info
func (*StatsService) PositionLast ¶
Retrieves platform statistics for position last see https://docs.bitfinex.com/reference#rest-public-stats for more info
func (*StatsService) SymbolCreditSizeHistory ¶
func (ss *StatsService) SymbolCreditSizeHistory(fundingSymbol string, tradingSymbol string) ([]*stats.Stat, error)
Retrieves platform statistics for credit size history see https://docs.bitfinex.com/reference#rest-public-stats for more info
func (*StatsService) SymbolCreditSizeLast ¶
func (ss *StatsService) SymbolCreditSizeLast(fundingSymbol string, tradingSymbol string) (*stats.Stat, error)
Retrieves platform statistics for credit size last see https://docs.bitfinex.com/reference#rest-public-stats for more info
type StatusService ¶
type StatusService struct { Synchronous // contains filtered or unexported fields }
TradeService manages the Trade endpoint.
func (*StatusService) DerivativeStatus ¶
func (ss *StatusService) DerivativeStatus(symbol string) (*derivatives.DerivativeStatus, error)
Retrieves derivative status information for the given symbol from the platform see https://docs.bitfinex.com/reference#rest-public-status for more info
func (*StatusService) DerivativeStatusAll ¶
func (ss *StatusService) DerivativeStatusAll() ([]*derivatives.DerivativeStatus, error)
Retrieves derivative status information for all symbols from the platform see https://docs.bitfinex.com/reference#rest-public-status for more info
func (*StatusService) DerivativeStatusMulti ¶
func (ss *StatusService) DerivativeStatusMulti(symbols []string) ([]*derivatives.DerivativeStatus, error)
Retrieves derivative status information for the given symbols from the platform see https://docs.bitfinex.com/reference#rest-public-status for more info
type Synchronous ¶
type TickerHistoryService ¶
type TickerHistoryService struct { Synchronous // contains filtered or unexported fields }
TickerHistoryService manages the Tickers History endpoint.
func (*TickerHistoryService) Get ¶
func (s *TickerHistoryService) Get(pld GetTickerHistPayload) ([]tickerhist.TickerHist, error)
Get - retrieves the ticker history for the given symbol see https://docs.bitfinex.com/reference#tickers-history for more info
type TickerService ¶
type TickerService struct { Synchronous // contains filtered or unexported fields }
TickerService manages the Ticker endpoint.
func (*TickerService) All ¶
func (s *TickerService) All() ([]*ticker.Ticker, error)
All - retrieves all tickers for all symbols see https://docs.bitfinex.com/reference#rest-public-tickers for more info
func (*TickerService) Get ¶
func (s *TickerService) Get(symbol string) (*ticker.Ticker, error)
Get - retrieves the ticker for the given symbol see https://docs.bitfinex.com/reference#rest-public-tickers for more info
func (*TickerService) GetMulti ¶
func (s *TickerService) GetMulti(symbols []string) ([]*ticker.Ticker, error)
GetMulti - retrieves the tickers for the given symbols see https://docs.bitfinex.com/reference#rest-public-tickers for more info
type TradeService ¶
type TradeService struct { Synchronous // contains filtered or unexported fields }
TradeService manages the Trade endpoint.
func (*TradeService) AccountAll ¶
func (s *TradeService) AccountAll() (*tradeexecutionupdate.Snapshot, error)
Retrieves all matched trades for the account see https://docs.bitfinex.com/reference#rest-auth-trades-hist for more info
func (*TradeService) AccountAllWithSymbol ¶
func (s *TradeService) AccountAllWithSymbol(symbol string) (*tradeexecutionupdate.Snapshot, error)
Retrieves all matched trades with the given symbol for the account see https://docs.bitfinex.com/reference#rest-auth-trades-hist for more info
func (*TradeService) AccountHistoryWithQuery ¶
func (s *TradeService) AccountHistoryWithQuery( symbol string, start common.Mts, end common.Mts, limit common.QueryLimit, sort common.SortOrder, ) (*tradeexecutionupdate.Snapshot, error)
Queries all matched trades with group of optional parameters see https://docs.bitfinex.com/reference#rest-auth-trades-hist for more info
func (*TradeService) PublicHistoryWithQuery ¶
func (s *TradeService) PublicHistoryWithQuery( symbol string, start common.Mts, end common.Mts, limit common.QueryLimit, sort common.SortOrder, ) (*trade.Snapshot, error)
Queries all public trades with a group of optional paramters see https://docs.bitfinex.com/reference#rest-public-trades for more info
type WalletService ¶
type WalletService struct { Synchronous // contains filtered or unexported fields }
WalletService manages data flow for the Wallet API endpoint
func (*WalletService) CreateDepositAddress ¶
func (ws *WalletService) CreateDepositAddress(wallet, method string) (*notification.Notification, error)
Submits a request to create a new deposit address for the give Bitfinex wallet. Old addresses are still valid. See https://docs.bitfinex.com/reference#deposit-address for more info
func (*WalletService) DepositAddress ¶
func (ws *WalletService) DepositAddress(wallet, method string) (*notification.Notification, error)
Retrieves the deposit address for the given Bitfinex wallet see https://docs.bitfinex.com/reference#deposit-address for more info
func (*WalletService) SetCollateral ¶
func (s *WalletService) SetCollateral(symbol string, amount float64) (bool, error)
Update the amount of collateral for a Derivative position see https://docs.bitfinex.com/reference#rest-auth-deriv-pos-collateral-set for more info
func (*WalletService) Transfer ¶
func (ws *WalletService) Transfer(from, to, currency, currencyTo string, amount float64) (*notification.Notification, error)
Submits a request to transfer funds from one Bitfinex wallet to another see https://docs.bitfinex.com/reference#transfer-between-wallets for more info
func (*WalletService) Wallet ¶
func (s *WalletService) Wallet() (*wallet.Snapshot, error)
Retrieves all of the wallets for the account see https://docs.bitfinex.com/reference#rest-auth-wallets for more info
func (*WalletService) Withdraw ¶
func (ws *WalletService) Withdraw(wallet, method string, amount float64, address string) (*notification.Notification, error)
Submits a request to withdraw funds from the given Bitfinex wallet to the given address See https://docs.bitfinex.com/reference#withdraw for more info