Documentation ¶
Index ¶
- Constants
- type Borrowed
- type BorrowedStatus
- type Fill
- type RestClient
- func (rc *RestClient) Borrowed(ctx context.Context, status BorrowedStatus, before, after, limit string) ([]Borrowed, error)
- func (rc *RestClient) Fills(ctx context.Context, orderID string, instrumentID string, before string, ...) ([]Fill, error)
- func (rc *RestClient) Finance(ctx context.Context, req *exchange.FinanceReqParam) ([]*exchange.Finance, error)
- func (rc *RestClient) Ledgers(ctx context.Context, instrumentID string, before, after, limit, typ string) ([]okex.Ledger, error)
Constants ¶
View Source
const (
FillsEndPoint = "/api/margin/v3/fills"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Borrowed ¶
type Borrowed struct { BorrowID string `json:"borrow_id"` InstrumentID string `json:"instrument_id"` Currency string `json:"currency"` Timestamp string `json:"timestamp"` Amount decimal.Decimal `json:"amount"` Interest decimal.Decimal `json:"interest"` ReturnedAmount decimal.Decimal `json:"returned_amount"` PaidInterest decimal.Decimal `json:"paid_interest"` LastInterestTime string `json:"last_interest_time"` ForceRepayTime string `json:"force_repay_time"` Rate decimal.Decimal `json:"rate"` }
type BorrowedStatus ¶
type BorrowedStatus int
const ( BorrowedStatusOpen BorrowedStatus = iota BorrowedStatusClose BorrowedEndPoint = "/api/margin/v3/accounts/borrowed" )
type Fill ¶
type Fill struct { LedgerID string `json:"ledger_id"` InstrumentID string `json:"instrument_id"` Price decimal.Decimal `json:"price"` Size decimal.Decimal `json:"size"` OrderID string `json:"order_id"` Timestamp string `json:"timestamp"` ExecType string `json:"exec_type"` Fee string `json:"fee"` Side string `json:"side"` Currency string `json:"currency"` }
type RestClient ¶
type RestClient struct {
*okex.RestClient
}
func NewRestClient ¶
func NewRestClient(key, secret, pass string) *RestClient
func (*RestClient) Borrowed ¶
func (rc *RestClient) Borrowed(ctx context.Context, status BorrowedStatus, before, after, limit string) ([]Borrowed, error)
func (*RestClient) Finance ¶
func (rc *RestClient) Finance(ctx context.Context, req *exchange.FinanceReqParam) ([]*exchange.Finance, error)
Click to show internal directories.
Click to hide internal directories.