Documentation ¶
Index ¶
- type API
- func (api *API) GetAccountHistory(account, stop types.ObjectID, limit int, start types.ObjectID) ([]*OperationHistory, error)
- func (api *API) GetFillOrderHistory(base, quote types.ObjectID, limit uint32) ([]*OrderHistory, error)
- func (api *API) GetMarketHistory(base, quote types.ObjectID, bucketSeconds uint32, start, end types.Time) ([]*Bucket, error)
- func (api *API) GetMarketHistoryBuckets() ([]uint32, error)
- type Bucket
- type BucketKey
- type OperationHistory
- type OrderHistory
- type OrderKey
- type OrderOperation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (*API) GetAccountHistory ¶
func (api *API) GetAccountHistory(account, stop types.ObjectID, limit int, start types.ObjectID) ([]*OperationHistory, error)
GetAccountHistory gets operations relevant to the specified account account: The account whose history should be queried stop: ID of the earliest operation to retrieve limit: Maximum number of operations to retrieve (must not exceed 100) start: ID of the most recent operation to retrieve
func (*API) GetFillOrderHistory ¶
func (api *API) GetFillOrderHistory(base, quote types.ObjectID, limit uint32) ([]*OrderHistory, error)
GetFillOrderHistory returns filled orders
func (*API) GetMarketHistory ¶
func (api *API) GetMarketHistory(base, quote types.ObjectID, bucketSeconds uint32, start, end types.Time) ([]*Bucket, error)
GetMarketHistory returns market history base/quote (candlesticks) for the given period
func (*API) GetMarketHistoryBuckets ¶
GetMarketHistoryBuckets returns a list of buckets that can be passed to `GetMarketHistory` as the `bucketSeconds` argument
type Bucket ¶
type Bucket struct { ID string `json:"id"` Key BucketKey `json:"key"` HighBase types.Suint32 `json:"high_base"` HighQuote types.Suint32 `json:"high_quote"` LowBase types.Suint32 `json:"low_base"` LowQuote types.Suint32 `json:"low_quote"` OpenBase types.Suint32 `json:"open_base"` OpenQuote types.Suint32 `json:"open_quote"` CloseBase types.Suint32 `json:"close_base"` CloseQuote types.Suint32 `json:"close_quote"` BaseVolume types.Suint32 `json:"base_volume"` QuoteVolume types.Suint32 `json:"quote_volume"` }
type OperationHistory ¶
type OperationHistory struct { ID string `json:"id"` BlockNumber uint32 `json:"block_num"` TransactionsInBlock uint32 `json:"trx_in_block"` OperationsInTransactions uint32 `json:"op_in_trx"` VirtualOperations uint32 `json:"virtual_op"` Result []json.RawMessage `json:"result"` Operations []json.RawMessage `json:"op"` }
type OrderHistory ¶
type OrderHistory struct { ID string `json:"id"` Key OrderKey `json:"key"` Time types.Time `json:"time"` Operation OrderOperation `json:"op"` }
type OrderOperation ¶
type OrderOperation struct { Fee types.AssetAmount `json:"fee"` Pays types.AssetAmount `json:"pays"` Receives types.AssetAmount `json:"receives"` FillPrice types.Price `json:"fill_price"` OrderID types.ObjectID `json:"order_id"` AccountID types.ObjectID `json:"account_id"` IsMaker bool `json:"is_maker"` }
Click to show internal directories.
Click to hide internal directories.