Documentation
¶
Index ¶
- Constants
- func InitSymbols(ctx context.Context) error
- func InitTestSymbols(ctx context.Context) error
- func NewBooks5Channel(instId string) exchange.Channel
- func NewBooks50TBTChannel(instId string) exchange.Channel
- func NewBooksChannel(instId string) exchange.Channel
- func ParseMarginSymbol(sym string) (exchange.MarginSymbol, error)
- func ParseSpotSymbol(sym string) (exchange.SpotSymbol, error)
- func ParseSwapSymbol(sym string) (exchange.SwapSymbol, error)
- func ParseSymbol(sym string) (ret exchange.Symbol, err error)
- func ParseTimestamp(ts string) (time.Time, error)
- type AccountBalance
- type AccountDetial
- type AssetBillRecord
- type AssetBillReq
- type Bill
- type BillReq
- type CancelOrderReq
- type CancelOrderResp
- type CodeC
- type CreateOrderReq
- type CreateOrderResp
- type CtType
- type CurrencyResp
- type Depth
- type DepthDS
- type ExecType
- type FetchOrderReq
- type Fill
- type FillsReq
- type FundingRate
- type GetRequest
- type InstType
- type Instrument
- type InterestAccrued
- type InterestAccruedReq
- type MarginSymbol
- type MgnMode
- type Okex5Channel
- type OrdType
- type Order
- type OrderCategory
- type OrderSide
- type OrderState
- type OrdersHistoryReq
- type PosSide
- type Positions
- type PositionsReq
- type RawDepth
- type RestClient
- func (r *RestClient) AccountBalance(ctx context.Context, currency ...string) (*AccountBalance, error)
- func (c *RestClient) AssetBills(ctx context.Context, req *AssetBillReq) ([]AssetBillRecord, error)
- func (rc *RestClient) Bills(ctx context.Context, req *BillReq) ([]Bill, error)
- func (rc *RestClient) Books(ctx context.Context, instId string, sz string) (*Depth, error)
- func (rc *RestClient) CancelOrder(ctx context.Context, req *CancelOrderReq) (*CancelOrderResp, error)
- func (rc *RestClient) CreateOrder(ctx context.Context, req *CreateOrderReq) (*CreateOrderResp, error)
- func (c *RestClient) Currencies(ctx context.Context) ([]CurrencyResp, error)
- func (rc *RestClient) FetchOrder(ctx context.Context, req *FetchOrderReq) (*Order, error)
- func (rc *RestClient) Fills(ctx context.Context, param *FillsReq) ([]Fill, error)
- func (rc *RestClient) Finance(ctx context.Context, req *exchange.FinanceReqParam) ([]exchange.Finance, error)
- func (rc *RestClient) FundingRate(ctx context.Context, instID string) ([]FundingRate, error)
- func (rc *RestClient) Instruments(ctx context.Context, typ InstType) ([]Instrument, error)
- func (rc *RestClient) InterestAccrued(ctx context.Context, iar *InterestAccruedReq) ([]InterestAccrued, error)
- func (rc *RestClient) MarginSymbols(ctx context.Context) ([]exchange.MarginSymbol, error)
- func (rc *RestClient) OrdersHistory(ctx context.Context, param *OrdersHistoryReq) ([]Order, error)
- func (rc *RestClient) Positions(ctx context.Context, req *PositionsReq) ([]Positions, error)
- func (rc *RestClient) Property() exchange.Property
- func (rc *RestClient) Request(ctx context.Context, method string, endPoint string, params url.Values, ...) error
- func (rc *RestClient) SpotSymbols(ctx context.Context) ([]exchange.SpotSymbol, error)
- func (rc *RestClient) SubAccountBalances(ctx context.Context, req *SubAccountBalancesReq) (*SubAccountBalancesResp, error)
- func (rc *RestClient) SubAccountBills(ctx context.Context, req *SubAccountBillsReq) ([]SubAccountBill, error)
- func (rc *RestClient) SubAccounts(ctx context.Context) ([]SubAccount, error)
- func (rc *RestClient) SwapSymbols(ctx context.Context) ([]exchange.SwapSymbol, error)
- func (rc *RestClient) Symbols(ctx context.Context) ([]exchange.Symbol, error)
- func (rc *RestClient) Trades(ctx context.Context, req *exchange.TradeReqParam) ([]exchange.Trade, error)
- func (c *RestClient) Transfer(ctx context.Context, param *TransferParam) (*TransferResp, error)
- func (c *RestClient) WithdrawlHistory(ctx context.Context, req *WithdrawlHistoryReq) ([]WithdrawlHistory, error)
- type RestResponse
- type SpotSymbol
- type SubAccount
- type SubAccountBalanceDetail
- type SubAccountBalancesReq
- type SubAccountBalancesResp
- type SubAccountBill
- type SubAccountBillsReq
- func (br *SubAccountBillsReq) AfterTime(ts time.Time) *SubAccountBillsReq
- func (br *SubAccountBillsReq) BeforeTime(ts time.Time) *SubAccountBillsReq
- func (br *SubAccountBillsReq) Ccy(ccy string) *SubAccountBillsReq
- func (br *SubAccountBillsReq) Limit(lmt int) *SubAccountBillsReq
- func (br *SubAccountBillsReq) SubAcct(at string) *SubAccountBillsReq
- func (br *SubAccountBillsReq) Type(typ string) *SubAccountBillsReq
- type SwapSymbol
- type TDMode
- type Trade
- type TransferParam
- type TransferResp
- type WSClient
- type WithdrawlHistory
- type WithdrawlHistoryReq
Constants ¶
View Source
const ( BillsEndPoint = "/api/v5/account/bills" InterestAccruedEndPoint = "/api/v5/account/interest-accrued" )
View Source
const ( TransferEndPoint = "/api/v5/asset/transfer" CurrenciesEndPoint = "/api/v5/asset/currencies" AssetBillsEndPoint = "/api/v5/asset/bills" WithdrawlHistoryEndPoint = "/api/v5/asset/withdrawal-history" )
View Source
const ( CtTypeNone CtType = "" CtTypeLinear CtType = "linear" CtTypeInverse CtType = "Inverse" MgnModeNone MgnMode = "" MgnModeCash MgnMode = "cash" MgnModeCross MgnMode = "cross" MgnModeIsolated MgnMode = "isolated" MgnModeEmpty MgnMode = "" ExecTypeMaker ExecType = "M" ExecTypeTaker ExecType = "T" InstTypeSpot InstType = "SPOT" InstTypeMargin InstType = "MARGIN" InstTypeSwap InstType = "SWAP" InstTypeFutures InstType = "FUTURES" InstTypeOption InstType = "OPTION" InstTypeAny InstType = "ANY" InstTypeNone InstType = "" TDModeIsolated TDMode = "isolated" TDModeCross TDMode = "cross" TDModeCash TDMode = "cash" OrderSideBuy OrderSide = "buy" OrderSideSell OrderSide = "sell" PosSideNone PosSide = "" PosSideLong PosSide = "long" PosSideShort PosSide = "short" PosSideNet PosSide = "net" OrdTypeMaket OrdType = "market" OrdTypeLimit OrdType = "limit" OrdTypePostOnly OrdType = "post_only" OrdTypeFOK OrdType = "fok" OrdTypeIOC OrdType = "ioc" OrdTypeOptimalLimitIOC OrdType = "optimal_limit_ioc" OrderStateCanceled OrderState = "canceled" OrderStateLive OrderState = "live" OrderStatePartiallyFilled OrderState = "partially_filled" OrderStateFilled OrderState = "filled" OrderCategoryUnknown OrderCategory = "" OrderCategoryNormal OrderCategory = "normal" OrderCategoryTwap OrderCategory = "twap" OrderCategoryAdl OrderCategory = "adl" OrderCategoryFullLiquidation OrderCategory = "full_liquidation" OrderCategoryPartialLiquidation OrderCategory = "partial_liquidation" OrderCategoryDelivery OrderCategory = "delivery" )
View Source
const ( SubAccountListEndpoint = "/api/v5/users/subaccount/list" SubAccountBillsEndPoint = "/api/v5/asset/subaccount/bills" SubAccountBalancesEndPoint = "/api/v5/account/subaccount/balances" )
View Source
const ( CreateOrderEndPoint = "/api/v5/trade/order" FetchOrderEndPoint = CreateOrderEndPoint CancelOrderEndPoint = "/api/v5/trade/cancel-order" FillsEndPoint = "/api/v5/trade/fills" )
View Source
const ( DepthSnapshot = "snapshot" DepthUpdate = "update" BooksChannel = "books" Books5Channel = "books5" Books50TBTChannel = "books50-l2-tbt" )
View Source
const ( WebSocketPublicAddr = "wss://wsaws.okx.com:8443/ws/v5/public" WebSocketPrivateAddr = "wss://wsaws.okx.com:8443/ws/v5/private" WebSocketSimPublicAddr = "wss://wspap.okx.com:8443/ws/v5/public?brokerId=9999" WebSocketSimPrivateAdrr = "wss://wspap.okx.com:8443/ws/v5/private?brokerId=9999" MethodSubscribe = "subscribe" MethodUnSubscribe = "unsubscribe" )
View Source
const (
AccountBalanceEndPoint = "/api/v5/account/balance"
)
View Source
const (
BooksEndPoint = "/api/v5/market/books"
)
View Source
const (
CodeOK = "0"
)
View Source
const (
FundingEndPoint = "/api/v5/public/funding-rate"
)
View Source
const (
InstrumentEndPoint = "/api/v5/public/instruments"
)
View Source
const (
PositionsEndPoint = "/api/v5/account/positions"
)
View Source
const (
TradesChannel = "trades"
)
Variables ¶
This section is empty.
Functions ¶
func InitSymbols ¶
func InitTestSymbols ¶ added in v0.5.2
func NewBooks5Channel ¶
func NewBooks50TBTChannel ¶
func NewBooksChannel ¶ added in v0.5.4
func ParseMarginSymbol ¶
func ParseMarginSymbol(sym string) (exchange.MarginSymbol, error)
func ParseSpotSymbol ¶
func ParseSpotSymbol(sym string) (exchange.SpotSymbol, error)
func ParseSwapSymbol ¶
func ParseSwapSymbol(sym string) (exchange.SwapSymbol, error)
Types ¶
type AccountBalance ¶
type AccountBalance struct {
UTime string `json:"uTime"`
TotalEq string `json:"totalEq"`
IsoEq string `json:"isoEq"`
AdjEq string `json:"adjEq"`
OrdFroz string `json:"ordFroz"`
Imr string `json:"imr"`
Nmr string `json:"nmr"`
MgnRatio string `json:"mgnRatio"`
NotionalUSD string `json:"notionalUsd"`
Details []AccountDetial `json:"details"`
}
type AccountDetial ¶
type AccountDetial struct {
Ccy string `json:"ccy"`
Eq string `json:"eq"`
CashBal string `json:"cashBal"`
UTime string `json:"uTime"`
IsoEq string `json:"isoEq"`
AvailEq string `json:"availEq"`
DisEq string `json:"disEq"`
AvailBal string `json:"availBal"`
FrozenBal string `json:"frozenBal"`
OrdFrozen string `json:"ordFrozen"`
Liab string `json:"liab"`
Upl string `json:"upl"`
UplLiab string `json:"uplLiab"`
CrossLiab string `json:"crossLiab"`
IsoLiab string `json:"isoLiab"`
MgnRatio string `json:"mgnRatio"`
Interest string `json:"interest"`
Twap string `json:"twap"`
MaxLoan string `json:"maxLoan"`
EqUsd string `json:"eqUsd"`
NotionalLever string `json:"notionalLever"`
}
type AssetBillRecord ¶ added in v0.5.4
type AssetBillReq ¶ added in v0.5.4
type AssetBillReq struct {
*GetRequest
}
func NewAssetBillReq ¶ added in v0.5.4
func NewAssetBillReq() *AssetBillReq
func (*AssetBillReq) AfterTime ¶ added in v0.5.4
func (ar *AssetBillReq) AfterTime(ts time.Time) *AssetBillReq
func (*AssetBillReq) BeforeTime ¶ added in v0.5.4
func (ar *AssetBillReq) BeforeTime(ts time.Time) *AssetBillReq
func (*AssetBillReq) Ccy ¶ added in v0.5.4
func (ar *AssetBillReq) Ccy(ccy string) *AssetBillReq
func (*AssetBillReq) Limit ¶ added in v0.5.4
func (ar *AssetBillReq) Limit(l string) *AssetBillReq
func (*AssetBillReq) Type ¶ added in v0.5.4
func (ar *AssetBillReq) Type(typ string) *AssetBillReq
type Bill ¶
type Bill struct {
InstType InstType `json:"instType"`
BillID string `json:"billId"`
Type string `json:"type"`
SubType string `json:"subType"`
Ts string `json:"ts"`
BalChg string `json:"balChg"`
PosBalChg string `json:"posBalChg"`
Bal string `json:"bal"`
PosBal string `json:"posBal"`
Sz string `json:"sz"`
Ccy string `json:"ccy"`
Pnl string `json:"pnl"`
Fee string `json:"fee"`
MgnMode MgnMode `json:"mgnMode"`
InstID string `json:"instId"`
OrdID string `json:"ordId"`
From string `json:"from"`
To string `json:"to"`
Notes string `json:"notes"`
}
type CancelOrderReq ¶
type CancelOrderResp ¶
type CreateOrderReq ¶
type CreateOrderReq struct {
InstID string `json:"instId"`
TDMode TDMode `json:"tdMode"`
Ccy string `json:"ccy,omitempty"`
ClOrderID string `json:"clOrderId,omitempty"`
Tag string `json:"tag,omitempty"`
Side OrderSide `json:"side"`
PosSide PosSide `json:"posSide,omitempty"`
OrdType OrdType `json:"ordType"`
Sz string `json:"sz"`
Px string `json:"px,omitempty"`
ReduecOnly bool `json:"reduceOnly"`
}
type CreateOrderResp ¶
type CurrencyResp ¶
type DepthDS ¶
type DepthDS struct {
// contains filtered or unexported fields
}
DepthDS recv okex5 RawDepth notify and calc depth
func NewDepthDS ¶
func NewDepthDS() *DepthDS
type FetchOrderReq ¶
type Fill ¶
type Fill struct {
InstType InstType `json:"instType"`
InstID string `json:"instId"`
TradeID string `json:"tradeId"`
OrdID string `json:"ordId"`
ClOrdID string `json:"clOrdId"`
BillID string `json:"billId"`
Tag string `json:"tag"`
FIllPx string `json:"fillPx"`
FillSz string `json:"fillSz"`
Side OrderSide `json:"side"`
PosSide PosSide `json:"posSide"`
ExecType ExecType `json:"execType"`
FeeCcy string `json:"feeCcy"`
Fee string `json:"fee"`
Ts string `json:"ts"`
}
type FundingRate ¶ added in v0.5.2
type GetRequest ¶ added in v0.5.4
type GetRequest struct {
// contains filtered or unexported fields
}
func NewGetRequest ¶ added in v0.5.4
func NewGetRequest() *GetRequest
func (*GetRequest) Add ¶ added in v0.5.4
func (gr *GetRequest) Add(key, val string)
func (*GetRequest) Values ¶ added in v0.5.4
func (gr *GetRequest) Values() url.Values
type Instrument ¶
type Instrument struct {
InstType InstType `json:"instType"`
InstID string `json:"instId"`
Uly string `json:"uly"`
Category string `json:"category"`
BaseCcy string `json:"baseCcy"`
QuoteCcy string `json:"quoteCcy"`
SettleCcy string `json:"settleCcy"`
CtVal string `json:"CtVal"`
CtMul string `json:"CtMul"`
CtValCcy string `json:"ctValCcy"`
OptType string `json:"optType"`
Stk string `json:"stk"`
ListTime string `json:"listTime"`
ExpTime string `json:"expTime"`
Lever string `json:"lever"`
TickSz string `json:"tickSz"`
LotSz string `json:"lotSz"`
MinSz string `json:"minSz"`
CtType string `json:"ctType"`
Alias string `json:"alias"`
State string `json:"state"`
}
type InterestAccrued ¶ added in v0.4.0
type InterestAccruedReq ¶ added in v0.4.0
type MarginSymbol ¶
type MarginSymbol struct {
*exchange.BaseMarginSymbol
}
func (*MarginSymbol) String ¶
func (ms *MarginSymbol) String() string
type Okex5Channel ¶
type Okex5Channel struct {
Channel string `json:"channel"`
InstType InstType `json:"instType,omitempty"`
Uly string `json:"uly,omitempty"`
InstID string `json:"instId,omitempty"`
}
func NewTradesChannel ¶
func NewTradesChannel(instID string) *Okex5Channel
func (*Okex5Channel) String ¶
func (oc *Okex5Channel) String() string
type Order ¶
type Order struct {
InstType InstType `json:"instType"`
InstId string `json:"instId"`
Ccy string `json:"ccy"`
OrderID string `json:"ordId"`
ClOrdID string `json:"clOrdId"`
Tag string `json:"tag"`
Px string `json:"px"`
Sz string `json:"sz"`
Pnl string `json:"pnl"`
OrderType OrdType `json:"ordType"`
Side OrderSide `json:"side"`
PosSide PosSide `json:"posSide"`
TDMode TDMode `json:"tdMode"`
AccFillSZ string `json:"accFillSz"`
FillPx string `json:"fillPx"`
TradeID string `json:"tradeId"`
FillSz string `json:"fillSz"`
FillTime string `json:"fillTime"`
AvgPx string `json:"avgPx"`
State OrderState `json:"state"`
Lever string `json:"lever"`
TpTriggerPx string `json:"tpTriggerPx"`
TpOrdPx string `json:"tpOrdPx"`
SlTriggerPx string `json:"slTriggerPx"`
SlOrdPx string `json:"slOrdPx"`
FeeCcy string `json:"feeCcy"`
Fee string `json:"fee"`
RebateCcy string `json:"rebatCcy"`
Rebat string `json:"rebat"`
Category OrderCategory `json:"category"`
UTime string `json:"uTime"`
CTime string `json:"cTime"`
}
type OrderCategory ¶
type OrderCategory string
func (*OrderCategory) UnmarshalJSON ¶
func (oc *OrderCategory) UnmarshalJSON(raw []byte) error
type OrderState ¶
type OrderState string
func (*OrderState) UnmarshalJSON ¶
func (os *OrderState) UnmarshalJSON(raw []byte) error
type OrdersHistoryReq ¶ added in v0.4.2
type OrdersHistoryReq struct {
InstType InstType `json:"instType"`
Uly string `json:"uly"`
InstID string `json:"instId"`
OrdType OrdType `json:"ordType"`
State string `json:"state"`
Category OrderCategory `json:"category"`
After string `json:"after"`
Before string `json:"before"`
Limit string `json:"limit"`
}
type Positions ¶ added in v0.5.4
type Positions struct {
Adl string `json:"adl"`
AvailPos string `json:"availPos"`
AvgPx string `json:"avgPx"`
CTime string `json:"cTime"`
Ccy string `json:"ccy"`
DeltaBS string `json:"deltaBS"`
DeltaPA string `json:"deltaPA"`
GammaBS string `json:"gammaBS"`
GammaPA string `json:"gammaPA"`
IMR string `json:"imr"`
InstID string `json:"instId"`
InstType string `json:"instType"`
Interest string `json:"interest"`
Last string `json:"last"`
UsdPx string `json:"usdPx"`
Lever string `json:"lever"`
Liab string `json:"liab"`
LiabCcy string `json:"liabCcy"`
LiqPx string `json:"liqPx"`
MarkPx string `json:"markPx"`
Margin string `json:"margin"`
MgnMode string `json:"mgnMode"`
MgnRatio string `json:"mgnRatio"`
NMR string `json:"nmr"`
NotionalUsd string `json:"notionalUsd"`
OptVal string `json:"optVal"`
PTime string `json:"pTime"`
Pos string `json:"pos"`
PosCcy string `json:"posCcy"`
PosID string `json:"posId"`
PosSide string `json:"posSide"`
ThetaBS string `json:"thetaBS"`
ThetaPA string `json:"thetaPA"`
TradeID string `json:"tradeId"`
UTime string `json:"uTime"`
Upl string `json:"upl"`
UplRatio string `json:"uplRatio"`
VegaBS string `json:"vegaBS"`
VegaPA string `json:"vegaPA"`
}
type PositionsReq ¶ added in v0.5.4
type PositionsReq struct {
*GetRequest
}
func NewPositionsReq ¶ added in v0.5.4
func NewPositionsReq() *PositionsReq
func (*PositionsReq) InstID ¶ added in v0.5.4
func (pr *PositionsReq) InstID(id string) *PositionsReq
func (*PositionsReq) InstType ¶ added in v0.5.4
func (pr *PositionsReq) InstType(typ string) *PositionsReq
func (*PositionsReq) PosID ¶ added in v0.5.4
func (pr *PositionsReq) PosID(id string) *PositionsReq
type RawDepth ¶
type RawDepth struct {
Asks [][4]string `json:"asks"`
Bids [][4]string `json:"bids"`
Ts string `json:"ts"`
Checksum int32 `json:"checksum"`
}
RawDepth incremental depth push
type RestClient ¶
type RestClient struct {
// contains filtered or unexported fields
}
func NewRestClient ¶
func NewRestClient(key, secret, pass string) *RestClient
func NewTestRestClient ¶
func NewTestRestClient(key, secret, pass string) *RestClient
func (*RestClient) AccountBalance ¶
func (r *RestClient) AccountBalance(ctx context.Context, currency ...string) (*AccountBalance, error)
func (*RestClient) AssetBills ¶ added in v0.5.4
func (c *RestClient) AssetBills(ctx context.Context, req *AssetBillReq) ([]AssetBillRecord, error)
func (*RestClient) CancelOrder ¶
func (rc *RestClient) CancelOrder(ctx context.Context, req *CancelOrderReq) (*CancelOrderResp, error)
func (*RestClient) CreateOrder ¶
func (rc *RestClient) CreateOrder(ctx context.Context, req *CreateOrderReq) (*CreateOrderResp, error)
func (*RestClient) Currencies ¶
func (c *RestClient) Currencies(ctx context.Context) ([]CurrencyResp, error)
func (*RestClient) FetchOrder ¶
func (rc *RestClient) FetchOrder(ctx context.Context, req *FetchOrderReq) (*Order, error)
func (*RestClient) Finance ¶
func (rc *RestClient) Finance(ctx context.Context, req *exchange.FinanceReqParam) ([]exchange.Finance, error)
func (*RestClient) FundingRate ¶ added in v0.5.2
func (rc *RestClient) FundingRate(ctx context.Context, instID string) ([]FundingRate, error)
func (*RestClient) Instruments ¶
func (rc *RestClient) Instruments(ctx context.Context, typ InstType) ([]Instrument, error)
func (*RestClient) InterestAccrued ¶ added in v0.4.0
func (rc *RestClient) InterestAccrued(ctx context.Context, iar *InterestAccruedReq) ([]InterestAccrued, error)
func (*RestClient) MarginSymbols ¶ added in v0.5.2
func (rc *RestClient) MarginSymbols(ctx context.Context) ([]exchange.MarginSymbol, error)
func (*RestClient) OrdersHistory ¶ added in v0.4.2
func (rc *RestClient) OrdersHistory(ctx context.Context, param *OrdersHistoryReq) ([]Order, error)
func (*RestClient) Positions ¶ added in v0.5.4
func (rc *RestClient) Positions(ctx context.Context, req *PositionsReq) ([]Positions, error)
func (*RestClient) Property ¶
func (rc *RestClient) Property() exchange.Property
func (*RestClient) Request ¶
func (rc *RestClient) Request(ctx context.Context, method string, endPoint string, params url.Values, body io.Reader, sign bool, dst interface{}) error
Request do okexv5 rest request. response data field will be store into dst
func (*RestClient) SpotSymbols ¶ added in v0.5.2
func (rc *RestClient) SpotSymbols(ctx context.Context) ([]exchange.SpotSymbol, error)
func (*RestClient) SubAccountBalances ¶ added in v0.5.4
func (rc *RestClient) SubAccountBalances(ctx context.Context, req *SubAccountBalancesReq) (*SubAccountBalancesResp, error)
func (*RestClient) SubAccountBills ¶ added in v0.5.4
func (rc *RestClient) SubAccountBills(ctx context.Context, req *SubAccountBillsReq) ([]SubAccountBill, error)
func (*RestClient) SubAccounts ¶ added in v0.5.4
func (rc *RestClient) SubAccounts(ctx context.Context) ([]SubAccount, error)
func (*RestClient) SwapSymbols ¶ added in v0.5.2
func (rc *RestClient) SwapSymbols(ctx context.Context) ([]exchange.SwapSymbol, error)
func (*RestClient) Trades ¶
func (rc *RestClient) Trades(ctx context.Context, req *exchange.TradeReqParam) ([]exchange.Trade, error)
func (*RestClient) Transfer ¶
func (c *RestClient) Transfer(ctx context.Context, param *TransferParam) (*TransferResp, error)
func (*RestClient) WithdrawlHistory ¶ added in v0.5.4
func (c *RestClient) WithdrawlHistory(ctx context.Context, req *WithdrawlHistoryReq) ([]WithdrawlHistory, error)
type RestResponse ¶
type SpotSymbol ¶
type SpotSymbol struct {
*exchange.BaseSpotSymbol
}
func (*SpotSymbol) String ¶
func (ss *SpotSymbol) String() string
type SubAccount ¶ added in v0.5.4
type SubAccountBalanceDetail ¶ added in v0.5.4
type SubAccountBalanceDetail struct {
Ccy string `json:"ccy"`
Eq string `json:"eq"`
CashBal string `json:"cashBal"`
UTime string `json:"uTime"`
IsoEq string `json:"isoEq"`
AvailEq string `json:"availEq"`
DisEq string `json:"disEq"`
AvailBal string `json:"availBal"`
FrozenBal string `json:"frozenBal"`
OrdFrozen string `json:"ordFrozen"`
Liab string `json:"liab"`
Upl string `json:"uplLiab"`
CrossLiab string `json:"crossLiab"`
IsoLiab string `json:"isoLiab"`
MgnRatio string `json:"mgnRatio"`
Interest string `json:"interest"`
Twap string `json:"twap"`
MaxLoan string `json:"maxLoan"`
EqUsd string `json:"eqUsd"`
NotionalLever string `json:"notionalLever"`
}
type SubAccountBalancesReq ¶ added in v0.5.4
type SubAccountBalancesReq struct {
*GetRequest
}
func NewBalancesReq ¶ added in v0.5.4
func NewBalancesReq(subAcct string) *SubAccountBalancesReq
type SubAccountBalancesResp ¶ added in v0.5.4
type SubAccountBalancesResp struct {
AdjEq string `json:"adjEq"`
TotalEq string `json:"totalEq"`
IsoEq string `json:"isoEq"`
OrdFroz string `json:"ordFroz"`
Imr string `json:"imr"`
Mmr string `json:"mmr"`
MgnRatio string `json:"mgnRatio"`
NotionalUsd string `json:"notionalUsd"`
UTime string `json:"uTime"`
Details []SubAccountBalanceDetail `json:"details"`
}
type SubAccountBill ¶ added in v0.5.4
type SubAccountBillsReq ¶ added in v0.5.4
type SubAccountBillsReq struct {
*GetRequest
}
func NewBillsReq ¶ added in v0.5.4
func NewBillsReq() *SubAccountBillsReq
func (*SubAccountBillsReq) AfterTime ¶ added in v0.5.4
func (br *SubAccountBillsReq) AfterTime(ts time.Time) *SubAccountBillsReq
func (*SubAccountBillsReq) BeforeTime ¶ added in v0.5.4
func (br *SubAccountBillsReq) BeforeTime(ts time.Time) *SubAccountBillsReq
func (*SubAccountBillsReq) Ccy ¶ added in v0.5.4
func (br *SubAccountBillsReq) Ccy(ccy string) *SubAccountBillsReq
func (*SubAccountBillsReq) Limit ¶ added in v0.5.4
func (br *SubAccountBillsReq) Limit(lmt int) *SubAccountBillsReq
func (*SubAccountBillsReq) SubAcct ¶ added in v0.5.4
func (br *SubAccountBillsReq) SubAcct(at string) *SubAccountBillsReq
func (*SubAccountBillsReq) Type ¶ added in v0.5.4
func (br *SubAccountBillsReq) Type(typ string) *SubAccountBillsReq
type SwapSymbol ¶
type SwapSymbol struct {
*exchange.BaseSwapSymbol
}
func (*SwapSymbol) String ¶
func (ss *SwapSymbol) String() string
type Trade ¶
type TransferParam ¶
type TransferResp ¶
type WSClient ¶
func NewTestWSPublicClient ¶
func NewTestWSPublicClient(data chan interface{}) *WSClient
func NewWSPublicClient ¶
func NewWSPublicClient(data chan interface{}) *WSClient
type WithdrawlHistory ¶ added in v0.5.4
type WithdrawlHistoryReq ¶ added in v0.5.4
type WithdrawlHistoryReq struct {
*GetRequest
}
func NewWithdrawlHistoryReq ¶ added in v0.5.4
func NewWithdrawlHistoryReq() *WithdrawlHistoryReq
func (*WithdrawlHistoryReq) AfterTime ¶ added in v0.5.4
func (wr *WithdrawlHistoryReq) AfterTime(ts time.Time) *WithdrawlHistoryReq
func (*WithdrawlHistoryReq) Ccy ¶ added in v0.5.4
func (wr *WithdrawlHistoryReq) Ccy(ccy string) *WithdrawlHistoryReq
Click to show internal directories.
Click to hide internal directories.