Documentation
¶
Index ¶
Constants ¶
View Source
const ( OrderSideASK = "ASK" OrderSideBID = "BID" OrderTypeLimit = "LIMIT" OrderTypeMarket = "MARKET" OrderStatePending = "PENDING" OrderStateDone = "DONE" TransferSourceCancel = "CANCEL" TransferSourceRefund = "REFUND" TransferSourceMatch = "MATCH" TradeSideMaker = "MAKER" TradeSideTaker = "TAKER" )
View Source
const (
Endpoint = "https://exchange.fox.one"
)
Variables ¶
This section is empty.
Functions ¶
func UseEndpoint ¶ added in v1.2.1
func UseEndpoint(endpoint string)
Types ¶
type AssetTicker ¶ added in v1.3.3
type AssetTicker struct { AssetID string `json:"asset_id"` Symbol string `json:"symbol"` Volume decimal.Decimal `json:"volume"` Price decimal.Decimal `json:"price"` Change decimal.Decimal `json:"change"` PriceUSD decimal.Decimal `json:"price_usd"` ChangeUSD decimal.Decimal `json:"change_usd"` PriceBTC decimal.Decimal `json:"price_btc"` ChangeBTC decimal.Decimal `json:"change_btc"` }
func ReadAssetTickers ¶ added in v1.3.3
func ReadAssetTickers(ctx context.Context) ([]*AssetTicker, error)
type Order ¶ added in v1.2.1
type Order struct { OrderID string `json:"id"` CreatedAt int64 `json:"created_at"` OrderType string `json:"order_type"` UserID string `json:"user_id"` QuoteAssetID string `json:"quote_asset_id"` BaseAssetID string `json:"base_asset_id"` Symbol string `json:"symbol"` Side string `json:"side"` Price decimal.Decimal `json:"price"` RemainingAmount decimal.Decimal `json:"remaining_amount"` FilledAmount decimal.Decimal `json:"filled_amount"` RemainingFunds decimal.Decimal `json:"remaining_fund"` FilledFunds decimal.Decimal `json:"filled_fund"` State string `json:"state"` }
func QueryOrder ¶ added in v1.2.4
func QueryOrders ¶ added in v1.2.1
func QueryOrders(ctx context.Context, token string, input *QueryOrdersInput) ([]*Order, *pagination.Pagination, error)
type OrderAction ¶
type OrderAction struct { S string // side A uuid.UUID // asset P string // price T string // type M uuid.UUID // merchant }
func ParsePutOrder ¶ added in v1.1.7
func ParsePutOrder(memo string) (*OrderAction, error)
func (*OrderAction) Encode ¶
func (action *OrderAction) Encode() (string, error)
type PutOrderInput ¶
type PutOrderOutput ¶
func PutOrder ¶
func PutOrder(input *PutOrderInput) (*PutOrderOutput, error)
type QueryOrdersInput ¶ added in v1.2.1
type TransferAction ¶
type TransferAction struct { S string // source O uuid.UUID // order A uuid.UUID // asset id P string // price C string // category, bid or ask }
func ParseTransfer ¶
func ParseTransfer(memo string) (*TransferAction, error)
Click to show internal directories.
Click to hide internal directories.