Documentation ¶
Index ¶
- Constants
- Variables
- func BinanceGetRestHostByApiType(apiType ApiType) string
- func GetPointer[T any](v T) *T
- func HandleWsPayloadResult[T any](data []byte) (*T, error)
- func HmacSha256(secret, data string) string
- func RequestWithHeader(urlStr string, method string, headerMap map[string]string, isGzip bool) ([]byte, error)
- func SetHttpTimeout(timeout time.Duration)
- func SetLogger(logger *logrus.Logger)
- func SetNetType(netType NetType)
- func SetServerTimeDelta(delta int64)
- func SetUseProxy(useProxy bool, proxyUrls ...string)
- type ApiType
- type AssertTransferType
- type BinanceErrorRes
- type BinanceRestRes
- type Client
- type DepthGear
- type FutureAccountApi
- type FutureAccountReq
- type FutureAccountRes
- type FutureAccountResAsset
- type FutureAccountResPosition
- type FutureAggTradesApi
- func (api *FutureAggTradesApi) Do() (*FutureAggTradesRes, error)
- func (api *FutureAggTradesApi) EndTime(EndTime int64) *FutureAggTradesApi
- func (api *FutureAggTradesApi) FromId(FromId int64) *FutureAggTradesApi
- func (api *FutureAggTradesApi) Limit(Limit int) *FutureAggTradesApi
- func (api *FutureAggTradesApi) StartTime(StartTime int64) *FutureAggTradesApi
- func (api *FutureAggTradesApi) Symbol(Symbol string) *FutureAggTradesApi
- type FutureAggTradesReq
- type FutureAggTradesRes
- type FutureAggTradesResRow
- type FutureAllOrdersApi
- func (api *FutureAllOrdersApi) Do() (*FutureAllOrdersRes, error)
- func (api *FutureAllOrdersApi) EndTime(EndTime int64) *FutureAllOrdersApi
- func (api *FutureAllOrdersApi) Limit(Limit int64) *FutureAllOrdersApi
- func (api *FutureAllOrdersApi) OrderId(OrderId int64) *FutureAllOrdersApi
- func (api *FutureAllOrdersApi) RecvWindow(RecvWindow int64) *FutureAllOrdersApi
- func (api *FutureAllOrdersApi) StartTime(StartTime int64) *FutureAllOrdersApi
- func (api *FutureAllOrdersApi) Symbol(Symbol string) *FutureAllOrdersApi
- func (api *FutureAllOrdersApi) Timestamp(Timestamp int64) *FutureAllOrdersApi
- type FutureAllOrdersReq
- type FutureAllOrdersRes
- type FutureApi
- type FutureBatchOrdersDeleteApi
- func (api *FutureBatchOrdersDeleteApi) Do() (*FutureBatchOrdersDeleteRes, error)
- func (api *FutureBatchOrdersDeleteApi) OrderIdList(OrderIdList []int64) *FutureBatchOrdersDeleteApi
- func (api *FutureBatchOrdersDeleteApi) OrigClientOrderIdList(OrigClientOrderIdList []string) *FutureBatchOrdersDeleteApi
- func (api *FutureBatchOrdersDeleteApi) RecvWindow(RecvWindow int64) *FutureBatchOrdersDeleteApi
- func (api *FutureBatchOrdersDeleteApi) Symbol(Symbol string) *FutureBatchOrdersDeleteApi
- func (api *FutureBatchOrdersDeleteApi) Timestamp(Timestamp int64) *FutureBatchOrdersDeleteApi
- type FutureBatchOrdersDeleteReq
- type FutureBatchOrdersDeleteRes
- type FutureBatchOrdersPostApi
- func (api *FutureBatchOrdersPostApi) AddOrders(orderApis ...*FutureOrderPostApi) *FutureBatchOrdersPostApi
- func (api *FutureBatchOrdersPostApi) Do() (*FutureBatchOrdersPostRes, error)
- func (api *FutureBatchOrdersPostApi) RecvWindow(RecvWindow int64) *FutureBatchOrdersPostApi
- func (api *FutureBatchOrdersPostApi) SetOrders(orderApi []*FutureOrderPostApi) *FutureBatchOrdersPostApi
- func (api *FutureBatchOrdersPostApi) Timestamp(Timestamp int64) *FutureBatchOrdersPostApi
- type FutureBatchOrdersPostReq
- type FutureBatchOrdersPostRes
- type FutureBatchOrdersPutApi
- func (api *FutureBatchOrdersPutApi) AddOrders(orderApi ...*FutureOrderPutApi) *FutureBatchOrdersPutApi
- func (api *FutureBatchOrdersPutApi) Do() (*FutureBatchOrdersPutRes, error)
- func (api *FutureBatchOrdersPutApi) RecvWindow(RecvWindow int64) *FutureBatchOrdersPutApi
- func (api *FutureBatchOrdersPutApi) SetOrders(orderApi []*FutureOrderPutApi) *FutureBatchOrdersPutApi
- func (api *FutureBatchOrdersPutApi) Timestamp(Timestamp int64) *FutureBatchOrdersPutApi
- type FutureBatchOrdersPutReq
- type FutureBatchOrdersPutRes
- type FutureBatchOrdersPutResRow
- type FutureCommissionRateApi
- func (api *FutureCommissionRateApi) Do() (*FutureCommissionRateRes, error)
- func (api *FutureCommissionRateApi) RecvWindow(RecvWindow int64) *FutureCommissionRateApi
- func (api *FutureCommissionRateApi) Symbol(Symbol string) *FutureCommissionRateApi
- func (api *FutureCommissionRateApi) Timestamp(Timestamp int64) *FutureCommissionRateApi
- type FutureCommissionRateReq
- type FutureCommissionRateRes
- type FutureCommonPostRes
- type FutureDataBasisApi
- func (api *FutureDataBasisApi) ContractType(ContractType string) *FutureDataBasisApi
- func (api *FutureDataBasisApi) Do() (*FutureDataBasisRes, error)
- func (api *FutureDataBasisApi) EndTime(EndTime int64) *FutureDataBasisApi
- func (api *FutureDataBasisApi) Limit(Limit int64) *FutureDataBasisApi
- func (api *FutureDataBasisApi) Pair(Pair string) *FutureDataBasisApi
- func (api *FutureDataBasisApi) Period(Period string) *FutureDataBasisApi
- func (api *FutureDataBasisApi) StartTime(StartTime int64) *FutureDataBasisApi
- type FutureDataBasisReq
- type FutureDataBasisRes
- type FutureDataBasisResRow
- type FutureDepthApi
- type FutureDepthReq
- type FutureDepthRes
- type FutureDepthResMiddle
- type FutureExchangeInfoApi
- type FutureExchangeInfoReq
- type FutureExchangeInfoRes
- type FutureExchangeInfoResAsset
- type FutureExchangeInfoResRateLimit
- type FutureExchangeInfoResSymbol
- type FutureFundingInfoApi
- type FutureFundingInfoReq
- type FutureFundingInfoRes
- type FutureFundingInfoResRow
- type FutureFundingRateApi
- func (api *FutureFundingRateApi) Do() (*FutureFundingRateRes, error)
- func (api *FutureFundingRateApi) EndTime(EndTime int64) *FutureFundingRateApi
- func (api *FutureFundingRateApi) Limit(Limit int) *FutureFundingRateApi
- func (api *FutureFundingRateApi) StartTime(StartTime int64) *FutureFundingRateApi
- func (api *FutureFundingRateApi) Symbol(Symbol string) *FutureFundingRateApi
- type FutureFundingRateReq
- type FutureFundingRateRes
- type FutureFundingRateResRow
- type FutureHistoricalTradesApi
- func (api *FutureHistoricalTradesApi) Do() (*FutureHistoricalTradesRes, error)
- func (api *FutureHistoricalTradesApi) FromId(FromId int64) *FutureHistoricalTradesApi
- func (api *FutureHistoricalTradesApi) Limit(Limit int) *FutureHistoricalTradesApi
- func (api *FutureHistoricalTradesApi) Symbol(Symbol string) *FutureHistoricalTradesApi
- type FutureHistoricalTradesReq
- type FutureHistoricalTradesRes
- type FutureKlinesApi
- func (api *FutureKlinesApi) Do() (*KlinesRes, error)
- func (api *FutureKlinesApi) EndTime(EndTime int64) *FutureKlinesApi
- func (api *FutureKlinesApi) Interval(Interval string) *FutureKlinesApi
- func (api *FutureKlinesApi) Limit(Limit int) *FutureKlinesApi
- func (api *FutureKlinesApi) StartTime(StartTime int64) *FutureKlinesApi
- func (api *FutureKlinesApi) Symbol(Symbol string) *FutureKlinesApi
- type FutureKlinesReq
- type FutureLeverageApi
- func (api *FutureLeverageApi) Do() (*FutureLeverageRes, error)
- func (api *FutureLeverageApi) Leverage(Leverage int64) *FutureLeverageApi
- func (api *FutureLeverageApi) RecvWindow(RecvWindow int64) *FutureLeverageApi
- func (api *FutureLeverageApi) Symbol(Symbol string) *FutureLeverageApi
- func (api *FutureLeverageApi) Timestamp(Timestamp int64) *FutureLeverageApi
- type FutureLeverageBracketApi
- func (api *FutureLeverageBracketApi) Do() (*FutureLeverageBracketRes, error)
- func (api *FutureLeverageBracketApi) RecvWindow(RecvWindow int64) *FutureLeverageBracketApi
- func (api *FutureLeverageBracketApi) Symbol(Symbol string) *FutureLeverageBracketApi
- func (api *FutureLeverageBracketApi) Timestamp(Timestamp int64) *FutureLeverageBracketApi
- type FutureLeverageBracketReq
- type FutureLeverageBracketRes
- type FutureLeverageBracketResResult
- type FutureLeverageBracketResResultBrackets
- type FutureLeverageReq
- type FutureLeverageRes
- type FutureListenKeyDeleteApi
- type FutureListenKeyDeleteReq
- type FutureListenKeyDeleteRes
- type FutureListenKeyPostApi
- type FutureListenKeyPostReq
- type FutureListenKeyPostRes
- type FutureListenKeyPutApi
- type FutureListenKeyPutReq
- type FutureListenKeyPutRes
- type FutureMarginTypeApi
- func (api *FutureMarginTypeApi) Do() (*FutureMarginTypeRes, error)
- func (api *FutureMarginTypeApi) MarginType(MarginType string) *FutureMarginTypeApi
- func (api *FutureMarginTypeApi) RecvWindow(RecvWindow int64) *FutureMarginTypeApi
- func (api *FutureMarginTypeApi) Symbol(Symbol string) *FutureMarginTypeApi
- func (api *FutureMarginTypeApi) Timestamp(Timestamp int64) *FutureMarginTypeApi
- type FutureMarginTypeReq
- type FutureMarginTypeRes
- type FutureMultiAssetsMarginGetApi
- type FutureMultiAssetsMarginGetReq
- type FutureMultiAssetsMarginGetRes
- type FutureMultiAssetsMarginPostApi
- func (api *FutureMultiAssetsMarginPostApi) Do() (*FutureMultiAssetsMarginPostRes, error)
- func (api *FutureMultiAssetsMarginPostApi) MultiAssetsMargin(MultiAssetsMargin string) *FutureMultiAssetsMarginPostApi
- func (api *FutureMultiAssetsMarginPostApi) RecvWindow(RecvWindow int64) *FutureMultiAssetsMarginPostApi
- func (api *FutureMultiAssetsMarginPostApi) Timestamp(Timestamp int64) *FutureMultiAssetsMarginPostApi
- type FutureMultiAssetsMarginPostReq
- type FutureMultiAssetsMarginPostRes
- type FutureOpenOrdersApi
- func (api *FutureOpenOrdersApi) Do() (*FutureOpenOrdersRes, error)
- func (api *FutureOpenOrdersApi) RecvWindow(RecvWindow int64) *FutureOpenOrdersApi
- func (api *FutureOpenOrdersApi) Symbol(Symbol string) *FutureOpenOrdersApi
- func (api *FutureOpenOrdersApi) Timestamp(Timestamp int64) *FutureOpenOrdersApi
- type FutureOpenOrdersReq
- type FutureOpenOrdersRes
- type FutureOrderDeleteApi
- func (api *FutureOrderDeleteApi) Do() (*FutureOrderDeleteRes, error)
- func (api *FutureOrderDeleteApi) OrderId(OrderId int64) *FutureOrderDeleteApi
- func (api *FutureOrderDeleteApi) OrigClientOrderId(OrigClientOrderId string) *FutureOrderDeleteApi
- func (api *FutureOrderDeleteApi) RecvWindow(RecvWindow int64) *FutureOrderDeleteApi
- func (api *FutureOrderDeleteApi) Symbol(Symbol string) *FutureOrderDeleteApi
- func (api *FutureOrderDeleteApi) Timestamp(Timestamp int64) *FutureOrderDeleteApi
- type FutureOrderDeleteReq
- type FutureOrderDeleteRes
- type FutureOrderGetApi
- func (api *FutureOrderGetApi) Do() (*FutureOrderGetRes, error)
- func (api *FutureOrderGetApi) OrderId(OrderId int64) *FutureOrderGetApi
- func (api *FutureOrderGetApi) OrigClientOrderId(OrigClientOrderId string) *FutureOrderGetApi
- func (api *FutureOrderGetApi) RecvWindow(RecvWindow int64) *FutureOrderGetApi
- func (api *FutureOrderGetApi) Symbol(Symbol string) *FutureOrderGetApi
- func (api *FutureOrderGetApi) Timestamp(Timestamp int64) *FutureOrderGetApi
- type FutureOrderGetReq
- type FutureOrderGetRes
- type FutureOrderOrder
- type FutureOrderPostApi
- func (api *FutureOrderPostApi) ActivationPrice(ActivationPrice decimal.Decimal) *FutureOrderPostApi
- func (api *FutureOrderPostApi) CallbackRate(CallbackRate decimal.Decimal) *FutureOrderPostApi
- func (api *FutureOrderPostApi) ClosePosition(ClosePosition string) *FutureOrderPostApi
- func (api *FutureOrderPostApi) Do() (*FutureOrderPostRes, error)
- func (api *FutureOrderPostApi) NewClientOrderId(NewClientOrderId string) *FutureOrderPostApi
- func (api *FutureOrderPostApi) NewOrderRespType(NewOrderRespType string) *FutureOrderPostApi
- func (api *FutureOrderPostApi) PositionSide(PositionSide string) *FutureOrderPostApi
- func (api *FutureOrderPostApi) Price(Price decimal.Decimal) *FutureOrderPostApi
- func (api *FutureOrderPostApi) PriceProtect(PriceProtect string) *FutureOrderPostApi
- func (api *FutureOrderPostApi) Quantity(Quantity decimal.Decimal) *FutureOrderPostApi
- func (api *FutureOrderPostApi) RecvWindow(RecvWindow int64) *FutureOrderPostApi
- func (api *FutureOrderPostApi) ReduceOnly(ReduceOnly string) *FutureOrderPostApi
- func (api *FutureOrderPostApi) Side(Side string) *FutureOrderPostApi
- func (api *FutureOrderPostApi) StopPrice(StopPrice decimal.Decimal) *FutureOrderPostApi
- func (api *FutureOrderPostApi) Symbol(Symbol string) *FutureOrderPostApi
- func (api *FutureOrderPostApi) TimeInForce(TimeInForce string) *FutureOrderPostApi
- func (api *FutureOrderPostApi) Timestamp(Timestamp int64) *FutureOrderPostApi
- func (api *FutureOrderPostApi) Type(Type string) *FutureOrderPostApi
- func (api *FutureOrderPostApi) WorkingType(WorkingType string) *FutureOrderPostApi
- type FutureOrderPostReq
- type FutureOrderPostRes
- type FutureOrderPostResRow
- type FutureOrderPutApi
- func (api *FutureOrderPutApi) Do() (*FutureOrderPutRes, error)
- func (api *FutureOrderPutApi) OrderId(OrderId int64) *FutureOrderPutApi
- func (api *FutureOrderPutApi) OrigClientOrderId(OrigClientOrderId string) *FutureOrderPutApi
- func (api *FutureOrderPutApi) Price(Price decimal.Decimal) *FutureOrderPutApi
- func (api *FutureOrderPutApi) PriceMatch(PriceMatch string) *FutureOrderPutApi
- func (api *FutureOrderPutApi) Quantity(Quantity decimal.Decimal) *FutureOrderPutApi
- func (api *FutureOrderPutApi) RecvWindow(RecvWindow int64) *FutureOrderPutApi
- func (api *FutureOrderPutApi) Side(Side string) *FutureOrderPutApi
- func (api *FutureOrderPutApi) Symbol(Symbol string) *FutureOrderPutApi
- func (api *FutureOrderPutApi) Timestamp(Timestamp int64) *FutureOrderPutApi
- type FutureOrderPutReq
- type FutureOrderPutRes
- type FuturePingApi
- type FuturePingReq
- type FuturePingRes
- type FuturePositionRiskApi
- func (api *FuturePositionRiskApi) Do() (*FuturePositionRiskRes, error)
- func (api *FuturePositionRiskApi) RecvWindow(RecvWindow int64) *FuturePositionRiskApi
- func (api *FuturePositionRiskApi) Symbol(Symbol string) *FuturePositionRiskApi
- func (api *FuturePositionRiskApi) Timestamp(Timestamp int64) *FuturePositionRiskApi
- type FuturePositionRiskReq
- type FuturePositionRiskRes
- type FuturePositionRiskRow
- type FuturePositionSideDualGetApi
- type FuturePositionSideDualGetReq
- type FuturePositionSideDualGetRes
- type FuturePositionSideDualPostApi
- func (api *FuturePositionSideDualPostApi) Do() (*FuturePositionSideDualPostRes, error)
- func (api *FuturePositionSideDualPostApi) DualSidePosition(DualSidePosition string) *FuturePositionSideDualPostApi
- func (api *FuturePositionSideDualPostApi) RecvWindow(RecvWindow int64) *FuturePositionSideDualPostApi
- func (api *FuturePositionSideDualPostApi) Timestamp(Timestamp int64) *FuturePositionSideDualPostApi
- type FuturePositionSideDualPostReq
- type FuturePositionSideDualPostRes
- type FuturePremiumIndexApi
- type FuturePremiumIndexReq
- type FuturePremiumIndexRes
- type FuturePremiumIndexResRow
- type FutureRestClient
- func (client *FutureRestClient) NewAllOrders() *FutureAllOrdersApi
- func (client *FutureRestClient) NewExchangeInfo() *FutureExchangeInfoApi
- func (client *FutureRestClient) NewFutureAccount() *FutureAccountApi
- func (client *FutureRestClient) NewFutureAggTrades() *FutureAggTradesApi
- func (client *FutureRestClient) NewFutureBatchOrdersDelete() *FutureBatchOrdersDeleteApi
- func (client *FutureRestClient) NewFutureBatchOrdersPost() *FutureBatchOrdersPostApi
- func (client *FutureRestClient) NewFutureBatchOrdersPut() *FutureBatchOrdersPutApi
- func (client *FutureRestClient) NewFutureCommissionRate() *FutureCommissionRateApi
- func (client *FutureRestClient) NewFutureDataBasis() *FutureDataBasisApi
- func (client *FutureRestClient) NewFutureDepth() *FutureDepthApi
- func (client *FutureRestClient) NewFutureFundingInfo() *FutureFundingInfoApi
- func (client *FutureRestClient) NewFutureFundingRate() *FutureFundingRateApi
- func (client *FutureRestClient) NewFutureHistoricalTrades() *FutureHistoricalTradesApi
- func (client *FutureRestClient) NewFutureKlines() *FutureKlinesApi
- func (client *FutureRestClient) NewFutureLeverage() *FutureLeverageApi
- func (client *FutureRestClient) NewFutureLeverageBracket() *FutureLeverageBracketApi
- func (client *FutureRestClient) NewFutureListenKeyDelete() *FutureListenKeyDeleteApi
- func (client *FutureRestClient) NewFutureListenKeyPost() *FutureListenKeyPostApi
- func (client *FutureRestClient) NewFutureListenKeyPut() *FutureListenKeyPutApi
- func (client *FutureRestClient) NewFutureMarginType() *FutureMarginTypeApi
- func (client *FutureRestClient) NewFutureMultiAssetsMarginGet() *FutureMultiAssetsMarginGetApi
- func (client *FutureRestClient) NewFutureMultiAssetsMarginPost() *FutureMultiAssetsMarginPostApi
- func (client *FutureRestClient) NewFutureOrderDelete() *FutureOrderDeleteApi
- func (client *FutureRestClient) NewFutureOrderGet() *FutureOrderGetApi
- func (client *FutureRestClient) NewFutureOrderPost() *FutureOrderPostApi
- func (client *FutureRestClient) NewFutureOrderPut() *FutureOrderPutApi
- func (client *FutureRestClient) NewFuturePositionRisk() *FuturePositionRiskApi
- func (client *FutureRestClient) NewFuturePositionSideDualGet() *FuturePositionSideDualGetApi
- func (client *FutureRestClient) NewFuturePositionSideDualPost() *FuturePositionSideDualPostApi
- func (client *FutureRestClient) NewFuturePremiumIndex() *FuturePremiumIndexApi
- func (client *FutureRestClient) NewFutureTicker24hr() *FutureTicker24hrApi
- func (client *FutureRestClient) NewFutureTickerBookTicker() *FutureTickerBookTickerApi
- func (client *FutureRestClient) NewFutureTickerPrice() *FutureTickerPriceApi
- func (client *FutureRestClient) NewFutureTrades() *FutureTradesApi
- func (client *FutureRestClient) NewFutureUserTrades() *FutureUserTradesApi
- func (client *FutureRestClient) NewOpenOrders() *FutureOpenOrdersApi
- func (client *FutureRestClient) NewPing() *FuturePingApi
- func (client *FutureRestClient) NewServerTime() *FutureServerTimeApi
- type FutureServerTimeApi
- type FutureServerTimeReq
- type FutureTicker24hrApi
- type FutureTicker24hrReq
- type FutureTicker24hrRes
- type FutureTicker24hrResRow
- type FutureTickerBookTickerApi
- type FutureTickerBookTickerReq
- type FutureTickerBookTickerRes
- type FutureTickerBookTickerResRow
- type FutureTickerPriceApi
- type FutureTickerPriceReq
- type FutureTickerPriceRes
- type FutureTickerPriceResRow
- type FutureTimeRes
- type FutureTradesApi
- type FutureTradesReq
- type FutureTradesRes
- type FutureTradesResRow
- type FutureUserTrade
- type FutureUserTradesApi
- func (api *FutureUserTradesApi) Do() (*FutureUserTradesRes, error)
- func (api *FutureUserTradesApi) EndTime(EndTime int64) *FutureUserTradesApi
- func (api *FutureUserTradesApi) FromId(FromId int64) *FutureUserTradesApi
- func (api *FutureUserTradesApi) Limit(Limit int64) *FutureUserTradesApi
- func (api *FutureUserTradesApi) OrderId(OrderId int64) *FutureUserTradesApi
- func (api *FutureUserTradesApi) RecvWindow(RecvWindow int64) *FutureUserTradesApi
- func (api *FutureUserTradesApi) StartTime(StartTime int64) *FutureUserTradesApi
- func (api *FutureUserTradesApi) Symbol(Symbol string) *FutureUserTradesApi
- func (api *FutureUserTradesApi) Timestamp(Timestamp int64) *FutureUserTradesApi
- type FutureUserTradesReq
- type FutureUserTradesRes
- type FutureWsStreamClient
- func (ws *FutureWsStreamClient) AmendOrder(api *FutureOrderPutApi) (*WsApiResult[FutureOrderPutRes], error)
- func (ws *FutureWsStreamClient) CancelOrder(api *FutureOrderDeleteApi) (*WsApiResult[FutureOrderDeleteRes], error)
- func (ws *FutureWsStreamClient) Close() error
- func (ws *FutureWsStreamClient) ConvertToAccountWs(apiKey string, apiSecret string) (*FutureWsStreamClient, error)
- func (ws *FutureWsStreamClient) ConvertToWsApi(apiKey string, apiSecret string) (*FutureWsStreamClient, error)
- func (ws *FutureWsStreamClient) CreateOrder(api *FutureOrderPostApi) (*WsApiResult[FutureOrderPostRes], error)
- func (ws *FutureWsStreamClient) CreatePayload() (*WsFuturePayload, error)
- func (ws *FutureWsStreamClient) QueryOrder(api *FutureOrderGetApi) (*WsApiResult[FutureOrderGetRes], error)
- type KlinesMiddle
- type KlinesMiddleRow
- type KlinesRes
- type KlinesResRow
- type ManagedSubAccountQueryTransLogRes
- type ManagerSubTransferHistoryVos
- type MarginAccountRes
- type MarginAllOrdersRes
- type MarginAllPairsRes
- type MarginAsset
- type MarginInterestHistoryRes
- type MarginInterestHistoryRow
- type MarginIsolatedAccountRes
- type MarginIsolatedAllPairsRes
- type MarginIsolatedAsset
- type MarginIsolatedInnerAsset
- type MarginIsolatedTransferRes
- type MarginLoanRes
- type MarginMaxBorrowableRes
- type MarginMaxTransferableRes
- type MarginOpenOrdersRes
- type MarginOrderGetRes
- type MarginOrderOrder
- type MarginPairs
- type MarginRepayRes
- type MarginTransferRes
- type MyBinance
- func (*MyBinance) NewFutureRestClient(apiKey string, apiSecret string) *FutureRestClient
- func (*MyBinance) NewFutureWsStreamClient() *FutureWsStreamClient
- func (*MyBinance) NewPmCRestClient(apiKey string, apiSecret string) *PmCRestClient
- func (*MyBinance) NewPmCWsStreamClient() *PmCWsStreamClient
- func (*MyBinance) NewPmMRestClient(apiKey string, apiSecret string) *PmMRestClient
- func (*MyBinance) NewPmMWsStreamClient() *PmMWsStreamClient
- func (*MyBinance) NewPmURestClient(apiKey string, apiSecret string) *PmURestClient
- func (*MyBinance) NewPmUWsStreamClient() *PmUWsStreamClient
- func (*MyBinance) NewSpotRestClient(apiKey string, apiSecret string) *SpotRestClient
- func (*MyBinance) NewSpotWsStreamClient() *SpotWsStreamClient
- func (*MyBinance) NewSwapRestClient(apiKey string, apiSecret string) *SwapRestClient
- func (*MyBinance) NewSwapWsStreamClient() *SwapWsStreamClient
- type MySyncMap
- type NetType
- type Payload
- type PmCAccountApi
- type PmCAccountBalanceApi
- func (api *PmCAccountBalanceApi) Asset(Asset string) *PmCAccountBalanceApi
- func (api *PmCAccountBalanceApi) Do() (*PmCAccountBalanceRes, error)
- func (api *PmCAccountBalanceApi) RecvWindow(RecvWindow int64) *PmCAccountBalanceApi
- func (api *PmCAccountBalanceApi) Timestamp(Timestamp int64) *PmCAccountBalanceApi
- type PmCAccountBalanceReq
- type PmCAccountBalanceRes
- type PmCAccountBalanceRow
- type PmCAccountForCApi
- type PmCAccountForCReq
- type PmCAccountForCRes
- type PmCAccountForCResAsset
- type PmCAccountForCResPosition
- type PmCAccountReq
- type PmCAccountRes
- type PmCAllConditionnalOrderDeleteApi
- func (api *PmCAllConditionnalOrderDeleteApi) Do() (*PmCAllConditionnalOrderDeleteRes, error)
- func (api *PmCAllConditionnalOrderDeleteApi) RecvWindow(RecvWindow int64) *PmCAllConditionnalOrderDeleteApi
- func (api *PmCAllConditionnalOrderDeleteApi) Symbol(Symbol string) *PmCAllConditionnalOrderDeleteApi
- func (api *PmCAllConditionnalOrderDeleteApi) Timestamp(Timestamp int64) *PmCAllConditionnalOrderDeleteApi
- type PmCAllConditionnalOrderDeleteReq
- type PmCAllConditionnalOrderDeleteRes
- type PmCAllOrderDeleteApi
- func (api *PmCAllOrderDeleteApi) Do() (*PmCAllOrderDeleteRes, error)
- func (api *PmCAllOrderDeleteApi) RecvWindow(RecvWindow int64) *PmCAllOrderDeleteApi
- func (api *PmCAllOrderDeleteApi) Symbol(Symbol string) *PmCAllOrderDeleteApi
- func (api *PmCAllOrderDeleteApi) Timestamp(Timestamp int64) *PmCAllOrderDeleteApi
- type PmCAllOrderDeleteReq
- type PmCAllOrderDeleteRes
- type PmCAllOrdersApi
- func (api *PmCAllOrdersApi) Do() (*PmCAllOrdersRes, error)
- func (api *PmCAllOrdersApi) EndTime(EndTime int64) *PmCAllOrdersApi
- func (api *PmCAllOrdersApi) Limit(Limit int64) *PmCAllOrdersApi
- func (api *PmCAllOrdersApi) OrderId(OrderId int64) *PmCAllOrdersApi
- func (api *PmCAllOrdersApi) Pair(Pair string) *PmCAllOrdersApi
- func (api *PmCAllOrdersApi) RecvWindow(RecvWindow int64) *PmCAllOrdersApi
- func (api *PmCAllOrdersApi) StartTime(StartTime int64) *PmCAllOrdersApi
- func (api *PmCAllOrdersApi) Symbol(Symbol string) *PmCAllOrdersApi
- func (api *PmCAllOrdersApi) Timestamp(Timestamp int64) *PmCAllOrdersApi
- type PmCAllOrdersReq
- type PmCAllOrdersRes
- type PmCApi
- type PmCCommissionRateApi
- func (api *PmCCommissionRateApi) Do() (*PmCCommissionRateRes, error)
- func (api *PmCCommissionRateApi) RecvWindow(RecvWindow int64) *PmCCommissionRateApi
- func (api *PmCCommissionRateApi) Symbol(Symbol string) *PmCCommissionRateApi
- func (api *PmCCommissionRateApi) Timestamp(Timestamp int64) *PmCCommissionRateApi
- type PmCCommissionRateReq
- type PmCCommissionRateRes
- type PmCConditionalOrderDeleteApi
- func (api *PmCConditionalOrderDeleteApi) Do() (*PmCConditionalOrderDeleteRes, error)
- func (api *PmCConditionalOrderDeleteApi) NewClientStrategyId(NewClientStrategyId string) *PmCConditionalOrderDeleteApi
- func (api *PmCConditionalOrderDeleteApi) RecvWindow(RecvWindow int64) *PmCConditionalOrderDeleteApi
- func (api *PmCConditionalOrderDeleteApi) StrategyId(StrategyId string) *PmCConditionalOrderDeleteApi
- func (api *PmCConditionalOrderDeleteApi) Symbol(Symbol string) *PmCConditionalOrderDeleteApi
- func (api *PmCConditionalOrderDeleteApi) Timestamp(Timestamp int64) *PmCConditionalOrderDeleteApi
- type PmCConditionalOrderDeleteReq
- type PmCConditionalOrderDeleteRes
- type PmCConditionalOrderPostApi
- func (api *PmCConditionalOrderPostApi) ActivationPrice(ActivationPrice decimal.Decimal) *PmCConditionalOrderPostApi
- func (api *PmCConditionalOrderPostApi) CallbackRate(CallbackRate decimal.Decimal) *PmCConditionalOrderPostApi
- func (api *PmCConditionalOrderPostApi) Do() (*PmCConditionalOrderPostRes, error)
- func (api *PmCConditionalOrderPostApi) NewClientStrategyId(NewClientStrategyId string) *PmCConditionalOrderPostApi
- func (api *PmCConditionalOrderPostApi) PositionSide(PositionSide string) *PmCConditionalOrderPostApi
- func (api *PmCConditionalOrderPostApi) Price(Price decimal.Decimal) *PmCConditionalOrderPostApi
- func (api *PmCConditionalOrderPostApi) PriceProtect(PriceProtect string) *PmCConditionalOrderPostApi
- func (api *PmCConditionalOrderPostApi) Quantity(Quantity decimal.Decimal) *PmCConditionalOrderPostApi
- func (api *PmCConditionalOrderPostApi) RecvWindow(RecvWindow int64) *PmCConditionalOrderPostApi
- func (api *PmCConditionalOrderPostApi) Side(Side string) *PmCConditionalOrderPostApi
- func (api *PmCConditionalOrderPostApi) StopPrice(StopPrice decimal.Decimal) *PmCConditionalOrderPostApi
- func (api *PmCConditionalOrderPostApi) StrategyType(StrategyType string) *PmCConditionalOrderPostApi
- func (api *PmCConditionalOrderPostApi) Symbol(Symbol string) *PmCConditionalOrderPostApi
- func (api *PmCConditionalOrderPostApi) TimeInForce(TimeInForce string) *PmCConditionalOrderPostApi
- func (api *PmCConditionalOrderPostApi) Timestamp(Timestamp int64) *PmCConditionalOrderPostApi
- func (api *PmCConditionalOrderPostApi) WorkingType(WorkingType string) *PmCConditionalOrderPostApi
- type PmCConditionalOrderPostReq
- type PmCConditionalOrderPostRes
- type PmCListenKeyDeleteApi
- type PmCListenKeyDeleteReq
- type PmCListenKeyDeleteRes
- type PmCListenKeyPostApi
- type PmCListenKeyPostReq
- type PmCListenKeyPostRes
- type PmCListenKeyPutApi
- type PmCListenKeyPutReq
- type PmCListenKeyPutRes
- type PmCOpenOrdersApi
- func (api *PmCOpenOrdersApi) Do() (*PmCOpenOrdersRes, error)
- func (api *PmCOpenOrdersApi) Pair(Pair string) *PmCOpenOrdersApi
- func (api *PmCOpenOrdersApi) RecvWindow(RecvWindow int64) *PmCOpenOrdersApi
- func (api *PmCOpenOrdersApi) Symbol(Symbol string) *PmCOpenOrdersApi
- func (api *PmCOpenOrdersApi) Timestamp(Timestamp int64) *PmCOpenOrdersApi
- type PmCOpenOrdersReq
- type PmCOpenOrdersRes
- type PmCOrderDeleteApi
- func (api *PmCOrderDeleteApi) Do() (*PmCOrderDeleteRes, error)
- func (api *PmCOrderDeleteApi) OrderId(OrderId int64) *PmCOrderDeleteApi
- func (api *PmCOrderDeleteApi) OrigClientOrderId(OrigClientOrderId string) *PmCOrderDeleteApi
- func (api *PmCOrderDeleteApi) RecvWindow(RecvWindow int64) *PmCOrderDeleteApi
- func (api *PmCOrderDeleteApi) Symbol(Symbol string) *PmCOrderDeleteApi
- func (api *PmCOrderDeleteApi) Timestamp(Timestamp int64) *PmCOrderDeleteApi
- type PmCOrderDeleteReq
- type PmCOrderDeleteRes
- type PmCOrderGetApi
- func (api *PmCOrderGetApi) Do() (*PmCOrderGetRes, error)
- func (api *PmCOrderGetApi) OrderId(OrderId int64) *PmCOrderGetApi
- func (api *PmCOrderGetApi) OrigClientOrderId(OrigClientOrderId string) *PmCOrderGetApi
- func (api *PmCOrderGetApi) RecvWindow(RecvWindow int64) *PmCOrderGetApi
- func (api *PmCOrderGetApi) Symbol(Symbol string) *PmCOrderGetApi
- func (api *PmCOrderGetApi) Timestamp(Timestamp int64) *PmCOrderGetApi
- type PmCOrderGetReq
- type PmCOrderGetRes
- type PmCOrderOrder
- type PmCOrderPostApi
- func (api *PmCOrderPostApi) Do() (*PmCOrderPostRes, error)
- func (api *PmCOrderPostApi) NewClientOrderId(NewClientOrderId string) *PmCOrderPostApi
- func (api *PmCOrderPostApi) NewOrderRespType(NewOrderRespType string) *PmCOrderPostApi
- func (api *PmCOrderPostApi) PositionSide(PositionSide string) *PmCOrderPostApi
- func (api *PmCOrderPostApi) Price(Price decimal.Decimal) *PmCOrderPostApi
- func (api *PmCOrderPostApi) Quantity(Quantity decimal.Decimal) *PmCOrderPostApi
- func (api *PmCOrderPostApi) RecvWindow(RecvWindow int64) *PmCOrderPostApi
- func (api *PmCOrderPostApi) ReduceOnly(ReduceOnly string) *PmCOrderPostApi
- func (api *PmCOrderPostApi) Side(Side string) *PmCOrderPostApi
- func (api *PmCOrderPostApi) Symbol(Symbol string) *PmCOrderPostApi
- func (api *PmCOrderPostApi) TimeInForce(TimeInForce string) *PmCOrderPostApi
- func (api *PmCOrderPostApi) Timestamp(Timestamp int64) *PmCOrderPostApi
- func (api *PmCOrderPostApi) Type(Type string) *PmCOrderPostApi
- type PmCOrderPostReq
- type PmCOrderPostRes
- type PmCOrderPutApi
- func (api *PmCOrderPutApi) Do() (*PmCOrderPutRes, error)
- func (api *PmCOrderPutApi) OrderId(OrderId int64) *PmCOrderPutApi
- func (api *PmCOrderPutApi) OrigClientOrderId(OrigClientOrderId string) *PmCOrderPutApi
- func (api *PmCOrderPutApi) Price(Price decimal.Decimal) *PmCOrderPutApi
- func (api *PmCOrderPutApi) Quantity(Quantity decimal.Decimal) *PmCOrderPutApi
- func (api *PmCOrderPutApi) RecvWindow(RecvWindow int64) *PmCOrderPutApi
- func (api *PmCOrderPutApi) Side(Side string) *PmCOrderPutApi
- func (api *PmCOrderPutApi) Symbol(Symbol string) *PmCOrderPutApi
- func (api *PmCOrderPutApi) Timestamp(Timestamp int64) *PmCOrderPutApi
- type PmCOrderPutReq
- type PmCOrderPutRes
- type PmCRestClient
- func (client *PmCRestClient) NewAllOrders() *PmCAllOrdersApi
- func (client *PmCRestClient) NewOpenOrders() *PmCOpenOrdersApi
- func (client *PmCRestClient) NewPmCAccount() *PmCAccountApi
- func (client *PmCRestClient) NewPmCAccountBalance() *PmCAccountBalanceApi
- func (client *PmCRestClient) NewPmCAccountForC() *PmCAccountForCApi
- func (client *PmCRestClient) NewPmCAllConditionnalOrderDelete() *PmCAllConditionnalOrderDeleteApi
- func (client *PmCRestClient) NewPmCAllOrderDelete() *PmCAllOrderDeleteApi
- func (client *PmCRestClient) NewPmCCommissionRate() *PmCCommissionRateApi
- func (client *PmCRestClient) NewPmCConditionalOrderDelete() *PmCConditionalOrderDeleteApi
- func (client *PmCRestClient) NewPmCConditionalOrderPost() *PmCConditionalOrderPostApi
- func (client *PmCRestClient) NewPmCListenKeyDelete() *PmCListenKeyDeleteApi
- func (client *PmCRestClient) NewPmCListenKeyPost() *PmCListenKeyPostApi
- func (client *PmCRestClient) NewPmCListenKeyPut() *PmCListenKeyPutApi
- func (client *PmCRestClient) NewPmCOrderDelete() *PmCOrderDeleteApi
- func (client *PmCRestClient) NewPmCOrderGet() *PmCOrderGetApi
- func (client *PmCRestClient) NewPmCOrderPost() *PmCOrderPostApi
- func (client *PmCRestClient) NewPmCOrderPut() *PmCOrderPutApi
- func (client *PmCRestClient) NewPmCUserTrades() *PmCUserTradesApi
- type PmCUserTradesApi
- func (api *PmCUserTradesApi) Do() (*PmCUserTradesRes, error)
- func (api *PmCUserTradesApi) EndTime(EndTime int64) *PmCUserTradesApi
- func (api *PmCUserTradesApi) FromId(FromId int64) *PmCUserTradesApi
- func (api *PmCUserTradesApi) Limit(Limit int64) *PmCUserTradesApi
- func (api *PmCUserTradesApi) Pair(Pair string) *PmCUserTradesApi
- func (api *PmCUserTradesApi) RecvWindow(RecvWindow int64) *PmCUserTradesApi
- func (api *PmCUserTradesApi) StartTime(StartTime int64) *PmCUserTradesApi
- func (api *PmCUserTradesApi) Symbol(Symbol string) *PmCUserTradesApi
- func (api *PmCUserTradesApi) Timestamp(Timestamp int64) *PmCUserTradesApi
- type PmCUserTradesOrder
- type PmCUserTradesReq
- type PmCUserTradesRes
- type PmCWsStreamClient
- type PmMAccountApi
- type PmMAccountBalanceApi
- func (api *PmMAccountBalanceApi) Asset(Asset string) *PmMAccountBalanceApi
- func (api *PmMAccountBalanceApi) Do() (*PmMAccountBalanceRes, error)
- func (api *PmMAccountBalanceApi) RecvWindow(RecvWindow int64) *PmMAccountBalanceApi
- func (api *PmMAccountBalanceApi) Timestamp(Timestamp int64) *PmMAccountBalanceApi
- type PmMAccountBalanceReq
- type PmMAccountBalanceRes
- type PmMAccountBalanceRow
- type PmMAccountReq
- type PmMAccountRes
- type PmMApi
- type PmMListenKeyDeleteApi
- type PmMListenKeyDeleteReq
- type PmMListenKeyDeleteRes
- type PmMListenKeyPostApi
- type PmMListenKeyPostReq
- type PmMListenKeyPostRes
- type PmMListenKeyPutApi
- type PmMListenKeyPutReq
- type PmMListenKeyPutRes
- type PmMMarginAllOrdersApi
- func (api *PmMMarginAllOrdersApi) Do() (*PmMMarginAllOrdersRes, error)
- func (api *PmMMarginAllOrdersApi) EndTime(EndTime int64) *PmMMarginAllOrdersApi
- func (api *PmMMarginAllOrdersApi) Limit(Limit int64) *PmMMarginAllOrdersApi
- func (api *PmMMarginAllOrdersApi) OrderId(OrderId int64) *PmMMarginAllOrdersApi
- func (api *PmMMarginAllOrdersApi) RecvWindow(RecvWindow int64) *PmMMarginAllOrdersApi
- func (api *PmMMarginAllOrdersApi) StartTime(StartTime int64) *PmMMarginAllOrdersApi
- func (api *PmMMarginAllOrdersApi) Symbol(Symbol string) *PmMMarginAllOrdersApi
- func (api *PmMMarginAllOrdersApi) Timestamp(Timestamp int64) *PmMMarginAllOrdersApi
- type PmMMarginAllOrdersReq
- type PmMMarginAllOrdersRes
- type PmMMarginInterestHistoryApi
- func (api *PmMMarginInterestHistoryApi) Archived(Archived string) *PmMMarginInterestHistoryApi
- func (api *PmMMarginInterestHistoryApi) Asset(Asset string) *PmMMarginInterestHistoryApi
- func (api *PmMMarginInterestHistoryApi) Current(Current int64) *PmMMarginInterestHistoryApi
- func (api *PmMMarginInterestHistoryApi) Do() (*PmMMarginInterestHistoryRes, error)
- func (api *PmMMarginInterestHistoryApi) EndTime(EndTime int64) *PmMMarginInterestHistoryApi
- func (api *PmMMarginInterestHistoryApi) RecvWindow(RecvWindow int64) *PmMMarginInterestHistoryApi
- func (api *PmMMarginInterestHistoryApi) Size(Size int64) *PmMMarginInterestHistoryApi
- func (api *PmMMarginInterestHistoryApi) StartTime(StartTime int64) *PmMMarginInterestHistoryApi
- func (api *PmMMarginInterestHistoryApi) Timestamp(Timestamp int64) *PmMMarginInterestHistoryApi
- type PmMMarginInterestHistoryReq
- type PmMMarginInterestHistoryRes
- type PmMMarginInterestHistoryRow
- type PmMMarginMaxBorrowableApi
- func (api *PmMMarginMaxBorrowableApi) Asset(Asset string) *PmMMarginMaxBorrowableApi
- func (api *PmMMarginMaxBorrowableApi) Do() (*PmMMarginMaxBorrowableRes, error)
- func (api *PmMMarginMaxBorrowableApi) RecvWindow(RecvWindow int64) *PmMMarginMaxBorrowableApi
- func (api *PmMMarginMaxBorrowableApi) Timestamp(Timestamp int64) *PmMMarginMaxBorrowableApi
- type PmMMarginMaxBorrowableReq
- type PmMMarginMaxBorrowableRes
- type PmMMarginMaxTransferableApi
- func (api *PmMMarginMaxTransferableApi) Asset(Asset string) *PmMMarginMaxTransferableApi
- func (api *PmMMarginMaxTransferableApi) Do() (*PmMMarginMaxTransferableRes, error)
- func (api *PmMMarginMaxTransferableApi) RecvWindow(RecvWindow int64) *PmMMarginMaxTransferableApi
- func (api *PmMMarginMaxTransferableApi) Timestamp(Timestamp int64) *PmMMarginMaxTransferableApi
- type PmMMarginMaxTransferableReq
- type PmMMarginMaxTransferableRes
- type PmMMarginOCOAllOrdersApi
- func (api *PmMMarginOCOAllOrdersApi) Do() (*PmMMarginOCOAllOrdersRes, error)
- func (api *PmMMarginOCOAllOrdersApi) EndTime(EndTime int64) *PmMMarginOCOAllOrdersApi
- func (api *PmMMarginOCOAllOrdersApi) FromId(FromId int64) *PmMMarginOCOAllOrdersApi
- func (api *PmMMarginOCOAllOrdersApi) Limit(Limit int64) *PmMMarginOCOAllOrdersApi
- func (api *PmMMarginOCOAllOrdersApi) RecvWindow(RecvWindow int64) *PmMMarginOCOAllOrdersApi
- func (api *PmMMarginOCOAllOrdersApi) StartTime(StartTime int64) *PmMMarginOCOAllOrdersApi
- func (api *PmMMarginOCOAllOrdersApi) Timestamp(Timestamp int64) *PmMMarginOCOAllOrdersApi
- type PmMMarginOCOAllOrdersReq
- type PmMMarginOCOAllOrdersRes
- type PmMMarginOCOOpenOrdersApi
- type PmMMarginOCOOpenOrdersReq
- type PmMMarginOCOOpenOrdersRes
- type PmMMarginOCOOrderDeleteApi
- func (api *PmMMarginOCOOrderDeleteApi) Do() (*PmMMarginOCOOrderDeleteRes, error)
- func (api *PmMMarginOCOOrderDeleteApi) ListClientOrderId(ListClientOrderId string) *PmMMarginOCOOrderDeleteApi
- func (api *PmMMarginOCOOrderDeleteApi) NewClientOrderId(NewClientOrderId string) *PmMMarginOCOOrderDeleteApi
- func (api *PmMMarginOCOOrderDeleteApi) OrderListId(OrderListId int64) *PmMMarginOCOOrderDeleteApi
- func (api *PmMMarginOCOOrderDeleteApi) RecvWindow(RecvWindow int64) *PmMMarginOCOOrderDeleteApi
- func (api *PmMMarginOCOOrderDeleteApi) Symbol(Symbol string) *PmMMarginOCOOrderDeleteApi
- func (api *PmMMarginOCOOrderDeleteApi) Timestamp(Timestamp int64) *PmMMarginOCOOrderDeleteApi
- type PmMMarginOCOOrderDeleteReq
- type PmMMarginOCOOrderDeleteRes
- type PmMMarginOCOOrderGetApi
- func (api *PmMMarginOCOOrderGetApi) Do() (*PmMMarginOCOOrderGetRes, error)
- func (api *PmMMarginOCOOrderGetApi) OrderListId(OrderListId int64) *PmMMarginOCOOrderGetApi
- func (api *PmMMarginOCOOrderGetApi) OrigClientOrderId(OrigClientOrderId string) *PmMMarginOCOOrderGetApi
- func (api *PmMMarginOCOOrderGetApi) RecvWindow(RecvWindow int64) *PmMMarginOCOOrderGetApi
- func (api *PmMMarginOCOOrderGetApi) Timestamp(Timestamp int64) *PmMMarginOCOOrderGetApi
- type PmMMarginOCOOrderGetReq
- type PmMMarginOCOOrderGetRes
- type PmMMarginOCOOrderPostApi
- func (api *PmMMarginOCOOrderPostApi) Do() (*PmMMarginOCOOrderPostRes, error)
- func (api *PmMMarginOCOOrderPostApi) LimitClientOrderId(LimitClientOrderId string) *PmMMarginOCOOrderPostApi
- func (api *PmMMarginOCOOrderPostApi) LimitIcebergQty(LimitIcebergQty decimal.Decimal) *PmMMarginOCOOrderPostApi
- func (api *PmMMarginOCOOrderPostApi) ListClientOrderId(ListClientOrderId string) *PmMMarginOCOOrderPostApi
- func (api *PmMMarginOCOOrderPostApi) NewOrderRespType(NewOrderRespType string) *PmMMarginOCOOrderPostApi
- func (api *PmMMarginOCOOrderPostApi) Price(Price decimal.Decimal) *PmMMarginOCOOrderPostApi
- func (api *PmMMarginOCOOrderPostApi) Quantity(Quantity decimal.Decimal) *PmMMarginOCOOrderPostApi
- func (api *PmMMarginOCOOrderPostApi) RecvWindow(RecvWindow int64) *PmMMarginOCOOrderPostApi
- func (api *PmMMarginOCOOrderPostApi) Side(Side string) *PmMMarginOCOOrderPostApi
- func (api *PmMMarginOCOOrderPostApi) SideEffectType(SideEffectType string) *PmMMarginOCOOrderPostApi
- func (api *PmMMarginOCOOrderPostApi) StopClientOrderId(StopClientOrderId string) *PmMMarginOCOOrderPostApi
- func (api *PmMMarginOCOOrderPostApi) StopIcebergQty(StopIcebergQty decimal.Decimal) *PmMMarginOCOOrderPostApi
- func (api *PmMMarginOCOOrderPostApi) StopLimitPrice(StopLimitPrice decimal.Decimal) *PmMMarginOCOOrderPostApi
- func (api *PmMMarginOCOOrderPostApi) StopLimitTimeInForce(StopLimitTimeInForce string) *PmMMarginOCOOrderPostApi
- func (api *PmMMarginOCOOrderPostApi) StopPrice(StopPrice decimal.Decimal) *PmMMarginOCOOrderPostApi
- func (api *PmMMarginOCOOrderPostApi) Symbol(Symbol string) *PmMMarginOCOOrderPostApi
- func (api *PmMMarginOCOOrderPostApi) Timestamp(Timestamp int64) *PmMMarginOCOOrderPostApi
- type PmMMarginOCOOrderPostReq
- type PmMMarginOCOOrderPostRes
- type PmMMarginOpenOrdersApi
- func (api *PmMMarginOpenOrdersApi) Do() (*PmMMarginOpenOrdersRes, error)
- func (api *PmMMarginOpenOrdersApi) RecvWindow(RecvWindow int64) *PmMMarginOpenOrdersApi
- func (api *PmMMarginOpenOrdersApi) Symbol(Symbol string) *PmMMarginOpenOrdersApi
- func (api *PmMMarginOpenOrdersApi) Timestamp(Timestamp int64) *PmMMarginOpenOrdersApi
- type PmMMarginOpenOrdersReq
- type PmMMarginOpenOrdersRes
- type PmMMarginOrder
- type PmMMarginOrderDeleteApi
- func (api *PmMMarginOrderDeleteApi) Do() (*PmMMarginOrderDeleteRes, error)
- func (api *PmMMarginOrderDeleteApi) NewClientOrderId(NewClientOrderId string) *PmMMarginOrderDeleteApi
- func (api *PmMMarginOrderDeleteApi) OrderId(OrderId int64) *PmMMarginOrderDeleteApi
- func (api *PmMMarginOrderDeleteApi) OrigClientOrderId(OrigClientOrderId int64) *PmMMarginOrderDeleteApi
- func (api *PmMMarginOrderDeleteApi) RecvWindow(RecvWindow int64) *PmMMarginOrderDeleteApi
- func (api *PmMMarginOrderDeleteApi) Symbol(Symbol string) *PmMMarginOrderDeleteApi
- func (api *PmMMarginOrderDeleteApi) Timestamp(Timestamp int64) *PmMMarginOrderDeleteApi
- type PmMMarginOrderDeleteReq
- type PmMMarginOrderDeleteRes
- type PmMMarginOrderGetApi
- func (api *PmMMarginOrderGetApi) Do() (*PmMMarginOrderGetRes, error)
- func (api *PmMMarginOrderGetApi) OrderId(OrderId int64) *PmMMarginOrderGetApi
- func (api *PmMMarginOrderGetApi) OrigClientOrderId(OrigClientOrderId int64) *PmMMarginOrderGetApi
- func (api *PmMMarginOrderGetApi) RecvWindow(RecvWindow int64) *PmMMarginOrderGetApi
- func (api *PmMMarginOrderGetApi) Symbol(Symbol string) *PmMMarginOrderGetApi
- func (api *PmMMarginOrderGetApi) Timestamp(Timestamp int64) *PmMMarginOrderGetApi
- type PmMMarginOrderGetReq
- type PmMMarginOrderGetRes
- type PmMMarginOrderPostApi
- func (api *PmMMarginOrderPostApi) AutoRepayAtCancel(AutoRepayAtCancel bool) *PmMMarginOrderPostApi
- func (api *PmMMarginOrderPostApi) Do() (*PmMMarginOrderPostRes, error)
- func (api *PmMMarginOrderPostApi) IcebergQty(IcebergQty decimal.Decimal) *PmMMarginOrderPostApi
- func (api *PmMMarginOrderPostApi) NewClientOrderId(NewClientOrderId string) *PmMMarginOrderPostApi
- func (api *PmMMarginOrderPostApi) NewOrderRespType(NewOrderRespType string) *PmMMarginOrderPostApi
- func (api *PmMMarginOrderPostApi) Price(Price decimal.Decimal) *PmMMarginOrderPostApi
- func (api *PmMMarginOrderPostApi) Quantity(Quantity decimal.Decimal) *PmMMarginOrderPostApi
- func (api *PmMMarginOrderPostApi) QuoteOrderQty(QuoteOrderQty decimal.Decimal) *PmMMarginOrderPostApi
- func (api *PmMMarginOrderPostApi) RecvWindow(RecvWindow int64) *PmMMarginOrderPostApi
- func (api *PmMMarginOrderPostApi) SelfTradePreventionMode(SelfTradePreventionMode string) *PmMMarginOrderPostApi
- func (api *PmMMarginOrderPostApi) Side(Side string) *PmMMarginOrderPostApi
- func (api *PmMMarginOrderPostApi) SideEffectType(SideEffectType string) *PmMMarginOrderPostApi
- func (api *PmMMarginOrderPostApi) StopPrice(StopPrice decimal.Decimal) *PmMMarginOrderPostApi
- func (api *PmMMarginOrderPostApi) Symbol(Symbol string) *PmMMarginOrderPostApi
- func (api *PmMMarginOrderPostApi) TimeInForce(TimeInForce string) *PmMMarginOrderPostApi
- func (api *PmMMarginOrderPostApi) Timestamp(Timestamp int64) *PmMMarginOrderPostApi
- func (api *PmMMarginOrderPostApi) Type(Type string) *PmMMarginOrderPostApi
- type PmMMarginOrderPostReq
- type PmMMarginOrderPostRes
- type PmMMarginOrderPostRow
- type PmMRestClient
- func (client *PmMRestClient) NewPmMAccount() *PmMAccountApi
- func (client *PmMRestClient) NewPmMAccountBalance() *PmMAccountBalanceApi
- func (client *PmMRestClient) NewPmMListenKeyDelete() *PmMListenKeyDeleteApi
- func (client *PmMRestClient) NewPmMListenKeyPost() *PmMListenKeyPostApi
- func (client *PmMRestClient) NewPmMListenKeyPut() *PmMListenKeyPutApi
- func (client *PmMRestClient) NewPmMMarginAllOrders() *PmMMarginAllOrdersApi
- func (client *PmMRestClient) NewPmMMarginInterestHistory() *PmMMarginInterestHistoryApi
- func (client *PmMRestClient) NewPmMMarginMaxBorrowable() *PmMMarginMaxBorrowableApi
- func (client *PmMRestClient) NewPmMMarginMaxTransferable() *PmMMarginMaxTransferableApi
- func (client *PmMRestClient) NewPmMMarginOCOAllOrders() *PmMMarginOCOAllOrdersApi
- func (client *PmMRestClient) NewPmMMarginOCOOpenOrders() *PmMMarginOCOOpenOrdersApi
- func (client *PmMRestClient) NewPmMMarginOCOOrderDelete() *PmMMarginOCOOrderDeleteApi
- func (client *PmMRestClient) NewPmMMarginOCOOrderGet() *PmMMarginOCOOrderGetApi
- func (client *PmMRestClient) NewPmMMarginOCOOrderPost() *PmMMarginOCOOrderPostApi
- func (client *PmMRestClient) NewPmMMarginOpenOrders() *PmMMarginOpenOrdersApi
- func (client *PmMRestClient) NewPmMMarginOrderDelete() *PmMMarginOrderDeleteApi
- func (client *PmMRestClient) NewPmMMarginOrderGet() *PmMMarginOrderGetApi
- func (client *PmMRestClient) NewPmMMarginOrderPost() *PmMMarginOrderPostApi
- type PmMWsStreamClient
- type PmPOCODeleteOrderReport
- type PmPOCOOrder
- type PmPOCOOrderReport
- type PmUAccountApi
- type PmUAccountBalanceApi
- func (api *PmUAccountBalanceApi) Asset(Asset string) *PmUAccountBalanceApi
- func (api *PmUAccountBalanceApi) Do() (*PmUAccountBalanceRes, error)
- func (api *PmUAccountBalanceApi) RecvWindow(RecvWindow int64) *PmUAccountBalanceApi
- func (api *PmUAccountBalanceApi) Timestamp(Timestamp int64) *PmUAccountBalanceApi
- type PmUAccountBalanceReq
- type PmUAccountBalanceRes
- type PmUAccountBalanceRow
- type PmUAccountForUApi
- type PmUAccountForUReq
- type PmUAccountForURes
- type PmUAccountForUResAsset
- type PmUAccountForUResPosition
- type PmUAccountReq
- type PmUAccountRes
- type PmUAllConditionnalOrderDeleteApi
- func (api *PmUAllConditionnalOrderDeleteApi) Do() (*PmUAllConditionnalOrderDeleteRes, error)
- func (api *PmUAllConditionnalOrderDeleteApi) RecvWindow(RecvWindow int64) *PmUAllConditionnalOrderDeleteApi
- func (api *PmUAllConditionnalOrderDeleteApi) Symbol(Symbol string) *PmUAllConditionnalOrderDeleteApi
- func (api *PmUAllConditionnalOrderDeleteApi) Timestamp(Timestamp int64) *PmUAllConditionnalOrderDeleteApi
- type PmUAllConditionnalOrderDeleteReq
- type PmUAllConditionnalOrderDeleteRes
- type PmUAllOrderDeleteApi
- func (api *PmUAllOrderDeleteApi) Do() (*PmUAllOrderDeleteRes, error)
- func (api *PmUAllOrderDeleteApi) RecvWindow(RecvWindow int64) *PmUAllOrderDeleteApi
- func (api *PmUAllOrderDeleteApi) Symbol(Symbol string) *PmUAllOrderDeleteApi
- func (api *PmUAllOrderDeleteApi) Timestamp(Timestamp int64) *PmUAllOrderDeleteApi
- type PmUAllOrderDeleteReq
- type PmUAllOrderDeleteRes
- type PmUAllOrdersApi
- func (api *PmUAllOrdersApi) Do() (*PmUAllOrdersRes, error)
- func (api *PmUAllOrdersApi) EndTime(EndTime int64) *PmUAllOrdersApi
- func (api *PmUAllOrdersApi) Limit(Limit int64) *PmUAllOrdersApi
- func (api *PmUAllOrdersApi) OrderId(OrderId int64) *PmUAllOrdersApi
- func (api *PmUAllOrdersApi) RecvWindow(RecvWindow int64) *PmUAllOrdersApi
- func (api *PmUAllOrdersApi) StartTime(StartTime int64) *PmUAllOrdersApi
- func (api *PmUAllOrdersApi) Symbol(Symbol string) *PmUAllOrdersApi
- func (api *PmUAllOrdersApi) Timestamp(Timestamp int64) *PmUAllOrdersApi
- type PmUAllOrdersReq
- type PmUAllOrdersRes
- type PmUApi
- type PmUCommissionRateApi
- func (api *PmUCommissionRateApi) Do() (*PmUCommissionRateRes, error)
- func (api *PmUCommissionRateApi) RecvWindow(RecvWindow int64) *PmUCommissionRateApi
- func (api *PmUCommissionRateApi) Symbol(Symbol string) *PmUCommissionRateApi
- func (api *PmUCommissionRateApi) Timestamp(Timestamp int64) *PmUCommissionRateApi
- type PmUCommissionRateReq
- type PmUCommissionRateRes
- type PmUConditionalOrderDeleteApi
- func (api *PmUConditionalOrderDeleteApi) Do() (*PmUConditionalOrderDeleteRes, error)
- func (api *PmUConditionalOrderDeleteApi) NewClientStrategyId(NewClientStrategyId string) *PmUConditionalOrderDeleteApi
- func (api *PmUConditionalOrderDeleteApi) RecvWindow(RecvWindow int64) *PmUConditionalOrderDeleteApi
- func (api *PmUConditionalOrderDeleteApi) StrategyId(StrategyId string) *PmUConditionalOrderDeleteApi
- func (api *PmUConditionalOrderDeleteApi) Symbol(Symbol string) *PmUConditionalOrderDeleteApi
- func (api *PmUConditionalOrderDeleteApi) Timestamp(Timestamp int64) *PmUConditionalOrderDeleteApi
- type PmUConditionalOrderDeleteReq
- type PmUConditionalOrderDeleteRes
- type PmUConditionalOrderPostApi
- func (api *PmUConditionalOrderPostApi) ActivationPrice(ActivationPrice decimal.Decimal) *PmUConditionalOrderPostApi
- func (api *PmUConditionalOrderPostApi) CallbackRate(CallbackRate decimal.Decimal) *PmUConditionalOrderPostApi
- func (api *PmUConditionalOrderPostApi) Do() (*PmUConditionalOrderPostRes, error)
- func (api *PmUConditionalOrderPostApi) GoodTillDate(GoodTillDate int64) *PmUConditionalOrderPostApi
- func (api *PmUConditionalOrderPostApi) NewClientStrategyId(NewClientStrategyId string) *PmUConditionalOrderPostApi
- func (api *PmUConditionalOrderPostApi) PositionSide(PositionSide string) *PmUConditionalOrderPostApi
- func (api *PmUConditionalOrderPostApi) Price(Price decimal.Decimal) *PmUConditionalOrderPostApi
- func (api *PmUConditionalOrderPostApi) PriceMatch(PriceMatch string) *PmUConditionalOrderPostApi
- func (api *PmUConditionalOrderPostApi) PriceProtect(PriceProtect string) *PmUConditionalOrderPostApi
- func (api *PmUConditionalOrderPostApi) Quantity(Quantity decimal.Decimal) *PmUConditionalOrderPostApi
- func (api *PmUConditionalOrderPostApi) RecvWindow(RecvWindow int64) *PmUConditionalOrderPostApi
- func (api *PmUConditionalOrderPostApi) SelfTradePreventionMode(SelfTradePreventionMode string) *PmUConditionalOrderPostApi
- func (api *PmUConditionalOrderPostApi) Side(Side string) *PmUConditionalOrderPostApi
- func (api *PmUConditionalOrderPostApi) StopPrice(StopPrice decimal.Decimal) *PmUConditionalOrderPostApi
- func (api *PmUConditionalOrderPostApi) StrategyType(StrategyType string) *PmUConditionalOrderPostApi
- func (api *PmUConditionalOrderPostApi) Symbol(Symbol string) *PmUConditionalOrderPostApi
- func (api *PmUConditionalOrderPostApi) TimeInForce(TimeInForce string) *PmUConditionalOrderPostApi
- func (api *PmUConditionalOrderPostApi) Timestamp(Timestamp int64) *PmUConditionalOrderPostApi
- func (api *PmUConditionalOrderPostApi) WorkingType(WorkingType string) *PmUConditionalOrderPostApi
- type PmUConditionalOrderPostReq
- type PmUConditionalOrderPostRes
- type PmUListenKeyDeleteApi
- type PmUListenKeyDeleteReq
- type PmUListenKeyDeleteRes
- type PmUListenKeyPostApi
- type PmUListenKeyPostReq
- type PmUListenKeyPostRes
- type PmUListenKeyPutApi
- type PmUListenKeyPutReq
- type PmUListenKeyPutRes
- type PmUOpenOrdersApi
- type PmUOpenOrdersReq
- type PmUOpenOrdersRes
- type PmUOrderDeleteApi
- func (api *PmUOrderDeleteApi) Do() (*PmUOrderDeleteRes, error)
- func (api *PmUOrderDeleteApi) OrderId(OrderId int64) *PmUOrderDeleteApi
- func (api *PmUOrderDeleteApi) OrigClientOrderId(OrigClientOrderId string) *PmUOrderDeleteApi
- func (api *PmUOrderDeleteApi) RecvWindow(RecvWindow int64) *PmUOrderDeleteApi
- func (api *PmUOrderDeleteApi) Symbol(Symbol string) *PmUOrderDeleteApi
- func (api *PmUOrderDeleteApi) Timestamp(Timestamp int64) *PmUOrderDeleteApi
- type PmUOrderDeleteReq
- type PmUOrderDeleteRes
- type PmUOrderGetApi
- func (api *PmUOrderGetApi) Do() (*PmUOrderGetRes, error)
- func (api *PmUOrderGetApi) OrderId(OrderId int64) *PmUOrderGetApi
- func (api *PmUOrderGetApi) OrigClientOrderId(OrigClientOrderId string) *PmUOrderGetApi
- func (api *PmUOrderGetApi) RecvWindow(RecvWindow int64) *PmUOrderGetApi
- func (api *PmUOrderGetApi) Symbol(Symbol string) *PmUOrderGetApi
- func (api *PmUOrderGetApi) Timestamp(Timestamp int64) *PmUOrderGetApi
- type PmUOrderGetReq
- type PmUOrderGetRes
- type PmUOrderOrder
- type PmUOrderPostApi
- func (api *PmUOrderPostApi) Do() (*PmUOrderPostRes, error)
- func (api *PmUOrderPostApi) GoodTillDate(GoodTillDate int64) *PmUOrderPostApi
- func (api *PmUOrderPostApi) NewClientOrderId(NewClientOrderId string) *PmUOrderPostApi
- func (api *PmUOrderPostApi) NewOrderRespType(NewOrderRespType string) *PmUOrderPostApi
- func (api *PmUOrderPostApi) PositionSide(PositionSide string) *PmUOrderPostApi
- func (api *PmUOrderPostApi) Price(Price decimal.Decimal) *PmUOrderPostApi
- func (api *PmUOrderPostApi) PriceMatch(PriceMatch string) *PmUOrderPostApi
- func (api *PmUOrderPostApi) Quantity(Quantity decimal.Decimal) *PmUOrderPostApi
- func (api *PmUOrderPostApi) RecvWindow(RecvWindow int64) *PmUOrderPostApi
- func (api *PmUOrderPostApi) ReduceOnly(ReduceOnly string) *PmUOrderPostApi
- func (api *PmUOrderPostApi) SelfTradePreventionMode(SelfTradePreventionMode string) *PmUOrderPostApi
- func (api *PmUOrderPostApi) Side(Side string) *PmUOrderPostApi
- func (api *PmUOrderPostApi) Symbol(Symbol string) *PmUOrderPostApi
- func (api *PmUOrderPostApi) TimeInForce(TimeInForce string) *PmUOrderPostApi
- func (api *PmUOrderPostApi) Timestamp(Timestamp int64) *PmUOrderPostApi
- func (api *PmUOrderPostApi) Type(Type string) *PmUOrderPostApi
- type PmUOrderPostReq
- type PmUOrderPostRes
- type PmUOrderPutApi
- func (api *PmUOrderPutApi) Do() (*PmUOrderPutRes, error)
- func (api *PmUOrderPutApi) OrderId(OrderId int64) *PmUOrderPutApi
- func (api *PmUOrderPutApi) OrigClientOrderId(OrigClientOrderId string) *PmUOrderPutApi
- func (api *PmUOrderPutApi) Price(Price decimal.Decimal) *PmUOrderPutApi
- func (api *PmUOrderPutApi) PriceMatch(PriceMatch string) *PmUOrderPutApi
- func (api *PmUOrderPutApi) Quantity(Quantity decimal.Decimal) *PmUOrderPutApi
- func (api *PmUOrderPutApi) RecvWindow(RecvWindow int64) *PmUOrderPutApi
- func (api *PmUOrderPutApi) Side(Side string) *PmUOrderPutApi
- func (api *PmUOrderPutApi) Symbol(Symbol string) *PmUOrderPutApi
- func (api *PmUOrderPutApi) Timestamp(Timestamp int64) *PmUOrderPutApi
- type PmUOrderPutReq
- type PmUOrderPutRes
- type PmURestClient
- func (client *PmURestClient) NewAllOrders() *PmUAllOrdersApi
- func (client *PmURestClient) NewOpenOrders() *PmUOpenOrdersApi
- func (client *PmURestClient) NewPmUAccount() *PmUAccountApi
- func (client *PmURestClient) NewPmUAccountBalance() *PmUAccountBalanceApi
- func (client *PmURestClient) NewPmUAccountForU() *PmUAccountForUApi
- func (client *PmURestClient) NewPmUAllConditionnalOrderDelete() *PmUAllConditionnalOrderDeleteApi
- func (client *PmURestClient) NewPmUAllOrderDelete() *PmUAllOrderDeleteApi
- func (client *PmURestClient) NewPmUCommissionRate() *PmUCommissionRateApi
- func (client *PmURestClient) NewPmUConditionalOrderDelete() *PmUConditionalOrderDeleteApi
- func (client *PmURestClient) NewPmUConditionalOrderPost() *PmUConditionalOrderPostApi
- func (client *PmURestClient) NewPmUListenKeyDelete() *PmUListenKeyDeleteApi
- func (client *PmURestClient) NewPmUListenKeyPost() *PmUListenKeyPostApi
- func (client *PmURestClient) NewPmUListenKeyPut() *PmUListenKeyPutApi
- func (client *PmURestClient) NewPmUOrderDelete() *PmUOrderDeleteApi
- func (client *PmURestClient) NewPmUOrderGet() *PmUOrderGetApi
- func (client *PmURestClient) NewPmUOrderPost() *PmUOrderPostApi
- func (client *PmURestClient) NewPmUOrderPut() *PmUOrderPutApi
- func (client *PmURestClient) NewPmUUserTrades() *PmUUserTradesApi
- type PmUUserTradesApi
- func (api *PmUUserTradesApi) Do() (*PmUUserTradesRes, error)
- func (api *PmUUserTradesApi) EndTime(EndTime int64) *PmUUserTradesApi
- func (api *PmUUserTradesApi) FromId(FromId int64) *PmUUserTradesApi
- func (api *PmUUserTradesApi) Limit(Limit int64) *PmUUserTradesApi
- func (api *PmUUserTradesApi) RecvWindow(RecvWindow int64) *PmUUserTradesApi
- func (api *PmUUserTradesApi) StartTime(StartTime int64) *PmUUserTradesApi
- func (api *PmUUserTradesApi) Symbol(Symbol string) *PmUUserTradesApi
- func (api *PmUUserTradesApi) Timestamp(Timestamp int64) *PmUUserTradesApi
- type PmUUserTradesOrder
- type PmUUserTradesReq
- type PmUUserTradesRes
- type PmUWsStreamClient
- type PriceLevel
- type ProxyWeight
- type RateLimit
- type RequestType
- type RestClient
- type RestProxy
- type SpotAccountApi
- type SpotAccountApiTradingStatusApi
- type SpotAccountApiTradingStatusData
- type SpotAccountApiTradingStatusReq
- type SpotAccountApiTradingStatusRes
- type SpotAccountApiTradingStatusTriggerCondition
- type SpotAccountCommissionRates
- type SpotAccountReq
- type SpotAccountRes
- type SpotAggTradesApi
- func (api *SpotAggTradesApi) Do() (*SpotAggTradesRes, error)
- func (api *SpotAggTradesApi) EndTime(EndTime int64) *SpotAggTradesApi
- func (api *SpotAggTradesApi) FromId(FromId int64) *SpotAggTradesApi
- func (api *SpotAggTradesApi) Limit(Limit int) *SpotAggTradesApi
- func (api *SpotAggTradesApi) StartTime(StartTime int64) *SpotAggTradesApi
- func (api *SpotAggTradesApi) Symbol(Symbol string) *SpotAggTradesApi
- type SpotAggTradesReq
- type SpotAggTradesRes
- type SpotAggTradesResRow
- type SpotAllOrdersApi
- func (api *SpotAllOrdersApi) Do() (*SpotAllOrdersRes, error)
- func (api *SpotAllOrdersApi) EndTime(EndTime int64) *SpotAllOrdersApi
- func (api *SpotAllOrdersApi) Limit(Limit int) *SpotAllOrdersApi
- func (api *SpotAllOrdersApi) OrderId(OrderId int64) *SpotAllOrdersApi
- func (api *SpotAllOrdersApi) RecvWindow(RecvWindow int64) *SpotAllOrdersApi
- func (api *SpotAllOrdersApi) StartTime(StartTime int64) *SpotAllOrdersApi
- func (api *SpotAllOrdersApi) Symbol(Symbol string) *SpotAllOrdersApi
- func (api *SpotAllOrdersApi) Timestamp(Timestamp int64) *SpotAllOrdersApi
- type SpotAllOrdersReq
- type SpotAllOrdersRes
- type SpotApi
- type SpotAssetGetFundingAssetApi
- func (api *SpotAssetGetFundingAssetApi) Asset(Asset string) *SpotAssetGetFundingAssetApi
- func (api *SpotAssetGetFundingAssetApi) Do() (*SpotAssetGetFundingAssetRes, error)
- func (api *SpotAssetGetFundingAssetApi) NeedBtcValuation(NeedBtcValuation string) *SpotAssetGetFundingAssetApi
- func (api *SpotAssetGetFundingAssetApi) RecvWindow(RecvWindow int64) *SpotAssetGetFundingAssetApi
- func (api *SpotAssetGetFundingAssetApi) Timestamp(Timestamp int64) *SpotAssetGetFundingAssetApi
- type SpotAssetGetFundingAssetReq
- type SpotAssetGetFundingAssetRes
- type SpotAssetGetFundingAssetResRow
- type SpotAssetTradeFeeApi
- func (api *SpotAssetTradeFeeApi) Do() (*SpotAssetTradeFeeRes, error)
- func (api *SpotAssetTradeFeeApi) RecvWindow(RecvWindow int64) *SpotAssetTradeFeeApi
- func (api *SpotAssetTradeFeeApi) Symbol(Symbol string) *SpotAssetTradeFeeApi
- func (api *SpotAssetTradeFeeApi) Timestamp(Timestamp int64) *SpotAssetTradeFeeApi
- type SpotAssetTradeFeeReq
- type SpotAssetTradeFeeRes
- type SpotAssetTradeFeeResRow
- type SpotAssetTransferGetApi
- func (api *SpotAssetTransferGetApi) Current(Current int64) *SpotAssetTransferGetApi
- func (api *SpotAssetTransferGetApi) Do() (*SpotAssetTransferGetRes, error)
- func (api *SpotAssetTransferGetApi) EndTime(EndTime int64) *SpotAssetTransferGetApi
- func (api *SpotAssetTransferGetApi) FromSymbol(FromSymbol string) *SpotAssetTransferGetApi
- func (api *SpotAssetTransferGetApi) RecvWindow(RecvWindow int64) *SpotAssetTransferGetApi
- func (api *SpotAssetTransferGetApi) Size(Size int64) *SpotAssetTransferGetApi
- func (api *SpotAssetTransferGetApi) StartTime(StartTime int64) *SpotAssetTransferGetApi
- func (api *SpotAssetTransferGetApi) Timestamp(Timestamp int64) *SpotAssetTransferGetApi
- func (api *SpotAssetTransferGetApi) ToSymbol(ToSymbol string) *SpotAssetTransferGetApi
- func (api *SpotAssetTransferGetApi) Type(Type AssertTransferType) *SpotAssetTransferGetApi
- type SpotAssetTransferGetReq
- type SpotAssetTransferGetRes
- type SpotAssetTransferGetRow
- type SpotAssetTransferPostApi
- func (api *SpotAssetTransferPostApi) Amount(Amount decimal.Decimal) *SpotAssetTransferPostApi
- func (api *SpotAssetTransferPostApi) Asset(Asset string) *SpotAssetTransferPostApi
- func (api *SpotAssetTransferPostApi) Do() (*SpotAssetTransferPostRes, error)
- func (api *SpotAssetTransferPostApi) FromSymbol(FromSymbol string) *SpotAssetTransferPostApi
- func (api *SpotAssetTransferPostApi) RecvWindow(RecvWindow int64) *SpotAssetTransferPostApi
- func (api *SpotAssetTransferPostApi) Timestamp(Timestamp int64) *SpotAssetTransferPostApi
- func (api *SpotAssetTransferPostApi) ToSymbol(ToSymbol string) *SpotAssetTransferPostApi
- func (api *SpotAssetTransferPostApi) Type(Type AssertTransferType) *SpotAssetTransferPostApi
- type SpotAssetTransferPostReq
- type SpotAssetTransferPostRes
- type SpotAvgPriceApi
- type SpotAvgPriceReq
- type SpotAvgPriceRes
- type SpotBalance
- type SpotDepthApi
- type SpotDepthReq
- type SpotDepthRes
- type SpotDepthResMiddle
- type SpotExchangeInfoApi
- type SpotExchangeInfoReq
- type SpotExchangeInfoRes
- type SpotExchangeInfoResRateLimit
- type SpotExchangeInfoResSymbol
- type SpotHistoricalTradesApi
- func (api *SpotHistoricalTradesApi) Do() (*SpotHistoricalTradesRes, error)
- func (api *SpotHistoricalTradesApi) FromId(FromId int64) *SpotHistoricalTradesApi
- func (api *SpotHistoricalTradesApi) Limit(Limit int) *SpotHistoricalTradesApi
- func (api *SpotHistoricalTradesApi) Symbol(Symbol string) *SpotHistoricalTradesApi
- type SpotHistoricalTradesReq
- type SpotHistoricalTradesRes
- type SpotKlinesApi
- func (api *SpotKlinesApi) Do() (*KlinesRes, error)
- func (api *SpotKlinesApi) EndTime(EndTime int64) *SpotKlinesApi
- func (api *SpotKlinesApi) Interval(Interval string) *SpotKlinesApi
- func (api *SpotKlinesApi) Limit(Limit int) *SpotKlinesApi
- func (api *SpotKlinesApi) StartTime(StartTime int64) *SpotKlinesApi
- func (api *SpotKlinesApi) Symbol(Symbol string) *SpotKlinesApi
- type SpotKlinesReq
- type SpotManagedSubAccountQueryTransLogApi
- func (api *SpotManagedSubAccountQueryTransLogApi) Do() (*ManagedSubAccountQueryTransLogRes, error)
- func (api *SpotManagedSubAccountQueryTransLogApi) EndTime(EndTime int64) *SpotManagedSubAccountQueryTransLogApi
- func (api *SpotManagedSubAccountQueryTransLogApi) Limit(Limit int) *SpotManagedSubAccountQueryTransLogApi
- func (api *SpotManagedSubAccountQueryTransLogApi) Page(Page int) *SpotManagedSubAccountQueryTransLogApi
- func (api *SpotManagedSubAccountQueryTransLogApi) RecvWindow(RecvWindow int64) *SpotManagedSubAccountQueryTransLogApi
- func (api *SpotManagedSubAccountQueryTransLogApi) StartTime(StartTime int64) *SpotManagedSubAccountQueryTransLogApi
- func (api *SpotManagedSubAccountQueryTransLogApi) Timestamp(Timestamp int64) *SpotManagedSubAccountQueryTransLogApi
- func (api *SpotManagedSubAccountQueryTransLogApi) TransferFunctionAccountType(TransferFunctionAccountType string) *SpotManagedSubAccountQueryTransLogApi
- func (api *SpotManagedSubAccountQueryTransLogApi) Transfers(Transfers string) *SpotManagedSubAccountQueryTransLogApi
- type SpotManagedSubAccountQueryTransLogReq
- type SpotMarginAccountApi
- type SpotMarginAccountReq
- type SpotMarginAllOrdersApi
- func (api *SpotMarginAllOrdersApi) Do() (*MarginAllOrdersRes, error)
- func (api *SpotMarginAllOrdersApi) EndTime(EndTime int64) *SpotMarginAllOrdersApi
- func (api *SpotMarginAllOrdersApi) IsIsolated(IsIsolated string) *SpotMarginAllOrdersApi
- func (api *SpotMarginAllOrdersApi) Limit(Limit int64) *SpotMarginAllOrdersApi
- func (api *SpotMarginAllOrdersApi) OrderId(OrderId int64) *SpotMarginAllOrdersApi
- func (api *SpotMarginAllOrdersApi) RecvWindow(RecvWindow int64) *SpotMarginAllOrdersApi
- func (api *SpotMarginAllOrdersApi) StartTime(StartTime int64) *SpotMarginAllOrdersApi
- func (api *SpotMarginAllOrdersApi) Symbol(Symbol string) *SpotMarginAllOrdersApi
- func (api *SpotMarginAllOrdersApi) Timestamp(Timestamp int64) *SpotMarginAllOrdersApi
- type SpotMarginAllOrdersReq
- type SpotMarginAllPairsApi
- type SpotMarginAllPairsReq
- type SpotMarginInterestHistoryApi
- func (api *SpotMarginInterestHistoryApi) Archived(Archived string) *SpotMarginInterestHistoryApi
- func (api *SpotMarginInterestHistoryApi) Asset(Asset string) *SpotMarginInterestHistoryApi
- func (api *SpotMarginInterestHistoryApi) Current(Current int64) *SpotMarginInterestHistoryApi
- func (api *SpotMarginInterestHistoryApi) Do() (*MarginInterestHistoryRes, error)
- func (api *SpotMarginInterestHistoryApi) EndTime(EndTime int64) *SpotMarginInterestHistoryApi
- func (api *SpotMarginInterestHistoryApi) IsolatedSymbol(IsolatedSymbol string) *SpotMarginInterestHistoryApi
- func (api *SpotMarginInterestHistoryApi) RecvWindow(RecvWindow int64) *SpotMarginInterestHistoryApi
- func (api *SpotMarginInterestHistoryApi) Size(Size int64) *SpotMarginInterestHistoryApi
- func (api *SpotMarginInterestHistoryApi) StartTime(StartTime int64) *SpotMarginInterestHistoryApi
- func (api *SpotMarginInterestHistoryApi) Timestamp(Timestamp int64) *SpotMarginInterestHistoryApi
- type SpotMarginInterestHistoryReq
- type SpotMarginIsolatedAccountApi
- func (api *SpotMarginIsolatedAccountApi) Do() (*MarginIsolatedAccountRes, error)
- func (api *SpotMarginIsolatedAccountApi) RecvWindow(RecvWindow int64) *SpotMarginIsolatedAccountApi
- func (api *SpotMarginIsolatedAccountApi) Symbols(Symbols string) *SpotMarginIsolatedAccountApi
- func (api *SpotMarginIsolatedAccountApi) Timestamp(Timestamp int64) *SpotMarginIsolatedAccountApi
- type SpotMarginIsolatedAccountReq
- type SpotMarginIsolatedAllPairsApi
- type SpotMarginIsolatedAllPairsReq
- type SpotMarginIsolatedTransferApi
- func (api *SpotMarginIsolatedTransferApi) Amount(Amount decimal.Decimal) *SpotMarginIsolatedTransferApi
- func (api *SpotMarginIsolatedTransferApi) Asset(Asset string) *SpotMarginIsolatedTransferApi
- func (api *SpotMarginIsolatedTransferApi) Do() (*MarginIsolatedTransferRes, error)
- func (api *SpotMarginIsolatedTransferApi) RecvWindow(RecvWindow int64) *SpotMarginIsolatedTransferApi
- func (api *SpotMarginIsolatedTransferApi) Symbol(Symbol string) *SpotMarginIsolatedTransferApi
- func (api *SpotMarginIsolatedTransferApi) Timestamp(Timestamp int64) *SpotMarginIsolatedTransferApi
- func (api *SpotMarginIsolatedTransferApi) TransFrom(TransFrom string) *SpotMarginIsolatedTransferApi
- func (api *SpotMarginIsolatedTransferApi) TransTo(TransTo string) *SpotMarginIsolatedTransferApi
- type SpotMarginIsolatedTransferReq
- type SpotMarginIsolatedUserDataStreamDeleteApi
- func (api *SpotMarginIsolatedUserDataStreamDeleteApi) Do() (*SpotMarginIsolatedUserDataStreamDeleteRes, error)
- func (api *SpotMarginIsolatedUserDataStreamDeleteApi) ListenKey(ListenKey string) *SpotMarginIsolatedUserDataStreamDeleteApi
- func (api *SpotMarginIsolatedUserDataStreamDeleteApi) Symbol(Symbol string) *SpotMarginIsolatedUserDataStreamDeleteApi
- type SpotMarginIsolatedUserDataStreamDeleteReq
- type SpotMarginIsolatedUserDataStreamDeleteRes
- type SpotMarginIsolatedUserDataStreamPostApi
- type SpotMarginIsolatedUserDataStreamPostReq
- type SpotMarginIsolatedUserDataStreamPostRes
- type SpotMarginIsolatedUserDataStreamPutApi
- func (api *SpotMarginIsolatedUserDataStreamPutApi) Do() (*SpotMarginIsolatedUserDataStreamPutRes, error)
- func (api *SpotMarginIsolatedUserDataStreamPutApi) ListenKey(ListenKey string) *SpotMarginIsolatedUserDataStreamPutApi
- func (api *SpotMarginIsolatedUserDataStreamPutApi) Symbol(Symbol string) *SpotMarginIsolatedUserDataStreamPutApi
- type SpotMarginIsolatedUserDataStreamPutReq
- type SpotMarginIsolatedUserDataStreamPutRes
- type SpotMarginLoanApi
- func (api *SpotMarginLoanApi) Amount(Amount decimal.Decimal) *SpotMarginLoanApi
- func (api *SpotMarginLoanApi) Asset(Asset string) *SpotMarginLoanApi
- func (api *SpotMarginLoanApi) Do() (*MarginLoanRes, error)
- func (api *SpotMarginLoanApi) IsIsolated(IsIsolated string) *SpotMarginLoanApi
- func (api *SpotMarginLoanApi) RecvWindow(RecvWindow int64) *SpotMarginLoanApi
- func (api *SpotMarginLoanApi) Symbol(Symbol string) *SpotMarginLoanApi
- func (api *SpotMarginLoanApi) Timestamp(Timestamp int64) *SpotMarginLoanApi
- type SpotMarginLoanReq
- type SpotMarginMaxBorrowableApi
- func (api *SpotMarginMaxBorrowableApi) Asset(Asset string) *SpotMarginMaxBorrowableApi
- func (api *SpotMarginMaxBorrowableApi) Do() (*MarginMaxBorrowableRes, error)
- func (api *SpotMarginMaxBorrowableApi) IsolatedSymbol(IsolatedSymbol string) *SpotMarginMaxBorrowableApi
- func (api *SpotMarginMaxBorrowableApi) RecvWindow(RecvWindow int64) *SpotMarginMaxBorrowableApi
- func (api *SpotMarginMaxBorrowableApi) Timestamp(Timestamp int64) *SpotMarginMaxBorrowableApi
- type SpotMarginMaxBorrowableReq
- type SpotMarginMaxTransferableApi
- func (api *SpotMarginMaxTransferableApi) Asset(Asset string) *SpotMarginMaxTransferableApi
- func (api *SpotMarginMaxTransferableApi) Do() (*MarginMaxTransferableRes, error)
- func (api *SpotMarginMaxTransferableApi) IsolatedSymbol(IsolatedSymbol string) *SpotMarginMaxTransferableApi
- func (api *SpotMarginMaxTransferableApi) RecvWindow(RecvWindow int64) *SpotMarginMaxTransferableApi
- func (api *SpotMarginMaxTransferableApi) Timestamp(Timestamp int64) *SpotMarginMaxTransferableApi
- type SpotMarginMaxTransferableReq
- type SpotMarginOpenOrdersApi
- func (api *SpotMarginOpenOrdersApi) Do() (*MarginOpenOrdersRes, error)
- func (api *SpotMarginOpenOrdersApi) IsIsolated(IsIsolated string) *SpotMarginOpenOrdersApi
- func (api *SpotMarginOpenOrdersApi) RecvWindow(RecvWindow int64) *SpotMarginOpenOrdersApi
- func (api *SpotMarginOpenOrdersApi) Symbol(Symbol string) *SpotMarginOpenOrdersApi
- func (api *SpotMarginOpenOrdersApi) Timestamp(Timestamp int64) *SpotMarginOpenOrdersApi
- type SpotMarginOpenOrdersReq
- type SpotMarginOrderDeleteApi
- func (api *SpotMarginOrderDeleteApi) Do() (*SpotMarginOrderDeleteRes, error)
- func (api *SpotMarginOrderDeleteApi) IsIsolated(IsIsolated string) *SpotMarginOrderDeleteApi
- func (api *SpotMarginOrderDeleteApi) NewClientOrderId(NewClientOrderId string) *SpotMarginOrderDeleteApi
- func (api *SpotMarginOrderDeleteApi) OrderId(OrderId int64) *SpotMarginOrderDeleteApi
- func (api *SpotMarginOrderDeleteApi) OrigClientOrderId(OrigClientOrderId string) *SpotMarginOrderDeleteApi
- func (api *SpotMarginOrderDeleteApi) RecvWindow(RecvWindow int64) *SpotMarginOrderDeleteApi
- func (api *SpotMarginOrderDeleteApi) Symbol(Symbol string) *SpotMarginOrderDeleteApi
- func (api *SpotMarginOrderDeleteApi) Timestamp(Timestamp int64) *SpotMarginOrderDeleteApi
- type SpotMarginOrderDeleteReq
- type SpotMarginOrderDeleteRes
- type SpotMarginOrderGetApi
- func (api *SpotMarginOrderGetApi) Do() (*MarginOrderGetRes, error)
- func (api *SpotMarginOrderGetApi) IsIsolated(IsIsolated string) *SpotMarginOrderGetApi
- func (api *SpotMarginOrderGetApi) OrderId(OrderId int64) *SpotMarginOrderGetApi
- func (api *SpotMarginOrderGetApi) OrigClientOrderId(OrigClientOrderId string) *SpotMarginOrderGetApi
- func (api *SpotMarginOrderGetApi) RecvWindow(RecvWindow int64) *SpotMarginOrderGetApi
- func (api *SpotMarginOrderGetApi) Symbol(Symbol string) *SpotMarginOrderGetApi
- func (api *SpotMarginOrderGetApi) Timestamp(Timestamp int64) *SpotMarginOrderGetApi
- type SpotMarginOrderGetReq
- type SpotMarginOrderPostApi
- func (api *SpotMarginOrderPostApi) AutoRepayAtCancel(AutoRepayAtCancel bool) *SpotMarginOrderPostApi
- func (api *SpotMarginOrderPostApi) Do() (*SpotMarginOrderPostRes, error)
- func (api *SpotMarginOrderPostApi) IcebergQty(IcebergQty decimal.Decimal) *SpotMarginOrderPostApi
- func (api *SpotMarginOrderPostApi) IsIsolated(IsIsolated string) *SpotMarginOrderPostApi
- func (api *SpotMarginOrderPostApi) NewClientOrderId(NewClientOrderId string) *SpotMarginOrderPostApi
- func (api *SpotMarginOrderPostApi) NewOrderRespType(NewOrderRespType string) *SpotMarginOrderPostApi
- func (api *SpotMarginOrderPostApi) Price(Price decimal.Decimal) *SpotMarginOrderPostApi
- func (api *SpotMarginOrderPostApi) Quantity(Quantity decimal.Decimal) *SpotMarginOrderPostApi
- func (api *SpotMarginOrderPostApi) QuoteOrderQty(QuoteOrderQty decimal.Decimal) *SpotMarginOrderPostApi
- func (api *SpotMarginOrderPostApi) RecvWindow(RecvWindow int64) *SpotMarginOrderPostApi
- func (api *SpotMarginOrderPostApi) SelfTradePreventionMode(SelfTradePreventionMode string) *SpotMarginOrderPostApi
- func (api *SpotMarginOrderPostApi) Side(Side string) *SpotMarginOrderPostApi
- func (api *SpotMarginOrderPostApi) SideEffectType(SideEffectType string) *SpotMarginOrderPostApi
- func (api *SpotMarginOrderPostApi) StopPrice(StopPrice decimal.Decimal) *SpotMarginOrderPostApi
- func (api *SpotMarginOrderPostApi) Symbol(Symbol string) *SpotMarginOrderPostApi
- func (api *SpotMarginOrderPostApi) TimeInForce(TimeInForce string) *SpotMarginOrderPostApi
- func (api *SpotMarginOrderPostApi) Timestamp(Timestamp int64) *SpotMarginOrderPostApi
- func (api *SpotMarginOrderPostApi) Type(Type string) *SpotMarginOrderPostApi
- type SpotMarginOrderPostReq
- type SpotMarginOrderPostRes
- type SpotMarginRepayApi
- func (api *SpotMarginRepayApi) Amount(Amount decimal.Decimal) *SpotMarginRepayApi
- func (api *SpotMarginRepayApi) Asset(Asset string) *SpotMarginRepayApi
- func (api *SpotMarginRepayApi) Do() (*MarginRepayRes, error)
- func (api *SpotMarginRepayApi) IsIsolated(IsIsolated string) *SpotMarginRepayApi
- func (api *SpotMarginRepayApi) RecvWindow(RecvWindow int64) *SpotMarginRepayApi
- func (api *SpotMarginRepayApi) Symbol(Symbol string) *SpotMarginRepayApi
- func (api *SpotMarginRepayApi) Timestamp(Timestamp int64) *SpotMarginRepayApi
- type SpotMarginRepayReq
- type SpotMarginTransferApi
- func (api *SpotMarginTransferApi) Amount(Amount decimal.Decimal) *SpotMarginTransferApi
- func (api *SpotMarginTransferApi) Asset(Asset string) *SpotMarginTransferApi
- func (api *SpotMarginTransferApi) Do() (*MarginTransferRes, error)
- func (api *SpotMarginTransferApi) RecvWindow(RecvWindow int64) *SpotMarginTransferApi
- func (api *SpotMarginTransferApi) Timestamp(Timestamp int64) *SpotMarginTransferApi
- func (api *SpotMarginTransferApi) Type(Type int) *SpotMarginTransferApi
- type SpotMarginTransferReq
- type SpotMarginUserDataStreamDeleteApi
- type SpotMarginUserDataStreamDeleteReq
- type SpotMarginUserDataStreamDeleteRes
- type SpotMarginUserDataStreamPostApi
- type SpotMarginUserDataStreamPostReq
- type SpotMarginUserDataStreamPostRes
- type SpotMarginUserDataStreamPutApi
- type SpotMarginUserDataStreamPutReq
- type SpotMarginUserDataStreamPutRes
- type SpotMyTradesApi
- func (api *SpotMyTradesApi) Do() (*SpotMyTradesRes, error)
- func (api *SpotMyTradesApi) EndTime(EndTime int64) *SpotMyTradesApi
- func (api *SpotMyTradesApi) FromId(FromId int64) *SpotMyTradesApi
- func (api *SpotMyTradesApi) Limit(Limit int) *SpotMyTradesApi
- func (api *SpotMyTradesApi) OrderId(OrderId int64) *SpotMyTradesApi
- func (api *SpotMyTradesApi) RecvWindow(RecvWindow int64) *SpotMyTradesApi
- func (api *SpotMyTradesApi) StartTime(StartTime int64) *SpotMyTradesApi
- func (api *SpotMyTradesApi) Symbol(Symbol string) *SpotMyTradesApi
- func (api *SpotMyTradesApi) Timestamp(Timestamp int64) *SpotMyTradesApi
- type SpotMyTradesReq
- type SpotMyTradesRes
- type SpotMyTradesResRow
- type SpotOpenOrdersApi
- type SpotOpenOrdersReq
- type SpotOpenOrdersRes
- type SpotOrderCancelReplaceApi
- func (api *SpotOrderCancelReplaceApi) CancelNewClientOrderId(CancelNewClientOrderId string) *SpotOrderCancelReplaceApi
- func (api *SpotOrderCancelReplaceApi) CancelOrderId(CancelOrderId int64) *SpotOrderCancelReplaceApi
- func (api *SpotOrderCancelReplaceApi) CancelOrigClientOrderId(CancelOrigClientOrderId string) *SpotOrderCancelReplaceApi
- func (api *SpotOrderCancelReplaceApi) CancelReplaceMode(CancelReplaceMode string) *SpotOrderCancelReplaceApi
- func (api *SpotOrderCancelReplaceApi) CancelRestrictions(CancelRestrictions string) *SpotOrderCancelReplaceApi
- func (api *SpotOrderCancelReplaceApi) Do() (*SpotOrderCancelReplaceRes, error)
- func (api *SpotOrderCancelReplaceApi) IcebergQty(IcebergQty decimal.Decimal) *SpotOrderCancelReplaceApi
- func (api *SpotOrderCancelReplaceApi) NewClientOrderId(NewClientOrderId string) *SpotOrderCancelReplaceApi
- func (api *SpotOrderCancelReplaceApi) NewOrderRespType(NewOrderRespType string) *SpotOrderCancelReplaceApi
- func (api *SpotOrderCancelReplaceApi) Price(Price decimal.Decimal) *SpotOrderCancelReplaceApi
- func (api *SpotOrderCancelReplaceApi) Quantity(Quantity decimal.Decimal) *SpotOrderCancelReplaceApi
- func (api *SpotOrderCancelReplaceApi) QuoteOrderQty(QuoteOrderQty decimal.Decimal) *SpotOrderCancelReplaceApi
- func (api *SpotOrderCancelReplaceApi) RecvWindow(RecvWindow int64) *SpotOrderCancelReplaceApi
- func (api *SpotOrderCancelReplaceApi) SelfTradePreventionMode(SelfTradePreventionMode string) *SpotOrderCancelReplaceApi
- func (api *SpotOrderCancelReplaceApi) Side(Side string) *SpotOrderCancelReplaceApi
- func (api *SpotOrderCancelReplaceApi) StopPrice(StopPrice decimal.Decimal) *SpotOrderCancelReplaceApi
- func (api *SpotOrderCancelReplaceApi) StrategyId(StrategyId int) *SpotOrderCancelReplaceApi
- func (api *SpotOrderCancelReplaceApi) StrategyType(StrategyType int) *SpotOrderCancelReplaceApi
- func (api *SpotOrderCancelReplaceApi) Symbol(Symbol string) *SpotOrderCancelReplaceApi
- func (api *SpotOrderCancelReplaceApi) TimeInForce(TimeInForce string) *SpotOrderCancelReplaceApi
- func (api *SpotOrderCancelReplaceApi) Timestamp(Timestamp int64) *SpotOrderCancelReplaceApi
- func (api *SpotOrderCancelReplaceApi) TrailingDelta(TrailingDelta int64) *SpotOrderCancelReplaceApi
- func (api *SpotOrderCancelReplaceApi) Type(Type string) *SpotOrderCancelReplaceApi
- type SpotOrderCancelReplaceReq
- type SpotOrderCancelReplaceRes
- type SpotOrderDeleteApi
- func (api *SpotOrderDeleteApi) CancelRestrictions(CancelRestrictions string) *SpotOrderDeleteApi
- func (api *SpotOrderDeleteApi) Do() (*SpotOrderDeleteRes, error)
- func (api *SpotOrderDeleteApi) NewClientOrderId(NewClientOrderId string) *SpotOrderDeleteApi
- func (api *SpotOrderDeleteApi) OrderId(OrderId int64) *SpotOrderDeleteApi
- func (api *SpotOrderDeleteApi) OrigClientOrderId(OrigClientOrderId string) *SpotOrderDeleteApi
- func (api *SpotOrderDeleteApi) RecvWindow(RecvWindow int64) *SpotOrderDeleteApi
- func (api *SpotOrderDeleteApi) Symbol(Symbol string) *SpotOrderDeleteApi
- func (api *SpotOrderDeleteApi) Timestamp(Timestamp int64) *SpotOrderDeleteApi
- type SpotOrderDeleteReq
- type SpotOrderDeleteRes
- type SpotOrderFill
- type SpotOrderGetApi
- func (api *SpotOrderGetApi) Do() (*SpotOrderGetRes, error)
- func (api *SpotOrderGetApi) OrderId(OrderId int64) *SpotOrderGetApi
- func (api *SpotOrderGetApi) OrigClientOrderId(OrigClientOrderId string) *SpotOrderGetApi
- func (api *SpotOrderGetApi) RecvWindow(RecvWindow int64) *SpotOrderGetApi
- func (api *SpotOrderGetApi) Symbol(Symbol string) *SpotOrderGetApi
- func (api *SpotOrderGetApi) Timestamp(Timestamp int64) *SpotOrderGetApi
- type SpotOrderGetReq
- type SpotOrderGetRes
- type SpotOrderOrder
- type SpotOrderPostApi
- func (api *SpotOrderPostApi) Do() (*SpotOrderPostRes, error)
- func (api *SpotOrderPostApi) IcebergQty(IcebergQty decimal.Decimal) *SpotOrderPostApi
- func (api *SpotOrderPostApi) NewClientOrderId(NewClientOrderId string) *SpotOrderPostApi
- func (api *SpotOrderPostApi) NewOrderRespType(NewOrderRespType string) *SpotOrderPostApi
- func (api *SpotOrderPostApi) Price(Price decimal.Decimal) *SpotOrderPostApi
- func (api *SpotOrderPostApi) Quantity(Quantity decimal.Decimal) *SpotOrderPostApi
- func (api *SpotOrderPostApi) QuoteOrderQty(QuoteOrderQty decimal.Decimal) *SpotOrderPostApi
- func (api *SpotOrderPostApi) RecvWindow(RecvWindow int64) *SpotOrderPostApi
- func (api *SpotOrderPostApi) SelfTradePreventionMode(SelfTradePreventionMode string) *SpotOrderPostApi
- func (api *SpotOrderPostApi) Side(Side string) *SpotOrderPostApi
- func (api *SpotOrderPostApi) StopPrice(StopPrice decimal.Decimal) *SpotOrderPostApi
- func (api *SpotOrderPostApi) StrategyId(StrategyId int) *SpotOrderPostApi
- func (api *SpotOrderPostApi) StrategyType(StrategyType int) *SpotOrderPostApi
- func (api *SpotOrderPostApi) Symbol(Symbol string) *SpotOrderPostApi
- func (api *SpotOrderPostApi) TimeInForce(TimeInForce string) *SpotOrderPostApi
- func (api *SpotOrderPostApi) Timestamp(Timestamp int64) *SpotOrderPostApi
- func (api *SpotOrderPostApi) TrailingDelta(TrailingDelta int64) *SpotOrderPostApi
- func (api *SpotOrderPostApi) Type(Type string) *SpotOrderPostApi
- type SpotOrderPostReq
- type SpotOrderPostRes
- type SpotPingApi
- type SpotPingReq
- type SpotPingRes
- type SpotRestClient
- func (client *SpotRestClient) NewAccountApiTradingStatus() *SpotAccountApiTradingStatusApi
- func (client *SpotRestClient) NewAllOrders() *SpotAllOrdersApi
- func (client *SpotRestClient) NewExchangeInfo() *SpotExchangeInfoApi
- func (client *SpotRestClient) NewManagedSubAccountQueryTransLog() *SpotManagedSubAccountQueryTransLogApi
- func (client *SpotRestClient) NewOpenOrders() *SpotOpenOrdersApi
- func (client *SpotRestClient) NewPing() *SpotPingApi
- func (client *SpotRestClient) NewServerTime() *SpotServerTimeApi
- func (client *SpotRestClient) NewSpotAccount() *SpotAccountApi
- func (client *SpotRestClient) NewSpotAggTrades() *SpotAggTradesApi
- func (client *SpotRestClient) NewSpotAssetGetFundingAsset() *SpotAssetGetFundingAssetApi
- func (client *SpotRestClient) NewSpotAssetTradeFee() *SpotAssetTradeFeeApi
- func (client *SpotRestClient) NewSpotAssetTransferGet() *SpotAssetTransferGetApi
- func (client *SpotRestClient) NewSpotAssetTransferPost() *SpotAssetTransferPostApi
- func (client *SpotRestClient) NewSpotAvgPrice() *SpotAvgPriceApi
- func (client *SpotRestClient) NewSpotDepth() *SpotDepthApi
- func (client *SpotRestClient) NewSpotHistoricalTrades() *SpotHistoricalTradesApi
- func (client *SpotRestClient) NewSpotKlines() *SpotKlinesApi
- func (client *SpotRestClient) NewSpotMarginAccount() *SpotMarginAccountApi
- func (client *SpotRestClient) NewSpotMarginAllOrders() *SpotMarginAllOrdersApi
- func (client *SpotRestClient) NewSpotMarginAllPairs() *SpotMarginAllPairsApi
- func (client *SpotRestClient) NewSpotMarginInterestHistory() *SpotMarginInterestHistoryApi
- func (client *SpotRestClient) NewSpotMarginIsolatedAccount() *SpotMarginIsolatedAccountApi
- func (client *SpotRestClient) NewSpotMarginIsolatedAllPairs() *SpotMarginIsolatedAllPairsApi
- func (client *SpotRestClient) NewSpotMarginIsolatedTransfer() *SpotMarginIsolatedTransferApi
- func (client *SpotRestClient) NewSpotMarginIsolatedUserDataStreamDelete() *SpotMarginIsolatedUserDataStreamDeleteApi
- func (client *SpotRestClient) NewSpotMarginIsolatedUserDataStreamPost() *SpotMarginIsolatedUserDataStreamPostApi
- func (client *SpotRestClient) NewSpotMarginIsolatedUserDataStreamPut() *SpotMarginIsolatedUserDataStreamPutApi
- func (client *SpotRestClient) NewSpotMarginLoan() *SpotMarginLoanApi
- func (client *SpotRestClient) NewSpotMarginMaxBorrowable() *SpotMarginMaxBorrowableApi
- func (client *SpotRestClient) NewSpotMarginMaxTransferable() *SpotMarginMaxTransferableApi
- func (client *SpotRestClient) NewSpotMarginOpenOrders() *SpotMarginOpenOrdersApi
- func (client *SpotRestClient) NewSpotMarginOrderDelete() *SpotMarginOrderDeleteApi
- func (client *SpotRestClient) NewSpotMarginOrderGet() *SpotMarginOrderGetApi
- func (client *SpotRestClient) NewSpotMarginOrderPost() *SpotMarginOrderPostApi
- func (client *SpotRestClient) NewSpotMarginRepay() *SpotMarginRepayApi
- func (client *SpotRestClient) NewSpotMarginTransfer() *SpotMarginTransferApi
- func (client *SpotRestClient) NewSpotMarginUserDataStreamDelete() *SpotMarginUserDataStreamDeleteApi
- func (client *SpotRestClient) NewSpotMarginUserDataStreamPost() *SpotMarginUserDataStreamPostApi
- func (client *SpotRestClient) NewSpotMarginUserDataStreamPut() *SpotMarginUserDataStreamPutApi
- func (client *SpotRestClient) NewSpotMyTrades() *SpotMyTradesApi
- func (client *SpotRestClient) NewSpotOrderCancelReplace() *SpotOrderCancelReplaceApi
- func (client *SpotRestClient) NewSpotOrderDelete() *SpotOrderDeleteApi
- func (client *SpotRestClient) NewSpotOrderGet() *SpotOrderGetApi
- func (client *SpotRestClient) NewSpotOrderPost() *SpotOrderPostApi
- func (client *SpotRestClient) NewSpotSubAccountApiIpRestriction() *SpotSubAccountApiIpRestrictionApi
- func (client *SpotRestClient) NewSpotTicker() *SpotTickerApi
- func (client *SpotRestClient) NewSpotTicker24hr() *SpotTicker24hrApi
- func (client *SpotRestClient) NewSpotTickerBookTicker() *SpotTickerBookTickerApi
- func (client *SpotRestClient) NewSpotTickerPrice() *SpotTickerPriceApi
- func (client *SpotRestClient) NewSpotTrades() *SpotTradesApi
- func (client *SpotRestClient) NewSpotUiKlines() *SpotUiKlinesApi
- func (client *SpotRestClient) NewSpotUserDataStreamDelete() *SpotUserDataStreamDeleteApi
- func (client *SpotRestClient) NewSpotUserDataStreamPost() *SpotUserDataStreamPostApi
- func (client *SpotRestClient) NewSpotUserDataStreamPut() *SpotUserDataStreamPutApi
- func (client *SpotRestClient) NewSubAccountAssets() *SpotSubAccountAssetsApi
- func (client *SpotRestClient) NewSubAccountFuturesAccount() *SpotSubAccountFuturesAccountApi
- func (client *SpotRestClient) NewSubAccountFuturesEnable() *SpotSubAccountFuturesEnableApi
- func (client *SpotRestClient) NewSubAccountList() *SpotSubAccountListApi
- func (client *SpotRestClient) NewSubAccountTransferSubUserHistory() *SpotSubAccountTransferSubUserHistoryApi
- func (client *SpotRestClient) NewSubAccountUniversalTransfer() *SpotSubAccountUniversalTransferApi
- func (client *SpotRestClient) NewSubAccountUniversalTransferHistory() *SpotSubAccountUniversalTransferHistoryApi
- func (client *SpotRestClient) NewSubAccountVirtualSubAccount() *SpotSubAccountVirtualSubAccountApi
- type SpotServerTimeApi
- type SpotServerTimeReq
- type SpotServerTimeRes
- type SpotSubAccountApiIpRestrictionApi
- func (api *SpotSubAccountApiIpRestrictionApi) Do() (*SpotSubAccountApiIpRestrictionRes, error)
- func (api *SpotSubAccountApiIpRestrictionApi) Email(Email string) *SpotSubAccountApiIpRestrictionApi
- func (api *SpotSubAccountApiIpRestrictionApi) RecvWindow(RecvWindow int64) *SpotSubAccountApiIpRestrictionApi
- func (api *SpotSubAccountApiIpRestrictionApi) SubAccountApiKey(SubAccountApiKey string) *SpotSubAccountApiIpRestrictionApi
- func (api *SpotSubAccountApiIpRestrictionApi) Timestamp(Timestamp int64) *SpotSubAccountApiIpRestrictionApi
- type SpotSubAccountApiIpRestrictionReq
- type SpotSubAccountApiIpRestrictionRes
- type SpotSubAccountAssetsApi
- func (api *SpotSubAccountAssetsApi) Do() (*SubAccountAssetsRes, error)
- func (api *SpotSubAccountAssetsApi) Email(Email string) *SpotSubAccountAssetsApi
- func (api *SpotSubAccountAssetsApi) RecvWindow(RecvWindow int64) *SpotSubAccountAssetsApi
- func (api *SpotSubAccountAssetsApi) Timestamp(Timestamp int64) *SpotSubAccountAssetsApi
- type SpotSubAccountAssetsReq
- type SpotSubAccountFuturesAccountApi
- func (api *SpotSubAccountFuturesAccountApi) Do() (*SubAccountFuturesAccountRes, error)
- func (api *SpotSubAccountFuturesAccountApi) Email(Email string) *SpotSubAccountFuturesAccountApi
- func (api *SpotSubAccountFuturesAccountApi) FuturesType(FuturesType int) *SpotSubAccountFuturesAccountApi
- func (api *SpotSubAccountFuturesAccountApi) RecvWindow(RecvWindow int64) *SpotSubAccountFuturesAccountApi
- func (api *SpotSubAccountFuturesAccountApi) Timestamp(Timestamp int64) *SpotSubAccountFuturesAccountApi
- type SpotSubAccountFuturesAccountReq
- type SpotSubAccountFuturesEnableApi
- func (api *SpotSubAccountFuturesEnableApi) Do() (*SubAccountFuturesEnableRes, error)
- func (api *SpotSubAccountFuturesEnableApi) Email(Email string) *SpotSubAccountFuturesEnableApi
- func (api *SpotSubAccountFuturesEnableApi) RecvWindow(RecvWindow int64) *SpotSubAccountFuturesEnableApi
- func (api *SpotSubAccountFuturesEnableApi) Timestamp(Timestamp int64) *SpotSubAccountFuturesEnableApi
- type SpotSubAccountFuturesEnableReq
- type SpotSubAccountListApi
- func (api *SpotSubAccountListApi) Do() (*SubAccountListRes, error)
- func (api *SpotSubAccountListApi) Email(Email string) *SpotSubAccountListApi
- func (api *SpotSubAccountListApi) Isfreeze(Isfreeze bool) *SpotSubAccountListApi
- func (api *SpotSubAccountListApi) Limit(Limit int) *SpotSubAccountListApi
- func (api *SpotSubAccountListApi) Page(Page int) *SpotSubAccountListApi
- func (api *SpotSubAccountListApi) RecvWindow(RecvWindow int64) *SpotSubAccountListApi
- func (api *SpotSubAccountListApi) Timestamp(Timestamp int64) *SpotSubAccountListApi
- type SpotSubAccountListReq
- type SpotSubAccountTransferSubUserHistoryApi
- func (api *SpotSubAccountTransferSubUserHistoryApi) Asset(Asset string) *SpotSubAccountTransferSubUserHistoryApi
- func (api *SpotSubAccountTransferSubUserHistoryApi) Do() (*SpotSubAccountTransferSubUserHistoryRes, error)
- func (api *SpotSubAccountTransferSubUserHistoryApi) EndTime(EndTime int64) *SpotSubAccountTransferSubUserHistoryApi
- func (api *SpotSubAccountTransferSubUserHistoryApi) Limit(Limit int64) *SpotSubAccountTransferSubUserHistoryApi
- func (api *SpotSubAccountTransferSubUserHistoryApi) RecvWindow(RecvWindow int64) *SpotSubAccountTransferSubUserHistoryApi
- func (api *SpotSubAccountTransferSubUserHistoryApi) ReturnFailHistory(ReturnFailHistory bool) *SpotSubAccountTransferSubUserHistoryApi
- func (api *SpotSubAccountTransferSubUserHistoryApi) StartTime(StartTime int64) *SpotSubAccountTransferSubUserHistoryApi
- func (api *SpotSubAccountTransferSubUserHistoryApi) Timestamp(Timestamp int64) *SpotSubAccountTransferSubUserHistoryApi
- func (api *SpotSubAccountTransferSubUserHistoryApi) Type(Type int64) *SpotSubAccountTransferSubUserHistoryApi
- type SpotSubAccountTransferSubUserHistoryReq
- type SpotSubAccountTransferSubUserHistoryRes
- type SpotSubAccountTransferSubUserHistoryResRow
- type SpotSubAccountUniversalTransferApi
- func (api *SpotSubAccountUniversalTransferApi) Amount(Amount decimal.Decimal) *SpotSubAccountUniversalTransferApi
- func (api *SpotSubAccountUniversalTransferApi) Asset(Asset string) *SpotSubAccountUniversalTransferApi
- func (api *SpotSubAccountUniversalTransferApi) ClientTranId(ClientTranId string) *SpotSubAccountUniversalTransferApi
- func (api *SpotSubAccountUniversalTransferApi) Do() (*SubAccountUniversalTransferRes, error)
- func (api *SpotSubAccountUniversalTransferApi) FromAccountType(FromAccountType string) *SpotSubAccountUniversalTransferApi
- func (api *SpotSubAccountUniversalTransferApi) FromEmail(FromEmail string) *SpotSubAccountUniversalTransferApi
- func (api *SpotSubAccountUniversalTransferApi) RecvWindow(RecvWindow int64) *SpotSubAccountUniversalTransferApi
- func (api *SpotSubAccountUniversalTransferApi) Symbol(Symbol string) *SpotSubAccountUniversalTransferApi
- func (api *SpotSubAccountUniversalTransferApi) Timestamp(Timestamp int64) *SpotSubAccountUniversalTransferApi
- func (api *SpotSubAccountUniversalTransferApi) ToAccountType(ToAccountType string) *SpotSubAccountUniversalTransferApi
- func (api *SpotSubAccountUniversalTransferApi) ToEmail(ToEmail string) *SpotSubAccountUniversalTransferApi
- type SpotSubAccountUniversalTransferHistoryApi
- func (api *SpotSubAccountUniversalTransferHistoryApi) ClientTranId(ClientTranId string) *SpotSubAccountUniversalTransferHistoryApi
- func (api *SpotSubAccountUniversalTransferHistoryApi) Do() (*SubAccountUniversalTransferHistoryRes, error)
- func (api *SpotSubAccountUniversalTransferHistoryApi) EndTime(EndTime int64) *SpotSubAccountUniversalTransferHistoryApi
- func (api *SpotSubAccountUniversalTransferHistoryApi) FromEmail(FromEmail string) *SpotSubAccountUniversalTransferHistoryApi
- func (api *SpotSubAccountUniversalTransferHistoryApi) Limit(Limit int) *SpotSubAccountUniversalTransferHistoryApi
- func (api *SpotSubAccountUniversalTransferHistoryApi) Page(Page int) *SpotSubAccountUniversalTransferHistoryApi
- func (api *SpotSubAccountUniversalTransferHistoryApi) RecvWindow(RecvWindow int64) *SpotSubAccountUniversalTransferHistoryApi
- func (api *SpotSubAccountUniversalTransferHistoryApi) StartTime(StartTime int64) *SpotSubAccountUniversalTransferHistoryApi
- func (api *SpotSubAccountUniversalTransferHistoryApi) Timestamp(Timestamp int64) *SpotSubAccountUniversalTransferHistoryApi
- func (api *SpotSubAccountUniversalTransferHistoryApi) ToEmail(ToEmail string) *SpotSubAccountUniversalTransferHistoryApi
- type SpotSubAccountUniversalTransferHistoryReq
- type SpotSubAccountUniversalTransferReq
- type SpotSubAccountVirtualSubAccountApi
- func (api *SpotSubAccountVirtualSubAccountApi) Do() (*SubAccountVirtualSubAccountRes, error)
- func (api *SpotSubAccountVirtualSubAccountApi) RecvWindow(RecvWindow int64) *SpotSubAccountVirtualSubAccountApi
- func (api *SpotSubAccountVirtualSubAccountApi) SubAccountString(SubAccountString string) *SpotSubAccountVirtualSubAccountApi
- func (api *SpotSubAccountVirtualSubAccountApi) Timestamp(Timestamp int64) *SpotSubAccountVirtualSubAccountApi
- type SpotSubAccountVirtualSubAccountReq
- type SpotTicker24hrApi
- type SpotTicker24hrReq
- type SpotTicker24hrRes
- type SpotTicker24hrResRow
- type SpotTickerApi
- func (api *SpotTickerApi) Do() (*SpotTickerRes, error)
- func (api *SpotTickerApi) Symbol(Symbol string) *SpotTickerApi
- func (api *SpotTickerApi) Symbols(Symbols []string) *SpotTickerApi
- func (api *SpotTickerApi) Type(Type string) *SpotTickerApi
- func (api *SpotTickerApi) WindowSize(WindowSize string) *SpotTickerApi
- type SpotTickerBookTickerApi
- type SpotTickerBookTickerReq
- type SpotTickerBookTickerRes
- type SpotTickerBookTickerResRow
- type SpotTickerPriceApi
- type SpotTickerPriceReq
- type SpotTickerPriceRes
- type SpotTickerPriceResRow
- type SpotTickerReq
- type SpotTickerRes
- type SpotTickerResRow
- type SpotTradesApi
- type SpotTradesReq
- type SpotTradesRes
- type SpotTradesResRow
- type SpotUiKlinesApi
- func (api *SpotUiKlinesApi) Do() (*KlinesRes, error)
- func (api *SpotUiKlinesApi) EndTime(EndTime int64) *SpotUiKlinesApi
- func (api *SpotUiKlinesApi) Interval(Interval string) *SpotUiKlinesApi
- func (api *SpotUiKlinesApi) Limit(Limit int) *SpotUiKlinesApi
- func (api *SpotUiKlinesApi) StartTime(StartTime int64) *SpotUiKlinesApi
- func (api *SpotUiKlinesApi) Symbol(Symbol string) *SpotUiKlinesApi
- type SpotUserDataStreamDeleteApi
- type SpotUserDataStreamDeleteReq
- type SpotUserDataStreamDeleteRes
- type SpotUserDataStreamPostApi
- type SpotUserDataStreamPostReq
- type SpotUserDataStreamPostRes
- type SpotUserDataStreamPutApi
- type SpotUserDataStreamPutReq
- type SpotUserDataStreamPutRes
- type SpotWsStreamClient
- func (ws *SpotWsStreamClient) CancelOrder(api *SpotOrderDeleteApi) (*WsApiResult[SpotOrderDeleteRes], error)
- func (ws *SpotWsStreamClient) CancelReplaceOrder(api *SpotOrderCancelReplaceApi) (*WsApiResult[SpotOrderCancelReplaceRes], error)
- func (ws *SpotWsStreamClient) Close() error
- func (ws *SpotWsStreamClient) ConvertToAccountWs(apiKey string, apiSecret string, spotWsType SpotWsType, ...) (*SpotWsStreamClient, error)
- func (ws *SpotWsStreamClient) ConvertToWsApi(apiKey string, apiSecret string) (*SpotWsStreamClient, error)
- func (ws *SpotWsStreamClient) CreateOrder(api *SpotOrderPostApi) (*WsApiResult[SpotOrderPostRes], error)
- func (ws *SpotWsStreamClient) CreatePayload() (*WsSpotPayload, error)
- func (ws *SpotWsStreamClient) QueryOrder(api *SpotOrderGetApi) (*WsApiResult[SpotOrderGetRes], error)
- type SpotWsType
- type SubAccountAssetsRes
- type SubAccountFuturesAccountAccountResp
- type SubAccountFuturesAccountAssets
- type SubAccountFuturesAccountRes
- type SubAccountFuturesEnableRes
- type SubAccountListRes
- type SubAccountResSubAccount
- type SubAccountUniversalTransferHistoryRes
- type SubAccountUniversalTransferHistoryResResult
- type SubAccountUniversalTransferRes
- type SubAccountVirtualSubAccountRes
- type SubscribeParams
- type SubscribeReq
- type SubscribeResult
- type Subscription
- type SwapAccountApi
- type SwapAccountReq
- type SwapAccountRes
- type SwapAllOrdersApi
- func (api *SwapAllOrdersApi) Do() (*SwapAllOrdersRes, error)
- func (api *SwapAllOrdersApi) EndTime(EndTime int64) *SwapAllOrdersApi
- func (api *SwapAllOrdersApi) Limit(Limit int64) *SwapAllOrdersApi
- func (api *SwapAllOrdersApi) OrderId(OrderId int64) *SwapAllOrdersApi
- func (api *SwapAllOrdersApi) RecvWindow(RecvWindow int64) *SwapAllOrdersApi
- func (api *SwapAllOrdersApi) StartTime(StartTime int64) *SwapAllOrdersApi
- func (api *SwapAllOrdersApi) Symbol(Symbol string) *SwapAllOrdersApi
- func (api *SwapAllOrdersApi) Timestamp(Timestamp int64) *SwapAllOrdersApi
- type SwapAllOrdersReq
- type SwapAllOrdersRes
- type SwapApi
- type SwapBatchOrdersDeleteApi
- func (api *SwapBatchOrdersDeleteApi) Do() (*SwapBatchOrdersDeleteRes, error)
- func (api *SwapBatchOrdersDeleteApi) OrderIdList(OrderIdList []int64) *SwapBatchOrdersDeleteApi
- func (api *SwapBatchOrdersDeleteApi) OrigClientOrderIdList(OrigClientOrderIdList []string) *SwapBatchOrdersDeleteApi
- func (api *SwapBatchOrdersDeleteApi) RecvWindow(RecvWindow int64) *SwapBatchOrdersDeleteApi
- func (api *SwapBatchOrdersDeleteApi) Symbol(Symbol string) *SwapBatchOrdersDeleteApi
- func (api *SwapBatchOrdersDeleteApi) Timestamp(Timestamp int64) *SwapBatchOrdersDeleteApi
- type SwapBatchOrdersDeleteReq
- type SwapBatchOrdersDeleteRes
- type SwapBatchOrdersPostApi
- func (api *SwapBatchOrdersPostApi) AddOrders(orderApis ...*SwapOrderPostApi) *SwapBatchOrdersPostApi
- func (api *SwapBatchOrdersPostApi) Do() (*SwapBatchOrdersPostRes, error)
- func (api *SwapBatchOrdersPostApi) RecvWindow(RecvWindow int64) *SwapBatchOrdersPostApi
- func (api *SwapBatchOrdersPostApi) SetOrders(orderApi []*SwapOrderPostApi) *SwapBatchOrdersPostApi
- func (api *SwapBatchOrdersPostApi) Timestamp(Timestamp int64) *SwapBatchOrdersPostApi
- type SwapBatchOrdersPostReq
- type SwapBatchOrdersPostRes
- type SwapBatchOrdersPutApi
- func (api *SwapBatchOrdersPutApi) AddOrders(orderApi ...*SwapOrderPutApi) *SwapBatchOrdersPutApi
- func (api *SwapBatchOrdersPutApi) Do() (*SwapBatchOrdersPutRes, error)
- func (api *SwapBatchOrdersPutApi) RecvWindow(RecvWindow int64) *SwapBatchOrdersPutApi
- func (api *SwapBatchOrdersPutApi) SetOrders(orderApi []*SwapOrderPutApi) *SwapBatchOrdersPutApi
- func (api *SwapBatchOrdersPutApi) Timestamp(Timestamp int64) *SwapBatchOrdersPutApi
- type SwapBatchOrdersPutReq
- type SwapBatchOrdersPutRes
- type SwapBatchOrdersPutResRow
- type SwapCommissionRateApi
- func (api *SwapCommissionRateApi) Do() (*SwapCommissionRateRes, error)
- func (api *SwapCommissionRateApi) RecvWindow(RecvWindow int64) *SwapCommissionRateApi
- func (api *SwapCommissionRateApi) Symbol(Symbol string) *SwapCommissionRateApi
- func (api *SwapCommissionRateApi) Timestamp(Timestamp int64) *SwapCommissionRateApi
- type SwapCommissionRateReq
- type SwapCommissionRateRes
- type SwapCommonPostRes
- type SwapDepthApi
- type SwapDepthReq
- type SwapDepthRes
- type SwapDepthResMiddle
- type SwapExchangeInfoApi
- type SwapExchangeInfoReq
- type SwapExchangeInfoRes
- type SwapExchangeInfoResRateLimit
- type SwapExchangeInfoResSymbol
- type SwapKlinesApi
- func (api *SwapKlinesApi) Do() (*KlinesRes, error)
- func (api *SwapKlinesApi) EndTime(EndTime int64) *SwapKlinesApi
- func (api *SwapKlinesApi) Interval(Interval string) *SwapKlinesApi
- func (api *SwapKlinesApi) Limit(Limit int) *SwapKlinesApi
- func (api *SwapKlinesApi) StartTime(StartTime int64) *SwapKlinesApi
- func (api *SwapKlinesApi) Symbol(Symbol string) *SwapKlinesApi
- type SwapKlinesReq
- type SwapLeverageApi
- func (api *SwapLeverageApi) Do() (*SwapLeverageRes, error)
- func (api *SwapLeverageApi) Leverage(Leverage int64) *SwapLeverageApi
- func (api *SwapLeverageApi) RecvWindow(RecvWindow int64) *SwapLeverageApi
- func (api *SwapLeverageApi) Symbol(Symbol string) *SwapLeverageApi
- func (api *SwapLeverageApi) Timestamp(Timestamp int64) *SwapLeverageApi
- type SwapLeverageBracketApi
- func (api *SwapLeverageBracketApi) Do() (*SwapLeverageBracketRes, error)
- func (api *SwapLeverageBracketApi) RecvWindow(RecvWindow int64) *SwapLeverageBracketApi
- func (api *SwapLeverageBracketApi) Symbol(Symbol string) *SwapLeverageBracketApi
- func (api *SwapLeverageBracketApi) Timestamp(Timestamp int64) *SwapLeverageBracketApi
- type SwapLeverageBracketReq
- type SwapLeverageBracketRes
- type SwapLeverageBracketResResult
- type SwapLeverageBracketResResultBrackets
- type SwapLeverageReq
- type SwapLeverageRes
- type SwapListenKeyDeleteApi
- type SwapListenKeyDeleteReq
- type SwapListenKeyDeleteRes
- type SwapListenKeyPostApi
- type SwapListenKeyPostReq
- type SwapListenKeyPostRes
- type SwapListenKeyPutApi
- type SwapListenKeyPutReq
- type SwapListenKeyPutRes
- type SwapMarginTypeApi
- func (api *SwapMarginTypeApi) Do() (*SwapMarginTypeRes, error)
- func (api *SwapMarginTypeApi) MarginType(MarginType string) *SwapMarginTypeApi
- func (api *SwapMarginTypeApi) RecvWindow(RecvWindow int64) *SwapMarginTypeApi
- func (api *SwapMarginTypeApi) Symbol(Symbol string) *SwapMarginTypeApi
- func (api *SwapMarginTypeApi) Timestamp(Timestamp int64) *SwapMarginTypeApi
- type SwapMarginTypeReq
- type SwapMarginTypeRes
- type SwapOpenOrdersApi
- type SwapOpenOrdersReq
- type SwapOpenOrdersRes
- type SwapOrderDeleteApi
- func (api *SwapOrderDeleteApi) Do() (*SwapOrderDeleteRes, error)
- func (api *SwapOrderDeleteApi) OrderId(OrderId int64) *SwapOrderDeleteApi
- func (api *SwapOrderDeleteApi) OrigClientOrderId(OrigClientOrderId string) *SwapOrderDeleteApi
- func (api *SwapOrderDeleteApi) RecvWindow(RecvWindow int64) *SwapOrderDeleteApi
- func (api *SwapOrderDeleteApi) Symbol(Symbol string) *SwapOrderDeleteApi
- func (api *SwapOrderDeleteApi) Timestamp(Timestamp int64) *SwapOrderDeleteApi
- type SwapOrderDeleteReq
- type SwapOrderDeleteRes
- type SwapOrderGetApi
- func (api *SwapOrderGetApi) Do() (*SwapOrderGetRes, error)
- func (api *SwapOrderGetApi) OrderId(OrderId int64) *SwapOrderGetApi
- func (api *SwapOrderGetApi) OrigClientOrderId(OrigClientOrderId string) *SwapOrderGetApi
- func (api *SwapOrderGetApi) RecvWindow(RecvWindow int64) *SwapOrderGetApi
- func (api *SwapOrderGetApi) Symbol(Symbol string) *SwapOrderGetApi
- func (api *SwapOrderGetApi) Timestamp(Timestamp int64) *SwapOrderGetApi
- type SwapOrderGetReq
- type SwapOrderGetRes
- type SwapOrderOrder
- type SwapOrderPostApi
- func (api *SwapOrderPostApi) ActivationPrice(ActivationPrice decimal.Decimal) *SwapOrderPostApi
- func (api *SwapOrderPostApi) CallbackRate(CallbackRate decimal.Decimal) *SwapOrderPostApi
- func (api *SwapOrderPostApi) ClosePosition(ClosePosition string) *SwapOrderPostApi
- func (api *SwapOrderPostApi) Do() (*SwapOrderPostRes, error)
- func (api *SwapOrderPostApi) NewClientOrderId(NewClientOrderId string) *SwapOrderPostApi
- func (api *SwapOrderPostApi) NewOrderRespType(NewOrderRespType string) *SwapOrderPostApi
- func (api *SwapOrderPostApi) PositionSide(PositionSide string) *SwapOrderPostApi
- func (api *SwapOrderPostApi) Price(Price decimal.Decimal) *SwapOrderPostApi
- func (api *SwapOrderPostApi) PriceProtect(PriceProtect string) *SwapOrderPostApi
- func (api *SwapOrderPostApi) Quantity(Quantity decimal.Decimal) *SwapOrderPostApi
- func (api *SwapOrderPostApi) RecvWindow(RecvWindow int64) *SwapOrderPostApi
- func (api *SwapOrderPostApi) ReduceOnly(ReduceOnly string) *SwapOrderPostApi
- func (api *SwapOrderPostApi) Side(Side string) *SwapOrderPostApi
- func (api *SwapOrderPostApi) StopPrice(StopPrice decimal.Decimal) *SwapOrderPostApi
- func (api *SwapOrderPostApi) Symbol(Symbol string) *SwapOrderPostApi
- func (api *SwapOrderPostApi) TimeInForce(TimeInForce string) *SwapOrderPostApi
- func (api *SwapOrderPostApi) Timestamp(Timestamp int64) *SwapOrderPostApi
- func (api *SwapOrderPostApi) Type(Type string) *SwapOrderPostApi
- func (api *SwapOrderPostApi) WorkingType(WorkingType string) *SwapOrderPostApi
- type SwapOrderPostReq
- type SwapOrderPostRes
- type SwapOrderPostResRow
- type SwapOrderPutApi
- func (api *SwapOrderPutApi) Do() (*SwapOrderPutRes, error)
- func (api *SwapOrderPutApi) OrderId(OrderId string) *SwapOrderPutApi
- func (api *SwapOrderPutApi) OrigClientOrderId(OrigClientOrderId string) *SwapOrderPutApi
- func (api *SwapOrderPutApi) Price(Price decimal.Decimal) *SwapOrderPutApi
- func (api *SwapOrderPutApi) Quantity(Quantity decimal.Decimal) *SwapOrderPutApi
- func (api *SwapOrderPutApi) RecvWindow(RecvWindow int64) *SwapOrderPutApi
- func (api *SwapOrderPutApi) Side(Side string) *SwapOrderPutApi
- func (api *SwapOrderPutApi) Symbol(Symbol string) *SwapOrderPutApi
- func (api *SwapOrderPutApi) Timestamp(Timestamp int64) *SwapOrderPutApi
- type SwapOrderPutReq
- type SwapOrderPutRes
- type SwapPingApi
- type SwapPingReq
- type SwapPingRes
- type SwapPositionRiskApi
- func (api *SwapPositionRiskApi) Do() (*SwapPositionRiskRes, error)
- func (api *SwapPositionRiskApi) MarginAsset(MarginAsset string) *SwapPositionRiskApi
- func (api *SwapPositionRiskApi) Pair(Pair string) *SwapPositionRiskApi
- func (api *SwapPositionRiskApi) RecvWindow(RecvWindow int64) *SwapPositionRiskApi
- func (api *SwapPositionRiskApi) Timestamp(Timestamp int64) *SwapPositionRiskApi
- type SwapPositionRiskReq
- type SwapPositionRiskRes
- type SwapPositionRiskResRow
- type SwapPositionSideDualGetApi
- type SwapPositionSideDualGetReq
- type SwapPositionSideDualGetRes
- type SwapPositionSideDualPostApi
- func (api *SwapPositionSideDualPostApi) Do() (*SwapPositionSideDualPostRes, error)
- func (api *SwapPositionSideDualPostApi) DualSidePosition(DualSidePosition string) *SwapPositionSideDualPostApi
- func (api *SwapPositionSideDualPostApi) RecvWindow(RecvWindow int64) *SwapPositionSideDualPostApi
- func (api *SwapPositionSideDualPostApi) Timestamp(Timestamp int64) *SwapPositionSideDualPostApi
- type SwapPositionSideDualPostReq
- type SwapPositionSideDualPostRes
- type SwapRestClient
- func (client *SwapRestClient) NewAllOrders() *SwapAllOrdersApi
- func (client *SwapRestClient) NewExchangeInfo() *SwapExchangeInfoApi
- func (client *SwapRestClient) NewOpenOrders() *SwapOpenOrdersApi
- func (client *SwapRestClient) NewPing() *SwapPingApi
- func (client *SwapRestClient) NewServerTime() *SwapServerTimeApi
- func (client *SwapRestClient) NewSwapAccount() *SwapAccountApi
- func (client *SwapRestClient) NewSwapBatchOrdersDelete() *SwapBatchOrdersDeleteApi
- func (client *SwapRestClient) NewSwapBatchOrdersPost() *SwapBatchOrdersPostApi
- func (client *SwapRestClient) NewSwapBatchOrdersPut() *SwapBatchOrdersPutApi
- func (client *SwapRestClient) NewSwapCommissionRate() *SwapCommissionRateApi
- func (client *SwapRestClient) NewSwapDepth() *SwapDepthApi
- func (client *SwapRestClient) NewSwapKlines() *SwapKlinesApi
- func (client *SwapRestClient) NewSwapLeverage() *SwapLeverageApi
- func (client *SwapRestClient) NewSwapLeverageBracket() *SwapLeverageBracketApi
- func (client *SwapRestClient) NewSwapListenKeyDelete() *SwapListenKeyDeleteApi
- func (client *SwapRestClient) NewSwapListenKeyPost() *SwapListenKeyPostApi
- func (client *SwapRestClient) NewSwapListenKeyPut() *SwapListenKeyPutApi
- func (client *SwapRestClient) NewSwapMarginType() *SwapMarginTypeApi
- func (client *SwapRestClient) NewSwapOrderDelete() *SwapOrderDeleteApi
- func (client *SwapRestClient) NewSwapOrderGet() *SwapOrderGetApi
- func (client *SwapRestClient) NewSwapOrderPost() *SwapOrderPostApi
- func (client *SwapRestClient) NewSwapOrderPut() *SwapOrderPutApi
- func (client *SwapRestClient) NewSwapPositionRisk() *SwapPositionRiskApi
- func (client *SwapRestClient) NewSwapPositionSideDualGet() *SwapPositionSideDualGetApi
- func (client *SwapRestClient) NewSwapPositionSideDualPost() *SwapPositionSideDualPostApi
- func (client *SwapRestClient) NewSwapTickerPrice() *SwapTickerPriceApi
- func (client *SwapRestClient) NewSwapUserTrades() *SwapUserTradesApi
- type SwapServerTimeApi
- type SwapServerTimeReq
- type SwapServerTimeRes
- type SwapTickerPriceApi
- type SwapTickerPriceReq
- type SwapTickerPriceRes
- type SwapTickerPriceResRow
- type SwapUserTrade
- type SwapUserTradesApi
- func (api *SwapUserTradesApi) Do() (*SwapUserTradesRes, error)
- func (api *SwapUserTradesApi) EndTime(EndTime int64) *SwapUserTradesApi
- func (api *SwapUserTradesApi) FromId(FromId int64) *SwapUserTradesApi
- func (api *SwapUserTradesApi) Limit(Limit int64) *SwapUserTradesApi
- func (api *SwapUserTradesApi) OrderId(OrderId int64) *SwapUserTradesApi
- func (api *SwapUserTradesApi) Pair(Pair string) *SwapUserTradesApi
- func (api *SwapUserTradesApi) RecvWindow(RecvWindow int64) *SwapUserTradesApi
- func (api *SwapUserTradesApi) StartTime(StartTime int64) *SwapUserTradesApi
- func (api *SwapUserTradesApi) Symbol(Symbol string) *SwapUserTradesApi
- func (api *SwapUserTradesApi) Timestamp(Timestamp int64) *SwapUserTradesApi
- type SwapUserTradesReq
- type SwapUserTradesRes
- type SwapWsStreamClient
- type TranRes
- type WsAggTrade
- type WsApiReq
- type WsApiReqExtend
- type WsApiResult
- type WsApiResultChan
- type WsApiResultChanImpl
- type WsDepth
- type WsFutureAction
- type WsFutureBalance
- type WsFutureOrder
- type WsFuturePayload
- type WsFuturePayloadAccountUpdate
- type WsFuturePayloadOrderTradeUpdate
- type WsFuturePosition
- type WsKline
- type WsPmCAction
- type WsPmCBalance
- type WsPmCOrder
- type WsPmCPayload
- type WsPmCPayloadAccountUpdate
- type WsPmCPayloadOrderTradeUpdate
- type WsPmCPosition
- type WsPmMBalance
- type WsPmMPayload
- type WsPmMPayloadBalanceUpdate
- type WsPmMPayloadExecutionReport
- type WsPmMPayloadOutboundAccountPosition
- type WsPmUAction
- type WsPmUBalance
- type WsPmUOrder
- type WsPmUPayload
- type WsPmUPayloadAccountUpdate
- type WsPmUPayloadOrderTradeUpdate
- type WsPmUPosition
- type WsSpotBalance
- type WsSpotPayload
- type WsSpotPayloadBalanceUpdate
- type WsSpotPayloadExecutionReport
- type WsSpotPayloadOutboundAccountPosition
- type WsStreamClient
- func (ws *WsStreamClient) Close() error
- func (ws *WsStreamClient) CurrentSubscribeList() ([]string, error)
- func (ws *WsStreamClient) GetConn() *websocket.Conn
- func (ws *WsStreamClient) OpenConn() error
- func (ws *WsStreamClient) SubscribeAggTrade(symbol string) (*Subscription[WsAggTrade], error)
- func (ws *WsStreamClient) SubscribeAggTradeMultiple(symbols []string) (*Subscription[WsAggTrade], error)
- func (ws *WsStreamClient) SubscribeIncrementDepth(symbol string, USpeed string) (*Subscription[WsDepth], error)
- func (ws *WsStreamClient) SubscribeIncrementDepthMultiple(symbols []string, USpeed string) (*Subscription[WsDepth], error)
- func (ws *WsStreamClient) SubscribeKline(symbol string, interval string) (*Subscription[WsKline], error)
- func (ws *WsStreamClient) SubscribeKlineMultiple(symbols []string, intervals []string) (*Subscription[WsKline], error)
- func (ws *WsStreamClient) SubscribeLevelDepth(symbol string, level string, USpeed string) (*Subscription[WsDepth], error)
- func (ws *WsStreamClient) SubscribeLevelDepthMultiple(symbols []string, level string, USpeed string) (*Subscription[WsDepth], error)
- type WsStreamPath
- type WsSwapAction
- type WsSwapBalance
- type WsSwapOrder
- type WsSwapPayload
- type WsSwapPayloadAccountUpdate
- type WsSwapPayloadOrderTradeUpdate
- type WsSwapPosition
Constants ¶
const ( BIT_BASE_10 = 10 BIT_SIZE_64 = 64 )
const ( GET = "GET" POST = "POST" DELETE = "DELETE" PUT = "PUT" )
const ( BINANCE_API_SPOT_HTTP = "api.binance.com" BINANCE_API_FUTURE_HTTP = "fapi.binance.com" BINANCE_API_SWAP_HTTP = "dapi.binance.com" BINANCE_API_PM_HTTP = "papi.binance.com" //zsk修改 TEST_BINANCE_API_SPOT_HTTP = "testnet.binance.vision" TEST_BINANCE_API_FUTURE_HTTP = "testnet.binancefuture.com" TEST_BINANCE_API_SWAP_HTTP = "testnet.binancefuture.com" IS_GZIP = true )
const ( BINANCE_API_SPOT_WS_STREAM = "stream.binance.com:9443" BINANCE_API_SWAP_WS_STREAM = "dstream.binance.com" BINANCE_API_FUTURE_WS_STREAM = "fstream.binance.com" BINANCE_API_SWAP_WS_STREAM_GZIP = "sdstream.binance.com" BINANCE_API_FUTURE_WS_STREAM_GZIP = "sfstream.binance.com" BINANCE_API_PM_WS_STREAM = "fstream.binance.com/pm" //zsk修改 BINANCE_API_SPOT_WS_API = "ws-api.binance.com:9443" BINANCE_API_FUTURE_WS_API = "ws-fapi.binance.com" TEST_BINANCE_API_SPOT_WS_STREAM = "testnet.binance.vision" TEST_BINANCE_API_FUTURE_WS_STREAM = "fstream.binancefuture.com" TEST_BINANCE_API_SWAP_WS_STREAM = "dstream.binancefuture.com" TEST_BINANCE_API_SPOT_WS_API = "testnet.binance.vision" TEST_BINANCE_API_FUTURE_WS_API = "testnet.binancefuture.com" )
const ( SUBSCRIBE = "SUBSCRIBE" UNSUBSCRIBE = "UNSUBSCRIBE" LIST_SUBSCRIPTIONS = "LIST_SUBSCRIPTIONS" )
Variables ¶
var ( // WebsocketTimeout is an interval for sending ping/pong messages if WebsocketKeepalive is enabled WebsocketTimeout = time.Second * 10 // WebsocketKeepalive enables sending ping/pong messages to check the connection stability WebsocketKeepalive = true ListenKeyRefreshInterval = 30 * time.Minute )
var FutureApiMap = map[FutureApi]string{ FutureAccount: "/fapi/v2/account", FuturePositionSideDualGet: "/fapi/v1/positionSide/dual", FutureMultiAssetsMarginGet: "/fapi/v1/multiAssetsMargin", FuturePositionSideDualPost: "/fapi/v1/positionSide/dual", FutureMultiAssetsMarginPost: "/fapi/v1/multiAssetsMargin", FutureLeverage: "/fapi/v1/leverage", FutureMarginType: "/fapi/v1/marginType", FutureLeverageBracket: "/fapi/v1/leverageBracket", FuturePositionRisk: "/fapi/v2/positionRisk", FutureOpenOrders: "/fapi/v1/openOrders", FutureAllOrders: "/fapi/v1/allOrders", FutureOrderPost: "/fapi/v1/order", FutureOrderPut: "/fapi/v1/order", FutureOrderGet: "/fapi/v1/order", FutureOrderDelete: "/fapi/v1/order", FutureBatchOrdersPost: "/fapi/v1/batchOrders", FutureBatchOrdersPut: "/fapi/v1/batchOrders", FutureBatchOrdersDelete: "/fapi/v1/batchOrders", FutureUserTrades: "/fapi/v1/userTrades", FutureCommissionRate: "/fapi/v1/commissionRate", FuturePing: "/fapi/v1/ping", FutureServerTime: "/fapi/v1/time", FutureExchangeInfo: "/fapi/v1/exchangeInfo", FutureKlines: "/fapi/v1/klines", FutureDepth: "/fapi/v1/depth", FutureTrades: "/fapi/v1/trades", FutureHistoricalTrades: "/fapi/v1/historicalTrades", FutureAggTrades: "/fapi/v1/aggTrades", FuturePremiumIndex: "/fapi/v1/premiumIndex", FutureFundingRate: "/fapi/v1/fundingRate", FutureFundingInfo: "/fapi/v1/fundingInfo", FutureTicker24hr: "/fapi/v1/ticker/24hr", FutureTickerPrice: "/fapi/v1/ticker/price", FutureTickerBookTicker: "/fapi/v1/ticker/bookTicker", FutureDataBasis: "/futures/data/basis", FutureListenKeyPost: "/fapi/v1/listenKey", FutureListenKeyPut: "/fapi/v1/listenKey", FutureListenKeyDelete: "/fapi/v1/listenKey", }
var NowNetType = MAIN_NET
var PmCApiMap = map[PmCApi]string{ PmCAccount: "/papi/v1/account", PmCAccountBalance: "/papi/v1/balance", PmCAccountForC: "/papi/v2/cm/account", PmCCommissionRate: "/papi/v1/cm/commissionRate", PmCOpenOrders: "/papi/v1/cm/openOrders", PmCAllOrders: "/papi/v1/cm/allOrders", PmCOrderPost: "/papi/v1/cm/order", PmCOrderPut: "/papi/v1/cm/order", PmCOrderGet: "/papi/v1/cm/order", PmCOrderDelete: "/papi/v1/cm/order", PmCAllOrderDelete: "/papi/v1/cm/allOpenOrders", PmCConditionalOrderPost: "/papi/v1/cm/conditional/order", PmCConditionalOrderDelete: "/papi/v1/cm/conditional/order", PmCAllConditionnalOrderDelete: "/papi/v1/cm/conditional/allOpenOrders", PmCUserTrades: "/papi/v1/cm/userTrades", PmCPing: "/fapi/v1/ping", PmCServerTime: "/fapi/v1/time", PmCExchangeInfo: "/fapi/v1/exchangeInfo", PmCKlines: "/fapi/v1/klines", PmCDepth: "/fapi/v1/depth", PmCTrades: "/fapi/v1/trades", PmCHistoricalTrades: "/fapi/v1/historicalTrades", PmCAggTrades: "/fapi/v1/aggTrades", PmCPremiumIndex: "/fapi/v1/premiumIndex", PmCFundingRate: "/fapi/v1/fundingRate", PmCFundingInfo: "/fapi/v1/fundingInfo", PmCTicker24hr: "/fapi/v1/ticker/24hr", PmCTickerPrice: "/fapi/v1/ticker/price", PmCTickerBookTicker: "/fapi/v1/ticker/bookTicker", PmCDataBasis: "/futures/data/basis", PmCListenKeyPost: "/papi/v1/listenKey", PmCListenKeyPut: "/papi/v1/listenKey", PmCListenKeyDelete: "/papi/v1/listenKey", }
var PmMApiMap = map[PmMApi]string{ PmMAccount: "/papi/v1/account", PmMAccountBalance: "/papi/v1/balance", PmMMarginMaxBorrowable: "/papi/v1/margin/maxBorrowable", PmMMarginMaxTransferable: "/papi/v1/margin/maxWithdraw", PmMMarginInterestHistory: "/papi/v1/margin/marginInterestHistory", PmMMarginOrderGet: "/papi/v1/margin/order", PmMMarginOrderPost: "/papi/v1/margin/order", PmMMarginOrderDelete: "/papi/v1/margin/order", PmMMarginAllOrders: "/papi/v1/margin/allOrders", PmMMarginOpenOrders: "/papi/v1/margin/openOrders", PmMMarginOCOOrderGet: "/papi/v1/margin/orderList", PmMMarginOCOOrderPost: "/papi/v1/margin/order/oco", PmMMarginOCOOrderDelete: "/papi/v1/margin/orderList", PmMMarginOCOAllOrders: "/papi/v1/margin/allOrderList", PmMMarginOCOOpenOrders: "/papi/v1/margin/openOrderList", PmMPing: "/api/v3/ping", PmMServerTime: "/api/v3/time", PmMExchangeInfo: "/api/v3/exchangeInfo", PmMTickerPrice: "/api/v3/ticker/price", PmMKlines: "/api/v3/klines", PmMDepth: "/api/v3/depth", PmMTrades: "/api/v3/trades", PmMHistoricalTrades: "/api/v3/historicalTrades", PmMAggTrades: "/api/v3/aggTrades", PmMAvgPrice: "/api/v3/avgPrice", PmMUiKlines: "/api/v3/uiKlines", PmMTicker24hr: "/api/v3/ticker/24hr", PmMTickerBookTicker: "/api/v3/ticker/bookTicker", PmMTicker: "/api/v3/ticker", PmMListenKeyPost: "/papi/v1/listenKey", PmMListenKeyPut: "/papi/v1/listenKey", PmMListenKeyDelete: "/papi/v1/listenKey", }
var PmUApiMap = map[PmUApi]string{ PmUAccount: "/papi/v1/account", PmUAccountBalance: "/papi/v1/balance", PmUAccountForU: "/papi/v2/um/account", PmUCommissionRate: "/papi/v1/um/commissionRate", PmUOpenOrders: "/papi/v1/um/openOrders", PmUAllOrders: "/papi/v1/um/allOrders", PmUOrderPost: "/papi/v1/um/order", PmUOrderPut: "/papi/v1/um/order", PmUOrderGet: "/papi/v1/um/order", PmUOrderDelete: "/papi/v1/um/order", PmUAllOrderDelete: "/papi/v1/um/allOpenOrders", PmUConditionalOrderPost: "/papi/v1/um/conditional/order", PmUConditionalOrderDelete: "/papi/v1/um/conditional/order", PmUAllConditionnalOrderDelete: "/papi/v1/um/conditional/allOpenOrders", PmUUserTrades: "/papi/v1/um/userTrades", PmUPing: "/fapi/v1/ping", PmUServerTime: "/fapi/v1/time", PmUExchangeInfo: "/fapi/v1/exchangeInfo", PmUKlines: "/fapi/v1/klines", PmUDepth: "/fapi/v1/depth", PmUTrades: "/fapi/v1/trades", PmUHistoricalTrades: "/fapi/v1/historicalTrades", PmUAggTrades: "/fapi/v1/aggTrades", PmUPremiumIndex: "/fapi/v1/premiumIndex", PmUFundingRate: "/fapi/v1/fundingRate", PmUFundingInfo: "/fapi/v1/fundingInfo", PmUTicker24hr: "/fapi/v1/ticker/24hr", PmUTickerPrice: "/fapi/v1/ticker/price", PmUTickerBookTicker: "/fapi/v1/ticker/bookTicker", PmUDataBasis: "/futures/data/basis", PmUListenKeyPost: "/papi/v1/listenKey", PmUListenKeyPut: "/papi/v1/listenKey", PmUListenKeyDelete: "/papi/v1/listenKey", }
var SpotApiMap = map[SpotApi]string{ SpotSubAccountList: "/sapi/v1/sub-account/list", SpotSubAccountUniversalTransferHistory: "/sapi/v1/sub-account/universalTransfer", SpotSubAccountAssets: "/sapi/v4/sub-account/assets", SpotSubAccountFuturesAccount: "/sapi/v2/sub-account/futures/account", SpotSubAccountApiIpRestriction: "/sapi/v1/sub-account/subAccountApi/ipRestriction", SpotSubAccountTransferSubUserHistory: "/sapi/v1/sub-account/transfer/subUserHistory", SpotManagedSubAccountQueryTransLog: "/sapi/v1/managed-subaccount/query-trans-log", SpotSubAccountVirtualSubAccount: "/sapi/v1/sub-account/virtualSubAccount", SpotSubAccountUniversalTransfer: "/sapi/v1/sub-account/universalTransfer", SpotSubAccountFuturesEnable: "/sapi/v1/sub-account/futures/enable", SpotMarginAllPairs: "/sapi/v1/margin/allPairs", SpotMarginIsolatedAllPairs: "/sapi/v1/margin/isolated/allPairs", SpotMarginAccount: "/sapi/v1/margin/account", SpotMarginIsolatedAccount: "/sapi/v1/margin/isolated/account", SpotMarginMaxBorrowable: "/sapi/v1/margin/maxBorrowable", SpotMarginMaxTransferable: "/sapi/v1/margin/maxTransferable", SpotMarginInterestHistory: "/sapi/v1/margin/interestHistory", SpotMarginOrderGet: "/sapi/v1/margin/order", SpotMarginOrderPost: "/sapi/v1/margin/order", SpotMarginOrderDelete: "/sapi/v1/margin/order", SpotMarginAllOrders: "/sapi/v1/margin/allOrders", SpotMarginOpenOrders: "/sapi/v1/margin/openOrders", SpotMarginTransfer: "/sapi/v1/margin/transfer", SpotMarginIsolatedTransfer: "/sapi/v1/margin/isolated/transfer", SpotMarginLoan: "/sapi/v1/margin/loan", SpotMarginRepay: "/sapi/v1/margin/repay", SpotAccountApiTradingStatus: "/sapi/v1/account/apiTradingStatus", SpotAccount: "/api/v3/account", SpotAssetGetFundingAsset: "/sapi/v1/asset/get-funding-asset", SpotAssetTransferPost: "/sapi/v1/asset/transfer", SpotAssetTransferGet: "/sapi/v1/asset/transfer", SpotAssetTradeFee: "/sapi/v1/asset/tradeFee", SpotOpenOrders: "/api/v3/openOrders", SpotAllOrders: "/api/v3/allOrders", SpotOrderGet: "/api/v3/order", SpotOrderPost: "/api/v3/order", SpotOrderDelete: "/api/v3/order", SpotOrderCancelReplace: "/api/v3/order/cancelReplace", SpotMyTrades: "/api/v3/myTrades", SpotPing: "/api/v3/ping", SpotServerTime: "/api/v3/time", SpotExchangeInfo: "/api/v3/exchangeInfo", SpotTickerPrice: "/api/v3/ticker/price", SpotKlines: "/api/v3/klines", SpotDepth: "/api/v3/depth", SpotTrades: "/api/v3/trades", SpotHistoricalTrades: "/api/v3/historicalTrades", SpotAggTrades: "/api/v3/aggTrades", SpotAvgPrice: "/api/v3/avgPrice", SpotUiKlines: "/api/v3/uiKlines", SpotTicker24hr: "/api/v3/ticker/24hr", SpotTickerBookTicker: "/api/v3/ticker/bookTicker", SpotTicker: "/api/v3/ticker", SpotUserDataStreamPost: "/api/v3/userDataStream", SpotUserDataStreamPut: "/api/v3/userDataStream", SpotUserDataStreamDelete: "/api/v3/userDataStream", SpotMarginUserDataStreamPost: "/sapi/v1/userDataStream", SpotMarginUserDataStreamPut: "/sapi/v1/userDataStream", SpotMarginUserDataStreamDelete: "/sapi/v1/userDataStream", SpotMarginIsolatedUserDataStreamPost: "/sapi/v1/userDataStream/isolated", SpotMarginIsolatedUserDataStreamPut: "/sapi/v1/userDataStream/isolated", SpotMarginIsolatedUserDataStreamDelete: "/sapi/v1/userDataStream/isolated", }
var SwapApiMap = map[SwapApi]string{ SwapAccount: "/dapi/v1/account", SwapPositionSideDualGet: "/dapi/v1/positionSide/dual", SwapLeverageBracket: "/dapi/v2/leverageBracket", SwapPositionSideDualPost: "/dapi/v1/positionSide/dual", SwapLeverage: "/dapi/v1/leverage", SwapMarginType: "/dapi/v1/marginType", SwapPositionRisk: "/dapi/v1/positionRisk", SwapOpenOrders: "/dapi/v1/openOrders", SwapAllOrders: "/dapi/v1/allOrders", SwapOrderPost: "/dapi/v1/order", SwapOrderPut: "/dapi/v1/order", SwapOrderGet: "/dapi/v1/order", SwapOrderDelete: "/dapi/v1/order", SwapUserTrades: "/dapi/v1/userTrades", SwapCommissionRate: "/dapi/v1/commissionRate", SwapBatchOrdersPost: "/dapi/v1/batchOrders", SwapBatchOrdersPut: "/dapi/v1/batchOrders", SwapBatchOrdersDelete: "/dapi/v1/batchOrders", SwapPing: "/dapi/v1/ping", SwapServerTime: "/dapi/v1/time", SwapExchangeInfo: "/dapi/v1/exchangeInfo", SwapKlines: "/dapi/v1/klines", SwapTickerPrice: "/dapi/v1/ticker/price", SwapDepth: "/dapi/v1/depth", SwapListenKeyPost: "/dapi/v1/listenKey", SwapListenKeyPut: "/dapi/v1/listenKey", SwapListenKeyDel: "/dapi/v1/listenKey", }
var UseProxy = false
Functions ¶
func GetPointer ¶
func GetPointer[T any](v T) *T
func HandleWsPayloadResult ¶
func HmacSha256 ¶
func RequestWithHeader ¶
func SetHttpTimeout ¶
func SetNetType ¶
func SetNetType(netType NetType)
func SetServerTimeDelta ¶
func SetServerTimeDelta(delta int64)
func SetUseProxy ¶
Types ¶
type AssertTransferType ¶
type AssertTransferType string
const ( MAIN_UMFUTURE AssertTransferType = "MAIN_UMFUTURE" //现货钱包转向U本位合约钱包 MAIN_CMFUTURE AssertTransferType = "MAIN_CMFUTURE" //现货钱包转向币本位合约钱包 MAIN_MARGIN AssertTransferType = "MAIN_MARGIN" //现货钱包转向杠杆全仓钱包 UMFUTURE_MAIN AssertTransferType = "UMFUTURE_MAIN" //U本位合约钱包转向现货钱包 UMFUTURE_MARGIN AssertTransferType = "UMFUTURE_MARGIN" //U本位合约钱包转向杠杆全仓钱包 CMFUTURE_MAIN AssertTransferType = "CMFUTURE_MAIN" //币本位合约钱包转向现货钱包 MARGIN_MAIN AssertTransferType = "MARGIN_MAIN" //杠杆全仓钱包转向现货钱包 MARGIN_UMFUTURE AssertTransferType = "MARGIN_UMFUTURE" //杠杆全仓钱包转向U本位合约钱包 MARGIN_CMFUTURE AssertTransferType = "MARGIN_CMFUTURE" //杠杆全仓钱包转向币本位合约钱包 CMFUTURE_MARGIN AssertTransferType = "CMFUTURE_MARGIN" //币本位合约钱包转向杠杆全仓钱包 ISOLATEDMARGIN_MARGIN AssertTransferType = "ISOLATEDMARGIN_MARGIN" //杠杆逐仓钱包转向杠杆全仓钱包 MARGIN_ISOLATEDMARGIN AssertTransferType = "MARGIN_ISOLATEDMARGIN" //杠杆全仓钱包转向杠杆逐仓钱包 ISOLATEDMARGIN_ISOLATEDMARGIN AssertTransferType = "ISOLATEDMARGIN_ISOLATEDMARGIN" //杠杆逐仓钱包转向杠杆逐仓钱包 MAIN_FUNDING AssertTransferType = "MAIN_FUNDING" //现货钱包转向资金钱包 FUNDING_MAIN AssertTransferType = "FUNDING_MAIN" //资金钱包转向现货钱包 FUNDING_UMFUTURE AssertTransferType = "FUNDING_UMFUTURE" //资金钱包转向U本位合约钱包 UMFUTURE_FUNDING AssertTransferType = "UMFUTURE_FUNDING" //U本位合约钱包转向资金钱包 MARGIN_FUNDING AssertTransferType = "MARGIN_FUNDING" //杠杆全仓钱包转向资金钱包 FUNDING_MARGIN AssertTransferType = "FUNDING_MARGIN" //资金钱包转向杠杆全仓钱包 FUNDING_CMFUTURE AssertTransferType = "FUNDING_CMFUTURE" //资金钱包转向币本位合约钱包 CMFUTURE_FUNDING AssertTransferType = "CMFUTURE_FUNDING" //币本位合约钱包转向资金钱包 MAIN_OPTION AssertTransferType = "MAIN_OPTION" //现货钱包转向期权钱包 OPTION_MAIN AssertTransferType = "OPTION_MAIN" //期权钱包转向现货钱包 UMFUTURE_OPTION AssertTransferType = "UMFUTURE_OPTION" //U本位合约钱包转向期权钱包 OPTION_UMFUTURE AssertTransferType = "OPTION_UMFUTURE" //期权钱包转向U本位合约钱包 MARGIN_OPTION AssertTransferType = "MARGIN_OPTION" //杠杆全仓钱包转向期权钱包 OPTION_MARGIN AssertTransferType = "OPTION_MARGIN" //期权全仓钱包转向杠杆钱包 FUNDING_OPTION AssertTransferType = "FUNDING_OPTION" //资金钱包转向期权钱包 OPTION_FUNDING AssertTransferType = "OPTION_FUNDING" //期权钱包转向资金钱包 MAIN_PORTFOLIO_MARGIN AssertTransferType = "MAIN_PORTFOLIO_MARGIN" //现货钱包转向统一账户钱包 PORTFOLIO_MARGIN_MAIN AssertTransferType = "PORTFOLIO_MARGIN_MAIN" //统一账户钱包转向现货钱包 MAIN_ISOLATED_MARGIN AssertTransferType = "MAIN_ISOLATED_MARGIN" //现货钱包转向逐仓账户钱包 ISOLATED_MARGIN_MAIN AssertTransferType = "ISOLATED_MARGIN_MAIN" //逐仓钱包转向现货账户钱包 )
type BinanceErrorRes ¶
type BinanceRestRes ¶
type BinanceRestRes[T any] struct { Result T //请求结果 BinanceErrorRes //错误信息 }
type FutureAccountApi ¶
type FutureAccountApi struct {
// contains filtered or unexported fields
}
func (*FutureAccountApi) Do ¶
func (api *FutureAccountApi) Do() (*FutureAccountRes, error)
func (*FutureAccountApi) RecvWindow ¶
func (api *FutureAccountApi) RecvWindow(RecvWindow int64) *FutureAccountApi
func (*FutureAccountApi) Timestamp ¶
func (api *FutureAccountApi) Timestamp(Timestamp int64) *FutureAccountApi
type FutureAccountReq ¶
type FutureAccountReq struct { RecvWindow *int64 `json:"recvWindow"` Timestamp *int64 `json:"timestamp"` }
FutureAccount
type FutureAccountRes ¶
type FutureAccountRes struct { FeeTier int64 `json:"feeTier"` // 手续费等级 CanTrade bool `json:"canTrade"` // 是否可以交易 CanDeposit bool `json:"canDeposit"` // 是否可以入金 CanWithdraw bool `json:"canWithdraw"` // 是否可以出金 UpdateTime int64 `json:"updateTime"` // 保留字段,请忽略 MultiAssetsMargin bool `json:"multiAssetsMargin"` TotalInitialMargin string `json:"totalInitialMargin"` // 当前所需起始保证金总额(存在逐仓请忽略), 仅计算u TotalMaintMargin string `json:"totalMaintMargin"` // 维持保证金总额, 仅计算usdt资产 TotalWalletBalance string `json:"totalWalletBalance"` // 账户总余额, 仅计算usdt资产 TotalUnrealizedProfit string `json:"totalUnrealizedProfit"` // 持仓未实现盈亏总额, 仅计算usdt资产 TotalMarginBalance string `json:"totalMarginBalance"` // 保证金总余额, 仅计算usdt资产 TotalPositionInitialMargin string `json:"totalPositionInitialMargin"` // 持仓所需起始保证金(基于最新标记价格), 仅计算usdt TotalOpenOrderInitialMargin string `json:"totalOpenOrderInitialMargin"` // 当前挂单所需起始保证金(基于最新标记价格), 仅计算 TotalCrossWalletBalance string `json:"totalCrossWalletBalance"` // 全仓账户余额, 仅计算usdt资产 TotalCrossUnPnl string `json:"totalCrossUnPnl"` // 全仓持仓未实现盈亏总额, 仅计算usdt资产 AvailableBalance string `json:"availableBalance"` // 可用余额, 仅计算usdt资产 MaxWithdrawAmount string `json:"maxWithdrawAmount"` // 最大可转出余额, 仅计算usdt资产 Assets []FutureAccountResAsset `json:"assets"` Positions []FutureAccountResPosition `json:"positions"` // 头寸,将返回所有市场symbol。 }
type FutureAccountResAsset ¶
type FutureAccountResAsset struct { Asset string `json:"asset"` //资产 WalletBalance string `json:"walletBalance"` //余额 UnrealizedProfit string `json:"unrealizedProfit"` // 未实现盈亏 MarginBalance string `json:"marginBalance"` // 保证金余额 MaintMargin string `json:"maintMargin"` // 维持保证金 InitialMargin string `json:"initialMargin"` // 当前所需起始保证金 PositionInitialMargin string `json:"positionInitialMargin"` // 持仓所需起始保证金(基于最新标记价格) OpenOrderInitialMargin string `json:"openOrderInitialMargin"` // 当前挂单所需起始保证金(基于最新标记价格) CrossWalletBalance string `json:"crossWalletBalance"` //全仓账户余额 CrossUnPnl string `json:"crossUnPnl"` // 全仓持仓未实现盈亏 AvailableBalance string `json:"availableBalance"` // 可用余额 MaxWithdrawAmount string `json:"maxWithdrawAmount"` // 最大可转出余额 MarginAvailable bool `json:"marginAvailable"` // 是否可用作联合保证金 UpdateTime int64 `json:"updateTime"` //更新时间 }
type FutureAccountResPosition ¶
type FutureAccountResPosition struct { //根据用户持仓模式展示持仓方向,即单向模式下只返回BOTH持仓情况,双向模式下只返回 LONG 和 SHORT 持仓情况 Symbol string `json:"symbol"` // 交易对 InitialMargin string `json:"initialMargin"` // 当前所需起始保证金(基于最新标记价格) MaintMargin string `json:"maintMargin"` //维持保证金 UnrealizedProfit string `json:"unrealizedProfit"` // 持仓未实现盈亏 PositionInitialMargin string `json:"positionInitialMargin"` // 持仓所需起始保证金(基于最新标记价格) OpenOrderInitialMargin string `json:"openOrderInitialMargin"` // 当前挂单所需起始保证金(基于最新标记价格) Leverage string `json:"leverage"` // 杠杆倍率 Isolated bool `json:"isolated"` // 是否是逐仓模式 EntryPrice string `json:"entryPrice"` // 持仓成本价 MaxNotional string `json:"maxNotional"` // 当前杠杆下用户可用的最大名义价值 BidNotional string `json:"bidNotional"` // 买单净值,忽略 AskNotional string `json:"askNotional"` // 卖单净值,忽略 PositionSide string `json:"positionSide"` // 持仓方向 PositionAmt string `json:"positionAmt"` // 持仓数量 UpdateTime int64 `json:"updateTime"` // 更新时间 }
type FutureAggTradesApi ¶
type FutureAggTradesApi struct {
// contains filtered or unexported fields
}
func (*FutureAggTradesApi) Do ¶
func (api *FutureAggTradesApi) Do() (*FutureAggTradesRes, error)
func (*FutureAggTradesApi) EndTime ¶
func (api *FutureAggTradesApi) EndTime(EndTime int64) *FutureAggTradesApi
NO 返回该时刻为止的成交记录
func (*FutureAggTradesApi) FromId ¶
func (api *FutureAggTradesApi) FromId(FromId int64) *FutureAggTradesApi
NO 从包含fromID的成交开始返回结果
func (*FutureAggTradesApi) Limit ¶
func (api *FutureAggTradesApi) Limit(Limit int) *FutureAggTradesApi
NO 默认 500; 最大 1000.
func (*FutureAggTradesApi) StartTime ¶
func (api *FutureAggTradesApi) StartTime(StartTime int64) *FutureAggTradesApi
NO 从该时刻之后的成交记录开始返回结果
func (*FutureAggTradesApi) Symbol ¶
func (api *FutureAggTradesApi) Symbol(Symbol string) *FutureAggTradesApi
YES 交易对
type FutureAggTradesReq ¶
type FutureAggTradesRes ¶
type FutureAggTradesRes []FutureAggTradesResRow
type FutureAggTradesResRow ¶
type FutureAllOrdersApi ¶
type FutureAllOrdersApi struct {
// contains filtered or unexported fields
}
func (*FutureAllOrdersApi) Do ¶
func (api *FutureAllOrdersApi) Do() (*FutureAllOrdersRes, error)
func (*FutureAllOrdersApi) EndTime ¶
func (api *FutureAllOrdersApi) EndTime(EndTime int64) *FutureAllOrdersApi
func (*FutureAllOrdersApi) Limit ¶
func (api *FutureAllOrdersApi) Limit(Limit int64) *FutureAllOrdersApi
func (*FutureAllOrdersApi) OrderId ¶
func (api *FutureAllOrdersApi) OrderId(OrderId int64) *FutureAllOrdersApi
func (*FutureAllOrdersApi) RecvWindow ¶
func (api *FutureAllOrdersApi) RecvWindow(RecvWindow int64) *FutureAllOrdersApi
func (*FutureAllOrdersApi) StartTime ¶
func (api *FutureAllOrdersApi) StartTime(StartTime int64) *FutureAllOrdersApi
func (*FutureAllOrdersApi) Symbol ¶
func (api *FutureAllOrdersApi) Symbol(Symbol string) *FutureAllOrdersApi
func (*FutureAllOrdersApi) Timestamp ¶
func (api *FutureAllOrdersApi) Timestamp(Timestamp int64) *FutureAllOrdersApi
type FutureAllOrdersReq ¶
type FutureAllOrdersReq struct { Symbol *string `json:"symbol"` //No 交易对 OrderId *int64 `json:"orderId"` //No 只返回此orderID及之后的订单,缺省返回最近的订单 StartTime *int64 `json:"startTime"` //No 起始时间 EndTime *int64 `json:"endTime"` //No 结束时间 Limit *int64 `json:"limit"` //No 返回的结果集数量 默认值:500 最大值:1000 RecvWindow *int64 `json:"recvWindow"` Timestamp *int64 `json:"timestamp"` }
type FutureAllOrdersRes ¶
type FutureAllOrdersRes []FutureOrderOrder
type FutureApi ¶
type FutureApi int
const ( //账户接口 FutureAccount FutureApi = iota //GET接口 账户信息V2 (USER_DATA) FuturePositionSideDualGet //GET接口 (HMAC SHA256)查询持仓模式(USER_DATA) FutureMultiAssetsMarginGet //GET接口 (HMAC SHA256)查询联合保证金模式(USER_DATA) FuturePositionSideDualPost //POST接口 (HMAC SHA256)更改持仓模式(TRADE) FutureMultiAssetsMarginPost //POST接口 (HMAC SHA256)更改联合保证金模式(TRADE) FutureLeverage //POST接口 (HMAC SHA256)调整开仓杠杆 (TRADE) FutureMarginType //POST接口 (HMAC SHA256)变换逐全仓模式 (TRADE) FutureLeverageBracket //GET接口 杠杆分层标准 (USER_DATA) FuturePositionRisk //GET接口 用户持仓风险V2 (USER_DATA) //交易接口 FutureOpenOrders //GET接口 (HMAC SHA256)查询当前挂单 (USER_DATA) FutureAllOrders //GET接口 (HMAC SHA256)查询所有订单 (USER_DATA) FutureOrderPost //POST接口 (HMAC SHA256)下单 (TRADE) FutureOrderPut //PUT接口 (HMAC SHA256)修改订单 (TRADE) FutureOrderGet //GET接口 (HMAC SHA256)查询订单 (USER_DATA) FutureOrderDelete //DELETE接口 (HMAC SHA256)撤销订单 (TRADE) FutureBatchOrdersPost //POST接口 (HMAC SHA256)批量下单 (TRADE) FutureBatchOrdersPut //PUT接口 (HMAC SHA256)批量修改订单 (TRADE) FutureBatchOrdersDelete //DELETE接口 (HMAC SHA256)批量撤销订单 (TRADE) FutureUserTrades //GET接口 (HMAC SHA256)账户成交历史 (USER_DATA) FutureCommissionRate //GET接口 (HMAC SHA256)查询用户当前的手续费率 //通用接口 FuturePing //GET接口 测试服务器连通性 FutureServerTime //GET接口 获取服务器时间 FutureExchangeInfo //GET接口 交易规则和交易对信息 //行情接口 FutureKlines //K线数据 FutureDepth //深度信息 FutureTrades //最新成交 FutureHistoricalTrades //历史成交 FutureAggTrades //近期成交(归集) FuturePremiumIndex //最新标记价格和资金费率 FutureFundingRate //查询资金费率历史 FutureFundingInfo //查询资金费率信息 FutureTicker24hr //24hr价格变动情况 FutureTickerPrice //最新价格 FutureTickerBookTicker //当前最优挂单 FutureDataBasis //基差数据 //Ws账户推送相关接口 FutureListenKeyPost //生成listenKey (USER_STREAM) FutureListenKeyPut //延长listenKey有效期 (USER_STREAM) FutureListenKeyDelete //关闭listenKey (USER_STREAM) )
type FutureBatchOrdersDeleteApi ¶
type FutureBatchOrdersDeleteApi struct {
// contains filtered or unexported fields
}
func (*FutureBatchOrdersDeleteApi) Do ¶
func (api *FutureBatchOrdersDeleteApi) Do() (*FutureBatchOrdersDeleteRes, error)
func (*FutureBatchOrdersDeleteApi) OrderIdList ¶
func (api *FutureBatchOrdersDeleteApi) OrderIdList(OrderIdList []int64) *FutureBatchOrdersDeleteApi
func (*FutureBatchOrdersDeleteApi) OrigClientOrderIdList ¶
func (api *FutureBatchOrdersDeleteApi) OrigClientOrderIdList(OrigClientOrderIdList []string) *FutureBatchOrdersDeleteApi
func (*FutureBatchOrdersDeleteApi) RecvWindow ¶
func (api *FutureBatchOrdersDeleteApi) RecvWindow(RecvWindow int64) *FutureBatchOrdersDeleteApi
func (*FutureBatchOrdersDeleteApi) Symbol ¶
func (api *FutureBatchOrdersDeleteApi) Symbol(Symbol string) *FutureBatchOrdersDeleteApi
func (*FutureBatchOrdersDeleteApi) Timestamp ¶
func (api *FutureBatchOrdersDeleteApi) Timestamp(Timestamp int64) *FutureBatchOrdersDeleteApi
type FutureBatchOrdersDeleteReq ¶
type FutureBatchOrdersDeleteReq struct { Symbol *string `json:"symbol"` //YES 交易对 OrderIdList *[]int64 `json:"orderIdList"` //NO 系统订单号, 最多支持10个订单 OrigClientOrderIdList *[]string `json:"origClientOrderIdList"` //NO 用户自定义的订单号, 最多支持10个订单 RecvWindow *int64 `json:"recvWindow"` //NO Timestamp *int64 `json:"timestamp"` //YES }
type FutureBatchOrdersDeleteRes ¶
type FutureBatchOrdersDeleteRes []FutureOrderDeleteRes
type FutureBatchOrdersPostApi ¶
type FutureBatchOrdersPostApi struct {
// contains filtered or unexported fields
}
func (*FutureBatchOrdersPostApi) AddOrders ¶
func (api *FutureBatchOrdersPostApi) AddOrders(orderApis ...*FutureOrderPostApi) *FutureBatchOrdersPostApi
func (*FutureBatchOrdersPostApi) Do ¶
func (api *FutureBatchOrdersPostApi) Do() (*FutureBatchOrdersPostRes, error)
func (*FutureBatchOrdersPostApi) RecvWindow ¶
func (api *FutureBatchOrdersPostApi) RecvWindow(RecvWindow int64) *FutureBatchOrdersPostApi
func (*FutureBatchOrdersPostApi) SetOrders ¶
func (api *FutureBatchOrdersPostApi) SetOrders(orderApi []*FutureOrderPostApi) *FutureBatchOrdersPostApi
func (*FutureBatchOrdersPostApi) Timestamp ¶
func (api *FutureBatchOrdersPostApi) Timestamp(Timestamp int64) *FutureBatchOrdersPostApi
type FutureBatchOrdersPostReq ¶
type FutureBatchOrdersPostReq struct { BatchOrders *[]FutureOrderPostReq `json:"batchOrders"` //YES 批量下单 最多支持5个 RecvWindow *int64 `json:"recvWindow"` //NO Timestamp *int64 `json:"timestamp"` //YES }
type FutureBatchOrdersPostRes ¶
type FutureBatchOrdersPostRes []FutureOrderPostResRow
type FutureBatchOrdersPutApi ¶
type FutureBatchOrdersPutApi struct {
// contains filtered or unexported fields
}
func (*FutureBatchOrdersPutApi) AddOrders ¶
func (api *FutureBatchOrdersPutApi) AddOrders(orderApi ...*FutureOrderPutApi) *FutureBatchOrdersPutApi
func (*FutureBatchOrdersPutApi) Do ¶
func (api *FutureBatchOrdersPutApi) Do() (*FutureBatchOrdersPutRes, error)
func (*FutureBatchOrdersPutApi) RecvWindow ¶
func (api *FutureBatchOrdersPutApi) RecvWindow(RecvWindow int64) *FutureBatchOrdersPutApi
func (*FutureBatchOrdersPutApi) SetOrders ¶
func (api *FutureBatchOrdersPutApi) SetOrders(orderApi []*FutureOrderPutApi) *FutureBatchOrdersPutApi
func (*FutureBatchOrdersPutApi) Timestamp ¶
func (api *FutureBatchOrdersPutApi) Timestamp(Timestamp int64) *FutureBatchOrdersPutApi
type FutureBatchOrdersPutReq ¶
type FutureBatchOrdersPutReq struct { BatchOrders *[]FutureOrderPutReq `json:"batchOrders"` //YES 批量下单 最多支持5个 RecvWindow *int64 `json:"recvWindow"` //NO Timestamp *int64 `json:"timestamp"` //YES }
type FutureBatchOrdersPutRes ¶
type FutureBatchOrdersPutRes []FutureBatchOrdersPutResRow
type FutureBatchOrdersPutResRow ¶
type FutureBatchOrdersPutResRow struct { BinanceErrorRes FutureOrderPutRes }
type FutureCommissionRateApi ¶
type FutureCommissionRateApi struct {
// contains filtered or unexported fields
}
func (*FutureCommissionRateApi) Do ¶
func (api *FutureCommissionRateApi) Do() (*FutureCommissionRateRes, error)
func (*FutureCommissionRateApi) RecvWindow ¶
func (api *FutureCommissionRateApi) RecvWindow(RecvWindow int64) *FutureCommissionRateApi
func (*FutureCommissionRateApi) Symbol ¶
func (api *FutureCommissionRateApi) Symbol(Symbol string) *FutureCommissionRateApi
func (*FutureCommissionRateApi) Timestamp ¶
func (api *FutureCommissionRateApi) Timestamp(Timestamp int64) *FutureCommissionRateApi
type FutureCommissionRateReq ¶
type FutureCommissionRateRes ¶
type FutureCommonPostRes ¶
type FutureDataBasisApi ¶
type FutureDataBasisApi struct {
// contains filtered or unexported fields
}
func (*FutureDataBasisApi) ContractType ¶
func (api *FutureDataBasisApi) ContractType(ContractType string) *FutureDataBasisApi
YES CURRENT_QUARTER, NEXT_QUARTER, PERPETUAL
func (*FutureDataBasisApi) Do ¶
func (api *FutureDataBasisApi) Do() (*FutureDataBasisRes, error)
func (*FutureDataBasisApi) EndTime ¶
func (api *FutureDataBasisApi) EndTime(EndTime int64) *FutureDataBasisApi
NO
func (*FutureDataBasisApi) Limit ¶
func (api *FutureDataBasisApi) Limit(Limit int64) *FutureDataBasisApi
NO Default 30,Max 500
func (*FutureDataBasisApi) Pair ¶
func (api *FutureDataBasisApi) Pair(Pair string) *FutureDataBasisApi
YES BTCUSDT
func (*FutureDataBasisApi) Period ¶
func (api *FutureDataBasisApi) Period(Period string) *FutureDataBasisApi
YES "5m","15m","30m","1h","2h","4h","6h","12h","1d"
func (*FutureDataBasisApi) StartTime ¶
func (api *FutureDataBasisApi) StartTime(StartTime int64) *FutureDataBasisApi
NO
type FutureDataBasisReq ¶
type FutureDataBasisReq struct { Pair *string `json:"pair"` //YES BTCUSDT ContractType *string `json:"contractType"` //YES CURRENT_QUARTER, NEXT_QUARTER, PERPETUAL Period *string `json:"period"` //YES "5m","15m","30m","1h","2h","4h","6h","12h","1d" Limit *int64 `json:"limit"` //NO Default 30,Max 500 StartTime *int64 `json:"startTime"` //NO EndTime *int64 `json:"endTime"` //NO }
type FutureDataBasisRes ¶
type FutureDataBasisRes []FutureDataBasisResRow
type FutureDataBasisResRow ¶
type FutureDataBasisResRow struct { IndexPrice string `json:"indexPrice"` ContractType string `json:"contractType"` BasisRate string `json:"basisRate"` FuturesPrice string `json:"futuresPrice"` AnnualizedBasisRate string `json:"annualizedBasisRate"` Basis string `json:"basis"` Pair string `json:"pair"` Timestamp int64 `json:"timestamp"` }
type FutureDepthApi ¶
type FutureDepthApi struct {
// contains filtered or unexported fields
}
func (*FutureDepthApi) Do ¶
func (api *FutureDepthApi) Do() (*FutureDepthRes, error)
func (*FutureDepthApi) Limit ¶
func (api *FutureDepthApi) Limit(Limit int) *FutureDepthApi
NO 默认 500; 可选值:[5, 10, 20, 50, 100, 500, 1000]
func (*FutureDepthApi) Symbol ¶
func (api *FutureDepthApi) Symbol(Symbol string) *FutureDepthApi
YES 交易对
type FutureDepthReq ¶
type FutureDepthRes ¶
type FutureDepthResMiddle ¶
type FutureDepthResMiddle struct { LastUpdateId int64 `json:"lastUpdateId"` // 最后更新ID MessageTime int64 `json:"E"` // 消息时间 EngineTime int64 `json:"T"` // 撮合引擎时间 Bids [][]interface{} `json:"bids"` // 买单 Asks [][]interface{} `json:"asks"` // 卖单 }
func (*FutureDepthResMiddle) ConvertToRes ¶
func (middle *FutureDepthResMiddle) ConvertToRes() *FutureDepthRes
type FutureExchangeInfoApi ¶
type FutureExchangeInfoApi struct {
// contains filtered or unexported fields
}
func (*FutureExchangeInfoApi) Do ¶
func (api *FutureExchangeInfoApi) Do() (*FutureExchangeInfoRes, error)
type FutureExchangeInfoReq ¶
type FutureExchangeInfoReq struct { }
type FutureExchangeInfoRes ¶
type FutureExchangeInfoRes struct { ExchangeFilters []map[string]interface{} `json:"exchangeFilters"` RateLimits []FutureExchangeInfoResRateLimit `json:"rateLimits"` // API访问的限制 Assets []FutureExchangeInfoResAsset `json:"assets"` // 资产信息 Symbols []FutureExchangeInfoResSymbol `json:"symbols"` // 交易对信息 Timezone string `json:"timezone"` // 服务器所用的时间区域 }
type FutureExchangeInfoResSymbol ¶
type FutureExchangeInfoResSymbol struct { Symbol string `json:"symbol"` // 交易对 Pair string `json:"pair"` // 标的交易对 ContractType string `json:"contractType"` // 合约类型 DeliveryDate int64 `json:"deliveryDate"` // 交割日期 OnboardDate int64 `json:"onboardDate"` // 上线日期 Status string `json:"status"` // 交易对状态 BaseAsset string `json:"baseAsset"` // 标的资产 QuoteAsset string `json:"quoteAsset"` // 报价资产 MarginAsset string `json:"marginAsset"` // 保证金资产 PricePrecision int `json:"pricePrecision"` // 价格小数点位数(仅作为系统精度使用,注意同tickSize 区分) QuantityPrecision int `json:"quantityPrecision"` // 数量小数点位数(仅作为系统精度使用,注意同stepSize 区分) BaseAssetPrecision int `json:"baseAssetPrecision"` // 标的资产精度 QuotePrecision int `json:"quotePrecision"` // 报价资产精度 UnderlyingType string `json:"underlyingType"` UnderlyingSubType []string `json:"underlyingSubType"` SettlePlan int `json:"settlePlan"` TriggerProtect string `json:"triggerProtect"` // 开启"priceProtect"的条件订单的触发阈值 Filters []map[string]interface{} `json:"filters"` OrderType []string `json:"OrderType"` // 订单类型 TimeInForce []string `json:"timeInForce"` // 有效方式 LiquidationFee string `json:"liquidationFee"` // 强平费率 MarketTakeBound string `json:"marketTakeBound"` // 市价吃单(相对于标记价格)允许可造成的最大价格偏离比例 }
type FutureFundingInfoApi ¶
type FutureFundingInfoApi struct {
// contains filtered or unexported fields
}
func (*FutureFundingInfoApi) Do ¶
func (api *FutureFundingInfoApi) Do() (*FutureFundingInfoRes, error)
type FutureFundingInfoReq ¶
type FutureFundingInfoReq struct { }
type FutureFundingInfoRes ¶
type FutureFundingInfoRes []FutureFundingInfoResRow
type FutureFundingInfoResRow ¶
type FutureFundingInfoResRow struct { Symbol string `json:"symbol"` // 交易对 AdjustedFundingRateCap string `json:"adjustedFundingRateCap"` // 资金费率上限 AdjustedFundingRateFloor string `json:"adjustedFundingRateFloor"` // 资金费率下限 FundingIntervalHours int64 `json:"fundingIntervalHours"` // 资金费率间隔时间 Disclaimer bool `json:"disclaimer"` }
type FutureFundingRateApi ¶
type FutureFundingRateApi struct {
// contains filtered or unexported fields
}
func (*FutureFundingRateApi) Do ¶
func (api *FutureFundingRateApi) Do() (*FutureFundingRateRes, error)
func (*FutureFundingRateApi) EndTime ¶
func (api *FutureFundingRateApi) EndTime(EndTime int64) *FutureFundingRateApi
NO 结束时间
func (*FutureFundingRateApi) Limit ¶
func (api *FutureFundingRateApi) Limit(Limit int) *FutureFundingRateApi
NO 默认值:100 最大值:1000
func (*FutureFundingRateApi) StartTime ¶
func (api *FutureFundingRateApi) StartTime(StartTime int64) *FutureFundingRateApi
NO 起始时间
func (*FutureFundingRateApi) Symbol ¶
func (api *FutureFundingRateApi) Symbol(Symbol string) *FutureFundingRateApi
NO 交易对
type FutureFundingRateReq ¶
type FutureFundingRateRes ¶
type FutureFundingRateRes []FutureFundingRateResRow
type FutureFundingRateResRow ¶
type FutureHistoricalTradesApi ¶
type FutureHistoricalTradesApi struct {
// contains filtered or unexported fields
}
func (*FutureHistoricalTradesApi) Do ¶
func (api *FutureHistoricalTradesApi) Do() (*FutureHistoricalTradesRes, error)
func (*FutureHistoricalTradesApi) FromId ¶
func (api *FutureHistoricalTradesApi) FromId(FromId int64) *FutureHistoricalTradesApi
NO 从哪一条成交id开始返回. 缺省返回最近的成交记录
func (*FutureHistoricalTradesApi) Limit ¶
func (api *FutureHistoricalTradesApi) Limit(Limit int) *FutureHistoricalTradesApi
NO 默认值:500 最大值:1000.
func (*FutureHistoricalTradesApi) Symbol ¶
func (api *FutureHistoricalTradesApi) Symbol(Symbol string) *FutureHistoricalTradesApi
YES 交易对
type FutureHistoricalTradesRes ¶
type FutureHistoricalTradesRes []FutureTradesResRow
type FutureKlinesApi ¶
type FutureKlinesApi struct {
// contains filtered or unexported fields
}
func (*FutureKlinesApi) Do ¶
func (api *FutureKlinesApi) Do() (*KlinesRes, error)
func (*FutureKlinesApi) EndTime ¶
func (api *FutureKlinesApi) EndTime(EndTime int64) *FutureKlinesApi
func (*FutureKlinesApi) Interval ¶
func (api *FutureKlinesApi) Interval(Interval string) *FutureKlinesApi
func (*FutureKlinesApi) Limit ¶
func (api *FutureKlinesApi) Limit(Limit int) *FutureKlinesApi
func (*FutureKlinesApi) StartTime ¶
func (api *FutureKlinesApi) StartTime(StartTime int64) *FutureKlinesApi
func (*FutureKlinesApi) Symbol ¶
func (api *FutureKlinesApi) Symbol(Symbol string) *FutureKlinesApi
type FutureKlinesReq ¶
type FutureLeverageApi ¶
type FutureLeverageApi struct {
// contains filtered or unexported fields
}
func (*FutureLeverageApi) Do ¶
func (api *FutureLeverageApi) Do() (*FutureLeverageRes, error)
func (*FutureLeverageApi) Leverage ¶
func (api *FutureLeverageApi) Leverage(Leverage int64) *FutureLeverageApi
func (*FutureLeverageApi) RecvWindow ¶
func (api *FutureLeverageApi) RecvWindow(RecvWindow int64) *FutureLeverageApi
func (*FutureLeverageApi) Symbol ¶
func (api *FutureLeverageApi) Symbol(Symbol string) *FutureLeverageApi
func (*FutureLeverageApi) Timestamp ¶
func (api *FutureLeverageApi) Timestamp(Timestamp int64) *FutureLeverageApi
type FutureLeverageBracketApi ¶
type FutureLeverageBracketApi struct {
// contains filtered or unexported fields
}
func (*FutureLeverageBracketApi) Do ¶
func (api *FutureLeverageBracketApi) Do() (*FutureLeverageBracketRes, error)
func (*FutureLeverageBracketApi) RecvWindow ¶
func (api *FutureLeverageBracketApi) RecvWindow(RecvWindow int64) *FutureLeverageBracketApi
func (*FutureLeverageBracketApi) Symbol ¶
func (api *FutureLeverageBracketApi) Symbol(Symbol string) *FutureLeverageBracketApi
func (*FutureLeverageBracketApi) Timestamp ¶
func (api *FutureLeverageBracketApi) Timestamp(Timestamp int64) *FutureLeverageBracketApi
type FutureLeverageBracketReq ¶
type FutureLeverageBracketReq struct { Symbol *string `json:"symbol"` //No 交易对 RecvWindow *int64 `json:"recvWindow"` Timestamp *int64 `json:"timestamp"` }
FutureLeverageBracket
type FutureLeverageBracketRes ¶
type FutureLeverageBracketRes []FutureLeverageBracketResResult
type FutureLeverageBracketResResult ¶
type FutureLeverageBracketResResult struct { Symbol string `json:"symbol"` // 交易对 Brackets []FutureLeverageBracketResResultBrackets `json:"brackets"` // 交易对 }
type FutureLeverageBracketResResultBrackets ¶
type FutureLeverageBracketResResultBrackets struct { Bracket int64 `json:"bracket"` // 层级 InitialLeverage int64 `json:"initialLeverage"` // 该层允许的最高初始杠杆倍数 NotionalCap int64 `json:"notionalCap"` // 该层对应的名义价值上限 NotionalFloor int64 `json:"notionalFloor"` // 该层对应的名义价值下限 MaintMarginRatio decimal.Decimal `json:"maintMarginRatio"` // 该层对应的维持保证金率 Cum decimal.Decimal `json:"cum"` // 速算数 }
type FutureLeverageReq ¶
type FutureLeverageReq struct { Symbol *string `json:"symbol"` //YES 交易对 Leverage *int64 `json:"leverage"` //YES 目标杠杆倍数:1 到 125 整数 RecvWindow *int64 `json:"recvWindow"` Timestamp *int64 `json:"timestamp"` }
FutureLeverage
type FutureLeverageRes ¶
type FutureListenKeyDeleteApi ¶
type FutureListenKeyDeleteApi struct {
// contains filtered or unexported fields
}
func (*FutureListenKeyDeleteApi) Do ¶
func (api *FutureListenKeyDeleteApi) Do() (*FutureListenKeyDeleteRes, error)
type FutureListenKeyDeleteReq ¶
type FutureListenKeyDeleteReq struct{}
type FutureListenKeyDeleteRes ¶
type FutureListenKeyDeleteRes struct{}
type FutureListenKeyPostApi ¶
type FutureListenKeyPostApi struct {
// contains filtered or unexported fields
}
func (*FutureListenKeyPostApi) Do ¶
func (api *FutureListenKeyPostApi) Do() (*FutureListenKeyPostRes, error)
type FutureListenKeyPostRes ¶
type FutureListenKeyPostRes struct {
ListenKey string `json:"listenKey"`
}
type FutureListenKeyPutApi ¶
type FutureListenKeyPutApi struct {
// contains filtered or unexported fields
}
func (*FutureListenKeyPutApi) Do ¶
func (api *FutureListenKeyPutApi) Do() (*FutureListenKeyPutRes, error)
type FutureListenKeyPutReq ¶
type FutureListenKeyPutReq struct{}
type FutureListenKeyPutRes ¶
type FutureListenKeyPutRes struct{}
type FutureMarginTypeApi ¶
type FutureMarginTypeApi struct {
// contains filtered or unexported fields
}
func (*FutureMarginTypeApi) Do ¶
func (api *FutureMarginTypeApi) Do() (*FutureMarginTypeRes, error)
func (*FutureMarginTypeApi) MarginType ¶
func (api *FutureMarginTypeApi) MarginType(MarginType string) *FutureMarginTypeApi
func (*FutureMarginTypeApi) RecvWindow ¶
func (api *FutureMarginTypeApi) RecvWindow(RecvWindow int64) *FutureMarginTypeApi
func (*FutureMarginTypeApi) Symbol ¶
func (api *FutureMarginTypeApi) Symbol(Symbol string) *FutureMarginTypeApi
func (*FutureMarginTypeApi) Timestamp ¶
func (api *FutureMarginTypeApi) Timestamp(Timestamp int64) *FutureMarginTypeApi
type FutureMarginTypeReq ¶
type FutureMarginTypeReq struct { Symbol *string `json:"symbol"` //YES 交易对 MarginType *string `json:"marginType"` //YES 保证金模式 ISOLATED(逐仓), CROSSED(全仓) RecvWindow *int64 `json:"recvWindow"` Timestamp *int64 `json:"timestamp"` }
FutureMarginType
type FutureMarginTypeRes ¶
type FutureMarginTypeRes FutureCommonPostRes
type FutureMultiAssetsMarginGetApi ¶
type FutureMultiAssetsMarginGetApi struct {
// contains filtered or unexported fields
}
func (*FutureMultiAssetsMarginGetApi) Do ¶
func (api *FutureMultiAssetsMarginGetApi) Do() (*FutureMultiAssetsMarginGetRes, error)
func (*FutureMultiAssetsMarginGetApi) RecvWindow ¶
func (api *FutureMultiAssetsMarginGetApi) RecvWindow(RecvWindow int64) *FutureMultiAssetsMarginGetApi
func (*FutureMultiAssetsMarginGetApi) Timestamp ¶
func (api *FutureMultiAssetsMarginGetApi) Timestamp(Timestamp int64) *FutureMultiAssetsMarginGetApi
type FutureMultiAssetsMarginGetReq ¶
type FutureMultiAssetsMarginGetReq struct { RecvWindow *int64 `json:"recvWindow"` Timestamp *int64 `json:"timestamp"` }
FutureMultiAssetsMarginGet
type FutureMultiAssetsMarginGetRes ¶
type FutureMultiAssetsMarginGetRes struct {
MultiAssetsMargin bool `json:"multiAssetsMargin"` // "true": 联合保证金模式开启;"false": 联合保证金模式关闭
}
type FutureMultiAssetsMarginPostApi ¶
type FutureMultiAssetsMarginPostApi struct {
// contains filtered or unexported fields
}
func (*FutureMultiAssetsMarginPostApi) Do ¶
func (api *FutureMultiAssetsMarginPostApi) Do() (*FutureMultiAssetsMarginPostRes, error)
func (*FutureMultiAssetsMarginPostApi) MultiAssetsMargin ¶
func (api *FutureMultiAssetsMarginPostApi) MultiAssetsMargin(MultiAssetsMargin string) *FutureMultiAssetsMarginPostApi
func (*FutureMultiAssetsMarginPostApi) RecvWindow ¶
func (api *FutureMultiAssetsMarginPostApi) RecvWindow(RecvWindow int64) *FutureMultiAssetsMarginPostApi
func (*FutureMultiAssetsMarginPostApi) Timestamp ¶
func (api *FutureMultiAssetsMarginPostApi) Timestamp(Timestamp int64) *FutureMultiAssetsMarginPostApi
type FutureMultiAssetsMarginPostReq ¶
type FutureMultiAssetsMarginPostReq struct { MultiAssetsMargin *string `json:"multiAssetsMargin"` //YES "true": 联合保证金模式开启;"false": 联合保证金模式关闭 RecvWindow *int64 `json:"recvWindow"` Timestamp *int64 `json:"timestamp"` }
FutureMultiAssetsMarginPost
type FutureMultiAssetsMarginPostRes ¶
type FutureMultiAssetsMarginPostRes FutureCommonPostRes
type FutureOpenOrdersApi ¶
type FutureOpenOrdersApi struct {
// contains filtered or unexported fields
}
func (*FutureOpenOrdersApi) Do ¶
func (api *FutureOpenOrdersApi) Do() (*FutureOpenOrdersRes, error)
func (*FutureOpenOrdersApi) RecvWindow ¶
func (api *FutureOpenOrdersApi) RecvWindow(RecvWindow int64) *FutureOpenOrdersApi
func (*FutureOpenOrdersApi) Symbol ¶
func (api *FutureOpenOrdersApi) Symbol(Symbol string) *FutureOpenOrdersApi
func (*FutureOpenOrdersApi) Timestamp ¶
func (api *FutureOpenOrdersApi) Timestamp(Timestamp int64) *FutureOpenOrdersApi
type FutureOpenOrdersReq ¶
type FutureOpenOrdersRes ¶
type FutureOpenOrdersRes []FutureOrderOrder
type FutureOrderDeleteApi ¶
type FutureOrderDeleteApi struct {
// contains filtered or unexported fields
}
func (*FutureOrderDeleteApi) Do ¶
func (api *FutureOrderDeleteApi) Do() (*FutureOrderDeleteRes, error)
func (*FutureOrderDeleteApi) OrderId ¶
func (api *FutureOrderDeleteApi) OrderId(OrderId int64) *FutureOrderDeleteApi
func (*FutureOrderDeleteApi) OrigClientOrderId ¶
func (api *FutureOrderDeleteApi) OrigClientOrderId(OrigClientOrderId string) *FutureOrderDeleteApi
func (*FutureOrderDeleteApi) RecvWindow ¶
func (api *FutureOrderDeleteApi) RecvWindow(RecvWindow int64) *FutureOrderDeleteApi
func (*FutureOrderDeleteApi) Symbol ¶
func (api *FutureOrderDeleteApi) Symbol(Symbol string) *FutureOrderDeleteApi
func (*FutureOrderDeleteApi) Timestamp ¶
func (api *FutureOrderDeleteApi) Timestamp(Timestamp int64) *FutureOrderDeleteApi
type FutureOrderDeleteReq ¶
type FutureOrderDeleteReq struct { Symbol *string `json:"symbol"` //YES 交易对 OrderId *int64 `json:"orderId,omitempty"` //NO 系统订单号 OrigClientOrderId *string `json:"origClientOrderId,omitempty"` //NO 用户自定义的订单号 RecvWindow *int64 `json:"recvWindow,omitempty"` //NO Timestamp *int64 `json:"timestamp"` //YES }
type FutureOrderDeleteRes ¶
type FutureOrderDeleteRes struct { BinanceErrorRes FutureOrderOrder }
type FutureOrderGetApi ¶
type FutureOrderGetApi struct {
// contains filtered or unexported fields
}
func (*FutureOrderGetApi) Do ¶
func (api *FutureOrderGetApi) Do() (*FutureOrderGetRes, error)
func (*FutureOrderGetApi) OrderId ¶
func (api *FutureOrderGetApi) OrderId(OrderId int64) *FutureOrderGetApi
func (*FutureOrderGetApi) OrigClientOrderId ¶
func (api *FutureOrderGetApi) OrigClientOrderId(OrigClientOrderId string) *FutureOrderGetApi
func (*FutureOrderGetApi) RecvWindow ¶
func (api *FutureOrderGetApi) RecvWindow(RecvWindow int64) *FutureOrderGetApi
func (*FutureOrderGetApi) Symbol ¶
func (api *FutureOrderGetApi) Symbol(Symbol string) *FutureOrderGetApi
func (*FutureOrderGetApi) Timestamp ¶
func (api *FutureOrderGetApi) Timestamp(Timestamp int64) *FutureOrderGetApi
type FutureOrderGetReq ¶
type FutureOrderGetReq struct { Symbol *string `json:"symbol"` //YES 交易对 OrderId *int64 `json:"orderId,omitempty"` //NO 系统订单号 OrigClientOrderId *string `json:"origClientOrderId,omitempty"` //NO 用户自定义的订单号 RecvWindow *int64 `json:"recvWindow,omitempty"` //NO Timestamp *int64 `json:"timestamp"` //YES }
type FutureOrderGetRes ¶
type FutureOrderGetRes FutureOrderOrder
type FutureOrderOrder ¶
type FutureOrderOrder struct { AvgPrice string `json:"avgPrice"` // 平均成交价 ClientOrderId string `json:"clientOrderId"` // 用户自定义的订单号 CumQuote string `json:"cumQuote"` // 成交金额 ExecutedQty string `json:"executedQty"` // 成交量 OrderId int64 `gorm:"primaryKey" json:"orderId"` // 系统订单号 OrigQty string `json:"origQty"` // 原始委托数量 OrigType string `json:"origType"` // 触发前订单类型 Price string `json:"price"` // 委托价格 ReduceOnly bool `json:"reduceOnly"` // 是否仅减仓 Side string `json:"side"` // 买卖方向 Status string `json:"status"` // 订单状态 PositionSide string `json:"positionSide"` // 持仓方向 StopPrice string `json:"stopPrice"` // 触发价,对`TRAILING_STOP_MARKET`无效 ClosePosition bool `json:"closePosition"` // 是否条件全平仓 Symbol string `json:"symbol"` // 交易对 Time int64 `json:"time"` // 订单时间 TimeInForce string `json:"timeInForce"` // 有效方法 Type string `json:"type"` // 订单类型 ActivatePrice string `json:"activatePrice"` // 跟踪止损激活价格, 仅`TRAILING_STOP_MARKET` 订单返回此字段 PriceRate string `json:"priceRate"` // 跟踪止损回调比例, 仅`TRAILING_STOP_MARKET` 订单返回此字段 UpdateTime int64 `json:"updateTime"` // 更新时间 WorkingType string `json:"workingType"` // 条件价格触发类型 PriceProtect bool `json:"priceProtect"` // 是否开启条件单触发保护 }
type FutureOrderPostApi ¶
type FutureOrderPostApi struct {
// contains filtered or unexported fields
}
func (*FutureOrderPostApi) ActivationPrice ¶
func (api *FutureOrderPostApi) ActivationPrice(ActivationPrice decimal.Decimal) *FutureOrderPostApi
func (*FutureOrderPostApi) CallbackRate ¶
func (api *FutureOrderPostApi) CallbackRate(CallbackRate decimal.Decimal) *FutureOrderPostApi
func (*FutureOrderPostApi) ClosePosition ¶
func (api *FutureOrderPostApi) ClosePosition(ClosePosition string) *FutureOrderPostApi
func (*FutureOrderPostApi) Do ¶
func (api *FutureOrderPostApi) Do() (*FutureOrderPostRes, error)
func (*FutureOrderPostApi) NewClientOrderId ¶
func (api *FutureOrderPostApi) NewClientOrderId(NewClientOrderId string) *FutureOrderPostApi
func (*FutureOrderPostApi) NewOrderRespType ¶
func (api *FutureOrderPostApi) NewOrderRespType(NewOrderRespType string) *FutureOrderPostApi
func (*FutureOrderPostApi) PositionSide ¶
func (api *FutureOrderPostApi) PositionSide(PositionSide string) *FutureOrderPostApi
func (*FutureOrderPostApi) Price ¶
func (api *FutureOrderPostApi) Price(Price decimal.Decimal) *FutureOrderPostApi
func (*FutureOrderPostApi) PriceProtect ¶
func (api *FutureOrderPostApi) PriceProtect(PriceProtect string) *FutureOrderPostApi
func (*FutureOrderPostApi) Quantity ¶
func (api *FutureOrderPostApi) Quantity(Quantity decimal.Decimal) *FutureOrderPostApi
func (*FutureOrderPostApi) RecvWindow ¶
func (api *FutureOrderPostApi) RecvWindow(RecvWindow int64) *FutureOrderPostApi
func (*FutureOrderPostApi) ReduceOnly ¶
func (api *FutureOrderPostApi) ReduceOnly(ReduceOnly string) *FutureOrderPostApi
func (*FutureOrderPostApi) Side ¶
func (api *FutureOrderPostApi) Side(Side string) *FutureOrderPostApi
func (*FutureOrderPostApi) StopPrice ¶
func (api *FutureOrderPostApi) StopPrice(StopPrice decimal.Decimal) *FutureOrderPostApi
func (*FutureOrderPostApi) Symbol ¶
func (api *FutureOrderPostApi) Symbol(Symbol string) *FutureOrderPostApi
func (*FutureOrderPostApi) TimeInForce ¶
func (api *FutureOrderPostApi) TimeInForce(TimeInForce string) *FutureOrderPostApi
func (*FutureOrderPostApi) Timestamp ¶
func (api *FutureOrderPostApi) Timestamp(Timestamp int64) *FutureOrderPostApi
func (*FutureOrderPostApi) Type ¶
func (api *FutureOrderPostApi) Type(Type string) *FutureOrderPostApi
func (*FutureOrderPostApi) WorkingType ¶
func (api *FutureOrderPostApi) WorkingType(WorkingType string) *FutureOrderPostApi
type FutureOrderPostReq ¶
type FutureOrderPostReq struct { Symbol *string `json:"symbol"` //Yes 交易对 Side *string `json:"side"` //Yes 买卖方向 SELL, BUY PositionSide *string `json:"positionSide,omitempty"` //No 持仓方向,单向持仓模式下非必填,默认且仅可填BOTH;在双向持仓模式下必填,且仅可选择 LONG 或 SHORT Type *string `json:"type"` //Yes 订单类型 LIMIT, MARKET, STOP, TAKE_PROFIT, STOP_MARKET, TAKE_PROFIT_MARKET, TRAILING_STOP_MARKET ReduceOnly *string `json:"reduceOnly,omitempty"` //No true, false; 非双开模式下默认false;双开模式下不接受此参数; 使用closePosition不支持此参数。 Quantity *decimal.Decimal `json:"quantity,omitempty"` //No 下单数量,使用closePosition不支持此参数。 Price *decimal.Decimal `json:"price,omitempty"` //No 委托价格 NewClientOrderId *string `json:"newClientOrderId,omitempty"` //No 用户自定义的订单号,不可以重复出现在挂单中。如空缺系统会自动赋值。必须满足正则规则 ^[\.A-Z\:/a-z0-9_-]{1,36}$ StopPrice *decimal.Decimal `json:"stopPrice,omitempty"` //No 触发价, 仅 STOP, STOP_MARKET, TAKE_PROFIT, TAKE_PROFIT_MARKET 需要此参数 ClosePosition *string `json:"closePosition,omitempty"` //No true, false;触发后全部平仓,仅支持STOP_MARKET和TAKE_PROFIT_MARKET;不与quantity合用;自带只平仓效果,不与reduceOnly 合用 ActivationPrice *decimal.Decimal `json:"activationPrice,omitempty"` //No 追踪止损激活价格,仅TRAILING_STOP_MARKET 需要此参数, 默认为下单当前市场价格(支持不同workingType) CallbackRate *decimal.Decimal `json:"callbackRate,omitempty"` //No 追踪止损回调比例,可取值范围[0.1, 5],其中 1代表1% ,仅TRAILING_STOP_MARKET 需要此参数 TimeInForce *string `json:"timeInForce,omitempty"` //No 有效方法 WorkingType *string `json:"workingType,omitempty"` //No stopPrice 触发类型: MARK_PRICE(标记价格), CONTRACT_PRICE(合约最新价). 默认 CONTRACT_PRICE PriceProtect *string `json:"priceProtect,omitempty"` //No 条件单触发保护:"TRUE","FALSE", 默认"FALSE". 仅 STOP, STOP_MARKET, TAKE_PROFIT, TAKE_PROFIT_MARKET 需要此参数 NewOrderRespType *string `json:"newOrderRespType,omitempty"` //No "ACK", "RESULT", 默认 "ACK" RecvWindow *int64 `json:"recvWindow,omitempty"` //No Timestamp *int64 `json:"timestamp,omitempty"` //Yes }
type FutureOrderPostRes ¶
type FutureOrderPostRes struct { ClientOrderId string `json:"clientOrderId"` // 用户自定义的订单号 CumQty string `json:"cumQty"` CumQuote string `json:"cumQuote"` // 成交金额 ExecutedQty string `json:"executedQty"` OrderId int64 `json:"orderId"` // 系统订单号 AvgPrice string `json:"avgPrice"` OrigQty string `json:"origQty"` // 原始委托数量 Price string `json:"price"` // 委托价格 ReduceOnly bool `json:"reduceOnly"` Side string `json:"side"` // 买卖方向 PositionSide string `json:"positionSide"` // 持仓方向 Status string `json:"status"` // 订单状态 StopPrice string `json:"stopPrice"` // 触发价,对`TRAILING_STOP_MARKET`无效 ClosePosition bool `json:"closePosition"` Symbol string `json:"symbol"` // 交易对 TimeInForce string `json:"timeInForce"` // 有效方法 Type string `json:"type"` // 订单类型 OrigType string `json:"origType"` // 触发前订单类型 }
type FutureOrderPostResRow ¶
type FutureOrderPostResRow struct { BinanceErrorRes FutureOrderPostRes }
type FutureOrderPutApi ¶
type FutureOrderPutApi struct {
// contains filtered or unexported fields
}
func (*FutureOrderPutApi) Do ¶
func (api *FutureOrderPutApi) Do() (*FutureOrderPutRes, error)
func (*FutureOrderPutApi) OrderId ¶
func (api *FutureOrderPutApi) OrderId(OrderId int64) *FutureOrderPutApi
func (*FutureOrderPutApi) OrigClientOrderId ¶
func (api *FutureOrderPutApi) OrigClientOrderId(OrigClientOrderId string) *FutureOrderPutApi
func (*FutureOrderPutApi) Price ¶
func (api *FutureOrderPutApi) Price(Price decimal.Decimal) *FutureOrderPutApi
func (*FutureOrderPutApi) PriceMatch ¶
func (api *FutureOrderPutApi) PriceMatch(PriceMatch string) *FutureOrderPutApi
func (*FutureOrderPutApi) Quantity ¶
func (api *FutureOrderPutApi) Quantity(Quantity decimal.Decimal) *FutureOrderPutApi
func (*FutureOrderPutApi) RecvWindow ¶
func (api *FutureOrderPutApi) RecvWindow(RecvWindow int64) *FutureOrderPutApi
func (*FutureOrderPutApi) Side ¶
func (api *FutureOrderPutApi) Side(Side string) *FutureOrderPutApi
func (*FutureOrderPutApi) Symbol ¶
func (api *FutureOrderPutApi) Symbol(Symbol string) *FutureOrderPutApi
func (*FutureOrderPutApi) Timestamp ¶
func (api *FutureOrderPutApi) Timestamp(Timestamp int64) *FutureOrderPutApi
type FutureOrderPutReq ¶
type FutureOrderPutReq struct { Symbol *string `json:"symbol"` //YES 交易对 OrderId *string `json:"orderId,omitempty"` //NO 系统订单号 OrigClientOrderId *string `json:"origClientOrderId,omitempty"` //NO 用户自定义的订单号 Side *string `json:"side"` //YES 买卖方向 SELL, BUY; side需要和原订单相同 Quantity *decimal.Decimal `json:"quantity"` //YES 下单数量,使用closePosition不支持此参数。 Price *decimal.Decimal `json:"price"` //YES 委托价格 PriceMatch *string `json:"priceMatch,omitempty"` //NO OPPONENT/ OPPONENT_5/ OPPONENT_10/ OPPONENT_20/QUEUE/ QUEUE_5/ QUEUE_10/ QUEUE_20;不能与price同时传 RecvWindow *int64 `json:"recvWindow,omitempty"` //NO Timestamp *int64 `json:"timestamp,omitempty"` //YES }
type FutureOrderPutRes ¶
type FutureOrderPutRes FutureOrderPostRes
type FuturePingApi ¶
type FuturePingApi struct {
// contains filtered or unexported fields
}
func (*FuturePingApi) Do ¶
func (api *FuturePingApi) Do() (*FuturePingRes, error)
type FuturePingReq ¶
type FuturePingReq struct { }
type FuturePingRes ¶
type FuturePingRes struct { }
type FuturePositionRiskApi ¶
type FuturePositionRiskApi struct {
// contains filtered or unexported fields
}
func (*FuturePositionRiskApi) Do ¶
func (api *FuturePositionRiskApi) Do() (*FuturePositionRiskRes, error)
func (*FuturePositionRiskApi) RecvWindow ¶
func (api *FuturePositionRiskApi) RecvWindow(RecvWindow int64) *FuturePositionRiskApi
func (*FuturePositionRiskApi) Symbol ¶
func (api *FuturePositionRiskApi) Symbol(Symbol string) *FuturePositionRiskApi
func (*FuturePositionRiskApi) Timestamp ¶
func (api *FuturePositionRiskApi) Timestamp(Timestamp int64) *FuturePositionRiskApi
type FuturePositionRiskReq ¶
type FuturePositionRiskRes ¶
type FuturePositionRiskRes []FuturePositionRiskRow
type FuturePositionRiskRow ¶
type FuturePositionRiskRow struct { EntryPrice string `json:"entryPrice"` //开仓均价 BreakEvenPrice string `json:"breakEvenPrice"` //盈亏平衡价 MarginType string `json:"marginType"` //逐仓模式或全仓模式 IsAutoAddMargin string `json:"isAutoAddMargin"` //是否自动追加保证金 IsolatedMargin string `json:"isolatedMargin"` //逐仓保证金 Leverage string `json:"leverage"` //当前杠杆倍数 LiquidationPrice string `json:"liquidationPrice"` //参考强平价格 MarkPrice string `json:"markPrice"` //当前标记价格 MaxNotionalValue string `json:"maxNotionalValue"` //当前杠杆倍数允许的名义价值上限 PositionAmt string `json:"positionAmt"` //头寸数量,符号代表多空方向, 正数为多,负数为空 Notional string `json:"notional"` //名义价值 IsolatedWallet string `json:"isolatedWallet"` //逐仓钱包余额 Symbol string `json:"symbol"` //交易对 UnRealizedProfit string `json:"unRealizedProfit"` //持仓未实现盈亏 PositionSide string `json:"positionSide"` //持仓方向 UpdateTime int64 `json:"updateTime"` //更新时间 }
type FuturePositionSideDualGetApi ¶
type FuturePositionSideDualGetApi struct {
// contains filtered or unexported fields
}
func (*FuturePositionSideDualGetApi) Do ¶
func (api *FuturePositionSideDualGetApi) Do() (*FuturePositionSideDualGetRes, error)
func (*FuturePositionSideDualGetApi) RecvWindow ¶
func (api *FuturePositionSideDualGetApi) RecvWindow(RecvWindow int64) *FuturePositionSideDualGetApi
func (*FuturePositionSideDualGetApi) Timestamp ¶
func (api *FuturePositionSideDualGetApi) Timestamp(Timestamp int64) *FuturePositionSideDualGetApi
type FuturePositionSideDualGetReq ¶
type FuturePositionSideDualGetReq struct { RecvWindow *int64 `json:"recvWindow"` Timestamp *int64 `json:"timestamp"` }
FuturePositionSideDualGet
type FuturePositionSideDualGetRes ¶
type FuturePositionSideDualGetRes struct {
DualSidePosition bool `json:"dualSidePosition"` // "true": 双向持仓模式;"false": 单向持仓模式
}
type FuturePositionSideDualPostApi ¶
type FuturePositionSideDualPostApi struct {
// contains filtered or unexported fields
}
func (*FuturePositionSideDualPostApi) Do ¶
func (api *FuturePositionSideDualPostApi) Do() (*FuturePositionSideDualPostRes, error)
func (*FuturePositionSideDualPostApi) DualSidePosition ¶
func (api *FuturePositionSideDualPostApi) DualSidePosition(DualSidePosition string) *FuturePositionSideDualPostApi
func (*FuturePositionSideDualPostApi) RecvWindow ¶
func (api *FuturePositionSideDualPostApi) RecvWindow(RecvWindow int64) *FuturePositionSideDualPostApi
func (*FuturePositionSideDualPostApi) Timestamp ¶
func (api *FuturePositionSideDualPostApi) Timestamp(Timestamp int64) *FuturePositionSideDualPostApi
type FuturePositionSideDualPostReq ¶
type FuturePositionSideDualPostReq struct { DualSidePosition *string `json:"dualSidePosition"` //YES "true": 双向持仓模式;"false": 单向持仓模式 RecvWindow *int64 `json:"recvWindow"` Timestamp *int64 `json:"timestamp"` }
FuturePositionSideDualPost
type FuturePositionSideDualPostRes ¶
type FuturePositionSideDualPostRes FutureCommonPostRes
type FuturePremiumIndexApi ¶
type FuturePremiumIndexApi struct {
// contains filtered or unexported fields
}
func (*FuturePremiumIndexApi) Do ¶
func (api *FuturePremiumIndexApi) Do() (*FuturePremiumIndexRes, error)
func (*FuturePremiumIndexApi) Symbol ¶
func (api *FuturePremiumIndexApi) Symbol(Symbol string) *FuturePremiumIndexApi
NO 交易对
type FuturePremiumIndexReq ¶
type FuturePremiumIndexReq struct {
Symbol *string `json:"symbol"` //NO 交易对
}
symbol STRING NO 交易对
type FuturePremiumIndexRes ¶
type FuturePremiumIndexRes []FuturePremiumIndexResRow
type FuturePremiumIndexResRow ¶
type FuturePremiumIndexResRow struct { Symbol string `json:"symbol"` // 交易对 MarkPrice string `json:"markPrice"` // 标记价格 IndexPrice string `json:"indexPrice"` // 指数价格 EstimatedSettlePrice string `json:"estimatedSettlePrice"` // 预估结算价,仅在交割开始前最后一小时有意义 LastFundingRate string `json:"lastFundingRate"` // 最近更新的资金费率 NextFundingTime int64 `json:"nextFundingTime"` // 下次资金费时间 InterestRate string `json:"interestRate"` // 标的资产基础利率 Time int64 `json:"time"` // 更新时间 }
type FutureRestClient ¶
type FutureRestClient RestClient
func (*FutureRestClient) NewAllOrders ¶
func (client *FutureRestClient) NewAllOrders() *FutureAllOrdersApi
binance FUTURE FutureAllOrders rest查询所有订单 (USER_DATA)
func (*FutureRestClient) NewExchangeInfo ¶
func (client *FutureRestClient) NewExchangeInfo() *FutureExchangeInfoApi
binance FUTURE FutureExchangeInfo rest交易规范信息和交易对信息 (NONE)
func (*FutureRestClient) NewFutureAccount ¶
func (client *FutureRestClient) NewFutureAccount() *FutureAccountApi
账户接口 binance FUTURE FutureAccount rest账户信息 (USER_DATA)
func (*FutureRestClient) NewFutureAggTrades ¶
func (client *FutureRestClient) NewFutureAggTrades() *FutureAggTradesApi
binance FUTURE FutureAggTrades rest近期成交(归集) (MARKET_DATA)
func (*FutureRestClient) NewFutureBatchOrdersDelete ¶
func (client *FutureRestClient) NewFutureBatchOrdersDelete() *FutureBatchOrdersDeleteApi
binance FUTURE FutureBatchOrdersDelete rest批量撤销订单 (TRADE)
func (*FutureRestClient) NewFutureBatchOrdersPost ¶
func (client *FutureRestClient) NewFutureBatchOrdersPost() *FutureBatchOrdersPostApi
binance FUTURE FutureBatchOrdersPost rest批量下单 (TRADE)
func (*FutureRestClient) NewFutureBatchOrdersPut ¶
func (client *FutureRestClient) NewFutureBatchOrdersPut() *FutureBatchOrdersPutApi
binance FUTURE FutureBatchOrdersPut rest批量修改订单 (TRADE)
func (*FutureRestClient) NewFutureCommissionRate ¶
func (client *FutureRestClient) NewFutureCommissionRate() *FutureCommissionRateApi
binance FUTURE FutureCommissionRate rest查询用户当前的手续费率 (USER_DATA)
func (*FutureRestClient) NewFutureDataBasis ¶
func (client *FutureRestClient) NewFutureDataBasis() *FutureDataBasisApi
binance FUTURE FutureDataBasis rest基差数据 (MARKET_DATA)
func (*FutureRestClient) NewFutureDepth ¶
func (client *FutureRestClient) NewFutureDepth() *FutureDepthApi
binance FUTURE FutureDepth rest深度信息 (MARKET_DATA)
func (*FutureRestClient) NewFutureFundingInfo ¶
func (client *FutureRestClient) NewFutureFundingInfo() *FutureFundingInfoApi
binance FUTURE FutureFundingInfo rest查询资金费率信息 (MARKET_DATA)
func (*FutureRestClient) NewFutureFundingRate ¶
func (client *FutureRestClient) NewFutureFundingRate() *FutureFundingRateApi
binance FUTURE FutureFundingRate rest查询资金费率历史 (MARKET_DATA)
func (*FutureRestClient) NewFutureHistoricalTrades ¶
func (client *FutureRestClient) NewFutureHistoricalTrades() *FutureHistoricalTradesApi
binance FUTURE FutureHistoricalTrades rest历史成交 (MARKET_DATA)
func (*FutureRestClient) NewFutureKlines ¶
func (client *FutureRestClient) NewFutureKlines() *FutureKlinesApi
行情接口 binance FUTURE FutureKlines restK线数据 (MARKET_DATA)
func (*FutureRestClient) NewFutureLeverage ¶
func (client *FutureRestClient) NewFutureLeverage() *FutureLeverageApi
binance FUTURE FutureLeverage rest调整开仓杠杆 (TRADE)
func (*FutureRestClient) NewFutureLeverageBracket ¶
func (client *FutureRestClient) NewFutureLeverageBracket() *FutureLeverageBracketApi
binance FUTURE FutureLeverageBracket rest杠杆分层标准 (USER_DATA)
func (*FutureRestClient) NewFutureListenKeyDelete ¶
func (client *FutureRestClient) NewFutureListenKeyDelete() *FutureListenKeyDeleteApi
binance FUTURE FutureListenKeyDelete rest关闭listenKey (USER_STREAM)
func (*FutureRestClient) NewFutureListenKeyPost ¶
func (client *FutureRestClient) NewFutureListenKeyPost() *FutureListenKeyPostApi
Ws账户推送相关 binance FUTURE FutureListenKeyPost rest生成listenKey (USER_STREAM)
func (*FutureRestClient) NewFutureListenKeyPut ¶
func (client *FutureRestClient) NewFutureListenKeyPut() *FutureListenKeyPutApi
binance FUTURE FutureListenKeyPut rest延长listenKey有效期 (USER_STREAM)
func (*FutureRestClient) NewFutureMarginType ¶
func (client *FutureRestClient) NewFutureMarginType() *FutureMarginTypeApi
binance FUTURE FutureMarginType rest变换逐全仓模式 (TRADE)
func (*FutureRestClient) NewFutureMultiAssetsMarginGet ¶
func (client *FutureRestClient) NewFutureMultiAssetsMarginGet() *FutureMultiAssetsMarginGetApi
binance FUTURE FutureMultiAssetsMarginGet rest查询联合保证金模式 (USER_DATA)
func (*FutureRestClient) NewFutureMultiAssetsMarginPost ¶
func (client *FutureRestClient) NewFutureMultiAssetsMarginPost() *FutureMultiAssetsMarginPostApi
binance FUTURE FutureMultiAssetsMarginPost rest更改联合保证金模式 (TRADE)
func (*FutureRestClient) NewFutureOrderDelete ¶
func (client *FutureRestClient) NewFutureOrderDelete() *FutureOrderDeleteApi
binance FUTURE FutureOrderDelete rest撤销订单 (TRADE)
func (*FutureRestClient) NewFutureOrderGet ¶
func (client *FutureRestClient) NewFutureOrderGet() *FutureOrderGetApi
binance FUTURE FutureOrderGet rest查询订单 (USER_DATA)
func (*FutureRestClient) NewFutureOrderPost ¶
func (client *FutureRestClient) NewFutureOrderPost() *FutureOrderPostApi
binance FUTURE FutureOrderPost rest下单 (TRADE)
func (*FutureRestClient) NewFutureOrderPut ¶
func (client *FutureRestClient) NewFutureOrderPut() *FutureOrderPutApi
binance FUTURE FutureOrderPut rest修改订单 (TRADE)
func (*FutureRestClient) NewFuturePositionRisk ¶
func (client *FutureRestClient) NewFuturePositionRisk() *FuturePositionRiskApi
binance FUTURE FuturePositionRisk rest用户持仓风险V2 (USER_DATA)
func (*FutureRestClient) NewFuturePositionSideDualGet ¶
func (client *FutureRestClient) NewFuturePositionSideDualGet() *FuturePositionSideDualGetApi
binance FUTURE FuturePositionSideDualGet rest查询持仓模式 (USER_DATA)
func (*FutureRestClient) NewFuturePositionSideDualPost ¶
func (client *FutureRestClient) NewFuturePositionSideDualPost() *FuturePositionSideDualPostApi
binance FUTURE FuturePositionSideDualPost rest更改持仓模式 (TRADE)
func (*FutureRestClient) NewFuturePremiumIndex ¶
func (client *FutureRestClient) NewFuturePremiumIndex() *FuturePremiumIndexApi
binance FUTURE FuturePremiumIndex rest最新标记价格和资金费率 (MARKET_DATA)
func (*FutureRestClient) NewFutureTicker24hr ¶
func (client *FutureRestClient) NewFutureTicker24hr() *FutureTicker24hrApi
binance FUTURE FutureTicker24hr rest24hr价格变动情况 (MARKET_DATA)
func (*FutureRestClient) NewFutureTickerBookTicker ¶
func (client *FutureRestClient) NewFutureTickerBookTicker() *FutureTickerBookTickerApi
binance FUTURE FutureTickerBookTicker rest当前最优挂单 (MARKET_DATA)
func (*FutureRestClient) NewFutureTickerPrice ¶
func (client *FutureRestClient) NewFutureTickerPrice() *FutureTickerPriceApi
binance FUTURE FutureTickerPrice rest最新价格 (MARKET_DATA)
func (*FutureRestClient) NewFutureTrades ¶
func (client *FutureRestClient) NewFutureTrades() *FutureTradesApi
binance FUTURE FutureTrades rest最新成交 (MARKET_DATA)
func (*FutureRestClient) NewFutureUserTrades ¶
func (client *FutureRestClient) NewFutureUserTrades() *FutureUserTradesApi
binance FUTURE FutureUserTrades rest账户成交历史 (USER_DATA)
func (*FutureRestClient) NewOpenOrders ¶
func (client *FutureRestClient) NewOpenOrders() *FutureOpenOrdersApi
交易接口 binance FUTURE FutureOpenOrders rest查询当前挂单 (USER_DATA)
func (*FutureRestClient) NewPing ¶
func (client *FutureRestClient) NewPing() *FuturePingApi
通用接口 binance FUTURE FuturePing rest测试服务器连通性 (NONE)
func (*FutureRestClient) NewServerTime ¶
func (client *FutureRestClient) NewServerTime() *FutureServerTimeApi
binance FUTURE FutureTime rest获取服务器时间 (NONE)
type FutureServerTimeApi ¶
type FutureServerTimeApi struct {
// contains filtered or unexported fields
}
func (*FutureServerTimeApi) Do ¶
func (api *FutureServerTimeApi) Do() (*FutureTimeRes, error)
type FutureServerTimeReq ¶
type FutureServerTimeReq struct { }
type FutureTicker24hrApi ¶
type FutureTicker24hrApi struct {
// contains filtered or unexported fields
}
func (*FutureTicker24hrApi) Do ¶
func (api *FutureTicker24hrApi) Do() (*FutureTicker24hrRes, error)
func (*FutureTicker24hrApi) Symbol ¶
func (api *FutureTicker24hrApi) Symbol(Symbol string) *FutureTicker24hrApi
NO 交易对
type FutureTicker24hrReq ¶
type FutureTicker24hrReq struct {
Symbol *string `json:"symbol"` //NO 交易对
}
symbol STRING NO 交易对
type FutureTicker24hrRes ¶
type FutureTicker24hrRes []FutureTicker24hrResRow
type FutureTicker24hrResRow ¶
type FutureTicker24hrResRow struct { Symbol string `json:"symbol"` // 交易对 PriceChange string `json:"priceChange"` // 24小时价格变动 PriceChangePercent string `json:"priceChangePercent"` // 24小时价格变动百分比 WeightedAvgPrice string `json:"weightedAvgPrice"` // 加权平均价 LastPrice string `json:"lastPrice"` // 最近一次成交价 LastQty string `json:"lastQty"` // 最近一次成交额 OpenPrice string `json:"openPrice"` // 24小时内第一次成交的价格 HighPrice string `json:"highPrice"` // 24小时最高价 LowPrice string `json:"lowPrice"` // 24小时最低价 Volume string `json:"volume"` // 24小时成交量 QuoteVolume string `json:"quoteVolume"` // 24小时成交额 OpenTime int64 `json:"openTime"` // 24小时内,第一笔交易的发生时间 CloseTime int64 `json:"closeTime"` // 24小时内,最后一笔交易的发生时间 FirstId int64 `json:"firstId"` // 首笔成交id LastId int64 `json:"lastId"` // 末笔成交id Count int64 `json:"count"` // 成交笔数 }
type FutureTickerBookTickerApi ¶
type FutureTickerBookTickerApi struct {
// contains filtered or unexported fields
}
func (*FutureTickerBookTickerApi) Do ¶
func (api *FutureTickerBookTickerApi) Do() (*FutureTickerBookTickerRes, error)
func (*FutureTickerBookTickerApi) Symbol ¶
func (api *FutureTickerBookTickerApi) Symbol(Symbol string) *FutureTickerBookTickerApi
NO 交易对
type FutureTickerBookTickerReq ¶
type FutureTickerBookTickerReq struct {
Symbol *string `json:"symbol"` //NO 交易对
}
type FutureTickerBookTickerRes ¶
type FutureTickerBookTickerRes []FutureTickerBookTickerResRow
type FutureTickerBookTickerResRow ¶
type FutureTickerBookTickerResRow struct { LastUpdateId int64 `json:"lastUpdateId"` // 最后更新ID Symbol string `json:"symbol"` // 交易对 BidPrice string `json:"bidPrice"` // 最优买单价 BidQty string `json:"bidQty"` // 挂单量 AskPrice string `json:"askPrice"` // 最优卖单价 AskQty string `json:"askQty"` // 挂单量 Time int64 `json:"time"` // 撮合引擎时间 }
type FutureTickerPriceApi ¶
type FutureTickerPriceApi struct {
// contains filtered or unexported fields
}
func (*FutureTickerPriceApi) Do ¶
func (api *FutureTickerPriceApi) Do() (*FutureTickerPriceRes, error)
func (*FutureTickerPriceApi) Symbol ¶
func (api *FutureTickerPriceApi) Symbol(Symbol string) *FutureTickerPriceApi
NO 交易对
type FutureTickerPriceReq ¶
type FutureTickerPriceReq struct {
Symbol *string `json:"symbol"` //NO 交易对
}
symbol STRING NO 交易对
type FutureTickerPriceRes ¶
type FutureTickerPriceRes []FutureTickerPriceResRow
type FutureTickerPriceResRow ¶
type FutureTimeRes ¶
type FutureTimeRes struct {
ServerTime int64 `json:"serverTime"`
}
type FutureTradesApi ¶
type FutureTradesApi struct {
// contains filtered or unexported fields
}
func (*FutureTradesApi) Do ¶
func (api *FutureTradesApi) Do() (*FutureTradesRes, error)
func (*FutureTradesApi) Limit ¶
func (api *FutureTradesApi) Limit(Limit int) *FutureTradesApi
NO 默认:500,最大1000
func (*FutureTradesApi) Symbol ¶
func (api *FutureTradesApi) Symbol(Symbol string) *FutureTradesApi
YES 交易对
type FutureTradesReq ¶
type FutureTradesRes ¶
type FutureTradesRes []FutureTradesResRow
type FutureTradesResRow ¶
type FutureUserTrade ¶
type FutureUserTrade struct { Buyer bool `json:"buyer"` // 是否是买方 Commission string `json:"commission"` // 手续费 CommissionAsset string `json:"commissionAsset"` // 手续费计价单位 Id int64 `json:"id"` // 交易ID Maker bool `json:"maker"` // 是否是挂单方 OrderId int64 `json:"orderId"` // 订单编号 Price string `json:"price"` // 成交价 Qty string `json:"qty"` // 成交量 QuoteQty string `json:"quoteQty"` // 成交额 RealizedPnl string `json:"realizedPnl"` // 实现盈亏 Side string `json:"side"` // 买卖方向 PositionSide string `json:"positionSide"` // 持仓方向 Symbol string `json:"symbol"` // 交易对 Time int64 `json:"time"` // 时间 }
type FutureUserTradesApi ¶
type FutureUserTradesApi struct {
// contains filtered or unexported fields
}
func (*FutureUserTradesApi) Do ¶
func (api *FutureUserTradesApi) Do() (*FutureUserTradesRes, error)
func (*FutureUserTradesApi) EndTime ¶
func (api *FutureUserTradesApi) EndTime(EndTime int64) *FutureUserTradesApi
func (*FutureUserTradesApi) FromId ¶
func (api *FutureUserTradesApi) FromId(FromId int64) *FutureUserTradesApi
func (*FutureUserTradesApi) Limit ¶
func (api *FutureUserTradesApi) Limit(Limit int64) *FutureUserTradesApi
func (*FutureUserTradesApi) OrderId ¶
func (api *FutureUserTradesApi) OrderId(OrderId int64) *FutureUserTradesApi
func (*FutureUserTradesApi) RecvWindow ¶
func (api *FutureUserTradesApi) RecvWindow(RecvWindow int64) *FutureUserTradesApi
func (*FutureUserTradesApi) StartTime ¶
func (api *FutureUserTradesApi) StartTime(StartTime int64) *FutureUserTradesApi
func (*FutureUserTradesApi) Symbol ¶
func (api *FutureUserTradesApi) Symbol(Symbol string) *FutureUserTradesApi
func (*FutureUserTradesApi) Timestamp ¶
func (api *FutureUserTradesApi) Timestamp(Timestamp int64) *FutureUserTradesApi
type FutureUserTradesReq ¶
type FutureUserTradesReq struct { Symbol *string `json:"symbol"` //YES 交易对 OrderId *int64 `json:"orderId"` //NO 必须要和参数symbol一起使用 StartTime *int64 `json:"startTime"` //NO 起始时间 EndTime *int64 `json:"endTime"` //NO 结束时间 FromId *int64 `json:"fromId"` //NO 返回该fromId及之后的成交,缺省返回最近的成交 Limit *int64 `json:"limit"` //NO 返回的结果集数量 默认值:500 最大值:1000. RecvWindow *int64 `json:"recvWindow"` //NO Timestamp *int64 `json:"timestamp"` //YES }
type FutureUserTradesRes ¶
type FutureUserTradesRes []FutureUserTrade
type FutureWsStreamClient ¶
type FutureWsStreamClient struct { WsStreamClient // contains filtered or unexported fields }
func (*FutureWsStreamClient) AmendOrder ¶
func (ws *FutureWsStreamClient) AmendOrder(api *FutureOrderPutApi) (*WsApiResult[FutureOrderPutRes], error)
func (*FutureWsStreamClient) CancelOrder ¶
func (ws *FutureWsStreamClient) CancelOrder(api *FutureOrderDeleteApi) (*WsApiResult[FutureOrderDeleteRes], error)
func (*FutureWsStreamClient) Close ¶
func (ws *FutureWsStreamClient) Close() error
func (*FutureWsStreamClient) ConvertToAccountWs ¶
func (ws *FutureWsStreamClient) ConvertToAccountWs(apiKey string, apiSecret string) (*FutureWsStreamClient, error)
func (*FutureWsStreamClient) ConvertToWsApi ¶
func (ws *FutureWsStreamClient) ConvertToWsApi(apiKey string, apiSecret string) (*FutureWsStreamClient, error)
func (*FutureWsStreamClient) CreateOrder ¶
func (ws *FutureWsStreamClient) CreateOrder(api *FutureOrderPostApi) (*WsApiResult[FutureOrderPostRes], error)
func (*FutureWsStreamClient) CreatePayload ¶
func (ws *FutureWsStreamClient) CreatePayload() (*WsFuturePayload, error)
func (*FutureWsStreamClient) QueryOrder ¶
func (ws *FutureWsStreamClient) QueryOrder(api *FutureOrderGetApi) (*WsApiResult[FutureOrderGetRes], error)
type KlinesMiddle ¶
type KlinesMiddle []KlinesMiddleRow
func (*KlinesMiddle) ConvertToRes ¶
func (klinesMiddle *KlinesMiddle) ConvertToRes() KlinesRes
type KlinesMiddleRow ¶
type KlinesMiddleRow [11]interface{}
type KlinesRes ¶
type KlinesRes []KlinesResRow
type KlinesResRow ¶
type KlinesResRow struct { StartTime int64 `json:"start_time" gorm:"primaryKey"` //开盘时间 Open float64 `json:"open"` //开盘价 High float64 `json:"high"` //最高价 Low float64 `json:"low"` //最低价 Close float64 `json:"close"` //收盘价 Volume float64 `json:"volume"` //成交量 CloseTime int64 `json:"close_time"` //收盘时间 TransactionVolume float64 `json:"transaction_volume"` // 成交额 TransactionNumber int64 `json:"transaction_number"` //成交笔数 BuyTransactionVolume float64 `json:"buy_transaction_volume"` //主动买入成交量 BuyTransactionAmount float64 `json:"buy_transaction_amount"` //主动买入成交额 }
type ManagedSubAccountQueryTransLogRes ¶
type ManagedSubAccountQueryTransLogRes struct {
ManagerSubTransferHistoryVos []ManagerSubTransferHistoryVos `json:"managerSubTransferHistoryVos"`
}
type ManagerSubTransferHistoryVos ¶
type ManagerSubTransferHistoryVos struct { FromEmail string `json:"fromEmail"` FromAccountType string `json:"fromAccountType"` ToEmail string `json:"toEmail"` ToAccountType string `json:"toAccountType"` Asset string `json:"asset"` Amount string `json:"amount"` ScheduledData int64 `json:"scheduledData"` CreateTime int64 `json:"createTime"` Status string `json:"status"` TranId int64 `json:"tranId"` }
type MarginAccountRes ¶
type MarginAccountRes struct { BorrowEnabled bool `json:"borrowEnabled"` MarginLevel string `json:"marginLevel"` TotalAssetOfBtc string `json:"totalAssetOfBtc"` TotalLiabilityOfBtc string `json:"totalLiabilityOfBtc"` TotalNetAssetOfBtc string `json:"totalNetAssetOfBtc"` TradeEnabled bool `json:"tradeEnabled"` TransferEnabled bool `json:"transferEnabled"` UserAssets []MarginAsset `json:"userAssets"` }
type MarginAllOrdersRes ¶
type MarginAllOrdersRes []MarginOrderOrder
type MarginAllPairsRes ¶
type MarginAllPairsRes []MarginPairs
type MarginAsset ¶
type MarginInterestHistoryRes ¶
type MarginInterestHistoryRes struct { Rows []MarginInterestHistoryRow `json:"rows"` Total int `json:"total"` }
type MarginInterestHistoryRow ¶
type MarginInterestHistoryRow struct { TxId int64 `json:"txId"` InterestAccuredTime int64 `json:"interestAccuredTime"` Asset string `json:"asset"` RawAsset string `json:"rawAsset"` Principal string `json:"principal"` Interest string `json:"interest"` InterestRate string `json:"interestRate"` Type string `json:"type"` IsolatedSymbol string `json:"isolatedSymbol"` }
type MarginIsolatedAccountRes ¶
type MarginIsolatedAccountRes struct { Assets []MarginIsolatedAsset `json:"assets"` TotalAssetOfBtc string `json:"totalAssetOfBtc"` TotalLiabilityOfBtc string `json:"totalLiabilityOfBtc"` TotalNetAssetOfBtc string `json:"totalNetAssetOfBtc"` }
type MarginIsolatedAllPairsRes ¶
type MarginIsolatedAllPairsRes []MarginPairs
type MarginIsolatedAsset ¶
type MarginIsolatedAsset struct { BaseAsset MarginIsolatedInnerAsset `json:"baseAsset"` QuoteAsset MarginIsolatedInnerAsset `json:"quoteAsset"` Symbol string `json:"symbol"` IsolatedCreated bool `json:"isolatedCreated"` Enabled bool `json:"enabled"` MarginLevel string `json:"marginLevel"` MarginLevelStatus string `json:"marginLevelStatus"` MarginRatio string `json:"marginRatio"` IndexPrice string `json:"indexPrice"` LiquidatePrice string `json:"liquidatePrice"` LiquidateRate string `json:"liquidateRate"` TradeEnabled bool `json:"tradeEnabled"` }
type MarginIsolatedInnerAsset ¶
type MarginIsolatedInnerAsset struct { Asset string `json:"asset"` BorrowEnabled bool `json:"borrowEnabled"` Borrowed string `json:"borrowed"` Free string `json:"free"` Interest string `json:"interest"` Locked string `json:"locked"` NetAsset string `json:"netAsset"` NetAssetOfBtc string `json:"netAssetOfBtc"` RepayEnabled bool `json:"repayEnabled"` TotalAsset string `json:"totalAsset"` }
type MarginIsolatedTransferRes ¶
type MarginIsolatedTransferRes TranRes
type MarginLoanRes ¶
type MarginLoanRes TranRes
type MarginMaxBorrowableRes ¶
type MarginMaxTransferableRes ¶
type MarginMaxTransferableRes struct {
Amount string `json:"amount"` //用户账户当前最大可转出额度
}
type MarginOpenOrdersRes ¶
type MarginOpenOrdersRes []MarginOrderOrder
type MarginOrderGetRes ¶
type MarginOrderGetRes MarginOrderOrder
type MarginOrderOrder ¶
type MarginOrderOrder struct { ClientOrderId string `json:"clientOrderId"` CummulativeQuoteQty string `json:"cummulativeQuoteQty"` ExecutedQty string `json:"executedQty"` IcebergQty string `json:"icebergQty"` IsWorking bool `json:"isWorking"` OrderId int64 `json:"orderId"` OrigQty string `json:"origQty"` Price string `json:"price"` Side string `json:"side"` Status string `json:"status"` StopPrice string `json:"stopPrice"` Symbol string `json:"symbol"` IsIsolated bool `json:"isIsolated"` Time int64 `json:"time"` TimeInForce string `json:"timeInForce"` Type string `json:"type"` SelfTradePreventionMode string `json:"selfTradePreventionMode"` UpdateTime int64 `json:"updateTime"` }
type MarginPairs ¶
type MarginPairs struct { Base string `json:"base"` //基础币种 Id uint64 `json:"id"` //币种id IsBuyAllowed bool `json:"isBuyAllowed"` //是否允许买入 IsMarginTrade bool `json:"isMarginTrade"` //是否允许杠杆交易 IsSellAllowed bool `json:"isSellAllowed"` //是否允许卖出 Quote string `json:"quote"` //计价币种 Symbol string `json:"symbol"` //交易对 }
type MarginRepayRes ¶
type MarginRepayRes TranRes
type MarginTransferRes ¶
type MarginTransferRes TranRes
type MyBinance ¶
type MyBinance struct { }
func (*MyBinance) NewFutureRestClient ¶
func (*MyBinance) NewFutureRestClient(apiKey string, apiSecret string) *FutureRestClient
func (*MyBinance) NewFutureWsStreamClient ¶
func (*MyBinance) NewFutureWsStreamClient() *FutureWsStreamClient
func (*MyBinance) NewPmCRestClient ¶ added in v1.0.1
func (*MyBinance) NewPmCRestClient(apiKey string, apiSecret string) *PmCRestClient
func (*MyBinance) NewPmCWsStreamClient ¶ added in v1.0.1
func (*MyBinance) NewPmCWsStreamClient() *PmCWsStreamClient
func (*MyBinance) NewPmMRestClient ¶ added in v1.0.1
func (*MyBinance) NewPmMRestClient(apiKey string, apiSecret string) *PmMRestClient
func (*MyBinance) NewPmMWsStreamClient ¶ added in v1.0.1
func (*MyBinance) NewPmMWsStreamClient() *PmMWsStreamClient
func (*MyBinance) NewPmURestClient ¶ added in v1.0.1
func (*MyBinance) NewPmURestClient(apiKey string, apiSecret string) *PmURestClient
zsk修改
func (*MyBinance) NewPmUWsStreamClient ¶ added in v1.0.1
func (*MyBinance) NewPmUWsStreamClient() *PmUWsStreamClient
zsk修改
func (*MyBinance) NewSpotRestClient ¶
func (*MyBinance) NewSpotRestClient(apiKey string, apiSecret string) *SpotRestClient
func (*MyBinance) NewSpotWsStreamClient ¶
func (*MyBinance) NewSpotWsStreamClient() *SpotWsStreamClient
func (*MyBinance) NewSwapRestClient ¶
func (*MyBinance) NewSwapRestClient(apiKey string, apiSecret string) *SwapRestClient
func (*MyBinance) NewSwapWsStreamClient ¶
func (*MyBinance) NewSwapWsStreamClient() *SwapWsStreamClient
type Payload ¶
type Payload[T any] struct { // contains filtered or unexported fields }
func (*Payload[T]) ResultChan ¶
func (p *Payload[T]) ResultChan() chan T
type PmCAccountApi ¶ added in v1.0.1
type PmCAccountApi struct {
// contains filtered or unexported fields
}
func (*PmCAccountApi) Do ¶ added in v1.0.1
func (api *PmCAccountApi) Do() (*PmCAccountRes, error)
func (*PmCAccountApi) RecvWindow ¶ added in v1.0.1
func (api *PmCAccountApi) RecvWindow(RecvWindow int64) *PmCAccountApi
func (*PmCAccountApi) Timestamp ¶ added in v1.0.1
func (api *PmCAccountApi) Timestamp(Timestamp int64) *PmCAccountApi
type PmCAccountBalanceApi ¶ added in v1.0.1
type PmCAccountBalanceApi struct {
// contains filtered or unexported fields
}
func (*PmCAccountBalanceApi) Asset ¶ added in v1.0.1
func (api *PmCAccountBalanceApi) Asset(Asset string) *PmCAccountBalanceApi
func (*PmCAccountBalanceApi) Do ¶ added in v1.0.1
func (api *PmCAccountBalanceApi) Do() (*PmCAccountBalanceRes, error)
func (*PmCAccountBalanceApi) RecvWindow ¶ added in v1.0.1
func (api *PmCAccountBalanceApi) RecvWindow(RecvWindow int64) *PmCAccountBalanceApi
func (*PmCAccountBalanceApi) Timestamp ¶ added in v1.0.1
func (api *PmCAccountBalanceApi) Timestamp(Timestamp int64) *PmCAccountBalanceApi
type PmCAccountBalanceReq ¶ added in v1.0.1
type PmCAccountBalanceRes ¶ added in v1.0.1
type PmCAccountBalanceRes []PmCAccountBalanceRow
type PmCAccountBalanceRow ¶ added in v1.0.1
type PmCAccountBalanceRow struct { Asset string `json:"asset"` //资产 TotalWalletBalance string `json:"totalWalletBalance"` // 钱包余额 = 全仓杠杆未锁定 + 全仓杠杆锁定 + u本位合约钱包余额 + 币本位合约钱包余额 CrossMarginAsset string `json:"crossMarginAsset"` // 全仓资产 = 全仓杠杆未锁定 + 全仓杠杆锁定 CrossMarginBorrowed string `json:"crossMarginBorrowed"` // 全仓杠杆借贷 CrossMarginFree string `json:"crossMarginFree"` // 全仓杠杆未锁定 CrossMarginInterest string `json:"crossMarginInterest"` // 全仓杠杆利息 CrossMarginLocked string `json:"crossMarginLocked"` //全仓杠杆锁定 UmWalletBalance string `json:"umWalletBalance"` // u本位合约钱包余额 UmUnrealizedPNL string `json:"umUnrealizedPNL"` // u本位未实现盈亏 CmWalletBalance string `json:"cmWalletBalance"` // 币本位合约钱包余额 CmUnrealizedPNL string `json:"cmUnrealizedPNL"` // 币本位未实现盈亏 UpdateTime int64 `json:"updateTime"` // 更新时间 NegativeBalance string `json:"negativeBalance"` // 负资产余额 }
type PmCAccountForCApi ¶ added in v1.0.1
type PmCAccountForCApi struct {
// contains filtered or unexported fields
}
func (*PmCAccountForCApi) Do ¶ added in v1.0.1
func (api *PmCAccountForCApi) Do() (*PmCAccountForCRes, error)
func (*PmCAccountForCApi) RecvWindow ¶ added in v1.0.1
func (api *PmCAccountForCApi) RecvWindow(RecvWindow int64) *PmCAccountForCApi
func (*PmCAccountForCApi) Timestamp ¶ added in v1.0.1
func (api *PmCAccountForCApi) Timestamp(Timestamp int64) *PmCAccountForCApi
type PmCAccountForCReq ¶ added in v1.0.1
type PmCAccountForCReq struct { RecvWindow *int64 `json:"recvWindow"` Timestamp *int64 `json:"timestamp"` }
PmCAccountForU
type PmCAccountForCRes ¶ added in v1.0.1
type PmCAccountForCRes struct { Assets []PmCAccountForCResAsset `json:"assets"` Positions []PmCAccountForCResPosition `json:"positions"` // 头寸,将返回所有市场symbol。 }
type PmCAccountForCResAsset ¶ added in v1.0.1
type PmCAccountForCResAsset struct { Asset string `json:"asset"` //资产 CrossWalletBalance string `json:"crossWalletBalance"` //全仓账户余额 CrossUnPnl string `json:"crossUnPnl"` // 全仓持仓未实现盈亏 MaintMargin string `json:"maintMargin"` // 维持保证金 InitialMargin string `json:"initialMargin"` // 当前所需起始保证金 PositionInitialMargin string `json:"positionInitialMargin"` // 持仓所需起始保证金(基于最新标记价格) OpenOrderInitialMargin string `json:"openOrderInitialMargin"` // 当前挂单所需起始保证金(基于最新标记价格) UpdateTime int64 `json:"updateTime"` //更新时间 }
type PmCAccountForCResPosition ¶ added in v1.0.1
type PmCAccountForCResPosition struct { //根据用户持仓模式展示持仓方向,即单向模式下只返回BOTH持仓情况,双向模式下只返回 LONG 和 SHORT 持仓情况 Symbol string `json:"symbol"` // 交易对 PositionAmt string `json:"positionAmt"` // 持仓数量 InitialMargin string `json:"initialMargin"` // 当前所需起始保证金(基于最新标记价格) MaintMargin string `json:"maintMargin"` //维持保证金 UnrealizedProfit string `json:"unrealizedProfit"` // 持仓未实现盈亏 PositionInitialMargin string `json:"positionInitialMargin"` // 持仓所需起始保证金(基于最新标记价格) OpenOrderInitialMargin string `json:"openOrderInitialMargin"` // 当前挂单所需起始保证金(基于最新标记价格) Leverage string `json:"leverage"` // 杠杆倍数 PositionSide string `json:"positionSide"` // 持仓方向 EntryPrice string `json:"entryPrice"` // 开仓均价 MaxQty string `json:"maxQty"` // 最大下单量 UpdateTime int64 `json:"updateTime"` // 更新时间 }
type PmCAccountReq ¶ added in v1.0.1
type PmCAccountReq struct { RecvWindow *int64 `json:"recvWindow"` Timestamp *int64 `json:"timestamp"` }
PmCAccount
type PmCAccountRes ¶ added in v1.0.1
type PmCAccountRes struct { UniMMR string `json:"uniMMR"` // 统一账户维持保证金率 AccountEquity string `json:"accountEquity"` // 以USD计价的账户权益 ActualEquity string `json:"actualEquity"` // 不考虑质押率的以USD计价账户权益 AccountInitialMargin string `json:"accountInitialMargin"` // 当前所需起始保证金(基于最新标记价格) AccountMaintMargin string `json:"accountMaintMargin"` // 以USD计价统一账户维持保证金 AccountStatus string `json:"accountStatus"` // 统一账户账户状态:"NORMAL", "MARGIN_CALL", "SUPPLY_MARGIN", "REDUCE_ONLY", "ACTIVE_LIQUIDATION", "FORCE_LIQUIDATION", "BANKRUPTED" VirtualMaxWithdrawAmount string `json:"virtualMaxWithdrawAmount"` // 以USD计价的最大可转出 TotalAvailableBalance string `json:"totalAvailableBalance"` // 以USD计价的可用余额 TotalMarginOpenLoss string `json:"totalMarginOpenLoss"` // 以USD计价的总开仓保证金 UpdateTime int64 `json:"updateTime"` // 更新时间 }
type PmCAllConditionnalOrderDeleteApi ¶ added in v1.0.1
type PmCAllConditionnalOrderDeleteApi struct {
// contains filtered or unexported fields
}
func (*PmCAllConditionnalOrderDeleteApi) Do ¶ added in v1.0.1
func (api *PmCAllConditionnalOrderDeleteApi) Do() (*PmCAllConditionnalOrderDeleteRes, error)
func (*PmCAllConditionnalOrderDeleteApi) RecvWindow ¶ added in v1.0.1
func (api *PmCAllConditionnalOrderDeleteApi) RecvWindow(RecvWindow int64) *PmCAllConditionnalOrderDeleteApi
func (*PmCAllConditionnalOrderDeleteApi) Symbol ¶ added in v1.0.1
func (api *PmCAllConditionnalOrderDeleteApi) Symbol(Symbol string) *PmCAllConditionnalOrderDeleteApi
func (*PmCAllConditionnalOrderDeleteApi) Timestamp ¶ added in v1.0.1
func (api *PmCAllConditionnalOrderDeleteApi) Timestamp(Timestamp int64) *PmCAllConditionnalOrderDeleteApi
type PmCAllConditionnalOrderDeleteReq ¶ added in v1.0.1
type PmCAllConditionnalOrderDeleteRes ¶ added in v1.0.1
type PmCAllConditionnalOrderDeleteRes BinanceErrorRes
type PmCAllOrderDeleteApi ¶ added in v1.0.1
type PmCAllOrderDeleteApi struct {
// contains filtered or unexported fields
}
func (*PmCAllOrderDeleteApi) Do ¶ added in v1.0.1
func (api *PmCAllOrderDeleteApi) Do() (*PmCAllOrderDeleteRes, error)
func (*PmCAllOrderDeleteApi) RecvWindow ¶ added in v1.0.1
func (api *PmCAllOrderDeleteApi) RecvWindow(RecvWindow int64) *PmCAllOrderDeleteApi
func (*PmCAllOrderDeleteApi) Symbol ¶ added in v1.0.1
func (api *PmCAllOrderDeleteApi) Symbol(Symbol string) *PmCAllOrderDeleteApi
func (*PmCAllOrderDeleteApi) Timestamp ¶ added in v1.0.1
func (api *PmCAllOrderDeleteApi) Timestamp(Timestamp int64) *PmCAllOrderDeleteApi
type PmCAllOrderDeleteReq ¶ added in v1.0.1
type PmCAllOrderDeleteRes ¶ added in v1.0.1
type PmCAllOrderDeleteRes BinanceErrorRes
type PmCAllOrdersApi ¶ added in v1.0.1
type PmCAllOrdersApi struct {
// contains filtered or unexported fields
}
func (*PmCAllOrdersApi) Do ¶ added in v1.0.1
func (api *PmCAllOrdersApi) Do() (*PmCAllOrdersRes, error)
func (*PmCAllOrdersApi) EndTime ¶ added in v1.0.1
func (api *PmCAllOrdersApi) EndTime(EndTime int64) *PmCAllOrdersApi
func (*PmCAllOrdersApi) Limit ¶ added in v1.0.1
func (api *PmCAllOrdersApi) Limit(Limit int64) *PmCAllOrdersApi
func (*PmCAllOrdersApi) OrderId ¶ added in v1.0.1
func (api *PmCAllOrdersApi) OrderId(OrderId int64) *PmCAllOrdersApi
func (*PmCAllOrdersApi) Pair ¶ added in v1.0.1
func (api *PmCAllOrdersApi) Pair(Pair string) *PmCAllOrdersApi
func (*PmCAllOrdersApi) RecvWindow ¶ added in v1.0.1
func (api *PmCAllOrdersApi) RecvWindow(RecvWindow int64) *PmCAllOrdersApi
func (*PmCAllOrdersApi) StartTime ¶ added in v1.0.1
func (api *PmCAllOrdersApi) StartTime(StartTime int64) *PmCAllOrdersApi
func (*PmCAllOrdersApi) Symbol ¶ added in v1.0.1
func (api *PmCAllOrdersApi) Symbol(Symbol string) *PmCAllOrdersApi
func (*PmCAllOrdersApi) Timestamp ¶ added in v1.0.1
func (api *PmCAllOrdersApi) Timestamp(Timestamp int64) *PmCAllOrdersApi
type PmCAllOrdersReq ¶ added in v1.0.1
type PmCAllOrdersReq struct { Symbol *string `json:"symbol"` //No 交易对 Pair *string `json:"pair"` //No OrderId *int64 `json:"orderId"` //No 只返回此orderID及之后的订单,缺省返回最近的订单 StartTime *int64 `json:"startTime"` //No 起始时间 EndTime *int64 `json:"endTime"` //No 结束时间 Limit *int64 `json:"limit"` //No 返回的结果集数量 默认值:500 最大值:1000 RecvWindow *int64 `json:"recvWindow"` Timestamp *int64 `json:"timestamp"` }
type PmCAllOrdersRes ¶ added in v1.0.1
type PmCAllOrdersRes []PmCOrderOrder
type PmCApi ¶ added in v1.0.1
type PmCApi int
const ( //账户接口 PmCAccount PmCApi = iota //GET接口 统一账户信息 (USER_DATA) PmCAccountBalance //GET接口 统一账户余额 (USER_DATA) PmCAccountForC //GET接口 CM账户信息v2 (USER_DATA) PmCCommissionRate //GET接口 (HMAC SHA256)查询用户CM手续费率 (USER_DATA) //交易接口 PmCOpenOrders //GET接口 (HMAC SHA256)查看当前全部CM挂单(USER_DATA) PmCAllOrders //GET接口 (HMAC SHA256)查询所有CM订单(包括历史订单)(USER_DATA) PmCOrderPost //POST接口 (HMAC SHA256)CM下单(TRADE) PmCOrderPut //PUT接口 (HMAC SHA256)修改CM订单(TRADE) PmCOrderGet //GET接口 (HMAC SHA256)查询CM订单(USER_DATA) PmCOrderDelete //DELETE接口 (HMAC SHA256)撤销CM订单 (TRADE) PmCAllOrderDelete //DELETE接口 (HMAC SHA256)撤销全部CM订单 (TRADE) PmCConditionalOrderPost //POST接口 (HMAC SHA256)CM条件单下单(TRADE) PmCConditionalOrderDelete //DELETE接口 (HMAC SHA256)取消CM条件订单(TRADE) PmCAllConditionnalOrderDelete //DELETE接口 (HMAC SHA256)撤销全部CM条件订单(TRADE) PmCUserTrades //GET接口 (HMAC SHA256)CM账户成交历史 (USER_DATA) //通用接口 PmCPing //GET接口 测试服务器连通性 PmCServerTime //GET接口 获取服务器时间 PmCExchangeInfo //GET接口 交易规则和交易对信息 //行情接口 PmCKlines //K线数据 PmCDepth //深度信息 PmCTrades //最新成交 PmCHistoricalTrades //历史成交 PmCAggTrades //近期成交(归集) PmCPremiumIndex //最新标记价格和资金费率 PmCFundingRate //查询资金费率历史 PmCFundingInfo //查询资金费率信息 PmCTicker24hr //24hr价格变动情况 PmCTickerPrice //最新价格 PmCTickerBookTicker //当前最优挂单 PmCDataBasis //基差数据 //Ws账户推送相关接口 PmCListenKeyPost //生成listenKey (USER_STREAM) PmCListenKeyPut //延长listenKey有效期 (USER_STREAM) PmCListenKeyDelete //关闭listenKey (USER_STREAM) )
type PmCCommissionRateApi ¶ added in v1.0.1
type PmCCommissionRateApi struct {
// contains filtered or unexported fields
}
func (*PmCCommissionRateApi) Do ¶ added in v1.0.1
func (api *PmCCommissionRateApi) Do() (*PmCCommissionRateRes, error)
func (*PmCCommissionRateApi) RecvWindow ¶ added in v1.0.1
func (api *PmCCommissionRateApi) RecvWindow(RecvWindow int64) *PmCCommissionRateApi
func (*PmCCommissionRateApi) Symbol ¶ added in v1.0.1
func (api *PmCCommissionRateApi) Symbol(Symbol string) *PmCCommissionRateApi
func (*PmCCommissionRateApi) Timestamp ¶ added in v1.0.1
func (api *PmCCommissionRateApi) Timestamp(Timestamp int64) *PmCCommissionRateApi
type PmCCommissionRateReq ¶ added in v1.0.1
type PmCCommissionRateRes ¶ added in v1.0.1
type PmCConditionalOrderDeleteApi ¶ added in v1.0.1
type PmCConditionalOrderDeleteApi struct {
// contains filtered or unexported fields
}
func (*PmCConditionalOrderDeleteApi) Do ¶ added in v1.0.1
func (api *PmCConditionalOrderDeleteApi) Do() (*PmCConditionalOrderDeleteRes, error)
func (*PmCConditionalOrderDeleteApi) NewClientStrategyId ¶ added in v1.0.1
func (api *PmCConditionalOrderDeleteApi) NewClientStrategyId(NewClientStrategyId string) *PmCConditionalOrderDeleteApi
func (*PmCConditionalOrderDeleteApi) RecvWindow ¶ added in v1.0.1
func (api *PmCConditionalOrderDeleteApi) RecvWindow(RecvWindow int64) *PmCConditionalOrderDeleteApi
func (*PmCConditionalOrderDeleteApi) StrategyId ¶ added in v1.0.1
func (api *PmCConditionalOrderDeleteApi) StrategyId(StrategyId string) *PmCConditionalOrderDeleteApi
func (*PmCConditionalOrderDeleteApi) Symbol ¶ added in v1.0.1
func (api *PmCConditionalOrderDeleteApi) Symbol(Symbol string) *PmCConditionalOrderDeleteApi
func (*PmCConditionalOrderDeleteApi) Timestamp ¶ added in v1.0.1
func (api *PmCConditionalOrderDeleteApi) Timestamp(Timestamp int64) *PmCConditionalOrderDeleteApi
type PmCConditionalOrderDeleteReq ¶ added in v1.0.1
type PmCConditionalOrderDeleteReq struct { Symbol *string `json:"symbol"` //YES 交易对 StrategyId *string `json:"strategyId"` //NO strategyId 与 newClientStrategyId 之一必须发送 NewClientStrategyId *string `json:"newClientStrategyId"` //NO RecvWindow *int64 `json:"recvWindow,omitempty"` //NO Timestamp *int64 `json:"timestamp"` //YES }
type PmCConditionalOrderDeleteRes ¶ added in v1.0.1
type PmCConditionalOrderDeleteRes struct { NewClientStrategyId string `json:"newClientStrategyId"` StrategyId int64 `json:"strategyId"` StrategyStatus string `json:"strategyStatus"` StrategyType string `json:"strategyType"` OrigQty string `json:"origQty"` Price string `json:"price"` ReduceOnly bool `json:"reduceOnly"` Side string `json:"side"` PositionSide string `json:"positionSide"` StopPrice string `json:"stopPrice"` Symbol string `json:"symbol"` TimeInForce string `json:"timeInForce"` ActivatePrice string `json:"activatePrice"` PriceRate string `json:"priceRate"` UpdateTime int64 `json:"updateTime"` WorkingType string `json:"workingType"` PriceProtect bool `json:"priceProtect"` }
type PmCConditionalOrderPostApi ¶ added in v1.0.1
type PmCConditionalOrderPostApi struct {
// contains filtered or unexported fields
}
func (*PmCConditionalOrderPostApi) ActivationPrice ¶ added in v1.0.1
func (api *PmCConditionalOrderPostApi) ActivationPrice(ActivationPrice decimal.Decimal) *PmCConditionalOrderPostApi
func (*PmCConditionalOrderPostApi) CallbackRate ¶ added in v1.0.1
func (api *PmCConditionalOrderPostApi) CallbackRate(CallbackRate decimal.Decimal) *PmCConditionalOrderPostApi
func (*PmCConditionalOrderPostApi) Do ¶ added in v1.0.1
func (api *PmCConditionalOrderPostApi) Do() (*PmCConditionalOrderPostRes, error)
func (*PmCConditionalOrderPostApi) NewClientStrategyId ¶ added in v1.0.1
func (api *PmCConditionalOrderPostApi) NewClientStrategyId(NewClientStrategyId string) *PmCConditionalOrderPostApi
func (*PmCConditionalOrderPostApi) PositionSide ¶ added in v1.0.1
func (api *PmCConditionalOrderPostApi) PositionSide(PositionSide string) *PmCConditionalOrderPostApi
func (*PmCConditionalOrderPostApi) Price ¶ added in v1.0.1
func (api *PmCConditionalOrderPostApi) Price(Price decimal.Decimal) *PmCConditionalOrderPostApi
func (*PmCConditionalOrderPostApi) PriceProtect ¶ added in v1.0.1
func (api *PmCConditionalOrderPostApi) PriceProtect(PriceProtect string) *PmCConditionalOrderPostApi
func (*PmCConditionalOrderPostApi) Quantity ¶ added in v1.0.1
func (api *PmCConditionalOrderPostApi) Quantity(Quantity decimal.Decimal) *PmCConditionalOrderPostApi
func (*PmCConditionalOrderPostApi) RecvWindow ¶ added in v1.0.1
func (api *PmCConditionalOrderPostApi) RecvWindow(RecvWindow int64) *PmCConditionalOrderPostApi
func (*PmCConditionalOrderPostApi) Side ¶ added in v1.0.1
func (api *PmCConditionalOrderPostApi) Side(Side string) *PmCConditionalOrderPostApi
func (*PmCConditionalOrderPostApi) StopPrice ¶ added in v1.0.1
func (api *PmCConditionalOrderPostApi) StopPrice(StopPrice decimal.Decimal) *PmCConditionalOrderPostApi
func (*PmCConditionalOrderPostApi) StrategyType ¶ added in v1.0.1
func (api *PmCConditionalOrderPostApi) StrategyType(StrategyType string) *PmCConditionalOrderPostApi
func (*PmCConditionalOrderPostApi) Symbol ¶ added in v1.0.1
func (api *PmCConditionalOrderPostApi) Symbol(Symbol string) *PmCConditionalOrderPostApi
func (*PmCConditionalOrderPostApi) TimeInForce ¶ added in v1.0.1
func (api *PmCConditionalOrderPostApi) TimeInForce(TimeInForce string) *PmCConditionalOrderPostApi
func (*PmCConditionalOrderPostApi) Timestamp ¶ added in v1.0.1
func (api *PmCConditionalOrderPostApi) Timestamp(Timestamp int64) *PmCConditionalOrderPostApi
func (*PmCConditionalOrderPostApi) WorkingType ¶ added in v1.0.1
func (api *PmCConditionalOrderPostApi) WorkingType(WorkingType string) *PmCConditionalOrderPostApi
type PmCConditionalOrderPostReq ¶ added in v1.0.1
type PmCConditionalOrderPostReq struct { Symbol *string `json:"symbol"` //YES 交易对 Side *string `json:"side"` //YES 买卖方向 PositionSide *string `json:"positionSide"` //NO 持仓方向,单向持仓模式下非必填,默认且仅可填BOTH;在双向持仓模式下必填,且仅可选择 LONG 或 SHORT StrategyType *string `json:"strategyType"` //YES 条件单类型"STOP", "STOP_MARKET", "TAKE_PROFIT", "TAKE_PROFIT_MARKET"或"TRAILING_STOP_MARKET" TimeInForce *string `json:"timeInForce"` //NO 订单有效期 Quantity *decimal.Decimal `json:"quantity"` //NO 下单数量 ReduceOnly *string `json:"reduceOnly"` //NO true或false; 非双开模式下默认false;双开模式下不接受此参数 Price *decimal.Decimal `json:"price"` //NO 下单价格 WorkingType *string `json:"workingType"` //NO stopPrice 触发类型: MARK_PRICE(标记价格), CONTRACT_PRICE(合约最新价). 默认 CONTRACT_PRICE PriceProtect *string `json:"priceProtect"` //NO 条件单触发保护:"TRUE","FALSE", 默认"FALSE". 仅 STOP, STOP_MARKET, TAKE_PROFIT, TAKE_PROFIT_MARKET 需要此参数 NewClientStrategyId *string `json:"newClientStrategyId"` //NO 不可以重复出现在挂单中。如空缺系统会自动赋值。必须满足正则规则: ^[\.A-Z\:/a-z0-9_-]{1,32}$ StopPrice *decimal.Decimal `json:"stopPrice"` //NO Used with STOP/STOP_MARKET or TAKE_PROFIT/TAKE_PROFIT_MARKET orders. ActivationPrice *decimal.Decimal `json:"activationPrice"` //NO TRAILING_STOP_MARKET 单使用,默认标记价格 CallbackRate *decimal.Decimal `json:"callbackRate"` //NO TRAILING_STOP_MARKET 单使用, 最小0.1, 最大5,1代表1% RecvWindow *int64 `json:"recvWindow"` //NO Timestamp *int64 `json:"timestamp"` //YES }
type PmCConditionalOrderPostRes ¶ added in v1.0.1
type PmCConditionalOrderPostRes struct { NewClientStrategyId string `json:"newClientStrategyId"` StrategyId int64 `json:"strategyId"` StrategyStatus string `json:"strategyStatus"` StrategyType string `json:"strategyType"` OrigQty string `json:"origQty"` Price string `json:"price"` ReduceOnly bool `json:"reduceOnly"` Side string `json:"side"` PositionSide string `json:"positionSide"` StopPrice string `json:"stopPrice"` Symbol string `json:"symbol"` Pair string `json:"pair"` TimeInForce string `json:"timeInForce"` ActivatePrice string `json:"activatePrice"` PriceRate string `json:"priceRate"` BookTime int64 `json:"bookTime"` //条件单下单时间 UpdateTime int64 `json:"updateTime"` WorkingType string `json:"workingType"` PriceProtect bool `json:"priceProtect"` }
type PmCListenKeyDeleteApi ¶ added in v1.0.1
type PmCListenKeyDeleteApi struct {
// contains filtered or unexported fields
}
func (*PmCListenKeyDeleteApi) Do ¶ added in v1.0.1
func (api *PmCListenKeyDeleteApi) Do() (*PmCListenKeyDeleteRes, error)
type PmCListenKeyDeleteReq ¶ added in v1.0.1
type PmCListenKeyDeleteReq struct{}
type PmCListenKeyDeleteRes ¶ added in v1.0.1
type PmCListenKeyDeleteRes struct{}
type PmCListenKeyPostApi ¶ added in v1.0.1
type PmCListenKeyPostApi struct {
// contains filtered or unexported fields
}
func (*PmCListenKeyPostApi) Do ¶ added in v1.0.1
func (api *PmCListenKeyPostApi) Do() (*PmCListenKeyPostRes, error)
type PmCListenKeyPostRes ¶ added in v1.0.1
type PmCListenKeyPostRes struct {
ListenKey string `json:"listenKey"`
}
type PmCListenKeyPutApi ¶ added in v1.0.1
type PmCListenKeyPutApi struct {
// contains filtered or unexported fields
}
func (*PmCListenKeyPutApi) Do ¶ added in v1.0.1
func (api *PmCListenKeyPutApi) Do() (*PmCListenKeyPutRes, error)
type PmCListenKeyPutReq ¶ added in v1.0.1
type PmCListenKeyPutReq struct{}
type PmCListenKeyPutRes ¶ added in v1.0.1
type PmCListenKeyPutRes struct{}
type PmCOpenOrdersApi ¶ added in v1.0.1
type PmCOpenOrdersApi struct {
// contains filtered or unexported fields
}
func (*PmCOpenOrdersApi) Do ¶ added in v1.0.1
func (api *PmCOpenOrdersApi) Do() (*PmCOpenOrdersRes, error)
func (*PmCOpenOrdersApi) Pair ¶ added in v1.0.1
func (api *PmCOpenOrdersApi) Pair(Pair string) *PmCOpenOrdersApi
func (*PmCOpenOrdersApi) RecvWindow ¶ added in v1.0.1
func (api *PmCOpenOrdersApi) RecvWindow(RecvWindow int64) *PmCOpenOrdersApi
func (*PmCOpenOrdersApi) Symbol ¶ added in v1.0.1
func (api *PmCOpenOrdersApi) Symbol(Symbol string) *PmCOpenOrdersApi
func (*PmCOpenOrdersApi) Timestamp ¶ added in v1.0.1
func (api *PmCOpenOrdersApi) Timestamp(Timestamp int64) *PmCOpenOrdersApi
type PmCOpenOrdersReq ¶ added in v1.0.1
type PmCOpenOrdersRes ¶ added in v1.0.1
type PmCOpenOrdersRes []PmCOrderOrder
type PmCOrderDeleteApi ¶ added in v1.0.1
type PmCOrderDeleteApi struct {
// contains filtered or unexported fields
}
func (*PmCOrderDeleteApi) Do ¶ added in v1.0.1
func (api *PmCOrderDeleteApi) Do() (*PmCOrderDeleteRes, error)
func (*PmCOrderDeleteApi) OrderId ¶ added in v1.0.1
func (api *PmCOrderDeleteApi) OrderId(OrderId int64) *PmCOrderDeleteApi
func (*PmCOrderDeleteApi) OrigClientOrderId ¶ added in v1.0.1
func (api *PmCOrderDeleteApi) OrigClientOrderId(OrigClientOrderId string) *PmCOrderDeleteApi
func (*PmCOrderDeleteApi) RecvWindow ¶ added in v1.0.1
func (api *PmCOrderDeleteApi) RecvWindow(RecvWindow int64) *PmCOrderDeleteApi
func (*PmCOrderDeleteApi) Symbol ¶ added in v1.0.1
func (api *PmCOrderDeleteApi) Symbol(Symbol string) *PmCOrderDeleteApi
func (*PmCOrderDeleteApi) Timestamp ¶ added in v1.0.1
func (api *PmCOrderDeleteApi) Timestamp(Timestamp int64) *PmCOrderDeleteApi
type PmCOrderDeleteReq ¶ added in v1.0.1
type PmCOrderDeleteReq struct { Symbol *string `json:"symbol"` //YES 交易对 OrderId *int64 `json:"orderId,omitempty"` //NO 系统订单号 OrigClientOrderId *string `json:"origClientOrderId,omitempty"` //NO 用户自定义的订单号 RecvWindow *int64 `json:"recvWindow,omitempty"` //NO Timestamp *int64 `json:"timestamp"` //YES }
type PmCOrderDeleteRes ¶ added in v1.0.1
type PmCOrderDeleteRes struct { AvgPrice string `json:"avgPrice"` ClientOrderId string `json:"clientOrderId"` CumQty string `json:"cumQty"` CumBase string `json:"cumBase"` ExecutedQty string `json:"executedQty"` OrderId int64 `json:"orderId"` OrigQty string `json:"origQty"` Price string `json:"price"` ReduceOnly bool `json:"reduceOnly"` Side string `json:"side"` PositionSide string `json:"positionSide"` Status string `json:"status"` Symbol string `json:"symbol"` Pair string `json:"pair"` TimeInForce string `json:"timeInForce"` Type string `json:"type"` UpdateTime int64 `json:"updateTime"` }
type PmCOrderGetApi ¶ added in v1.0.1
type PmCOrderGetApi struct {
// contains filtered or unexported fields
}
func (*PmCOrderGetApi) Do ¶ added in v1.0.1
func (api *PmCOrderGetApi) Do() (*PmCOrderGetRes, error)
func (*PmCOrderGetApi) OrderId ¶ added in v1.0.1
func (api *PmCOrderGetApi) OrderId(OrderId int64) *PmCOrderGetApi
func (*PmCOrderGetApi) OrigClientOrderId ¶ added in v1.0.1
func (api *PmCOrderGetApi) OrigClientOrderId(OrigClientOrderId string) *PmCOrderGetApi
func (*PmCOrderGetApi) RecvWindow ¶ added in v1.0.1
func (api *PmCOrderGetApi) RecvWindow(RecvWindow int64) *PmCOrderGetApi
func (*PmCOrderGetApi) Symbol ¶ added in v1.0.1
func (api *PmCOrderGetApi) Symbol(Symbol string) *PmCOrderGetApi
func (*PmCOrderGetApi) Timestamp ¶ added in v1.0.1
func (api *PmCOrderGetApi) Timestamp(Timestamp int64) *PmCOrderGetApi
type PmCOrderGetReq ¶ added in v1.0.1
type PmCOrderGetRes ¶ added in v1.0.1
type PmCOrderGetRes PmCOrderOrder
type PmCOrderOrder ¶ added in v1.0.1
type PmCOrderOrder struct { AvgPrice string `json:"avgPrice"` // 平均成交价 ClientOrderId string `json:"clientOrderId"` // 用户自定义的订单号 CumBase string `json:"cumBase"` // 成交数量 ExecutedQty string `json:"executedQty"` // 成交量 OrderId int64 `gorm:"primaryKey" json:"orderId"` // 系统订单号 OrigQty string `json:"origQty"` // 原始委托数量 OrigType string `json:"origType"` // 触发前订单类型 Price string `json:"price"` // 委托价格 ReduceOnly bool `json:"reduceOnly"` // 是否仅减仓 Side string `json:"side"` // 买卖方向 PositionSide string `json:"positionSide"` // 持仓方向 Status string `json:"status"` // 订单状态 Symbol string `json:"symbol"` // 交易对 Pair string `json:"pair"` Time int64 `json:"time"` // 订单时间 TimeInForce string `json:"timeInForce"` // 有效方法 Type string `json:"type"` // 订单类型 UpdateTime int64 `json:"updateTime"` // 更新时间 }
type PmCOrderPostApi ¶ added in v1.0.1
type PmCOrderPostApi struct {
// contains filtered or unexported fields
}
func (*PmCOrderPostApi) Do ¶ added in v1.0.1
func (api *PmCOrderPostApi) Do() (*PmCOrderPostRes, error)
func (*PmCOrderPostApi) NewClientOrderId ¶ added in v1.0.1
func (api *PmCOrderPostApi) NewClientOrderId(NewClientOrderId string) *PmCOrderPostApi
func (*PmCOrderPostApi) NewOrderRespType ¶ added in v1.0.1
func (api *PmCOrderPostApi) NewOrderRespType(NewOrderRespType string) *PmCOrderPostApi
func (*PmCOrderPostApi) PositionSide ¶ added in v1.0.1
func (api *PmCOrderPostApi) PositionSide(PositionSide string) *PmCOrderPostApi
func (*PmCOrderPostApi) Price ¶ added in v1.0.1
func (api *PmCOrderPostApi) Price(Price decimal.Decimal) *PmCOrderPostApi
func (*PmCOrderPostApi) Quantity ¶ added in v1.0.1
func (api *PmCOrderPostApi) Quantity(Quantity decimal.Decimal) *PmCOrderPostApi
func (*PmCOrderPostApi) RecvWindow ¶ added in v1.0.1
func (api *PmCOrderPostApi) RecvWindow(RecvWindow int64) *PmCOrderPostApi
func (*PmCOrderPostApi) ReduceOnly ¶ added in v1.0.1
func (api *PmCOrderPostApi) ReduceOnly(ReduceOnly string) *PmCOrderPostApi
func (*PmCOrderPostApi) Side ¶ added in v1.0.1
func (api *PmCOrderPostApi) Side(Side string) *PmCOrderPostApi
func (*PmCOrderPostApi) Symbol ¶ added in v1.0.1
func (api *PmCOrderPostApi) Symbol(Symbol string) *PmCOrderPostApi
func (*PmCOrderPostApi) TimeInForce ¶ added in v1.0.1
func (api *PmCOrderPostApi) TimeInForce(TimeInForce string) *PmCOrderPostApi
func (*PmCOrderPostApi) Timestamp ¶ added in v1.0.1
func (api *PmCOrderPostApi) Timestamp(Timestamp int64) *PmCOrderPostApi
func (*PmCOrderPostApi) Type ¶ added in v1.0.1
func (api *PmCOrderPostApi) Type(Type string) *PmCOrderPostApi
type PmCOrderPostReq ¶ added in v1.0.1
type PmCOrderPostReq struct { Symbol *string `json:"symbol"` //Yes 交易对 Side *string `json:"side"` //Yes 买卖方向 SELL, BUY PositionSide *string `json:"positionSide,omitempty"` //No 持仓方向,单向持仓模式下非必填,默认且仅可填BOTH;在双向持仓模式下必填,且仅可选择 LONG 或 SHORT Type *string `json:"type"` //Yes 订单类型 LIMIT, MARKET, STOP, TAKE_PROFIT, STOP_MARKET, TAKE_PROFIT_MARKET, TRAILING_STOP_MARKET TimeInForce *string `json:"timeInForce,omitempty"` //No 有效方法 Quantity *decimal.Decimal `json:"quantity,omitempty"` //No 下单数量,使用closePosition不支持此参数。 ReduceOnly *string `json:"reduceOnly,omitempty"` //No true, false; 非双开模式下默认false;双开模式下不接受此参数; 使用closePosition不支持此参数。 Price *decimal.Decimal `json:"price,omitempty"` //No 委托价格 NewClientOrderId *string `json:"newClientOrderId,omitempty"` //No 用户自定义的订单号,不可以重复出现在挂单中。如空缺系统会自动赋值。必须满足正则规则 ^[\.A-Z\:/a-z0-9_-]{1,36}$ NewOrderRespType *string `json:"newOrderRespType,omitempty"` //No "ACK", "RESULT", 默认 "ACK" RecvWindow *int64 `json:"recvWindow,omitempty"` //No Timestamp *int64 `json:"timestamp,omitempty"` //Yes }
type PmCOrderPostRes ¶ added in v1.0.1
type PmCOrderPostRes struct { ClientOrderId string `json:"clientOrderId"` // 用户自定义的订单号 CumQty string `json:"cumQty"` CumBase string `json:"cumBase"` // 成交数量 ExecutedQty string `json:"executedQty"` OrderId int64 `json:"orderId"` // 系统订单号 AvgPrice string `json:"avgPrice"` OrigQty string `json:"origQty"` // 原始委托数量 Price string `json:"price"` // 委托价格 ReduceOnly bool `json:"reduceOnly"` Side string `json:"side"` // 买卖方向 PositionSide string `json:"positionSide"` // 持仓方向 Status string `json:"status"` // 订单状态 Symbol string `json:"symbol"` // 交易对 Pair string `json:"pair"` TimeInForce string `json:"timeInForce"` // 有效方法 Type string `json:"type"` // 订单类型 UpdateTime int64 `json:"updateTime"` // 更新时间 }
type PmCOrderPutApi ¶ added in v1.0.1
type PmCOrderPutApi struct {
// contains filtered or unexported fields
}
func (*PmCOrderPutApi) Do ¶ added in v1.0.1
func (api *PmCOrderPutApi) Do() (*PmCOrderPutRes, error)
func (*PmCOrderPutApi) OrderId ¶ added in v1.0.1
func (api *PmCOrderPutApi) OrderId(OrderId int64) *PmCOrderPutApi
func (*PmCOrderPutApi) OrigClientOrderId ¶ added in v1.0.1
func (api *PmCOrderPutApi) OrigClientOrderId(OrigClientOrderId string) *PmCOrderPutApi
func (*PmCOrderPutApi) Price ¶ added in v1.0.1
func (api *PmCOrderPutApi) Price(Price decimal.Decimal) *PmCOrderPutApi
func (*PmCOrderPutApi) Quantity ¶ added in v1.0.1
func (api *PmCOrderPutApi) Quantity(Quantity decimal.Decimal) *PmCOrderPutApi
func (*PmCOrderPutApi) RecvWindow ¶ added in v1.0.1
func (api *PmCOrderPutApi) RecvWindow(RecvWindow int64) *PmCOrderPutApi
func (*PmCOrderPutApi) Side ¶ added in v1.0.1
func (api *PmCOrderPutApi) Side(Side string) *PmCOrderPutApi
func (*PmCOrderPutApi) Symbol ¶ added in v1.0.1
func (api *PmCOrderPutApi) Symbol(Symbol string) *PmCOrderPutApi
func (*PmCOrderPutApi) Timestamp ¶ added in v1.0.1
func (api *PmCOrderPutApi) Timestamp(Timestamp int64) *PmCOrderPutApi
type PmCOrderPutReq ¶ added in v1.0.1
type PmCOrderPutReq struct { OrderId *string `json:"orderId,omitempty"` //NO 系统订单号 OrigClientOrderId *string `json:"origClientOrderId,omitempty"` //NO 用户自定义的订单号 Symbol *string `json:"symbol"` //YES 交易对 Side *string `json:"side"` //YES 买卖方向 SELL, BUY; side需要和原订单相同 Quantity *decimal.Decimal `json:"quantity"` //YES 下单数量,使用closePosition不支持此参数。 Price *decimal.Decimal `json:"price"` //YES 委托价格 RecvWindow *int64 `json:"recvWindow,omitempty"` //NO Timestamp *int64 `json:"timestamp,omitempty"` //YES }
type PmCOrderPutRes ¶ added in v1.0.1
type PmCOrderPutRes struct { OrderId int64 `json:"orderId"` Symbol string `json:"symbol"` Pair string `json:"pair"` Status string `json:"status"` ClientOrderId string `json:"clientOrderId"` Price string `json:"price"` AvgPrice string `json:"avgPrice"` OrigQty string `json:"origQty"` ExecutedQty string `json:"executedQty"` CumQty string `json:"cumQty"` CumBase string `json:"cumBase"` TimeInForce string `json:"timeInForce"` Type string `json:"type"` ReduceOnly bool `json:"reduceOnly"` Side string `json:"side"` PositionSide string `json:"positionSide"` OrigType string `json:"origType"` UpdateTime int64 `json:"updateTime"` }
type PmCRestClient ¶ added in v1.0.1
type PmCRestClient RestClient
func (*PmCRestClient) NewAllOrders ¶ added in v1.0.1
func (client *PmCRestClient) NewAllOrders() *PmCAllOrdersApi
binance PMC PmCAllOrders rest查询所有订单 (USER_DATA)
func (*PmCRestClient) NewOpenOrders ¶ added in v1.0.1
func (client *PmCRestClient) NewOpenOrders() *PmCOpenOrdersApi
交易接口 binance PMC PmCOpenOrders rest查询当前挂单 (USER_DATA)
func (*PmCRestClient) NewPmCAccount ¶ added in v1.0.1
func (client *PmCRestClient) NewPmCAccount() *PmCAccountApi
账户接口 binance PMC PmCAccount 统一账户信息 (USER_DATA)
func (*PmCRestClient) NewPmCAccountBalance ¶ added in v1.0.1
func (client *PmCRestClient) NewPmCAccountBalance() *PmCAccountBalanceApi
binance PMC PmCAccountBalance 统一账户余额 (USER_DATA)
func (*PmCRestClient) NewPmCAccountForC ¶ added in v1.0.1
func (client *PmCRestClient) NewPmCAccountForC() *PmCAccountForCApi
binance PMC PmCAccountForC UM账户信息v2 (USER_DATA)
func (*PmCRestClient) NewPmCAllConditionnalOrderDelete ¶ added in v1.0.1
func (client *PmCRestClient) NewPmCAllConditionnalOrderDelete() *PmCAllConditionnalOrderDeleteApi
func (*PmCRestClient) NewPmCAllOrderDelete ¶ added in v1.0.1
func (client *PmCRestClient) NewPmCAllOrderDelete() *PmCAllOrderDeleteApi
binance PMC PmCAllOrderDelete rest撤销全部订单 (TRADE)
func (*PmCRestClient) NewPmCCommissionRate ¶ added in v1.0.1
func (client *PmCRestClient) NewPmCCommissionRate() *PmCCommissionRateApi
func (*PmCRestClient) NewPmCConditionalOrderDelete ¶ added in v1.0.1
func (client *PmCRestClient) NewPmCConditionalOrderDelete() *PmCConditionalOrderDeleteApi
func (*PmCRestClient) NewPmCConditionalOrderPost ¶ added in v1.0.1
func (client *PmCRestClient) NewPmCConditionalOrderPost() *PmCConditionalOrderPostApi
func (*PmCRestClient) NewPmCListenKeyDelete ¶ added in v1.0.1
func (client *PmCRestClient) NewPmCListenKeyDelete() *PmCListenKeyDeleteApi
binance PMC PmCListenKeyDelete rest关闭listenKey (USER_STREAM)
func (*PmCRestClient) NewPmCListenKeyPost ¶ added in v1.0.1
func (client *PmCRestClient) NewPmCListenKeyPost() *PmCListenKeyPostApi
Ws账户推送相关 binance PMC PmCListenKeyPost rest生成listenKey (USER_STREAM)
func (*PmCRestClient) NewPmCListenKeyPut ¶ added in v1.0.1
func (client *PmCRestClient) NewPmCListenKeyPut() *PmCListenKeyPutApi
binance PMC PmCListenKeyPut rest延长listenKey有效期 (USER_STREAM)
func (*PmCRestClient) NewPmCOrderDelete ¶ added in v1.0.1
func (client *PmCRestClient) NewPmCOrderDelete() *PmCOrderDeleteApi
binance PMC PmCOrderDelete rest撤销订单 (TRADE)
func (*PmCRestClient) NewPmCOrderGet ¶ added in v1.0.1
func (client *PmCRestClient) NewPmCOrderGet() *PmCOrderGetApi
binance PMC PmCOrderGet rest查询订单 (USER_DATA)
func (*PmCRestClient) NewPmCOrderPost ¶ added in v1.0.1
func (client *PmCRestClient) NewPmCOrderPost() *PmCOrderPostApi
binance PMC PmCOrderPost rest下单 (TRADE)
func (*PmCRestClient) NewPmCOrderPut ¶ added in v1.0.1
func (client *PmCRestClient) NewPmCOrderPut() *PmCOrderPutApi
binance PMC PmCOrderPut rest修改订单 (TRADE)
func (*PmCRestClient) NewPmCUserTrades ¶ added in v1.0.1
func (client *PmCRestClient) NewPmCUserTrades() *PmCUserTradesApi
type PmCUserTradesApi ¶ added in v1.0.1
type PmCUserTradesApi struct {
// contains filtered or unexported fields
}
func (*PmCUserTradesApi) Do ¶ added in v1.0.1
func (api *PmCUserTradesApi) Do() (*PmCUserTradesRes, error)
func (*PmCUserTradesApi) EndTime ¶ added in v1.0.1
func (api *PmCUserTradesApi) EndTime(EndTime int64) *PmCUserTradesApi
func (*PmCUserTradesApi) FromId ¶ added in v1.0.1
func (api *PmCUserTradesApi) FromId(FromId int64) *PmCUserTradesApi
func (*PmCUserTradesApi) Limit ¶ added in v1.0.1
func (api *PmCUserTradesApi) Limit(Limit int64) *PmCUserTradesApi
func (*PmCUserTradesApi) Pair ¶ added in v1.0.1
func (api *PmCUserTradesApi) Pair(Pair string) *PmCUserTradesApi
func (*PmCUserTradesApi) RecvWindow ¶ added in v1.0.1
func (api *PmCUserTradesApi) RecvWindow(RecvWindow int64) *PmCUserTradesApi
func (*PmCUserTradesApi) StartTime ¶ added in v1.0.1
func (api *PmCUserTradesApi) StartTime(StartTime int64) *PmCUserTradesApi
func (*PmCUserTradesApi) Symbol ¶ added in v1.0.1
func (api *PmCUserTradesApi) Symbol(Symbol string) *PmCUserTradesApi
func (*PmCUserTradesApi) Timestamp ¶ added in v1.0.1
func (api *PmCUserTradesApi) Timestamp(Timestamp int64) *PmCUserTradesApi
type PmCUserTradesOrder ¶ added in v1.0.1
type PmCUserTradesOrder struct { Symbol string `json:"symbol"` Id int64 `json:"id"` OrderId int64 `json:"orderId"` Pair string `json:"pair"` Side string `json:"side"` Price string `json:"price"` Qty string `json:"qty"` RealizedPnl string `json:"realizedPnl"` MarginAsset string `json:"marginAsset"` BaseQty string `json:"baseQty"` Commission string `json:"commission"` CommissionAsset string `json:"commissionAsset"` Time int64 `json:"time"` PositionSide string `json:"positionSide"` Buyer bool `json:"buyer"` Maker bool `json:"maker"` }
type PmCUserTradesReq ¶ added in v1.0.1
type PmCUserTradesReq struct { Symbol *string `json:"symbol"` //YES 交易对 Pair *string `json:"pair"` //NO StartTime *int64 `json:"startTime"` //NO EndTime *int64 `json:"endTime"` //NO FromId *int64 `json:"fromId"` //NO 返回该fromId及之后的成交,缺省返回最近的成交 Limit *int64 `json:"limit"` //NO 返回的结果集数量 默认值:50 最大值:1000 RecvWindow *int64 `json:"recvWindow"` //NO Timestamp *int64 `json:"timestamp"` //YES }
type PmCUserTradesRes ¶ added in v1.0.1
type PmCUserTradesRes []PmCUserTradesOrder
type PmCWsStreamClient ¶ added in v1.0.1
type PmCWsStreamClient struct { WsStreamClient // contains filtered or unexported fields }
func (*PmCWsStreamClient) Close ¶ added in v1.0.1
func (ws *PmCWsStreamClient) Close() error
func (*PmCWsStreamClient) ConvertToAccountWs ¶ added in v1.0.1
func (ws *PmCWsStreamClient) ConvertToAccountWs(apiKey string, apiSecret string) (*PmCWsStreamClient, error)
func (*PmCWsStreamClient) CreatePayload ¶ added in v1.0.1
func (ws *PmCWsStreamClient) CreatePayload() (*WsPmCPayload, error)
type PmMAccountApi ¶ added in v1.0.1
type PmMAccountApi struct {
// contains filtered or unexported fields
}
func (*PmMAccountApi) Do ¶ added in v1.0.1
func (api *PmMAccountApi) Do() (*PmMAccountRes, error)
func (*PmMAccountApi) RecvWindow ¶ added in v1.0.1
func (api *PmMAccountApi) RecvWindow(RecvWindow int64) *PmMAccountApi
func (*PmMAccountApi) Timestamp ¶ added in v1.0.1
func (api *PmMAccountApi) Timestamp(Timestamp int64) *PmMAccountApi
type PmMAccountBalanceApi ¶ added in v1.0.1
type PmMAccountBalanceApi struct {
// contains filtered or unexported fields
}
func (*PmMAccountBalanceApi) Asset ¶ added in v1.0.1
func (api *PmMAccountBalanceApi) Asset(Asset string) *PmMAccountBalanceApi
func (*PmMAccountBalanceApi) Do ¶ added in v1.0.1
func (api *PmMAccountBalanceApi) Do() (*PmMAccountBalanceRes, error)
func (*PmMAccountBalanceApi) RecvWindow ¶ added in v1.0.1
func (api *PmMAccountBalanceApi) RecvWindow(RecvWindow int64) *PmMAccountBalanceApi
func (*PmMAccountBalanceApi) Timestamp ¶ added in v1.0.1
func (api *PmMAccountBalanceApi) Timestamp(Timestamp int64) *PmMAccountBalanceApi
type PmMAccountBalanceReq ¶ added in v1.0.1
type PmMAccountBalanceRes ¶ added in v1.0.1
type PmMAccountBalanceRes []PmMAccountBalanceRow
type PmMAccountBalanceRow ¶ added in v1.0.1
type PmMAccountBalanceRow struct { Asset string `json:"asset"` //资产 TotalWalletBalance string `json:"totalWalletBalance"` // 钱包余额 = 全仓杠杆未锁定 + 全仓杠杆锁定 + u本位合约钱包余额 + 币本位合约钱包余额 CrossMarginAsset string `json:"crossMarginAsset"` // 全仓资产 = 全仓杠杆未锁定 + 全仓杠杆锁定 CrossMarginBorrowed string `json:"crossMarginBorrowed"` // 全仓杠杆借贷 CrossMarginFree string `json:"crossMarginFree"` // 全仓杠杆未锁定 CrossMarginInterest string `json:"crossMarginInterest"` // 全仓杠杆利息 CrossMarginLocked string `json:"crossMarginLocked"` //全仓杠杆锁定 UmWalletBalance string `json:"umWalletBalance"` // u本位合约钱包余额 UmUnrealizedPNL string `json:"umUnrealizedPNL"` // u本位未实现盈亏 CmWalletBalance string `json:"cmWalletBalance"` // 币本位合约钱包余额 CmUnrealizedPNL string `json:"cmUnrealizedPNL"` // 币本位未实现盈亏 UpdateTime int64 `json:"updateTime"` // 更新时间 NegativeBalance string `json:"negativeBalance"` // 负资产余额 }
type PmMAccountReq ¶ added in v1.0.1
type PmMAccountReq struct { RecvWindow *int64 `json:"recvWindow"` Timestamp *int64 `json:"timestamp"` }
PmMAccount
type PmMAccountRes ¶ added in v1.0.1
type PmMAccountRes struct { UniMMR string `json:"uniMMR"` // 统一账户维持保证金率 AccountEquity string `json:"accountEquity"` // 以USD计价的账户权益 ActualEquity string `json:"actualEquity"` // 不考虑质押率的以USD计价账户权益 AccountInitialMargin string `json:"accountInitialMargin"` // 当前所需起始保证金(基于最新标记价格) AccountMaintMargin string `json:"accountMaintMargin"` // 以USD计价统一账户维持保证金 AccountStatus string `json:"accountStatus"` // 统一账户账户状态:"NORMAL", "MARGIN_CALL", "SUPPLY_MARGIN", "REDUCE_ONLY", "ACTIVE_LIQUIDATION", "FORCE_LIQUIDATION", "BANKRUPTED" VirtualMaxWithdrawAmount string `json:"virtualMaxWithdrawAmount"` // 以USD计价的最大可转出 TotalAvailableBalance string `json:"totalAvailableBalance"` // 以USD计价的可用余额 TotalMarginOpenLoss string `json:"totalMarginOpenLoss"` // 以USD计价的总开仓保证金 UpdateTime int64 `json:"updateTime"` // 更新时间 }
type PmMApi ¶ added in v1.0.1
type PmMApi int
const ( //杠杆账户接口 PmMAccount PmMApi = iota //GET接口 统一账户信息 (USER_DATA) PmMAccountBalance //GET接口 统一账户余额 (USER_DATA) PmMMarginAccount //GET接口 查询全仓杠杆账户详情 (USER_DATA) PmMMarginMaxBorrowable //GET接口 查询账户最大可借贷额度(USER_DATA) PmMMarginMaxTransferable //GET接口 查询最大可转出额 (USER_DATA) PmMMarginInterestHistory //GET接口 获取利息历史 (USER_DATA) //杠杆订单接口 PmMMarginOrderGet //GET接口 查询杠杆账户订单 (USER_DATA) PmMMarginOrderPost //POST接口 杠杆账户下单 (TRADE) PmMMarginOrderDelete //DELETE接口 撤销订单 (TRADE) PmMMarginAllOrders //GET接口 查询杠杆账户所有订单 (USER_DATA) PmMMarginOpenOrders //GET接口 查询杠杆账户挂单记录 (USER_DATA) PmMMarginOCOOrderGet //GET接口 查询杠杆账户OCO订单 (USER_DATA) PmMMarginOCOOrderPost //POST接口 杠杆账户OCO订单 (TRADE) PmMMarginOCOOrderDelete //DELETE接口 撤销OCO订单 (TRADE) PmMMarginOCOAllOrders //GET接口 查询特定杠杆账户所有 OCO (USER_DATA) PmMMarginOCOOpenOrders //GET接口 查询杠杆账户 OCO 挂单 (USER_DATA) //通用接口 PmMPing //GET接口 测试服务器连通性 PmMServerTime //GET接口 获取服务器时间 PmMExchangeInfo //GET接口 获取交易规则和交易对信息。 //行情接口 PmMKlines //GET接口 K线数据 PmMTickerPrice //GET接口 获取交易对最新价格 PmMDepth //GET接口 获取深度信息 PmMTrades //GET接口 近期成交列表 PmMHistoricalTrades //GET接口 历史成交记录 PmMAggTrades //GET接口 近期成交(归集) PmMAvgPrice //GET接口 当前平均价格 PmMUiKlines //GET接口 UIK线数据 PmMTicker24hr //GET接口 24hr 价格变动情况 PmMTickerBookTicker //GET接口 当前最优挂单 PmMTicker //GET接口 滚动窗口价格变动统计 PmMListenKeyPost //POST接口 生成listenKey(USER_STREAM) PmMListenKeyPut //PUT接口 延长listenKey有效期(USER_STREAM) PmMListenKeyDelete //DELETE接口 关闭listenKey(USER_STREAM) )
type PmMListenKeyDeleteApi ¶ added in v1.0.1
type PmMListenKeyDeleteApi struct {
// contains filtered or unexported fields
}
func (*PmMListenKeyDeleteApi) Do ¶ added in v1.0.1
func (api *PmMListenKeyDeleteApi) Do() (*PmMListenKeyDeleteRes, error)
type PmMListenKeyDeleteReq ¶ added in v1.0.1
type PmMListenKeyDeleteReq struct{}
type PmMListenKeyDeleteRes ¶ added in v1.0.1
type PmMListenKeyDeleteRes struct{}
type PmMListenKeyPostApi ¶ added in v1.0.1
type PmMListenKeyPostApi struct {
// contains filtered or unexported fields
}
func (*PmMListenKeyPostApi) Do ¶ added in v1.0.1
func (api *PmMListenKeyPostApi) Do() (*PmMListenKeyPostRes, error)
type PmMListenKeyPostRes ¶ added in v1.0.1
type PmMListenKeyPostRes struct {
ListenKey string `json:"listenKey"`
}
type PmMListenKeyPutApi ¶ added in v1.0.1
type PmMListenKeyPutApi struct {
// contains filtered or unexported fields
}
func (*PmMListenKeyPutApi) Do ¶ added in v1.0.1
func (api *PmMListenKeyPutApi) Do() (*PmMListenKeyPutRes, error)
type PmMListenKeyPutReq ¶ added in v1.0.1
type PmMListenKeyPutReq struct{}
type PmMListenKeyPutRes ¶ added in v1.0.1
type PmMListenKeyPutRes struct{}
type PmMMarginAllOrdersApi ¶ added in v1.0.1
type PmMMarginAllOrdersApi struct {
// contains filtered or unexported fields
}
func (*PmMMarginAllOrdersApi) Do ¶ added in v1.0.1
func (api *PmMMarginAllOrdersApi) Do() (*PmMMarginAllOrdersRes, error)
func (*PmMMarginAllOrdersApi) EndTime ¶ added in v1.0.1
func (api *PmMMarginAllOrdersApi) EndTime(EndTime int64) *PmMMarginAllOrdersApi
func (*PmMMarginAllOrdersApi) Limit ¶ added in v1.0.1
func (api *PmMMarginAllOrdersApi) Limit(Limit int64) *PmMMarginAllOrdersApi
func (*PmMMarginAllOrdersApi) OrderId ¶ added in v1.0.1
func (api *PmMMarginAllOrdersApi) OrderId(OrderId int64) *PmMMarginAllOrdersApi
func (*PmMMarginAllOrdersApi) RecvWindow ¶ added in v1.0.1
func (api *PmMMarginAllOrdersApi) RecvWindow(RecvWindow int64) *PmMMarginAllOrdersApi
func (*PmMMarginAllOrdersApi) StartTime ¶ added in v1.0.1
func (api *PmMMarginAllOrdersApi) StartTime(StartTime int64) *PmMMarginAllOrdersApi
func (*PmMMarginAllOrdersApi) Symbol ¶ added in v1.0.1
func (api *PmMMarginAllOrdersApi) Symbol(Symbol string) *PmMMarginAllOrdersApi
func (*PmMMarginAllOrdersApi) Timestamp ¶ added in v1.0.1
func (api *PmMMarginAllOrdersApi) Timestamp(Timestamp int64) *PmMMarginAllOrdersApi
type PmMMarginAllOrdersReq ¶ added in v1.0.1
type PmMMarginAllOrdersReq struct { Symbol *string `json:"symbol"` //YES OrderId *int64 `json:"orderId"` //NO StartTime *int64 `json:"startTime"` //NO EndTime *int64 `json:"endTime"` //NO Limit *int64 `json:"limit"` //NO 默认 500;最大500. RecvWindow *int64 `json:"recvWindow"` //NO 赋值不能大于 60000 Timestamp *int64 `json:"timestamp"` //YES }
type PmMMarginAllOrdersRes ¶ added in v1.0.1
type PmMMarginAllOrdersRes []PmMMarginOrder
type PmMMarginInterestHistoryApi ¶ added in v1.0.1
type PmMMarginInterestHistoryApi struct {
// contains filtered or unexported fields
}
func (*PmMMarginInterestHistoryApi) Archived ¶ added in v1.0.1
func (api *PmMMarginInterestHistoryApi) Archived(Archived string) *PmMMarginInterestHistoryApi
func (*PmMMarginInterestHistoryApi) Asset ¶ added in v1.0.1
func (api *PmMMarginInterestHistoryApi) Asset(Asset string) *PmMMarginInterestHistoryApi
func (*PmMMarginInterestHistoryApi) Current ¶ added in v1.0.1
func (api *PmMMarginInterestHistoryApi) Current(Current int64) *PmMMarginInterestHistoryApi
func (*PmMMarginInterestHistoryApi) Do ¶ added in v1.0.1
func (api *PmMMarginInterestHistoryApi) Do() (*PmMMarginInterestHistoryRes, error)
func (*PmMMarginInterestHistoryApi) EndTime ¶ added in v1.0.1
func (api *PmMMarginInterestHistoryApi) EndTime(EndTime int64) *PmMMarginInterestHistoryApi
func (*PmMMarginInterestHistoryApi) RecvWindow ¶ added in v1.0.1
func (api *PmMMarginInterestHistoryApi) RecvWindow(RecvWindow int64) *PmMMarginInterestHistoryApi
func (*PmMMarginInterestHistoryApi) Size ¶ added in v1.0.1
func (api *PmMMarginInterestHistoryApi) Size(Size int64) *PmMMarginInterestHistoryApi
func (*PmMMarginInterestHistoryApi) StartTime ¶ added in v1.0.1
func (api *PmMMarginInterestHistoryApi) StartTime(StartTime int64) *PmMMarginInterestHistoryApi
func (*PmMMarginInterestHistoryApi) Timestamp ¶ added in v1.0.1
func (api *PmMMarginInterestHistoryApi) Timestamp(Timestamp int64) *PmMMarginInterestHistoryApi
type PmMMarginInterestHistoryReq ¶ added in v1.0.1
type PmMMarginInterestHistoryReq struct { Asset *string `json:"asset"` //NO StartTime *int64 `json:"startTime"` EndTime *int64 `json:"endTime"` Current *int64 `json:"current"` //当前查询页。 开始值 1. 默认:1 Size *int64 `json:"size"` //默认:10 最大:100 Archived *string `json:"archived"` //默认: false. 查询6个月以前的数据,需要设为 true RecvWindow *int64 `json:"recvWindow"` Timestamp *int64 `json:"timestamp"` }
type PmMMarginInterestHistoryRes ¶ added in v1.0.1
type PmMMarginInterestHistoryRes struct { Rows []PmMMarginInterestHistoryRow `json:"rows"` Total int `json:"total"` }
type PmMMarginInterestHistoryRow ¶ added in v1.0.1
type PmMMarginMaxBorrowableApi ¶ added in v1.0.1
type PmMMarginMaxBorrowableApi struct {
// contains filtered or unexported fields
}
func (*PmMMarginMaxBorrowableApi) Asset ¶ added in v1.0.1
func (api *PmMMarginMaxBorrowableApi) Asset(Asset string) *PmMMarginMaxBorrowableApi
func (*PmMMarginMaxBorrowableApi) Do ¶ added in v1.0.1
func (api *PmMMarginMaxBorrowableApi) Do() (*PmMMarginMaxBorrowableRes, error)
func (*PmMMarginMaxBorrowableApi) RecvWindow ¶ added in v1.0.1
func (api *PmMMarginMaxBorrowableApi) RecvWindow(RecvWindow int64) *PmMMarginMaxBorrowableApi
func (*PmMMarginMaxBorrowableApi) Timestamp ¶ added in v1.0.1
func (api *PmMMarginMaxBorrowableApi) Timestamp(Timestamp int64) *PmMMarginMaxBorrowableApi
type PmMMarginMaxBorrowableReq ¶ added in v1.0.1
type PmMMarginMaxBorrowableRes ¶ added in v1.0.1
type PmMMarginMaxTransferableApi ¶ added in v1.0.1
type PmMMarginMaxTransferableApi struct {
// contains filtered or unexported fields
}
func (*PmMMarginMaxTransferableApi) Asset ¶ added in v1.0.1
func (api *PmMMarginMaxTransferableApi) Asset(Asset string) *PmMMarginMaxTransferableApi
func (*PmMMarginMaxTransferableApi) Do ¶ added in v1.0.1
func (api *PmMMarginMaxTransferableApi) Do() (*PmMMarginMaxTransferableRes, error)
func (*PmMMarginMaxTransferableApi) RecvWindow ¶ added in v1.0.1
func (api *PmMMarginMaxTransferableApi) RecvWindow(RecvWindow int64) *PmMMarginMaxTransferableApi
func (*PmMMarginMaxTransferableApi) Timestamp ¶ added in v1.0.1
func (api *PmMMarginMaxTransferableApi) Timestamp(Timestamp int64) *PmMMarginMaxTransferableApi
type PmMMarginMaxTransferableReq ¶ added in v1.0.1
type PmMMarginMaxTransferableRes ¶ added in v1.0.1
type PmMMarginMaxTransferableRes struct {
Anount string `json:"anount"`
}
type PmMMarginOCOAllOrdersApi ¶ added in v1.0.1
type PmMMarginOCOAllOrdersApi struct {
// contains filtered or unexported fields
}
func (*PmMMarginOCOAllOrdersApi) Do ¶ added in v1.0.1
func (api *PmMMarginOCOAllOrdersApi) Do() (*PmMMarginOCOAllOrdersRes, error)
func (*PmMMarginOCOAllOrdersApi) EndTime ¶ added in v1.0.1
func (api *PmMMarginOCOAllOrdersApi) EndTime(EndTime int64) *PmMMarginOCOAllOrdersApi
func (*PmMMarginOCOAllOrdersApi) FromId ¶ added in v1.0.1
func (api *PmMMarginOCOAllOrdersApi) FromId(FromId int64) *PmMMarginOCOAllOrdersApi
func (*PmMMarginOCOAllOrdersApi) Limit ¶ added in v1.0.1
func (api *PmMMarginOCOAllOrdersApi) Limit(Limit int64) *PmMMarginOCOAllOrdersApi
func (*PmMMarginOCOAllOrdersApi) RecvWindow ¶ added in v1.0.1
func (api *PmMMarginOCOAllOrdersApi) RecvWindow(RecvWindow int64) *PmMMarginOCOAllOrdersApi
func (*PmMMarginOCOAllOrdersApi) StartTime ¶ added in v1.0.1
func (api *PmMMarginOCOAllOrdersApi) StartTime(StartTime int64) *PmMMarginOCOAllOrdersApi
func (*PmMMarginOCOAllOrdersApi) Timestamp ¶ added in v1.0.1
func (api *PmMMarginOCOAllOrdersApi) Timestamp(Timestamp int64) *PmMMarginOCOAllOrdersApi
type PmMMarginOCOAllOrdersReq ¶ added in v1.0.1
type PmMMarginOCOAllOrdersReq struct { FromId *int64 `json:"fromId"` //NO 提供该项后, startTime 和 endTime 都不可提供 StartTime *int64 `json:"startTime"` //NO EndTime *int64 `json:"endTime"` //NO Limit *int64 `json:"limit"` //NO 默认 500;最大500. RecvWindow *int64 `json:"recvWindow"` //NO 赋值不能大于 60000 Timestamp *int64 `json:"timestamp"` //YES }
type PmMMarginOCOAllOrdersRes ¶ added in v1.0.1
type PmMMarginOCOAllOrdersRes []PmMMarginOCOOrderGetRes
type PmMMarginOCOOpenOrdersApi ¶ added in v1.0.1
type PmMMarginOCOOpenOrdersApi struct {
// contains filtered or unexported fields
}
func (*PmMMarginOCOOpenOrdersApi) Do ¶ added in v1.0.1
func (api *PmMMarginOCOOpenOrdersApi) Do() (*PmMMarginOCOOpenOrdersRes, error)
func (*PmMMarginOCOOpenOrdersApi) RecvWindow ¶ added in v1.0.1
func (api *PmMMarginOCOOpenOrdersApi) RecvWindow(RecvWindow int64) *PmMMarginOCOOpenOrdersApi
func (*PmMMarginOCOOpenOrdersApi) Timestamp ¶ added in v1.0.1
func (api *PmMMarginOCOOpenOrdersApi) Timestamp(Timestamp int64) *PmMMarginOCOOpenOrdersApi
type PmMMarginOCOOpenOrdersReq ¶ added in v1.0.1
type PmMMarginOCOOpenOrdersRes ¶ added in v1.0.1
type PmMMarginOCOOpenOrdersRes []PmMMarginOCOOrderGetRes
type PmMMarginOCOOrderDeleteApi ¶ added in v1.0.1
type PmMMarginOCOOrderDeleteApi struct {
// contains filtered or unexported fields
}
func (*PmMMarginOCOOrderDeleteApi) Do ¶ added in v1.0.1
func (api *PmMMarginOCOOrderDeleteApi) Do() (*PmMMarginOCOOrderDeleteRes, error)
func (*PmMMarginOCOOrderDeleteApi) ListClientOrderId ¶ added in v1.0.1
func (api *PmMMarginOCOOrderDeleteApi) ListClientOrderId(ListClientOrderId string) *PmMMarginOCOOrderDeleteApi
func (*PmMMarginOCOOrderDeleteApi) NewClientOrderId ¶ added in v1.0.1
func (api *PmMMarginOCOOrderDeleteApi) NewClientOrderId(NewClientOrderId string) *PmMMarginOCOOrderDeleteApi
func (*PmMMarginOCOOrderDeleteApi) OrderListId ¶ added in v1.0.1
func (api *PmMMarginOCOOrderDeleteApi) OrderListId(OrderListId int64) *PmMMarginOCOOrderDeleteApi
func (*PmMMarginOCOOrderDeleteApi) RecvWindow ¶ added in v1.0.1
func (api *PmMMarginOCOOrderDeleteApi) RecvWindow(RecvWindow int64) *PmMMarginOCOOrderDeleteApi
func (*PmMMarginOCOOrderDeleteApi) Symbol ¶ added in v1.0.1
func (api *PmMMarginOCOOrderDeleteApi) Symbol(Symbol string) *PmMMarginOCOOrderDeleteApi
func (*PmMMarginOCOOrderDeleteApi) Timestamp ¶ added in v1.0.1
func (api *PmMMarginOCOOrderDeleteApi) Timestamp(Timestamp int64) *PmMMarginOCOOrderDeleteApi
type PmMMarginOCOOrderDeleteReq ¶ added in v1.0.1
type PmMMarginOCOOrderDeleteReq struct { Symbol *string `json:"symbol"` //YES OrderListId *int64 `json:"orderListId"` //NO orderListId 或 listClientOrderId 必须被提供 ListClientOrderId *string `json:"listClientOrderId"` //NO orderListId 或 listClientOrderId 必须被提供 NewClientOrderId *string `json:"newClientOrderId"` //NO 用户自定义的本次撤销操作的ID(注意不是被撤销的订单的自定义ID)。如无指定会自动赋值 RecvWindow *int64 `json:"recvWindow"` //NO 赋值不能超过 60000 Timestamp *int64 `json:"timestamp"` //YES }
type PmMMarginOCOOrderDeleteRes ¶ added in v1.0.1
type PmMMarginOCOOrderDeleteRes struct { OrderListId int64 `json:"orderListId"` ContingencyType string `json:"contingencyType"` ListStatusType string `json:"listStatusType"` ListOrderStatus string `json:"listOrderStatus"` ListClientOrderId string `json:"listClientOrderId"` TransactionTime int64 `json:"transactionTime"` Symbol string `json:"symbol"` Orders []PmPOCOOrder `json:"orders"` OrderReports []PmPOCODeleteOrderReport `json:"orderReports"` }
type PmMMarginOCOOrderGetApi ¶ added in v1.0.1
type PmMMarginOCOOrderGetApi struct {
// contains filtered or unexported fields
}
func (*PmMMarginOCOOrderGetApi) Do ¶ added in v1.0.1
func (api *PmMMarginOCOOrderGetApi) Do() (*PmMMarginOCOOrderGetRes, error)
func (*PmMMarginOCOOrderGetApi) OrderListId ¶ added in v1.0.1
func (api *PmMMarginOCOOrderGetApi) OrderListId(OrderListId int64) *PmMMarginOCOOrderGetApi
func (*PmMMarginOCOOrderGetApi) OrigClientOrderId ¶ added in v1.0.1
func (api *PmMMarginOCOOrderGetApi) OrigClientOrderId(OrigClientOrderId string) *PmMMarginOCOOrderGetApi
func (*PmMMarginOCOOrderGetApi) RecvWindow ¶ added in v1.0.1
func (api *PmMMarginOCOOrderGetApi) RecvWindow(RecvWindow int64) *PmMMarginOCOOrderGetApi
func (*PmMMarginOCOOrderGetApi) Timestamp ¶ added in v1.0.1
func (api *PmMMarginOCOOrderGetApi) Timestamp(Timestamp int64) *PmMMarginOCOOrderGetApi
type PmMMarginOCOOrderGetReq ¶ added in v1.0.1
type PmMMarginOCOOrderGetReq struct { OrderListId *int64 `json:"orderListId"` //NO orderListId 或 listClientOrderId 必须被提供 OrigClientOrderId *string `json:"origClientOrderId"` //NO orderListId 或 listClientOrderId 必须被提供 RecvWindow *int64 `json:"recvWindow"` //NO 赋值不能大于 60000 Timestamp *int64 `json:"timestamp"` //YES }
type PmMMarginOCOOrderGetRes ¶ added in v1.0.1
type PmMMarginOCOOrderGetRes struct { OrderListId int64 `json:"orderListId"` ContingencyType string `json:"contingencyType"` ListStatusType string `json:"listStatusType"` ListOrderStatus string `json:"listOrderStatus"` ListClientOrderId string `json:"listClientOrderId"` TransactionTime int64 `json:"transactionTime"` Symbol string `json:"symbol"` Orders []PmPOCOOrder `json:"orders"` }
type PmMMarginOCOOrderPostApi ¶ added in v1.0.1
type PmMMarginOCOOrderPostApi struct {
// contains filtered or unexported fields
}
func (*PmMMarginOCOOrderPostApi) Do ¶ added in v1.0.1
func (api *PmMMarginOCOOrderPostApi) Do() (*PmMMarginOCOOrderPostRes, error)
func (*PmMMarginOCOOrderPostApi) LimitClientOrderId ¶ added in v1.0.1
func (api *PmMMarginOCOOrderPostApi) LimitClientOrderId(LimitClientOrderId string) *PmMMarginOCOOrderPostApi
func (*PmMMarginOCOOrderPostApi) LimitIcebergQty ¶ added in v1.0.1
func (api *PmMMarginOCOOrderPostApi) LimitIcebergQty(LimitIcebergQty decimal.Decimal) *PmMMarginOCOOrderPostApi
func (*PmMMarginOCOOrderPostApi) ListClientOrderId ¶ added in v1.0.1
func (api *PmMMarginOCOOrderPostApi) ListClientOrderId(ListClientOrderId string) *PmMMarginOCOOrderPostApi
func (*PmMMarginOCOOrderPostApi) NewOrderRespType ¶ added in v1.0.1
func (api *PmMMarginOCOOrderPostApi) NewOrderRespType(NewOrderRespType string) *PmMMarginOCOOrderPostApi
func (*PmMMarginOCOOrderPostApi) Price ¶ added in v1.0.1
func (api *PmMMarginOCOOrderPostApi) Price(Price decimal.Decimal) *PmMMarginOCOOrderPostApi
func (*PmMMarginOCOOrderPostApi) Quantity ¶ added in v1.0.1
func (api *PmMMarginOCOOrderPostApi) Quantity(Quantity decimal.Decimal) *PmMMarginOCOOrderPostApi
func (*PmMMarginOCOOrderPostApi) RecvWindow ¶ added in v1.0.1
func (api *PmMMarginOCOOrderPostApi) RecvWindow(RecvWindow int64) *PmMMarginOCOOrderPostApi
func (*PmMMarginOCOOrderPostApi) Side ¶ added in v1.0.1
func (api *PmMMarginOCOOrderPostApi) Side(Side string) *PmMMarginOCOOrderPostApi
func (*PmMMarginOCOOrderPostApi) SideEffectType ¶ added in v1.0.1
func (api *PmMMarginOCOOrderPostApi) SideEffectType(SideEffectType string) *PmMMarginOCOOrderPostApi
func (*PmMMarginOCOOrderPostApi) StopClientOrderId ¶ added in v1.0.1
func (api *PmMMarginOCOOrderPostApi) StopClientOrderId(StopClientOrderId string) *PmMMarginOCOOrderPostApi
func (*PmMMarginOCOOrderPostApi) StopIcebergQty ¶ added in v1.0.1
func (api *PmMMarginOCOOrderPostApi) StopIcebergQty(StopIcebergQty decimal.Decimal) *PmMMarginOCOOrderPostApi
func (*PmMMarginOCOOrderPostApi) StopLimitPrice ¶ added in v1.0.1
func (api *PmMMarginOCOOrderPostApi) StopLimitPrice(StopLimitPrice decimal.Decimal) *PmMMarginOCOOrderPostApi
func (*PmMMarginOCOOrderPostApi) StopLimitTimeInForce ¶ added in v1.0.1
func (api *PmMMarginOCOOrderPostApi) StopLimitTimeInForce(StopLimitTimeInForce string) *PmMMarginOCOOrderPostApi
func (*PmMMarginOCOOrderPostApi) StopPrice ¶ added in v1.0.1
func (api *PmMMarginOCOOrderPostApi) StopPrice(StopPrice decimal.Decimal) *PmMMarginOCOOrderPostApi
func (*PmMMarginOCOOrderPostApi) Symbol ¶ added in v1.0.1
func (api *PmMMarginOCOOrderPostApi) Symbol(Symbol string) *PmMMarginOCOOrderPostApi
func (*PmMMarginOCOOrderPostApi) Timestamp ¶ added in v1.0.1
func (api *PmMMarginOCOOrderPostApi) Timestamp(Timestamp int64) *PmMMarginOCOOrderPostApi
type PmMMarginOCOOrderPostReq ¶ added in v1.0.1
type PmMMarginOCOOrderPostReq struct { Symbol *string `json:"symbol"` //YES 交易对 ListClientOrderId *string `json:"listClientOrderId"` //NO 整个 orderList 的唯一 ID Side *string `json:"side"` //YES 详见枚举定义:订单方向 Quantity *decimal.Decimal `json:"quantity"` //YES LimitClientOrderId *string `json:"limitClientOrderId"` //NO 限价单的唯一 ID Price *decimal.Decimal `json:"price"` //YES LimitIcebergQty *decimal.Decimal `json:"limitIcebergQty"` //NO StopClientOrderId *string `json:"stopClientOrderId"` //NO 止损/止损限价单的唯一 ID StopPrice *decimal.Decimal `json:"stopPrice"` //YES StopLimitPrice *decimal.Decimal `json:"stopLimitPrice"` //NO 如果提供,须配合提交stopLimitTimeInForce StopIcebergQty *decimal.Decimal `json:"stopIcebergQty"` //NO StopLimitTimeInForce *string `json:"stopLimitTimeInForce"` //NO 有效值 GTC/FOK/IOC NewOrderRespType *string `json:"newOrderRespType"` //NO 详见枚举定义:订单返回类型 SideEffectType *string `json:"sideEffectType"` //NO NO_SIDE_EFFECT, MARGIN_BUY, AUTO_REPAY; 默认为 NO_SIDE_EFFECT RecvWindow *int64 `json:"recvWindow"` //NO 不能大于 60000 Timestamp *int64 `json:"timestamp"` //YES }
type PmMMarginOCOOrderPostRes ¶ added in v1.0.1
type PmMMarginOCOOrderPostRes struct { OrderListId int64 `json:"orderListId"` ContingencyType string `json:"contingencyType"` ListStatusType string `json:"listStatusType"` ListOrderStatus string `json:"listOrderStatus"` ListClientOrderId string `json:"listClientOrderId"` TransactionTime int64 `json:"transactionTime"` Symbol string `json:"symbol"` MarginBuyBorrowAmount string `json:"marginBuyBorrowAmount"` // 下单后没有发生借款则不返回该字段 MarginBuyBorrowAsset string `json:"marginBuyBorrowAsset"` // 下单后没有发生借款则不返回该字段 Orders []PmPOCOOrder `json:"orders"` OrderReports []PmPOCOOrderReport `json:"orderReports"` }
type PmMMarginOpenOrdersApi ¶ added in v1.0.1
type PmMMarginOpenOrdersApi struct {
// contains filtered or unexported fields
}
func (*PmMMarginOpenOrdersApi) Do ¶ added in v1.0.1
func (api *PmMMarginOpenOrdersApi) Do() (*PmMMarginOpenOrdersRes, error)
func (*PmMMarginOpenOrdersApi) RecvWindow ¶ added in v1.0.1
func (api *PmMMarginOpenOrdersApi) RecvWindow(RecvWindow int64) *PmMMarginOpenOrdersApi
func (*PmMMarginOpenOrdersApi) Symbol ¶ added in v1.0.1
func (api *PmMMarginOpenOrdersApi) Symbol(Symbol string) *PmMMarginOpenOrdersApi
func (*PmMMarginOpenOrdersApi) Timestamp ¶ added in v1.0.1
func (api *PmMMarginOpenOrdersApi) Timestamp(Timestamp int64) *PmMMarginOpenOrdersApi
type PmMMarginOpenOrdersReq ¶ added in v1.0.1
type PmMMarginOpenOrdersRes ¶ added in v1.0.1
type PmMMarginOpenOrdersRes []PmMMarginOrder
type PmMMarginOrder ¶ added in v1.0.1
type PmMMarginOrder struct { ClientOrderId string `json:"clientOrderId"` // 用户自定义的订单号 CummulativeQuoteQty string `json:"cummulativeQuoteQty"` // 成交金额 ExecutedQty string `json:"executedQty"` // 成交量 IcebergQty string `json:"icebergQty"` // 冰山数量 IsWorking bool `json:"isWorking"` // 是否生效 OrderId int64 `gorm:"primaryKey" json:"orderId"` // 系统订单号 OrigQty string `json:"origQty"` // 原始委托数量 Price string `json:"price"` // 委托价格 Side string `json:"side"` // 买卖方向 Status string `json:"status"` // 订单状态 StopPrice string `json:"stopPrice"` // 触发价格 Symbol string `json:"symbol"` // 交易对 Time int64 `json:"time"` // 订单时间 TimeInForce string `json:"timeInForce"` // 有效方法 Type string `json:"type"` // 订单类型 UpdateTime int64 `json:"updateTime"` // 更新时间 AccountId int64 `json:"accountId"` // 账户ID SelfTradePreventionMode string `json:"selfTradePreventionMode"` // 是否开启条件单触发保护 PreventedMatchId string `json:"preventedMatchId"` // 触发条件单的订单号 PreventedQuantity string `json:"preventedQuantity"` // 触发条件单的成交量 }
type PmMMarginOrderDeleteApi ¶ added in v1.0.1
type PmMMarginOrderDeleteApi struct {
// contains filtered or unexported fields
}
func (*PmMMarginOrderDeleteApi) Do ¶ added in v1.0.1
func (api *PmMMarginOrderDeleteApi) Do() (*PmMMarginOrderDeleteRes, error)
func (*PmMMarginOrderDeleteApi) NewClientOrderId ¶ added in v1.0.1
func (api *PmMMarginOrderDeleteApi) NewClientOrderId(NewClientOrderId string) *PmMMarginOrderDeleteApi
func (*PmMMarginOrderDeleteApi) OrderId ¶ added in v1.0.1
func (api *PmMMarginOrderDeleteApi) OrderId(OrderId int64) *PmMMarginOrderDeleteApi
func (*PmMMarginOrderDeleteApi) OrigClientOrderId ¶ added in v1.0.1
func (api *PmMMarginOrderDeleteApi) OrigClientOrderId(OrigClientOrderId int64) *PmMMarginOrderDeleteApi
func (*PmMMarginOrderDeleteApi) RecvWindow ¶ added in v1.0.1
func (api *PmMMarginOrderDeleteApi) RecvWindow(RecvWindow int64) *PmMMarginOrderDeleteApi
func (*PmMMarginOrderDeleteApi) Symbol ¶ added in v1.0.1
func (api *PmMMarginOrderDeleteApi) Symbol(Symbol string) *PmMMarginOrderDeleteApi
func (*PmMMarginOrderDeleteApi) Timestamp ¶ added in v1.0.1
func (api *PmMMarginOrderDeleteApi) Timestamp(Timestamp int64) *PmMMarginOrderDeleteApi
type PmMMarginOrderDeleteReq ¶ added in v1.0.1
type PmMMarginOrderDeleteReq struct { Symbol *string `json:"symbol"` //YES 交易对 OrderId *int64 `json:"orderId"` //NO 订单ID OrigClientOrderId *int64 `json:"origClientOrderId"` //NO 必须发送 orderId 或 origClientOrderId 其中一个 NewClientOrderId *string `json:"newClientOrderId"` //NO 用于唯一识别此撤销订单,默认自动生成。 RecvWindow *int64 `json:"recvWindow"` //NO 赋值不能超过 60000 Timestamp *int64 `json:"timestamp"` //YES }
type PmMMarginOrderDeleteRes ¶ added in v1.0.1
type PmMMarginOrderDeleteRes struct { Symbol string `json:"symbol"` OrderId int64 `json:"orderId"` OrigClientOrderId string `json:"origClientOrderId"` ClientOrderId string `json:"clientOrderId"` Price string `json:"price"` OrigQty string `json:"origQty"` ExecutedQty string `json:"executedQty"` CummulativeQuoteQty string `json:"cummulativeQuoteQty"` Status string `json:"status"` TimeInForce string `json:"timeInForce"` Type string `json:"type"` Side string `json:"side"` }
type PmMMarginOrderGetApi ¶ added in v1.0.1
type PmMMarginOrderGetApi struct {
// contains filtered or unexported fields
}
func (*PmMMarginOrderGetApi) Do ¶ added in v1.0.1
func (api *PmMMarginOrderGetApi) Do() (*PmMMarginOrderGetRes, error)
func (*PmMMarginOrderGetApi) OrderId ¶ added in v1.0.1
func (api *PmMMarginOrderGetApi) OrderId(OrderId int64) *PmMMarginOrderGetApi
func (*PmMMarginOrderGetApi) OrigClientOrderId ¶ added in v1.0.1
func (api *PmMMarginOrderGetApi) OrigClientOrderId(OrigClientOrderId int64) *PmMMarginOrderGetApi
func (*PmMMarginOrderGetApi) RecvWindow ¶ added in v1.0.1
func (api *PmMMarginOrderGetApi) RecvWindow(RecvWindow int64) *PmMMarginOrderGetApi
func (*PmMMarginOrderGetApi) Symbol ¶ added in v1.0.1
func (api *PmMMarginOrderGetApi) Symbol(Symbol string) *PmMMarginOrderGetApi
func (*PmMMarginOrderGetApi) Timestamp ¶ added in v1.0.1
func (api *PmMMarginOrderGetApi) Timestamp(Timestamp int64) *PmMMarginOrderGetApi
type PmMMarginOrderGetReq ¶ added in v1.0.1
type PmMMarginOrderGetRes ¶ added in v1.0.1
type PmMMarginOrderGetRes PmMMarginOrder
type PmMMarginOrderPostApi ¶ added in v1.0.1
type PmMMarginOrderPostApi struct {
// contains filtered or unexported fields
}
func (*PmMMarginOrderPostApi) AutoRepayAtCancel ¶ added in v1.0.1
func (api *PmMMarginOrderPostApi) AutoRepayAtCancel(AutoRepayAtCancel bool) *PmMMarginOrderPostApi
func (*PmMMarginOrderPostApi) Do ¶ added in v1.0.1
func (api *PmMMarginOrderPostApi) Do() (*PmMMarginOrderPostRes, error)
func (*PmMMarginOrderPostApi) IcebergQty ¶ added in v1.0.1
func (api *PmMMarginOrderPostApi) IcebergQty(IcebergQty decimal.Decimal) *PmMMarginOrderPostApi
func (*PmMMarginOrderPostApi) NewClientOrderId ¶ added in v1.0.1
func (api *PmMMarginOrderPostApi) NewClientOrderId(NewClientOrderId string) *PmMMarginOrderPostApi
func (*PmMMarginOrderPostApi) NewOrderRespType ¶ added in v1.0.1
func (api *PmMMarginOrderPostApi) NewOrderRespType(NewOrderRespType string) *PmMMarginOrderPostApi
func (*PmMMarginOrderPostApi) Price ¶ added in v1.0.1
func (api *PmMMarginOrderPostApi) Price(Price decimal.Decimal) *PmMMarginOrderPostApi
func (*PmMMarginOrderPostApi) Quantity ¶ added in v1.0.1
func (api *PmMMarginOrderPostApi) Quantity(Quantity decimal.Decimal) *PmMMarginOrderPostApi
func (*PmMMarginOrderPostApi) QuoteOrderQty ¶ added in v1.0.1
func (api *PmMMarginOrderPostApi) QuoteOrderQty(QuoteOrderQty decimal.Decimal) *PmMMarginOrderPostApi
func (*PmMMarginOrderPostApi) RecvWindow ¶ added in v1.0.1
func (api *PmMMarginOrderPostApi) RecvWindow(RecvWindow int64) *PmMMarginOrderPostApi
func (*PmMMarginOrderPostApi) SelfTradePreventionMode ¶ added in v1.0.1
func (api *PmMMarginOrderPostApi) SelfTradePreventionMode(SelfTradePreventionMode string) *PmMMarginOrderPostApi
func (*PmMMarginOrderPostApi) Side ¶ added in v1.0.1
func (api *PmMMarginOrderPostApi) Side(Side string) *PmMMarginOrderPostApi
func (*PmMMarginOrderPostApi) SideEffectType ¶ added in v1.0.1
func (api *PmMMarginOrderPostApi) SideEffectType(SideEffectType string) *PmMMarginOrderPostApi
func (*PmMMarginOrderPostApi) StopPrice ¶ added in v1.0.1
func (api *PmMMarginOrderPostApi) StopPrice(StopPrice decimal.Decimal) *PmMMarginOrderPostApi
func (*PmMMarginOrderPostApi) Symbol ¶ added in v1.0.1
func (api *PmMMarginOrderPostApi) Symbol(Symbol string) *PmMMarginOrderPostApi
func (*PmMMarginOrderPostApi) TimeInForce ¶ added in v1.0.1
func (api *PmMMarginOrderPostApi) TimeInForce(TimeInForce string) *PmMMarginOrderPostApi
func (*PmMMarginOrderPostApi) Timestamp ¶ added in v1.0.1
func (api *PmMMarginOrderPostApi) Timestamp(Timestamp int64) *PmMMarginOrderPostApi
func (*PmMMarginOrderPostApi) Type ¶ added in v1.0.1
func (api *PmMMarginOrderPostApi) Type(Type string) *PmMMarginOrderPostApi
type PmMMarginOrderPostReq ¶ added in v1.0.1
type PmMMarginOrderPostReq struct { Symbol *string `json:"symbol"` //YES 交易对 Side *string `json:"side"` //YES BUY ; SELL Type *string `json:"type"` //YES 详见枚举定义:订单类型 Quantity *decimal.Decimal `json:"quantity"` //NO QuoteOrderQty *decimal.Decimal `json:"quoteOrderQty"` //NO Price *decimal.Decimal `json:"price"` //NO StopPrice *decimal.Decimal `json:"stopPrice"` //NO 与 STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT,和 TAKE_PROFIT_LIMIT 订单一起使用 NewClientOrderId *string `json:"newClientOrderId"` //NO 客户自定义的唯一订单ID。若未发送自动生成。 NewOrderRespType *string `json:"newOrderRespType"` //NO 设置响应: JSON。 ACK, RESULT, 或 FULL; MARKET 和 LIMIT 订单类型默认为 FULL, 所有其他订单默认为 ACK IcebergQty *decimal.Decimal `json:"icebergQty"` //NO 与 LIMIT, STOP_LOSS_LIMIT,和 TAKE_PROFIT_LIMIT 一起使用创建 iceberg 订单 SideEffectType *string `json:"sideEffectType"` //NO NO_SIDE_EFFECT, MARGIN_BUY,AUTO_REPAY,AUTO_BORROW_REPAY;默认为 NO_SIDE_EFFECT TimeInForce *string `json:"timeInForce"` //NO GTC,IOC,FOK SelfTradePreventionMode *string `json:"selfTradePreventionMode"` //NO 允许的 ENUM 取决于交易对的配置。支持的值有 EXPIRE_TAKER,EXPIRE_MAKER,EXPIRE_BOTH,NONE AutoRepayAtCancel *bool `json:"autoRepayAtCancel"` //NO Only when MARGIN_BUY or AUTO_BORROW_REPAY order takes effect, true means that the debt generated by the order needs to be repay after the order is cancelled. The default is true RecvWindow *int64 `json:"recvWindow"` //NO 赋值不能超过 60000 Timestamp *int64 `json:"timestamp"` //YES }
type PmMMarginOrderPostRes ¶ added in v1.0.1
type PmMMarginOrderPostRes struct { Symbol string `json:"symbol"` OrderId int64 `json:"orderId"` ClientOrderId string `json:"clientOrderId"` TransactTime int64 `json:"transactTime"` Price string `json:"price"` OrigQty string `json:"origQty"` ExecutedQty string `json:"executedQty"` CummulativeQuoteQty string `json:"cummulativeQuoteQty"` Status string `json:"status"` TimeInForce string `json:"timeInForce"` Type string `json:"type"` Side string `json:"side"` MarginBuyBorrowAmount string `json:"marginBuyBorrowAmount"` MarginBuyBorrowAsset string `json:"marginBuyBorrowAsset"` PmMMarginOrderPostRow []PmMMarginOrderPostRow `json:"fills"` }
type PmMMarginOrderPostRow ¶ added in v1.0.1
type PmMRestClient ¶ added in v1.0.1
type PmMRestClient RestClient
func (*PmMRestClient) NewPmMAccount ¶ added in v1.0.1
func (client *PmMRestClient) NewPmMAccount() *PmMAccountApi
账户接口 binance PMM PmMAccount 统一账户信息 (USER_DATA)
func (*PmMRestClient) NewPmMAccountBalance ¶ added in v1.0.1
func (client *PmMRestClient) NewPmMAccountBalance() *PmMAccountBalanceApi
binance PMM PmMAccountBalance 统一账户余额 (USER_DATA)
func (*PmMRestClient) NewPmMListenKeyDelete ¶ added in v1.0.1
func (client *PmMRestClient) NewPmMListenKeyDelete() *PmMListenKeyDeleteApi
binance PMM PmMListenKeyDelete rest关闭listenKey (USER_STREAM)
func (*PmMRestClient) NewPmMListenKeyPost ¶ added in v1.0.1
func (client *PmMRestClient) NewPmMListenKeyPost() *PmMListenKeyPostApi
Ws账户推送相关 binance PMM PmMListenKeyPost rest生成listenKey (USER_STREAM)
func (*PmMRestClient) NewPmMListenKeyPut ¶ added in v1.0.1
func (client *PmMRestClient) NewPmMListenKeyPut() *PmMListenKeyPutApi
binance PMM PmMListenKeyPut rest延长listenKey有效期 (USER_STREAM)
func (*PmMRestClient) NewPmMMarginAllOrders ¶ added in v1.0.1
func (client *PmMRestClient) NewPmMMarginAllOrders() *PmMMarginAllOrdersApi
func (*PmMRestClient) NewPmMMarginInterestHistory ¶ added in v1.0.1
func (client *PmMRestClient) NewPmMMarginInterestHistory() *PmMMarginInterestHistoryApi
func (*PmMRestClient) NewPmMMarginMaxBorrowable ¶ added in v1.0.1
func (client *PmMRestClient) NewPmMMarginMaxBorrowable() *PmMMarginMaxBorrowableApi
func (*PmMRestClient) NewPmMMarginMaxTransferable ¶ added in v1.0.1
func (client *PmMRestClient) NewPmMMarginMaxTransferable() *PmMMarginMaxTransferableApi
func (*PmMRestClient) NewPmMMarginOCOAllOrders ¶ added in v1.0.1
func (client *PmMRestClient) NewPmMMarginOCOAllOrders() *PmMMarginOCOAllOrdersApi
func (*PmMRestClient) NewPmMMarginOCOOpenOrders ¶ added in v1.0.1
func (client *PmMRestClient) NewPmMMarginOCOOpenOrders() *PmMMarginOCOOpenOrdersApi
func (*PmMRestClient) NewPmMMarginOCOOrderDelete ¶ added in v1.0.1
func (client *PmMRestClient) NewPmMMarginOCOOrderDelete() *PmMMarginOCOOrderDeleteApi
func (*PmMRestClient) NewPmMMarginOCOOrderGet ¶ added in v1.0.1
func (client *PmMRestClient) NewPmMMarginOCOOrderGet() *PmMMarginOCOOrderGetApi
func (*PmMRestClient) NewPmMMarginOCOOrderPost ¶ added in v1.0.1
func (client *PmMRestClient) NewPmMMarginOCOOrderPost() *PmMMarginOCOOrderPostApi
func (*PmMRestClient) NewPmMMarginOpenOrders ¶ added in v1.0.1
func (client *PmMRestClient) NewPmMMarginOpenOrders() *PmMMarginOpenOrdersApi
func (*PmMRestClient) NewPmMMarginOrderDelete ¶ added in v1.0.1
func (client *PmMRestClient) NewPmMMarginOrderDelete() *PmMMarginOrderDeleteApi
func (*PmMRestClient) NewPmMMarginOrderGet ¶ added in v1.0.1
func (client *PmMRestClient) NewPmMMarginOrderGet() *PmMMarginOrderGetApi
交易接口 binance PMM PmMOpenOrders rest查询当前挂单 (USER_DATA)
func (*PmMRestClient) NewPmMMarginOrderPost ¶ added in v1.0.1
func (client *PmMRestClient) NewPmMMarginOrderPost() *PmMMarginOrderPostApi
type PmMWsStreamClient ¶ added in v1.0.1
type PmMWsStreamClient struct { WsStreamClient // contains filtered or unexported fields }
func (*PmMWsStreamClient) Close ¶ added in v1.0.1
func (ws *PmMWsStreamClient) Close() error
func (*PmMWsStreamClient) ConvertToAccountWs ¶ added in v1.0.1
func (ws *PmMWsStreamClient) ConvertToAccountWs(apiKey string, apiSecret string) (*PmMWsStreamClient, error)
func (*PmMWsStreamClient) CreatePayload ¶ added in v1.0.1
func (ws *PmMWsStreamClient) CreatePayload() (*WsPmMPayload, error)
type PmPOCODeleteOrderReport ¶ added in v1.0.1
type PmPOCODeleteOrderReport struct { Symbol string `json:"symbol"` OrigClientOrderId string `json:"origClientOrderId"` OrderId int64 `json:"orderId"` OrderListId int64 `json:"orderListId"` ClientOrderId string `json:"clientOrderId"` Price string `json:"price"` OrigQty string `json:"origQty"` ExecutedQty string `json:"executedQty"` CummulativeQuoteQty string `json:"cummulativeQuoteQty"` Status string `json:"status"` TimeInForce string `json:"timeInForce"` Type string `json:"type"` Side string `json:"side"` StopPrice string `json:"stopPrice"` }
type PmPOCOOrder ¶ added in v1.0.1
type PmPOCOOrderReport ¶ added in v1.0.1
type PmPOCOOrderReport struct { Symbol string `json:"symbol"` OrderId int64 `json:"orderId"` OrderListId int64 `json:"orderListId"` ClientOrderId string `json:"clientOrderId"` TransactTime int64 `json:"transactTime"` Price string `json:"price"` OrigQty string `json:"origQty"` ExecutedQty string `json:"executedQty"` CummulativeQuoteQty string `json:"cummulativeQuoteQty"` Status string `json:"status"` TimeInForce string `json:"timeInForce"` Type string `json:"type"` Side string `json:"side"` }
type PmUAccountApi ¶ added in v1.0.1
type PmUAccountApi struct {
// contains filtered or unexported fields
}
func (*PmUAccountApi) Do ¶ added in v1.0.1
func (api *PmUAccountApi) Do() (*PmUAccountRes, error)
func (*PmUAccountApi) RecvWindow ¶ added in v1.0.1
func (api *PmUAccountApi) RecvWindow(RecvWindow int64) *PmUAccountApi
func (*PmUAccountApi) Timestamp ¶ added in v1.0.1
func (api *PmUAccountApi) Timestamp(Timestamp int64) *PmUAccountApi
type PmUAccountBalanceApi ¶ added in v1.0.1
type PmUAccountBalanceApi struct {
// contains filtered or unexported fields
}
func (*PmUAccountBalanceApi) Asset ¶ added in v1.0.1
func (api *PmUAccountBalanceApi) Asset(Asset string) *PmUAccountBalanceApi
func (*PmUAccountBalanceApi) Do ¶ added in v1.0.1
func (api *PmUAccountBalanceApi) Do() (*PmUAccountBalanceRes, error)
func (*PmUAccountBalanceApi) RecvWindow ¶ added in v1.0.1
func (api *PmUAccountBalanceApi) RecvWindow(RecvWindow int64) *PmUAccountBalanceApi
func (*PmUAccountBalanceApi) Timestamp ¶ added in v1.0.1
func (api *PmUAccountBalanceApi) Timestamp(Timestamp int64) *PmUAccountBalanceApi
type PmUAccountBalanceReq ¶ added in v1.0.1
type PmUAccountBalanceRes ¶ added in v1.0.1
type PmUAccountBalanceRes []PmUAccountBalanceRow
type PmUAccountBalanceRow ¶ added in v1.0.1
type PmUAccountBalanceRow struct { Asset string `json:"asset"` //资产 TotalWalletBalance string `json:"totalWalletBalance"` // 钱包余额 = 全仓杠杆未锁定 + 全仓杠杆锁定 + u本位合约钱包余额 + 币本位合约钱包余额 CrossMarginAsset string `json:"crossMarginAsset"` // 全仓资产 = 全仓杠杆未锁定 + 全仓杠杆锁定 CrossMarginBorrowed string `json:"crossMarginBorrowed"` // 全仓杠杆借贷 CrossMarginFree string `json:"crossMarginFree"` // 全仓杠杆未锁定 CrossMarginInterest string `json:"crossMarginInterest"` // 全仓杠杆利息 CrossMarginLocked string `json:"crossMarginLocked"` //全仓杠杆锁定 UmWalletBalance string `json:"umWalletBalance"` // u本位合约钱包余额 UmUnrealizedPNL string `json:"umUnrealizedPNL"` // u本位未实现盈亏 CmWalletBalance string `json:"cmWalletBalance"` // 币本位合约钱包余额 CmUnrealizedPNL string `json:"cmUnrealizedPNL"` // 币本位未实现盈亏 UpdateTime int64 `json:"updateTime"` // 更新时间 NegativeBalance string `json:"negativeBalance"` // 负资产余额 }
type PmUAccountForUApi ¶ added in v1.0.1
type PmUAccountForUApi struct {
// contains filtered or unexported fields
}
func (*PmUAccountForUApi) Do ¶ added in v1.0.1
func (api *PmUAccountForUApi) Do() (*PmUAccountForURes, error)
func (*PmUAccountForUApi) RecvWindow ¶ added in v1.0.1
func (api *PmUAccountForUApi) RecvWindow(RecvWindow int64) *PmUAccountForUApi
func (*PmUAccountForUApi) Timestamp ¶ added in v1.0.1
func (api *PmUAccountForUApi) Timestamp(Timestamp int64) *PmUAccountForUApi
type PmUAccountForUReq ¶ added in v1.0.1
type PmUAccountForUReq struct { RecvWindow *int64 `json:"recvWindow"` Timestamp *int64 `json:"timestamp"` }
PmUAccountForU
type PmUAccountForURes ¶ added in v1.0.1
type PmUAccountForURes struct { Assets []PmUAccountForUResAsset `json:"assets"` Positions []PmUAccountForUResPosition `json:"positions"` // 头寸,将返回所有市场symbol。 }
type PmUAccountForUResAsset ¶ added in v1.0.1
type PmUAccountForUResAsset struct { Asset string `json:"asset"` //资产 CrossWalletBalance string `json:"crossWalletBalance"` //全仓账户余额 CrossUnPnl string `json:"crossUnPnl"` // 全仓持仓未实现盈亏 MaintMargin string `json:"maintMargin"` // 维持保证金 InitialMargin string `json:"initialMargin"` // 当前所需起始保证金 PositionInitialMargin string `json:"positionInitialMargin"` // 持仓所需起始保证金(基于最新标记价格) OpenOrderInitialMargin string `json:"openOrderInitialMargin"` // 当前挂单所需起始保证金(基于最新标记价格) UpdateTime int64 `json:"updateTime"` //更新时间 }
type PmUAccountForUResPosition ¶ added in v1.0.1
type PmUAccountForUResPosition struct { //根据用户持仓模式展示持仓方向,即单向模式下只返回BOTH持仓情况,双向模式下只返回 LONG 和 SHORT 持仓情况 Symbol string `json:"symbol"` // 交易对 InitialMargin string `json:"initialMargin"` // 当前所需起始保证金(基于最新标记价格) MaintMargin string `json:"maintMargin"` //维持保证金 UnrealizedProfit string `json:"unrealizedProfit"` // 持仓未实现盈亏 PositionSide string `json:"positionSide"` // 持仓方向 PositionAmt string `json:"positionAmt"` // 持仓数量 UpdateTime int64 `json:"updateTime"` // 更新时间 NotionalValue string `json:"notional"` // 净值 }
type PmUAccountReq ¶ added in v1.0.1
type PmUAccountReq struct { RecvWindow *int64 `json:"recvWindow"` Timestamp *int64 `json:"timestamp"` }
PmUAccount
type PmUAccountRes ¶ added in v1.0.1
type PmUAccountRes struct { UniMMR string `json:"uniMMR"` // 统一账户维持保证金率 AccountEquity string `json:"accountEquity"` // 以USD计价的账户权益 ActualEquity string `json:"actualEquity"` // 不考虑质押率的以USD计价账户权益 AccountInitialMargin string `json:"accountInitialMargin"` // 当前所需起始保证金(基于最新标记价格) AccountMaintMargin string `json:"accountMaintMargin"` // 以USD计价统一账户维持保证金 AccountStatus string `json:"accountStatus"` // 统一账户账户状态:"NORMAL", "MARGIN_CALL", "SUPPLY_MARGIN", "REDUCE_ONLY", "ACTIVE_LIQUIDATION", "FORCE_LIQUIDATION", "BANKRUPTED" VirtualMaxWithdrawAmount string `json:"virtualMaxWithdrawAmount"` // 以USD计价的最大可转出 TotalAvailableBalance string `json:"totalAvailableBalance"` // 以USD计价的可用余额 TotalMarginOpenLoss string `json:"totalMarginOpenLoss"` // 以USD计价的总开仓保证金 UpdateTime int64 `json:"updateTime"` // 更新时间 }
type PmUAllConditionnalOrderDeleteApi ¶ added in v1.0.1
type PmUAllConditionnalOrderDeleteApi struct {
// contains filtered or unexported fields
}
func (*PmUAllConditionnalOrderDeleteApi) Do ¶ added in v1.0.1
func (api *PmUAllConditionnalOrderDeleteApi) Do() (*PmUAllConditionnalOrderDeleteRes, error)
func (*PmUAllConditionnalOrderDeleteApi) RecvWindow ¶ added in v1.0.1
func (api *PmUAllConditionnalOrderDeleteApi) RecvWindow(RecvWindow int64) *PmUAllConditionnalOrderDeleteApi
func (*PmUAllConditionnalOrderDeleteApi) Symbol ¶ added in v1.0.1
func (api *PmUAllConditionnalOrderDeleteApi) Symbol(Symbol string) *PmUAllConditionnalOrderDeleteApi
func (*PmUAllConditionnalOrderDeleteApi) Timestamp ¶ added in v1.0.1
func (api *PmUAllConditionnalOrderDeleteApi) Timestamp(Timestamp int64) *PmUAllConditionnalOrderDeleteApi
type PmUAllConditionnalOrderDeleteReq ¶ added in v1.0.1
type PmUAllConditionnalOrderDeleteRes ¶ added in v1.0.1
type PmUAllConditionnalOrderDeleteRes BinanceErrorRes
type PmUAllOrderDeleteApi ¶ added in v1.0.1
type PmUAllOrderDeleteApi struct {
// contains filtered or unexported fields
}
func (*PmUAllOrderDeleteApi) Do ¶ added in v1.0.1
func (api *PmUAllOrderDeleteApi) Do() (*PmUAllOrderDeleteRes, error)
func (*PmUAllOrderDeleteApi) RecvWindow ¶ added in v1.0.1
func (api *PmUAllOrderDeleteApi) RecvWindow(RecvWindow int64) *PmUAllOrderDeleteApi
func (*PmUAllOrderDeleteApi) Symbol ¶ added in v1.0.1
func (api *PmUAllOrderDeleteApi) Symbol(Symbol string) *PmUAllOrderDeleteApi
func (*PmUAllOrderDeleteApi) Timestamp ¶ added in v1.0.1
func (api *PmUAllOrderDeleteApi) Timestamp(Timestamp int64) *PmUAllOrderDeleteApi
type PmUAllOrderDeleteReq ¶ added in v1.0.1
type PmUAllOrderDeleteRes ¶ added in v1.0.1
type PmUAllOrderDeleteRes BinanceErrorRes
type PmUAllOrdersApi ¶ added in v1.0.1
type PmUAllOrdersApi struct {
// contains filtered or unexported fields
}
func (*PmUAllOrdersApi) Do ¶ added in v1.0.1
func (api *PmUAllOrdersApi) Do() (*PmUAllOrdersRes, error)
func (*PmUAllOrdersApi) EndTime ¶ added in v1.0.1
func (api *PmUAllOrdersApi) EndTime(EndTime int64) *PmUAllOrdersApi
func (*PmUAllOrdersApi) Limit ¶ added in v1.0.1
func (api *PmUAllOrdersApi) Limit(Limit int64) *PmUAllOrdersApi
func (*PmUAllOrdersApi) OrderId ¶ added in v1.0.1
func (api *PmUAllOrdersApi) OrderId(OrderId int64) *PmUAllOrdersApi
func (*PmUAllOrdersApi) RecvWindow ¶ added in v1.0.1
func (api *PmUAllOrdersApi) RecvWindow(RecvWindow int64) *PmUAllOrdersApi
func (*PmUAllOrdersApi) StartTime ¶ added in v1.0.1
func (api *PmUAllOrdersApi) StartTime(StartTime int64) *PmUAllOrdersApi
func (*PmUAllOrdersApi) Symbol ¶ added in v1.0.1
func (api *PmUAllOrdersApi) Symbol(Symbol string) *PmUAllOrdersApi
func (*PmUAllOrdersApi) Timestamp ¶ added in v1.0.1
func (api *PmUAllOrdersApi) Timestamp(Timestamp int64) *PmUAllOrdersApi
type PmUAllOrdersReq ¶ added in v1.0.1
type PmUAllOrdersReq struct { Symbol *string `json:"symbol"` //No 交易对 OrderId *int64 `json:"orderId"` //No 只返回此orderID及之后的订单,缺省返回最近的订单 StartTime *int64 `json:"startTime"` //No 起始时间 EndTime *int64 `json:"endTime"` //No 结束时间 Limit *int64 `json:"limit"` //No 返回的结果集数量 默认值:500 最大值:1000 RecvWindow *int64 `json:"recvWindow"` Timestamp *int64 `json:"timestamp"` }
type PmUAllOrdersRes ¶ added in v1.0.1
type PmUAllOrdersRes []PmUOrderOrder
type PmUApi ¶ added in v1.0.1
type PmUApi int
const ( //账户接口 PmUAccount PmUApi = iota //GET接口 统一账户信息 (USER_DATA) PmUAccountBalance //GET接口 统一账户余额 (USER_DATA) PmUAccountForU //GET接口 UM账户信息v2 (USER_DATA) PmUCommissionRate //GET接口 (HMAC SHA256)查询用户UM手续费率 (USER_DATA) //交易接口 PmUOpenOrders //GET接口 (HMAC SHA256)查看当前全部UM挂单(USER_DATA) PmUAllOrders //GET接口 (HMAC SHA256)查询所有UM订单(包括历史订单)(USER_DATA) PmUOrderPost //POST接口 (HMAC SHA256)UM下单(TRADE) PmUOrderPut //PUT接口 (HMAC SHA256)修改UM订单(TRADE) PmUOrderGet //GET接口 (HMAC SHA256)查询UM订单(USER_DATA) PmUOrderDelete //DELETE接口 (HMAC SHA256)撤销UM订单 (TRADE) PmUAllOrderDelete //DELETE接口 (HMAC SHA256)撤销全部UM订单 (TRADE) PmUConditionalOrderPost //POST接口 (HMAC SHA256)UM条件单下单(TRADE) PmUConditionalOrderDelete //DELETE接口 (HMAC SHA256)取消UM条件订单(TRADE) PmUAllConditionnalOrderDelete //DELETE接口 (HMAC SHA256)撤销全部UM条件订单(TRADE) PmUUserTrades //GET接口 (HMAC SHA256)UM账户成交历史 (USER_DATA) //通用接口 PmUPing //GET接口 测试服务器连通性 PmUServerTime //GET接口 获取服务器时间 PmUExchangeInfo //GET接口 交易规则和交易对信息 //行情接口 PmUKlines //K线数据 PmUDepth //深度信息 PmUTrades //最新成交 PmUHistoricalTrades //历史成交 PmUAggTrades //近期成交(归集) PmUPremiumIndex //最新标记价格和资金费率 PmUFundingRate //查询资金费率历史 PmUFundingInfo //查询资金费率信息 PmUTicker24hr //24hr价格变动情况 PmUTickerPrice //最新价格 PmUTickerBookTicker //当前最优挂单 PmUDataBasis //基差数据 //Ws账户推送相关接口 PmUListenKeyPost //生成listenKey (USER_STREAM) PmUListenKeyPut //延长listenKey有效期 (USER_STREAM) PmUListenKeyDelete //关闭listenKey (USER_STREAM) )
type PmUCommissionRateApi ¶ added in v1.0.1
type PmUCommissionRateApi struct {
// contains filtered or unexported fields
}
func (*PmUCommissionRateApi) Do ¶ added in v1.0.1
func (api *PmUCommissionRateApi) Do() (*PmUCommissionRateRes, error)
func (*PmUCommissionRateApi) RecvWindow ¶ added in v1.0.1
func (api *PmUCommissionRateApi) RecvWindow(RecvWindow int64) *PmUCommissionRateApi
func (*PmUCommissionRateApi) Symbol ¶ added in v1.0.1
func (api *PmUCommissionRateApi) Symbol(Symbol string) *PmUCommissionRateApi
func (*PmUCommissionRateApi) Timestamp ¶ added in v1.0.1
func (api *PmUCommissionRateApi) Timestamp(Timestamp int64) *PmUCommissionRateApi
type PmUCommissionRateReq ¶ added in v1.0.1
type PmUCommissionRateRes ¶ added in v1.0.1
type PmUConditionalOrderDeleteApi ¶ added in v1.0.1
type PmUConditionalOrderDeleteApi struct {
// contains filtered or unexported fields
}
func (*PmUConditionalOrderDeleteApi) Do ¶ added in v1.0.1
func (api *PmUConditionalOrderDeleteApi) Do() (*PmUConditionalOrderDeleteRes, error)
func (*PmUConditionalOrderDeleteApi) NewClientStrategyId ¶ added in v1.0.1
func (api *PmUConditionalOrderDeleteApi) NewClientStrategyId(NewClientStrategyId string) *PmUConditionalOrderDeleteApi
func (*PmUConditionalOrderDeleteApi) RecvWindow ¶ added in v1.0.1
func (api *PmUConditionalOrderDeleteApi) RecvWindow(RecvWindow int64) *PmUConditionalOrderDeleteApi
func (*PmUConditionalOrderDeleteApi) StrategyId ¶ added in v1.0.1
func (api *PmUConditionalOrderDeleteApi) StrategyId(StrategyId string) *PmUConditionalOrderDeleteApi
func (*PmUConditionalOrderDeleteApi) Symbol ¶ added in v1.0.1
func (api *PmUConditionalOrderDeleteApi) Symbol(Symbol string) *PmUConditionalOrderDeleteApi
func (*PmUConditionalOrderDeleteApi) Timestamp ¶ added in v1.0.1
func (api *PmUConditionalOrderDeleteApi) Timestamp(Timestamp int64) *PmUConditionalOrderDeleteApi
type PmUConditionalOrderDeleteReq ¶ added in v1.0.1
type PmUConditionalOrderDeleteReq struct { Symbol *string `json:"symbol"` //YES 交易对 StrategyId *string `json:"strategyId"` //NO strategyId 与 newClientStrategyId 之一必须发送 NewClientStrategyId *string `json:"newClientStrategyId"` //NO RecvWindow *int64 `json:"recvWindow,omitempty"` //NO Timestamp *int64 `json:"timestamp"` //YES }
type PmUConditionalOrderDeleteRes ¶ added in v1.0.1
type PmUConditionalOrderDeleteRes struct { NewClientStrategyId string `json:"newClientStrategyId"` StrategyId int64 `json:"strategyId"` StrategyStatus string `json:"strategyStatus"` StrategyType string `json:"strategyType"` OrigQty string `json:"origQty"` Price string `json:"price"` ReduceOnly bool `json:"reduceOnly"` Side string `json:"side"` PositionSide string `json:"positionSide"` StopPrice string `json:"stopPrice"` Symbol string `json:"symbol"` TimeInForce string `json:"timeInForce"` ActivatePrice string `json:"activatePrice"` PriceRate string `json:"priceRate"` BookTime int64 `json:"bookTime"` //条件单下单时间 UpdateTime int64 `json:"updateTime"` WorkingType string `json:"workingType"` PriceProtect bool `json:"priceProtect"` SelfTradePreventionMode string `json:"selfTradePreventionMode"` ////订单自成交保护模式 GoodTillDate int64 `json:"goodTillDate"` //订单TIF为GTD时的自动取消时间 PriceMatch string `json:"priceMatch"` }
type PmUConditionalOrderPostApi ¶ added in v1.0.1
type PmUConditionalOrderPostApi struct {
// contains filtered or unexported fields
}
func (*PmUConditionalOrderPostApi) ActivationPrice ¶ added in v1.0.1
func (api *PmUConditionalOrderPostApi) ActivationPrice(ActivationPrice decimal.Decimal) *PmUConditionalOrderPostApi
func (*PmUConditionalOrderPostApi) CallbackRate ¶ added in v1.0.1
func (api *PmUConditionalOrderPostApi) CallbackRate(CallbackRate decimal.Decimal) *PmUConditionalOrderPostApi
func (*PmUConditionalOrderPostApi) Do ¶ added in v1.0.1
func (api *PmUConditionalOrderPostApi) Do() (*PmUConditionalOrderPostRes, error)
func (*PmUConditionalOrderPostApi) GoodTillDate ¶ added in v1.0.1
func (api *PmUConditionalOrderPostApi) GoodTillDate(GoodTillDate int64) *PmUConditionalOrderPostApi
func (*PmUConditionalOrderPostApi) NewClientStrategyId ¶ added in v1.0.1
func (api *PmUConditionalOrderPostApi) NewClientStrategyId(NewClientStrategyId string) *PmUConditionalOrderPostApi
func (*PmUConditionalOrderPostApi) PositionSide ¶ added in v1.0.1
func (api *PmUConditionalOrderPostApi) PositionSide(PositionSide string) *PmUConditionalOrderPostApi
func (*PmUConditionalOrderPostApi) Price ¶ added in v1.0.1
func (api *PmUConditionalOrderPostApi) Price(Price decimal.Decimal) *PmUConditionalOrderPostApi
func (*PmUConditionalOrderPostApi) PriceMatch ¶ added in v1.0.1
func (api *PmUConditionalOrderPostApi) PriceMatch(PriceMatch string) *PmUConditionalOrderPostApi
func (*PmUConditionalOrderPostApi) PriceProtect ¶ added in v1.0.1
func (api *PmUConditionalOrderPostApi) PriceProtect(PriceProtect string) *PmUConditionalOrderPostApi
func (*PmUConditionalOrderPostApi) Quantity ¶ added in v1.0.1
func (api *PmUConditionalOrderPostApi) Quantity(Quantity decimal.Decimal) *PmUConditionalOrderPostApi
func (*PmUConditionalOrderPostApi) RecvWindow ¶ added in v1.0.1
func (api *PmUConditionalOrderPostApi) RecvWindow(RecvWindow int64) *PmUConditionalOrderPostApi
func (*PmUConditionalOrderPostApi) SelfTradePreventionMode ¶ added in v1.0.1
func (api *PmUConditionalOrderPostApi) SelfTradePreventionMode(SelfTradePreventionMode string) *PmUConditionalOrderPostApi
func (*PmUConditionalOrderPostApi) Side ¶ added in v1.0.1
func (api *PmUConditionalOrderPostApi) Side(Side string) *PmUConditionalOrderPostApi
func (*PmUConditionalOrderPostApi) StopPrice ¶ added in v1.0.1
func (api *PmUConditionalOrderPostApi) StopPrice(StopPrice decimal.Decimal) *PmUConditionalOrderPostApi
func (*PmUConditionalOrderPostApi) StrategyType ¶ added in v1.0.1
func (api *PmUConditionalOrderPostApi) StrategyType(StrategyType string) *PmUConditionalOrderPostApi
func (*PmUConditionalOrderPostApi) Symbol ¶ added in v1.0.1
func (api *PmUConditionalOrderPostApi) Symbol(Symbol string) *PmUConditionalOrderPostApi
func (*PmUConditionalOrderPostApi) TimeInForce ¶ added in v1.0.1
func (api *PmUConditionalOrderPostApi) TimeInForce(TimeInForce string) *PmUConditionalOrderPostApi
func (*PmUConditionalOrderPostApi) Timestamp ¶ added in v1.0.1
func (api *PmUConditionalOrderPostApi) Timestamp(Timestamp int64) *PmUConditionalOrderPostApi
func (*PmUConditionalOrderPostApi) WorkingType ¶ added in v1.0.1
func (api *PmUConditionalOrderPostApi) WorkingType(WorkingType string) *PmUConditionalOrderPostApi
type PmUConditionalOrderPostReq ¶ added in v1.0.1
type PmUConditionalOrderPostReq struct { Symbol *string `json:"symbol"` //YES 交易对 Side *string `json:"side"` //YES 买卖方向 PositionSide *string `json:"positionSide"` //NO 持仓方向,单向持仓模式下非必填,默认且仅可填BOTH;在双向持仓模式下必填,且仅可选择 LONG 或 SHORT StrategyType *string `json:"strategyType"` //YES 条件单类型"STOP", "STOP_MARKET", "TAKE_PROFIT", "TAKE_PROFIT_MARKET"或"TRAILING_STOP_MARKET" TimeInForce *string `json:"timeInForce"` //NO 订单有效期 Quantity *decimal.Decimal `json:"quantity"` //NO 下单数量 ReduceOnly *string `json:"reduceOnly"` //NO true或false; 非双开模式下默认false;双开模式下不接受此参数 Price *decimal.Decimal `json:"price"` //NO 下单价格 WorkingType *string `json:"workingType"` //NO stopPrice 触发类型: MARK_PRICE(标记价格), CONTRACT_PRICE(合约最新价). 默认 CONTRACT_PRICE PriceProtect *string `json:"priceProtect"` //NO 条件单触发保护:"TRUE","FALSE", 默认"FALSE". 仅 STOP, STOP_MARKET, TAKE_PROFIT, TAKE_PROFIT_MARKET 需要此参数 NewClientStrategyId *string `json:"newClientStrategyId"` //NO 不可以重复出现在挂单中。如空缺系统会自动赋值。必须满足正则规则: ^[\.A-Z\:/a-z0-9_-]{1,32}$ StopPrice *decimal.Decimal `json:"stopPrice"` //NO Used with STOP/STOP_MARKET or TAKE_PROFIT/TAKE_PROFIT_MARKET orders. ActivationPrice *decimal.Decimal `json:"activationPrice"` //NO TRAILING_STOP_MARKET 单使用,默认标记价格 CallbackRate *decimal.Decimal `json:"callbackRate"` //NO TRAILING_STOP_MARKET 单使用, 最小0.1, 最大5,1代表1% PriceMatch *string `json:"priceMatch"` //NO OPPONENT/ OPPONENT_5/ OPPONENT_10/ OPPONENT_20/QUEUE/ QUEUE_5/ QUEUE_10/ QUEUE_20;不能与price同时传 SelfTradePreventionMode *string `json:"selfTradePreventionMode"` //NO NONE / EXPIRE_TAKER/ EXPIRE_MAKER/ EXPIRE_BOTH; 默认NONE GoodTillDate *int64 `json:"goodTillDate"` //NO TIF为GTD时订单的自动取消时间, 当timeInforce为GTD时必传;传入的时间戳仅保留秒级精度,毫秒级部分会被自动忽略,时间戳需大于当前时间+600s且小于253402300799000 RecvWindow *int64 `json:"recvWindow"` //NO Timestamp *int64 `json:"timestamp"` //YES }
type PmUConditionalOrderPostRes ¶ added in v1.0.1
type PmUConditionalOrderPostRes struct { NewClientStrategyId string `json:"newClientStrategyId"` StrategyId int64 `json:"strategyId"` StrategyStatus string `json:"strategyStatus"` StrategyType string `json:"strategyType"` OrigQty string `json:"origQty"` Price string `json:"price"` ReduceOnly bool `json:"reduceOnly"` Side string `json:"side"` PositionSide string `json:"positionSide"` StopPrice string `json:"stopPrice"` Symbol string `json:"symbol"` TimeInForce string `json:"timeInForce"` ActivatePrice string `json:"activatePrice"` PriceRate string `json:"priceRate"` BookTime int64 `json:"bookTime"` //条件单下单时间 UpdateTime int64 `json:"updateTime"` WorkingType string `json:"workingType"` PriceProtect bool `json:"priceProtect"` SelfTradePreventionMode string `json:"selfTradePreventionMode"` ////订单自成交保护模式 GoodTillDate int64 `json:"goodTillDate"` //订单TIF为GTD时的自动取消时间 PriceMatch string `json:"priceMatch"` }
type PmUListenKeyDeleteApi ¶ added in v1.0.1
type PmUListenKeyDeleteApi struct {
// contains filtered or unexported fields
}
func (*PmUListenKeyDeleteApi) Do ¶ added in v1.0.1
func (api *PmUListenKeyDeleteApi) Do() (*PmUListenKeyDeleteRes, error)
type PmUListenKeyDeleteReq ¶ added in v1.0.1
type PmUListenKeyDeleteReq struct{}
type PmUListenKeyDeleteRes ¶ added in v1.0.1
type PmUListenKeyDeleteRes struct{}
type PmUListenKeyPostApi ¶ added in v1.0.1
type PmUListenKeyPostApi struct {
// contains filtered or unexported fields
}
func (*PmUListenKeyPostApi) Do ¶ added in v1.0.1
func (api *PmUListenKeyPostApi) Do() (*PmUListenKeyPostRes, error)
type PmUListenKeyPostRes ¶ added in v1.0.1
type PmUListenKeyPostRes struct {
ListenKey string `json:"listenKey"`
}
type PmUListenKeyPutApi ¶ added in v1.0.1
type PmUListenKeyPutApi struct {
// contains filtered or unexported fields
}
func (*PmUListenKeyPutApi) Do ¶ added in v1.0.1
func (api *PmUListenKeyPutApi) Do() (*PmUListenKeyPutRes, error)
type PmUListenKeyPutReq ¶ added in v1.0.1
type PmUListenKeyPutReq struct{}
type PmUListenKeyPutRes ¶ added in v1.0.1
type PmUListenKeyPutRes struct{}
type PmUOpenOrdersApi ¶ added in v1.0.1
type PmUOpenOrdersApi struct {
// contains filtered or unexported fields
}
func (*PmUOpenOrdersApi) Do ¶ added in v1.0.1
func (api *PmUOpenOrdersApi) Do() (*PmUOpenOrdersRes, error)
func (*PmUOpenOrdersApi) RecvWindow ¶ added in v1.0.1
func (api *PmUOpenOrdersApi) RecvWindow(RecvWindow int64) *PmUOpenOrdersApi
func (*PmUOpenOrdersApi) Symbol ¶ added in v1.0.1
func (api *PmUOpenOrdersApi) Symbol(Symbol string) *PmUOpenOrdersApi
func (*PmUOpenOrdersApi) Timestamp ¶ added in v1.0.1
func (api *PmUOpenOrdersApi) Timestamp(Timestamp int64) *PmUOpenOrdersApi
type PmUOpenOrdersReq ¶ added in v1.0.1
type PmUOpenOrdersRes ¶ added in v1.0.1
type PmUOpenOrdersRes []PmUOrderOrder
type PmUOrderDeleteApi ¶ added in v1.0.1
type PmUOrderDeleteApi struct {
// contains filtered or unexported fields
}
func (*PmUOrderDeleteApi) Do ¶ added in v1.0.1
func (api *PmUOrderDeleteApi) Do() (*PmUOrderDeleteRes, error)
func (*PmUOrderDeleteApi) OrderId ¶ added in v1.0.1
func (api *PmUOrderDeleteApi) OrderId(OrderId int64) *PmUOrderDeleteApi
func (*PmUOrderDeleteApi) OrigClientOrderId ¶ added in v1.0.1
func (api *PmUOrderDeleteApi) OrigClientOrderId(OrigClientOrderId string) *PmUOrderDeleteApi
func (*PmUOrderDeleteApi) RecvWindow ¶ added in v1.0.1
func (api *PmUOrderDeleteApi) RecvWindow(RecvWindow int64) *PmUOrderDeleteApi
func (*PmUOrderDeleteApi) Symbol ¶ added in v1.0.1
func (api *PmUOrderDeleteApi) Symbol(Symbol string) *PmUOrderDeleteApi
func (*PmUOrderDeleteApi) Timestamp ¶ added in v1.0.1
func (api *PmUOrderDeleteApi) Timestamp(Timestamp int64) *PmUOrderDeleteApi
type PmUOrderDeleteReq ¶ added in v1.0.1
type PmUOrderDeleteReq struct { Symbol *string `json:"symbol"` //YES 交易对 OrderId *int64 `json:"orderId,omitempty"` //NO 系统订单号 OrigClientOrderId *string `json:"origClientOrderId,omitempty"` //NO 用户自定义的订单号 RecvWindow *int64 `json:"recvWindow,omitempty"` //NO Timestamp *int64 `json:"timestamp"` //YES }
type PmUOrderDeleteRes ¶ added in v1.0.1
type PmUOrderDeleteRes PmUOrderOrder
type PmUOrderGetApi ¶ added in v1.0.1
type PmUOrderGetApi struct {
// contains filtered or unexported fields
}
func (*PmUOrderGetApi) Do ¶ added in v1.0.1
func (api *PmUOrderGetApi) Do() (*PmUOrderGetRes, error)
func (*PmUOrderGetApi) OrderId ¶ added in v1.0.1
func (api *PmUOrderGetApi) OrderId(OrderId int64) *PmUOrderGetApi
func (*PmUOrderGetApi) OrigClientOrderId ¶ added in v1.0.1
func (api *PmUOrderGetApi) OrigClientOrderId(OrigClientOrderId string) *PmUOrderGetApi
func (*PmUOrderGetApi) RecvWindow ¶ added in v1.0.1
func (api *PmUOrderGetApi) RecvWindow(RecvWindow int64) *PmUOrderGetApi
func (*PmUOrderGetApi) Symbol ¶ added in v1.0.1
func (api *PmUOrderGetApi) Symbol(Symbol string) *PmUOrderGetApi
func (*PmUOrderGetApi) Timestamp ¶ added in v1.0.1
func (api *PmUOrderGetApi) Timestamp(Timestamp int64) *PmUOrderGetApi
type PmUOrderGetReq ¶ added in v1.0.1
type PmUOrderGetRes ¶ added in v1.0.1
type PmUOrderGetRes PmUOrderOrder
type PmUOrderOrder ¶ added in v1.0.1
type PmUOrderOrder struct { AvgPrice string `json:"avgPrice"` // 平均成交价 ClientOrderId string `json:"clientOrderId"` // 用户自定义的订单号 CumQuote string `json:"cumQuote"` // 成交金额 ExecutedQty string `json:"executedQty"` // 成交量 OrderId int64 `gorm:"primaryKey" json:"orderId"` // 系统订单号 OrigQty string `json:"origQty"` // 原始委托数量 OrigType string `json:"origType"` // 触发前订单类型 Price string `json:"price"` // 委托价格 ReduceOnly bool `json:"reduceOnly"` // 是否仅减仓 Side string `json:"side"` // 买卖方向 PositionSide string `json:"positionSide"` // 持仓方向 Status string `json:"status"` // 订单状态 Symbol string `json:"symbol"` // 交易对 Time int64 `json:"time"` // 订单时间 TimeInForce string `json:"timeInForce"` // 有效方法 Type string `json:"type"` // 订单类型 UpdateTime int64 `json:"updateTime"` // 更新时间 SelfTradePreventionMode string `json:"selfTradePreventionMode"` // 是否开启条件单触发保护 GoodTillDate int64 `json:"goodTillDate"` // 订单TIF为GTD时的自动取消时间 PriceMatch string `json:"priceMatch"` // 触发条件 }
type PmUOrderPostApi ¶ added in v1.0.1
type PmUOrderPostApi struct {
// contains filtered or unexported fields
}
func (*PmUOrderPostApi) Do ¶ added in v1.0.1
func (api *PmUOrderPostApi) Do() (*PmUOrderPostRes, error)
func (*PmUOrderPostApi) GoodTillDate ¶ added in v1.0.1
func (api *PmUOrderPostApi) GoodTillDate(GoodTillDate int64) *PmUOrderPostApi
func (*PmUOrderPostApi) NewClientOrderId ¶ added in v1.0.1
func (api *PmUOrderPostApi) NewClientOrderId(NewClientOrderId string) *PmUOrderPostApi
func (*PmUOrderPostApi) NewOrderRespType ¶ added in v1.0.1
func (api *PmUOrderPostApi) NewOrderRespType(NewOrderRespType string) *PmUOrderPostApi
func (*PmUOrderPostApi) PositionSide ¶ added in v1.0.1
func (api *PmUOrderPostApi) PositionSide(PositionSide string) *PmUOrderPostApi
func (*PmUOrderPostApi) Price ¶ added in v1.0.1
func (api *PmUOrderPostApi) Price(Price decimal.Decimal) *PmUOrderPostApi
func (*PmUOrderPostApi) PriceMatch ¶ added in v1.0.1
func (api *PmUOrderPostApi) PriceMatch(PriceMatch string) *PmUOrderPostApi
func (*PmUOrderPostApi) Quantity ¶ added in v1.0.1
func (api *PmUOrderPostApi) Quantity(Quantity decimal.Decimal) *PmUOrderPostApi
func (*PmUOrderPostApi) RecvWindow ¶ added in v1.0.1
func (api *PmUOrderPostApi) RecvWindow(RecvWindow int64) *PmUOrderPostApi
func (*PmUOrderPostApi) ReduceOnly ¶ added in v1.0.1
func (api *PmUOrderPostApi) ReduceOnly(ReduceOnly string) *PmUOrderPostApi
func (*PmUOrderPostApi) SelfTradePreventionMode ¶ added in v1.0.1
func (api *PmUOrderPostApi) SelfTradePreventionMode(SelfTradePreventionMode string) *PmUOrderPostApi
func (*PmUOrderPostApi) Side ¶ added in v1.0.1
func (api *PmUOrderPostApi) Side(Side string) *PmUOrderPostApi
func (*PmUOrderPostApi) Symbol ¶ added in v1.0.1
func (api *PmUOrderPostApi) Symbol(Symbol string) *PmUOrderPostApi
func (*PmUOrderPostApi) TimeInForce ¶ added in v1.0.1
func (api *PmUOrderPostApi) TimeInForce(TimeInForce string) *PmUOrderPostApi
func (*PmUOrderPostApi) Timestamp ¶ added in v1.0.1
func (api *PmUOrderPostApi) Timestamp(Timestamp int64) *PmUOrderPostApi
func (*PmUOrderPostApi) Type ¶ added in v1.0.1
func (api *PmUOrderPostApi) Type(Type string) *PmUOrderPostApi
type PmUOrderPostReq ¶ added in v1.0.1
type PmUOrderPostReq struct { Symbol *string `json:"symbol"` //Yes 交易对 Side *string `json:"side"` //Yes 买卖方向 SELL, BUY PositionSide *string `json:"positionSide,omitempty"` //No 持仓方向,单向持仓模式下非必填,默认且仅可填BOTH;在双向持仓模式下必填,且仅可选择 LONG 或 SHORT Type *string `json:"type"` //Yes 订单类型 LIMIT, MARKET, STOP, TAKE_PROFIT, STOP_MARKET, TAKE_PROFIT_MARKET, TRAILING_STOP_MARKET TimeInForce *string `json:"timeInForce,omitempty"` //No 有效方法 Quantity *decimal.Decimal `json:"quantity,omitempty"` //No 下单数量,使用closePosition不支持此参数。 ReduceOnly *string `json:"reduceOnly,omitempty"` //No true, false; 非双开模式下默认false;双开模式下不接受此参数; 使用closePosition不支持此参数。 Price *decimal.Decimal `json:"price,omitempty"` //No 委托价格 NewClientOrderId *string `json:"newClientOrderId,omitempty"` //No 用户自定义的订单号,不可以重复出现在挂单中。如空缺系统会自动赋值。必须满足正则规则 ^[\.A-Z\:/a-z0-9_-]{1,36}$ NewOrderRespType *string `json:"newOrderRespType,omitempty"` //No "ACK", "RESULT", 默认 "ACK" PriceMatch *string `json:"priceMatch,omitempty"` //No 条件单触发保护:"TRUE","FALSE", 默认"FALSE". 仅 STOP, STOP_MARKET, TAKE_PROFIT, TAKE_PROFIT_MARKET 需要此参数 SelfTradePreventionMode *string `json:"selfTradePreventionMode,omitempty"` //No "GTC", "IOC", "FOK", "GTX" GoodTillDate *int64 `json:"goodTillDate,omitempty"` //No 订单有效期时间戳,单位毫秒 RecvWindow *int64 `json:"recvWindow,omitempty"` //No Timestamp *int64 `json:"timestamp,omitempty"` //Yes }
type PmUOrderPostRes ¶ added in v1.0.1
type PmUOrderPostRes struct { ClientOrderId string `json:"clientOrderId"` // 用户自定义的订单号 CumQty string `json:"cumQty"` CumQuote string `json:"cumQuote"` // 成交金额 ExecutedQty string `json:"executedQty"` OrderId int64 `json:"orderId"` // 系统订单号 AvgPrice string `json:"avgPrice"` OrigQty string `json:"origQty"` // 原始委托数量 Price string `json:"price"` // 委托价格 ReduceOnly bool `json:"reduceOnly"` Side string `json:"side"` // 买卖方向 PositionSide string `json:"positionSide"` // 持仓方向 Status string `json:"status"` // 订单状态 Symbol string `json:"symbol"` // 交易对 TimeInForce string `json:"timeInForce"` // 有效方法 Type string `json:"type"` // 订单类型 SelfTradePreventionMode string `json:"selfTradePreventionMode"` // 订单自成交保护模式 GoodTillDate int64 `json:"goodTillDate"` // 订单TIF为GTD时的自动取消时间 UpdateTime int64 `json:"updateTime"` // 更新时间 PriceMatch string `json:"priceMatch"` // 触发条件 }
type PmUOrderPutApi ¶ added in v1.0.1
type PmUOrderPutApi struct {
// contains filtered or unexported fields
}
func (*PmUOrderPutApi) Do ¶ added in v1.0.1
func (api *PmUOrderPutApi) Do() (*PmUOrderPutRes, error)
func (*PmUOrderPutApi) OrderId ¶ added in v1.0.1
func (api *PmUOrderPutApi) OrderId(OrderId int64) *PmUOrderPutApi
func (*PmUOrderPutApi) OrigClientOrderId ¶ added in v1.0.1
func (api *PmUOrderPutApi) OrigClientOrderId(OrigClientOrderId string) *PmUOrderPutApi
func (*PmUOrderPutApi) Price ¶ added in v1.0.1
func (api *PmUOrderPutApi) Price(Price decimal.Decimal) *PmUOrderPutApi
func (*PmUOrderPutApi) PriceMatch ¶ added in v1.0.1
func (api *PmUOrderPutApi) PriceMatch(PriceMatch string) *PmUOrderPutApi
func (*PmUOrderPutApi) Quantity ¶ added in v1.0.1
func (api *PmUOrderPutApi) Quantity(Quantity decimal.Decimal) *PmUOrderPutApi
func (*PmUOrderPutApi) RecvWindow ¶ added in v1.0.1
func (api *PmUOrderPutApi) RecvWindow(RecvWindow int64) *PmUOrderPutApi
func (*PmUOrderPutApi) Side ¶ added in v1.0.1
func (api *PmUOrderPutApi) Side(Side string) *PmUOrderPutApi
func (*PmUOrderPutApi) Symbol ¶ added in v1.0.1
func (api *PmUOrderPutApi) Symbol(Symbol string) *PmUOrderPutApi
func (*PmUOrderPutApi) Timestamp ¶ added in v1.0.1
func (api *PmUOrderPutApi) Timestamp(Timestamp int64) *PmUOrderPutApi
type PmUOrderPutReq ¶ added in v1.0.1
type PmUOrderPutReq struct { OrderId *string `json:"orderId,omitempty"` //NO 系统订单号 OrigClientOrderId *string `json:"origClientOrderId,omitempty"` //NO 用户自定义的订单号 Symbol *string `json:"symbol"` //YES 交易对 Side *string `json:"side"` //YES 买卖方向 SELL, BUY; side需要和原订单相同 Quantity *decimal.Decimal `json:"quantity"` //YES 下单数量,使用closePosition不支持此参数。 Price *decimal.Decimal `json:"price"` //YES 委托价格 PriceMatch *string `json:"priceMatch,omitempty"` //NO OPPONENT/ OPPONENT_5/ OPPONENT_10/ OPPONENT_20/QUEUE/ QUEUE_5/ QUEUE_10/ QUEUE_20;不能与price同时传 RecvWindow *int64 `json:"recvWindow,omitempty"` //NO Timestamp *int64 `json:"timestamp,omitempty"` //YES }
type PmUOrderPutRes ¶ added in v1.0.1
type PmUOrderPutRes struct { OrderId int64 `json:"orderId"` Symbol string `json:"symbol"` Pair string `json:"pair"` Status string `json:"status"` ClientOrderId string `json:"clientOrderId"` Price string `json:"price"` AvgPrice string `json:"avgPrice"` OrigQty string `json:"origQty"` ExecutedQty string `json:"executedQty"` CumQty string `json:"cumQty"` CumBase string `json:"cumBase"` TimeInForce string `json:"timeInForce"` Type string `json:"type"` ReduceOnly bool `json:"reduceOnly"` ClosePosition bool `json:"closePosition"` Side string `json:"side"` PositionSide string `json:"positionSide"` StopPrice string `json:"stopPrice"` WorkingType string `json:"workingType"` PriceProtect bool `json:"priceProtect"` OrigType string `json:"origType"` PriceMatch string `json:"priceMatch"` //盘口价格下单模式 与price只可同时传一个 SelfTradePreventionMode string `json:"selfTradePreventionMode"` //订单自成交保护模式 GoodTillDate int64 `json:"goodTillDate"` //订单TIF为GTD时的自动取消时间 UpdateTime int64 `json:"updateTime"` }
type PmURestClient ¶ added in v1.0.1
type PmURestClient RestClient //zsk修改
func (*PmURestClient) NewAllOrders ¶ added in v1.0.1
func (client *PmURestClient) NewAllOrders() *PmUAllOrdersApi
binance PMU PmUAllOrders rest查询所有订单 (USER_DATA)
func (*PmURestClient) NewOpenOrders ¶ added in v1.0.1
func (client *PmURestClient) NewOpenOrders() *PmUOpenOrdersApi
交易接口 binance PMU PmUOpenOrders rest查询当前挂单 (USER_DATA)
func (*PmURestClient) NewPmUAccount ¶ added in v1.0.1
func (client *PmURestClient) NewPmUAccount() *PmUAccountApi
账户接口 binance PMU PmUAccount 统一账户信息 (USER_DATA)
func (*PmURestClient) NewPmUAccountBalance ¶ added in v1.0.1
func (client *PmURestClient) NewPmUAccountBalance() *PmUAccountBalanceApi
binance PMU PmUAccountBalance 统一账户余额 (USER_DATA)
func (*PmURestClient) NewPmUAccountForU ¶ added in v1.0.1
func (client *PmURestClient) NewPmUAccountForU() *PmUAccountForUApi
binance PMU PmUAccountForU UM账户信息v2 (USER_DATA)
func (*PmURestClient) NewPmUAllConditionnalOrderDelete ¶ added in v1.0.1
func (client *PmURestClient) NewPmUAllConditionnalOrderDelete() *PmUAllConditionnalOrderDeleteApi
func (*PmURestClient) NewPmUAllOrderDelete ¶ added in v1.0.1
func (client *PmURestClient) NewPmUAllOrderDelete() *PmUAllOrderDeleteApi
binance PMU PmUAllOrderDelete rest撤销全部订单 (TRADE)
func (*PmURestClient) NewPmUCommissionRate ¶ added in v1.0.1
func (client *PmURestClient) NewPmUCommissionRate() *PmUCommissionRateApi
func (*PmURestClient) NewPmUConditionalOrderDelete ¶ added in v1.0.1
func (client *PmURestClient) NewPmUConditionalOrderDelete() *PmUConditionalOrderDeleteApi
func (*PmURestClient) NewPmUConditionalOrderPost ¶ added in v1.0.1
func (client *PmURestClient) NewPmUConditionalOrderPost() *PmUConditionalOrderPostApi
func (*PmURestClient) NewPmUListenKeyDelete ¶ added in v1.0.1
func (client *PmURestClient) NewPmUListenKeyDelete() *PmUListenKeyDeleteApi
binance PMU PmUListenKeyDelete rest关闭listenKey (USER_STREAM)
func (*PmURestClient) NewPmUListenKeyPost ¶ added in v1.0.1
func (client *PmURestClient) NewPmUListenKeyPost() *PmUListenKeyPostApi
Ws账户推送相关 binance PMU PmUListenKeyPost rest生成listenKey (USER_STREAM)
func (*PmURestClient) NewPmUListenKeyPut ¶ added in v1.0.1
func (client *PmURestClient) NewPmUListenKeyPut() *PmUListenKeyPutApi
binance PMU PmUListenKeyPut rest延长listenKey有效期 (USER_STREAM)
func (*PmURestClient) NewPmUOrderDelete ¶ added in v1.0.1
func (client *PmURestClient) NewPmUOrderDelete() *PmUOrderDeleteApi
binance PMU PmUOrderDelete rest撤销订单 (TRADE)
func (*PmURestClient) NewPmUOrderGet ¶ added in v1.0.1
func (client *PmURestClient) NewPmUOrderGet() *PmUOrderGetApi
binance PMU PmUOrderGet rest查询订单 (USER_DATA)
func (*PmURestClient) NewPmUOrderPost ¶ added in v1.0.1
func (client *PmURestClient) NewPmUOrderPost() *PmUOrderPostApi
binance PMU PmUOrderPost rest下单 (TRADE)
func (*PmURestClient) NewPmUOrderPut ¶ added in v1.0.1
func (client *PmURestClient) NewPmUOrderPut() *PmUOrderPutApi
binance PMU PmUOrderPut rest修改订单 (TRADE)
func (*PmURestClient) NewPmUUserTrades ¶ added in v1.0.1
func (client *PmURestClient) NewPmUUserTrades() *PmUUserTradesApi
type PmUUserTradesApi ¶ added in v1.0.1
type PmUUserTradesApi struct {
// contains filtered or unexported fields
}
func (*PmUUserTradesApi) Do ¶ added in v1.0.1
func (api *PmUUserTradesApi) Do() (*PmUUserTradesRes, error)
func (*PmUUserTradesApi) EndTime ¶ added in v1.0.1
func (api *PmUUserTradesApi) EndTime(EndTime int64) *PmUUserTradesApi
func (*PmUUserTradesApi) FromId ¶ added in v1.0.1
func (api *PmUUserTradesApi) FromId(FromId int64) *PmUUserTradesApi
func (*PmUUserTradesApi) Limit ¶ added in v1.0.1
func (api *PmUUserTradesApi) Limit(Limit int64) *PmUUserTradesApi
func (*PmUUserTradesApi) RecvWindow ¶ added in v1.0.1
func (api *PmUUserTradesApi) RecvWindow(RecvWindow int64) *PmUUserTradesApi
func (*PmUUserTradesApi) StartTime ¶ added in v1.0.1
func (api *PmUUserTradesApi) StartTime(StartTime int64) *PmUUserTradesApi
func (*PmUUserTradesApi) Symbol ¶ added in v1.0.1
func (api *PmUUserTradesApi) Symbol(Symbol string) *PmUUserTradesApi
func (*PmUUserTradesApi) Timestamp ¶ added in v1.0.1
func (api *PmUUserTradesApi) Timestamp(Timestamp int64) *PmUUserTradesApi
type PmUUserTradesOrder ¶ added in v1.0.1
type PmUUserTradesOrder struct { Symbol string `json:"symbol"` Id int64 `json:"id"` OrderId int64 `json:"orderId"` Side string `json:"side"` Price string `json:"price"` Qty string `json:"qty"` RealizedPnl string `json:"realizedPnl"` QuoteQty string `json:"quoteQty"` Commission string `json:"commission"` CommissionAsset string `json:"commissionAsset"` Time int64 `json:"time"` Buyer bool `json:"buyer"` Maker bool `json:"maker"` PositionSide string `json:"positionSide"` }
type PmUUserTradesReq ¶ added in v1.0.1
type PmUUserTradesReq struct { Symbol *string `json:"symbol"` //YES 交易对 StartTime *int64 `json:"startTime"` //NO EndTime *int64 `json:"endTime"` //NO FromId *int64 `json:"fromId"` //NO 返回该fromId及之后的成交,缺省返回最近的成交 Limit *int64 `json:"limit"` //NO 返回的结果集数量 默认值:50 最大值:1000 RecvWindow *int64 `json:"recvWindow"` //NO Timestamp *int64 `json:"timestamp"` //YES }
type PmUUserTradesRes ¶ added in v1.0.1
type PmUUserTradesRes []PmUUserTradesOrder
type PmUWsStreamClient ¶ added in v1.0.1
type PmUWsStreamClient struct { WsStreamClient // contains filtered or unexported fields }
zsk修改
func (*PmUWsStreamClient) ConvertToAccountWs ¶ added in v1.0.1
func (ws *PmUWsStreamClient) ConvertToAccountWs(apiKey string, apiSecret string) (*PmUWsStreamClient, error)
zsk修改
func (*PmUWsStreamClient) CreatePayload ¶ added in v1.0.1
func (ws *PmUWsStreamClient) CreatePayload() (*WsPmUPayload, error)
zsk修改
type PriceLevel ¶
type ProxyWeight ¶
type RequestType ¶
type RequestType string
type RestClient ¶
type RestClient struct {
// contains filtered or unexported fields
}
type RestProxy ¶
type RestProxy struct { ProxyUrl string //代理的协议IP端口URL SpotWeight ProxyWeight FutureWeight ProxyWeight SwapWeight ProxyWeight PmWeight ProxyWeight //zsk修改 }
func GetCurrentProxyList ¶
func GetCurrentProxyList() []*RestProxy
type SpotAccountApi ¶
type SpotAccountApi struct {
// contains filtered or unexported fields
}
func (*SpotAccountApi) Do ¶
func (api *SpotAccountApi) Do() (*SpotAccountRes, error)
func (*SpotAccountApi) OmitZeroBalances ¶
func (api *SpotAccountApi) OmitZeroBalances(OmitZeroBalances bool) *SpotAccountApi
func (*SpotAccountApi) RecvWindow ¶
func (api *SpotAccountApi) RecvWindow(RecvWindow int64) *SpotAccountApi
func (*SpotAccountApi) Timestamp ¶
func (api *SpotAccountApi) Timestamp(Timestamp int64) *SpotAccountApi
type SpotAccountApiTradingStatusApi ¶
type SpotAccountApiTradingStatusApi struct {
// contains filtered or unexported fields
}
func (*SpotAccountApiTradingStatusApi) Do ¶
func (api *SpotAccountApiTradingStatusApi) Do() (*SpotAccountApiTradingStatusRes, error)
func (*SpotAccountApiTradingStatusApi) RecvWindow ¶
func (api *SpotAccountApiTradingStatusApi) RecvWindow(RecvWindow int64) *SpotAccountApiTradingStatusApi
func (*SpotAccountApiTradingStatusApi) Timestamp ¶
func (api *SpotAccountApiTradingStatusApi) Timestamp(Timestamp int64) *SpotAccountApiTradingStatusApi
type SpotAccountApiTradingStatusData ¶
type SpotAccountApiTradingStatusData struct { IsLocked bool `json:"isLocked"` PlannedRecoverTime int64 `json:"plannedRecoverTime"` TriggerCondition SpotAccountApiTradingStatusTriggerCondition `json:"triggerCondition"` UpdateTime int64 `json:"updateTime"` }
type SpotAccountApiTradingStatusRes ¶
type SpotAccountApiTradingStatusRes struct {
Data SpotAccountApiTradingStatusData `json:"data"`
}
type SpotAccountReq ¶
type SpotAccountRes ¶
type SpotAccountRes struct { MakerCommission int `json:"makerCommission"` TakerCommission int `json:"takerCommission"` BuyerCommission int `json:"buyerCommission"` SellerCommission int `json:"sellerCommission"` CommissionRates SpotAccountCommissionRates `json:"commissionRates"` CanTrade bool `json:"canTrade"` CanWithdraw bool `json:"canWithdraw"` CanDeposit bool `json:"canDeposit"` Brokered bool `json:"brokered"` RequireSelfTradePrevention bool `json:"requireSelfTradePrevention"` PreventSor bool `json:"preventSor"` UpdateTime int64 `json:"updateTime"` AccountType string `json:"accountType"` Balance []SpotBalance `json:"balances"` Permissions []string `json:"permissions"` Uid int64 `json:"uid"` }
type SpotAggTradesApi ¶
type SpotAggTradesApi struct {
// contains filtered or unexported fields
}
func (*SpotAggTradesApi) Do ¶
func (api *SpotAggTradesApi) Do() (*SpotAggTradesRes, error)
func (*SpotAggTradesApi) EndTime ¶
func (api *SpotAggTradesApi) EndTime(EndTime int64) *SpotAggTradesApi
func (*SpotAggTradesApi) FromId ¶
func (api *SpotAggTradesApi) FromId(FromId int64) *SpotAggTradesApi
func (*SpotAggTradesApi) Limit ¶
func (api *SpotAggTradesApi) Limit(Limit int) *SpotAggTradesApi
func (*SpotAggTradesApi) StartTime ¶
func (api *SpotAggTradesApi) StartTime(StartTime int64) *SpotAggTradesApi
func (*SpotAggTradesApi) Symbol ¶
func (api *SpotAggTradesApi) Symbol(Symbol string) *SpotAggTradesApi
type SpotAggTradesReq ¶
type SpotAggTradesRes ¶
type SpotAggTradesRes []SpotAggTradesResRow
type SpotAggTradesResRow ¶
type SpotAggTradesResRow struct { Id int64 `json:"a"` // 归集成交ID Price string `json:"p"` // 成交价格 Qty string `json:"q"` // 成交数量 FirstTradeId int64 `json:"f"` // 被归集的首个成交ID LastTradeId int64 `json:"l"` // 被归集的末个成交ID Time int64 `json:"T"` // 成交时间 IsBuyerMaker bool `json:"m"` // 是否为主动卖出单 IsBestMatch bool `json:"M"` // 是否为最优撮合单(可忽略,目前总为最优撮合) }
type SpotAllOrdersApi ¶
type SpotAllOrdersApi struct {
// contains filtered or unexported fields
}
func (*SpotAllOrdersApi) Do ¶
func (api *SpotAllOrdersApi) Do() (*SpotAllOrdersRes, error)
func (*SpotAllOrdersApi) EndTime ¶
func (api *SpotAllOrdersApi) EndTime(EndTime int64) *SpotAllOrdersApi
func (*SpotAllOrdersApi) Limit ¶
func (api *SpotAllOrdersApi) Limit(Limit int) *SpotAllOrdersApi
func (*SpotAllOrdersApi) OrderId ¶
func (api *SpotAllOrdersApi) OrderId(OrderId int64) *SpotAllOrdersApi
func (*SpotAllOrdersApi) RecvWindow ¶
func (api *SpotAllOrdersApi) RecvWindow(RecvWindow int64) *SpotAllOrdersApi
func (*SpotAllOrdersApi) StartTime ¶
func (api *SpotAllOrdersApi) StartTime(StartTime int64) *SpotAllOrdersApi
func (*SpotAllOrdersApi) Symbol ¶
func (api *SpotAllOrdersApi) Symbol(Symbol string) *SpotAllOrdersApi
func (*SpotAllOrdersApi) Timestamp ¶
func (api *SpotAllOrdersApi) Timestamp(Timestamp int64) *SpotAllOrdersApi
type SpotAllOrdersReq ¶
type SpotAllOrdersReq struct { Symbol *string `json:"symbol"` //YES OrderId *int64 `json:"orderId"` //NO StartTime *int64 `json:"startTime"` //NO EndTime *int64 `json:"endTime"` //NO Limit *int `json:"limit"` //NO 默认 500; 最大 1000. RecvWindow *int64 `json:"recvWindow"` //NO 赋值不能大于 60000 Timestamp *int64 `json:"timestamp"` //YES }
type SpotAllOrdersRes ¶
type SpotAllOrdersRes []SpotOrderOrder
type SpotApi ¶
type SpotApi int
const ( //子母账户接口 SpotSubAccountList SpotApi = iota //GET接口 查询子账户列表(适用主账户) SpotSubAccountUniversalTransferHistory //GET接口 查询子母账户万能划转历史查询 SpotSubAccountAssets //GET接口 查询子账户资产 (适用主账户)(USER_DATA) SpotSubAccountFuturesAccount //GET接口 查询子账户Futures账户详情V2 (适用主账户) SpotSubAccountApiIpRestriction //GET接口 查询子账户API Key IP白名单 (适用母账户) SpotSubAccountTransferSubUserHistory //GET接口 查询子账户划转历史 (仅适用子账户) SpotManagedSubAccountQueryTransLog //GET接口 查询托管子账户的划转记录(适用交易团队子账户)(USER_DATA) SpotSubAccountVirtualSubAccount //POST接口 创建虚拟子账户(适用主账户) SpotSubAccountUniversalTransfer //POST接口 子母账户万能划转 (适用主账户) SpotSubAccountFuturesEnable //POST接口 为子账户开通Futures (适用主账户) //杠杆账户接口 SpotMarginAllPairs //GET接口 获取所有全仓杠杆交易对(MARKET_DATA) SpotMarginIsolatedAllPairs //GET接口 获取所有逐仓杠杆交易对(USER_DATA) SpotMarginAccount //GET接口 查询全仓杠杆账户详情 (USER_DATA) SpotMarginIsolatedAccount //GET接口 查询逐仓杠杆账户详情 (USER_DATA) SpotMarginMaxBorrowable //GET接口 查询账户最大可借贷额度(USER_DATA) SpotMarginMaxTransferable //GET接口 查询最大可转出额 (USER_DATA) SpotMarginInterestHistory //GET接口 获取利息历史 (USER_DATA) SpotMarginOrderGet //GET接口 查询杠杆账户订单 (USER_DATA) SpotMarginOrderPost //POST接口 杠杆账户下单 (TRADE) SpotMarginOrderDelete //DELETE接口 撤销订单 (TRADE) SpotMarginAllOrders //GET接口 查询杠杆账户所有订单 (USER_DATA) SpotMarginOpenOrders //GET接口 查询杠杆账户挂单记录 (USER_DATA) SpotMarginTransfer //POST接口 全仓杠杆账户划转 (MARGIN) SpotMarginIsolatedTransfer //POST接口 逐仓杠杆账户划转 (MARGIN) SpotMarginLoan //POST接口 杠杆账户借贷 (MARGIN) 支持逐仓和全仓 SpotMarginRepay //POST接口 杠杆账户归还借贷 (MARGIN) 支持逐仓和全仓 //现货账户接口 SpotAccountApiTradingStatus //GET接口 账户API交易状态(USER_DATA) SpotAccount //GET接口 账户信息 (USER_DATA) SpotAssetGetFundingAsset //POST接口 资金账户 (USER_DATA) SpotAssetTransferPost //POST接口 用户万向划转 (USER_DATA) SpotAssetTransferGet //GET接口 查询用户万向划转历史 (USER_DATA) SpotAssetTradeFee //GET接口 查询用户交易手续费率 (USER_DATA) //现货订单接口 SpotOpenOrders //GET接口 查询当前挂单 (USER_DATA) SpotAllOrders //GET接口 查询所有订单 (USER_DATA) SpotOrderGet //GET接口 查询订单 (USER_DATA) SpotOrderPost //POST接口 下单 (TRADE) SpotOrderDelete //DELETE接口 撤销订单 (TRADE) SpotOrderCancelReplace //POST接口 撤消挂单再下单 (TRADE) SpotMyTrades //GET接口 账户成交历史 (USER_DATA) //通用接口 SpotPing //GET接口 测试服务器连通性 SpotServerTime //GET接口 获取服务器时间 SpotExchangeInfo //GET接口 获取交易规则和交易对信息。 //行情接口 SpotKlines //GET接口 K线数据 SpotTickerPrice //GET接口 获取交易对最新价格 SpotDepth //GET接口 获取深度信息 SpotTrades //GET接口 近期成交列表 SpotHistoricalTrades //GET接口 历史成交记录 SpotAggTrades //GET接口 近期成交(归集) SpotAvgPrice //GET接口 当前平均价格 SpotUiKlines //GET接口 UIK线数据 SpotTicker24hr //GET接口 24hr 价格变动情况 SpotTickerBookTicker //GET接口 当前最优挂单 SpotTicker //GET接口 滚动窗口价格变动统计 //Ws账户推送相关 SpotUserDataStreamPost //POST接口 (现货账户)生成 Listen Key (USER_STREAM) SpotUserDataStreamPut //PUT接口 (现货账户)延长 Listen Key 有效期 (USER_STREAM) SpotUserDataStreamDelete //DELETE接口 (现货账户)关闭 Listen Key (USER_STREAM) SpotMarginUserDataStreamPost //POST接口 (杠杆账户)生成 Listen Key (USER_STREAM) SpotMarginUserDataStreamPut //PUT接口 (杠杆账户)延长 Listen Key 有效期 (USER_STREAM) SpotMarginUserDataStreamDelete //DELETE接口 (杠杆账户)关闭 Listen Key (USER_STREAM) SpotMarginIsolatedUserDataStreamPost //POST接口 (逐仓杠杆账户)生成 Listen Key (USER_STREAM) SpotMarginIsolatedUserDataStreamPut //PUT接口 (逐仓杠杆账户)延长 Listen Key 有效期 (USER_STREAM) SpotMarginIsolatedUserDataStreamDelete //DELETE接口 (逐仓杠杆账户)关闭 Listen Key (USER_STREAM) )
type SpotAssetGetFundingAssetApi ¶
type SpotAssetGetFundingAssetApi struct {
// contains filtered or unexported fields
}
func (*SpotAssetGetFundingAssetApi) Asset ¶
func (api *SpotAssetGetFundingAssetApi) Asset(Asset string) *SpotAssetGetFundingAssetApi
func (*SpotAssetGetFundingAssetApi) Do ¶
func (api *SpotAssetGetFundingAssetApi) Do() (*SpotAssetGetFundingAssetRes, error)
func (*SpotAssetGetFundingAssetApi) NeedBtcValuation ¶
func (api *SpotAssetGetFundingAssetApi) NeedBtcValuation(NeedBtcValuation string) *SpotAssetGetFundingAssetApi
func (*SpotAssetGetFundingAssetApi) RecvWindow ¶
func (api *SpotAssetGetFundingAssetApi) RecvWindow(RecvWindow int64) *SpotAssetGetFundingAssetApi
func (*SpotAssetGetFundingAssetApi) Timestamp ¶
func (api *SpotAssetGetFundingAssetApi) Timestamp(Timestamp int64) *SpotAssetGetFundingAssetApi
type SpotAssetGetFundingAssetRes ¶
type SpotAssetGetFundingAssetRes []SpotAssetGetFundingAssetResRow
type SpotAssetTradeFeeApi ¶
type SpotAssetTradeFeeApi struct {
// contains filtered or unexported fields
}
func (*SpotAssetTradeFeeApi) Do ¶
func (api *SpotAssetTradeFeeApi) Do() (*SpotAssetTradeFeeRes, error)
func (*SpotAssetTradeFeeApi) RecvWindow ¶
func (api *SpotAssetTradeFeeApi) RecvWindow(RecvWindow int64) *SpotAssetTradeFeeApi
func (*SpotAssetTradeFeeApi) Symbol ¶
func (api *SpotAssetTradeFeeApi) Symbol(Symbol string) *SpotAssetTradeFeeApi
func (*SpotAssetTradeFeeApi) Timestamp ¶
func (api *SpotAssetTradeFeeApi) Timestamp(Timestamp int64) *SpotAssetTradeFeeApi
type SpotAssetTradeFeeReq ¶
type SpotAssetTradeFeeRes ¶
type SpotAssetTradeFeeRes []SpotAssetTradeFeeResRow
type SpotAssetTradeFeeResRow ¶
type SpotAssetTransferGetApi ¶
type SpotAssetTransferGetApi struct {
// contains filtered or unexported fields
}
func (*SpotAssetTransferGetApi) Current ¶
func (api *SpotAssetTransferGetApi) Current(Current int64) *SpotAssetTransferGetApi
func (*SpotAssetTransferGetApi) Do ¶
func (api *SpotAssetTransferGetApi) Do() (*SpotAssetTransferGetRes, error)
func (*SpotAssetTransferGetApi) EndTime ¶
func (api *SpotAssetTransferGetApi) EndTime(EndTime int64) *SpotAssetTransferGetApi
func (*SpotAssetTransferGetApi) FromSymbol ¶
func (api *SpotAssetTransferGetApi) FromSymbol(FromSymbol string) *SpotAssetTransferGetApi
func (*SpotAssetTransferGetApi) RecvWindow ¶
func (api *SpotAssetTransferGetApi) RecvWindow(RecvWindow int64) *SpotAssetTransferGetApi
func (*SpotAssetTransferGetApi) Size ¶
func (api *SpotAssetTransferGetApi) Size(Size int64) *SpotAssetTransferGetApi
func (*SpotAssetTransferGetApi) StartTime ¶
func (api *SpotAssetTransferGetApi) StartTime(StartTime int64) *SpotAssetTransferGetApi
func (*SpotAssetTransferGetApi) Timestamp ¶
func (api *SpotAssetTransferGetApi) Timestamp(Timestamp int64) *SpotAssetTransferGetApi
func (*SpotAssetTransferGetApi) ToSymbol ¶
func (api *SpotAssetTransferGetApi) ToSymbol(ToSymbol string) *SpotAssetTransferGetApi
func (*SpotAssetTransferGetApi) Type ¶
func (api *SpotAssetTransferGetApi) Type(Type AssertTransferType) *SpotAssetTransferGetApi
type SpotAssetTransferGetReq ¶
type SpotAssetTransferGetReq struct { Type *AssertTransferType `json:"type"` //YES StartTime *int64 `json:"startTime"` //NO EndTime *int64 `json:"endTime"` //NO Current *int64 `json:"current"` //NO 默认 1 Size *int64 `json:"size"` //NO 默认 10, 最大 100 FromSymbol *string `json:"fromSymbol"` //NO ToSymbol *string `json:"toSymbol"` //NO RecvWindow *int64 `json:"recvWindow"` //NO Timestamp *int64 `json:"timestamp"` //YES }
type SpotAssetTransferGetRes ¶
type SpotAssetTransferGetRes struct { Total int `json:"total"` Rows []SpotAssetTransferGetRow `json:"rows"` }
type SpotAssetTransferGetRow ¶
type SpotAssetTransferPostApi ¶
type SpotAssetTransferPostApi struct {
// contains filtered or unexported fields
}
func (*SpotAssetTransferPostApi) Amount ¶
func (api *SpotAssetTransferPostApi) Amount(Amount decimal.Decimal) *SpotAssetTransferPostApi
func (*SpotAssetTransferPostApi) Asset ¶
func (api *SpotAssetTransferPostApi) Asset(Asset string) *SpotAssetTransferPostApi
func (*SpotAssetTransferPostApi) Do ¶
func (api *SpotAssetTransferPostApi) Do() (*SpotAssetTransferPostRes, error)
func (*SpotAssetTransferPostApi) FromSymbol ¶
func (api *SpotAssetTransferPostApi) FromSymbol(FromSymbol string) *SpotAssetTransferPostApi
func (*SpotAssetTransferPostApi) RecvWindow ¶
func (api *SpotAssetTransferPostApi) RecvWindow(RecvWindow int64) *SpotAssetTransferPostApi
func (*SpotAssetTransferPostApi) Timestamp ¶
func (api *SpotAssetTransferPostApi) Timestamp(Timestamp int64) *SpotAssetTransferPostApi
func (*SpotAssetTransferPostApi) ToSymbol ¶
func (api *SpotAssetTransferPostApi) ToSymbol(ToSymbol string) *SpotAssetTransferPostApi
func (*SpotAssetTransferPostApi) Type ¶
func (api *SpotAssetTransferPostApi) Type(Type AssertTransferType) *SpotAssetTransferPostApi
type SpotAssetTransferPostReq ¶
type SpotAssetTransferPostReq struct { Type *AssertTransferType `json:"type"` //YES Asset *string `json:"asset"` //YES Amount *decimal.Decimal `json:"amount"` //YES FromSymbol *string `json:"fromSymbol"` //NO ToSymbol *string `json:"toSymbol"` //NO RecvWindow *int64 `json:"recvWindow"` //NO Timestamp *int64 `json:"timestamp"` //YES }
type SpotAssetTransferPostRes ¶
type SpotAssetTransferPostRes struct {
TranId int64 `json:"tranId"`
}
type SpotAvgPriceApi ¶
type SpotAvgPriceApi struct {
// contains filtered or unexported fields
}
func (*SpotAvgPriceApi) Do ¶
func (api *SpotAvgPriceApi) Do() (*SpotAvgPriceRes, error)
func (*SpotAvgPriceApi) Symbol ¶
func (api *SpotAvgPriceApi) Symbol(Symbol string) *SpotAvgPriceApi
type SpotAvgPriceReq ¶
type SpotAvgPriceReq struct {
Symbol *string `json:"symbol"` //YES
}
type SpotAvgPriceRes ¶
type SpotBalance ¶
type SpotDepthApi ¶
type SpotDepthApi struct {
// contains filtered or unexported fields
}
func (*SpotDepthApi) Do ¶
func (api *SpotDepthApi) Do() (*SpotDepthRes, error)
func (*SpotDepthApi) Limit ¶
func (api *SpotDepthApi) Limit(Limit int) *SpotDepthApi
func (*SpotDepthApi) Symbol ¶
func (api *SpotDepthApi) Symbol(Symbol string) *SpotDepthApi
type SpotDepthReq ¶
type SpotDepthRes ¶
type SpotDepthResMiddle ¶
type SpotDepthResMiddle struct { LastUpdateId int64 `json:"lastUpdateId"` Bids [][]interface{} `json:"bids"` Asks [][]interface{} `json:"asks"` }
func (*SpotDepthResMiddle) ConvertToRes ¶
func (middle *SpotDepthResMiddle) ConvertToRes() *SpotDepthRes
type SpotExchangeInfoApi ¶
type SpotExchangeInfoApi struct {
// contains filtered or unexported fields
}
func (*SpotExchangeInfoApi) Do ¶
func (api *SpotExchangeInfoApi) Do() (*SpotExchangeInfoRes, error)
type SpotExchangeInfoReq ¶
type SpotExchangeInfoReq struct { }
type SpotExchangeInfoRes ¶
type SpotExchangeInfoRes struct { Timezone string `json:"timezone"` ServerTime int64 `json:"serverTime"` RateLimits []SpotExchangeInfoResRateLimit `json:"rateLimits"` ExchangeFilters []map[string]interface{} `json:"exchangeFilters"` Symbols []SpotExchangeInfoResSymbol `json:"symbols"` }
type SpotExchangeInfoResSymbol ¶
type SpotExchangeInfoResSymbol struct { Symbol string `json:"symbol"` Status string `json:"status"` BaseAsset string `json:"baseAsset"` BaseAssetPrecision int64 `json:"baseAssetPrecision"` QuoteAsset string `json:"quoteAsset"` QuotePrecision int64 `json:"quotePrecision"` QuoteAssetPrecision int64 `json:"quoteAssetPrecision"` OrderTypes []string `json:"orderTypes"` IcebergAllowed bool `json:"icebergAllowed"` OcoAllowed bool `json:"ocoAllowed"` QuoteOrderQtyMarketAllowed bool `json:"quoteOrderQtyMarketAllowed"` AllowTrailingStop bool `json:"allowTrailingStop"` IsSpotTradingAllowed bool `json:"isSpotTradingAllowed"` IsMarginTradingAllowed bool `json:"isMarginTradingAllowed"` CancelReplaceAllowed bool `json:"cancelReplaceAllowed"` Filters []map[string]interface{} `json:"filters"` Permissions []string `json:"permissions"` DefaultSelfTradePreventionMode string `json:"defaultSelfTradePreventionMode"` AllowedSelfTradePreventionModes []string `json:"allowedSelfTradePreventionModes"` }
type SpotHistoricalTradesApi ¶
type SpotHistoricalTradesApi struct {
// contains filtered or unexported fields
}
func (*SpotHistoricalTradesApi) Do ¶
func (api *SpotHistoricalTradesApi) Do() (*SpotHistoricalTradesRes, error)
func (*SpotHistoricalTradesApi) FromId ¶
func (api *SpotHistoricalTradesApi) FromId(FromId int64) *SpotHistoricalTradesApi
func (*SpotHistoricalTradesApi) Limit ¶
func (api *SpotHistoricalTradesApi) Limit(Limit int) *SpotHistoricalTradesApi
func (*SpotHistoricalTradesApi) Symbol ¶
func (api *SpotHistoricalTradesApi) Symbol(Symbol string) *SpotHistoricalTradesApi
type SpotHistoricalTradesReq ¶
type SpotHistoricalTradesRes ¶
type SpotHistoricalTradesRes []SpotTradesResRow
type SpotKlinesApi ¶
type SpotKlinesApi struct {
// contains filtered or unexported fields
}
func (*SpotKlinesApi) Do ¶
func (api *SpotKlinesApi) Do() (*KlinesRes, error)
func (*SpotKlinesApi) EndTime ¶
func (api *SpotKlinesApi) EndTime(EndTime int64) *SpotKlinesApi
func (*SpotKlinesApi) Interval ¶
func (api *SpotKlinesApi) Interval(Interval string) *SpotKlinesApi
func (*SpotKlinesApi) Limit ¶
func (api *SpotKlinesApi) Limit(Limit int) *SpotKlinesApi
func (*SpotKlinesApi) StartTime ¶
func (api *SpotKlinesApi) StartTime(StartTime int64) *SpotKlinesApi
func (*SpotKlinesApi) Symbol ¶
func (api *SpotKlinesApi) Symbol(Symbol string) *SpotKlinesApi
type SpotKlinesReq ¶
type SpotManagedSubAccountQueryTransLogApi ¶
type SpotManagedSubAccountQueryTransLogApi struct {
// contains filtered or unexported fields
}
func (*SpotManagedSubAccountQueryTransLogApi) Do ¶
func (api *SpotManagedSubAccountQueryTransLogApi) Do() (*ManagedSubAccountQueryTransLogRes, error)
func (*SpotManagedSubAccountQueryTransLogApi) EndTime ¶
func (api *SpotManagedSubAccountQueryTransLogApi) EndTime(EndTime int64) *SpotManagedSubAccountQueryTransLogApi
func (*SpotManagedSubAccountQueryTransLogApi) Limit ¶
func (api *SpotManagedSubAccountQueryTransLogApi) Limit(Limit int) *SpotManagedSubAccountQueryTransLogApi
func (*SpotManagedSubAccountQueryTransLogApi) Page ¶
func (api *SpotManagedSubAccountQueryTransLogApi) Page(Page int) *SpotManagedSubAccountQueryTransLogApi
func (*SpotManagedSubAccountQueryTransLogApi) RecvWindow ¶
func (api *SpotManagedSubAccountQueryTransLogApi) RecvWindow(RecvWindow int64) *SpotManagedSubAccountQueryTransLogApi
func (*SpotManagedSubAccountQueryTransLogApi) StartTime ¶
func (api *SpotManagedSubAccountQueryTransLogApi) StartTime(StartTime int64) *SpotManagedSubAccountQueryTransLogApi
func (*SpotManagedSubAccountQueryTransLogApi) Timestamp ¶
func (api *SpotManagedSubAccountQueryTransLogApi) Timestamp(Timestamp int64) *SpotManagedSubAccountQueryTransLogApi
func (*SpotManagedSubAccountQueryTransLogApi) TransferFunctionAccountType ¶
func (api *SpotManagedSubAccountQueryTransLogApi) TransferFunctionAccountType(TransferFunctionAccountType string) *SpotManagedSubAccountQueryTransLogApi
func (*SpotManagedSubAccountQueryTransLogApi) Transfers ¶
func (api *SpotManagedSubAccountQueryTransLogApi) Transfers(Transfers string) *SpotManagedSubAccountQueryTransLogApi
type SpotManagedSubAccountQueryTransLogReq ¶
type SpotManagedSubAccountQueryTransLogReq struct { StartTime *int64 `json:"startTime"` //YES 开始时间 EndTime *int64 `json:"endTime"` //YES 结束时间(开始时间结束时间间隔不能超过半年) Page *int `json:"page"` //YES 页数 Limit *int `json:"limit"` //YES 每页数量 (最大值: 500) Transfers *string `json:"transfers"` //NO 划转方向 (FROM/TO) TransferFunctionAccountType *string `json:"transferFunctionAccountType"` //NO 划转账户类型 (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) RecvWindow *int64 `json:"recvWindow"` //NO Timestamp *int64 `json:"timestamp"` //YES }
type SpotMarginAccountApi ¶
type SpotMarginAccountApi struct {
// contains filtered or unexported fields
}
func (*SpotMarginAccountApi) Do ¶
func (api *SpotMarginAccountApi) Do() (*MarginAccountRes, error)
func (*SpotMarginAccountApi) RecvWindow ¶
func (api *SpotMarginAccountApi) RecvWindow(RecvWindow int64) *SpotMarginAccountApi
func (*SpotMarginAccountApi) Timestamp ¶
func (api *SpotMarginAccountApi) Timestamp(Timestamp int64) *SpotMarginAccountApi
type SpotMarginAccountReq ¶
type SpotMarginAllOrdersApi ¶
type SpotMarginAllOrdersApi struct {
// contains filtered or unexported fields
}
func (*SpotMarginAllOrdersApi) Do ¶
func (api *SpotMarginAllOrdersApi) Do() (*MarginAllOrdersRes, error)
func (*SpotMarginAllOrdersApi) EndTime ¶
func (api *SpotMarginAllOrdersApi) EndTime(EndTime int64) *SpotMarginAllOrdersApi
func (*SpotMarginAllOrdersApi) IsIsolated ¶
func (api *SpotMarginAllOrdersApi) IsIsolated(IsIsolated string) *SpotMarginAllOrdersApi
func (*SpotMarginAllOrdersApi) Limit ¶
func (api *SpotMarginAllOrdersApi) Limit(Limit int64) *SpotMarginAllOrdersApi
func (*SpotMarginAllOrdersApi) OrderId ¶
func (api *SpotMarginAllOrdersApi) OrderId(OrderId int64) *SpotMarginAllOrdersApi
func (*SpotMarginAllOrdersApi) RecvWindow ¶
func (api *SpotMarginAllOrdersApi) RecvWindow(RecvWindow int64) *SpotMarginAllOrdersApi
func (*SpotMarginAllOrdersApi) StartTime ¶
func (api *SpotMarginAllOrdersApi) StartTime(StartTime int64) *SpotMarginAllOrdersApi
func (*SpotMarginAllOrdersApi) Symbol ¶
func (api *SpotMarginAllOrdersApi) Symbol(Symbol string) *SpotMarginAllOrdersApi
func (*SpotMarginAllOrdersApi) Timestamp ¶
func (api *SpotMarginAllOrdersApi) Timestamp(Timestamp int64) *SpotMarginAllOrdersApi
type SpotMarginAllOrdersReq ¶
type SpotMarginAllOrdersReq struct { Symbol *string `json:"symbol"` //YES IsIsolated *string `json:"isIsolated"` //NO 是否逐仓杠杆,"TRUE", "FALSE", 默认 "FALSE" OrderId *int64 `json:"orderId"` //NO StartTime *int64 `json:"startTime"` //NO EndTime *int64 `json:"endTime"` //NO Limit *int64 `json:"limit"` //NO 默认 500;最大500. RecvWindow *int64 `json:"recvWindow"` //NO 赋值不能大于 60000 Timestamp *int64 `json:"timestamp"` //YES }
type SpotMarginAllPairsApi ¶
type SpotMarginAllPairsApi struct {
// contains filtered or unexported fields
}
func (*SpotMarginAllPairsApi) Do ¶
func (api *SpotMarginAllPairsApi) Do() (*MarginAllPairsRes, error)
func (*SpotMarginAllPairsApi) RecvWindow ¶
func (api *SpotMarginAllPairsApi) RecvWindow(RecvWindow int64) *SpotMarginAllPairsApi
func (*SpotMarginAllPairsApi) Timestamp ¶
func (api *SpotMarginAllPairsApi) Timestamp(Timestamp int64) *SpotMarginAllPairsApi
type SpotMarginAllPairsReq ¶
type SpotMarginInterestHistoryApi ¶
type SpotMarginInterestHistoryApi struct {
// contains filtered or unexported fields
}
func (*SpotMarginInterestHistoryApi) Archived ¶
func (api *SpotMarginInterestHistoryApi) Archived(Archived string) *SpotMarginInterestHistoryApi
func (*SpotMarginInterestHistoryApi) Asset ¶
func (api *SpotMarginInterestHistoryApi) Asset(Asset string) *SpotMarginInterestHistoryApi
func (*SpotMarginInterestHistoryApi) Current ¶
func (api *SpotMarginInterestHistoryApi) Current(Current int64) *SpotMarginInterestHistoryApi
func (*SpotMarginInterestHistoryApi) Do ¶
func (api *SpotMarginInterestHistoryApi) Do() (*MarginInterestHistoryRes, error)
func (*SpotMarginInterestHistoryApi) EndTime ¶
func (api *SpotMarginInterestHistoryApi) EndTime(EndTime int64) *SpotMarginInterestHistoryApi
func (*SpotMarginInterestHistoryApi) IsolatedSymbol ¶
func (api *SpotMarginInterestHistoryApi) IsolatedSymbol(IsolatedSymbol string) *SpotMarginInterestHistoryApi
func (*SpotMarginInterestHistoryApi) RecvWindow ¶
func (api *SpotMarginInterestHistoryApi) RecvWindow(RecvWindow int64) *SpotMarginInterestHistoryApi
func (*SpotMarginInterestHistoryApi) Size ¶
func (api *SpotMarginInterestHistoryApi) Size(Size int64) *SpotMarginInterestHistoryApi
func (*SpotMarginInterestHistoryApi) StartTime ¶
func (api *SpotMarginInterestHistoryApi) StartTime(StartTime int64) *SpotMarginInterestHistoryApi
func (*SpotMarginInterestHistoryApi) Timestamp ¶
func (api *SpotMarginInterestHistoryApi) Timestamp(Timestamp int64) *SpotMarginInterestHistoryApi
type SpotMarginInterestHistoryReq ¶
type SpotMarginInterestHistoryReq struct { Asset *string `json:"asset"` //NO 币种, 比如, BTC IsolatedSymbol *string `json:"isolatedSymbol"` //NO 逐仓交易对,适用于逐仓查询 StartTime *int64 `json:"startTime"` //NO EndTime *int64 `json:"endTime"` //NO Current *int64 `json:"current"` //NO 当前查询页。 开始值 1. 默认:1 Size *int64 `json:"size"` //NO 默认:10 最大:100 Archived *string `json:"archived"` //NO 默认: false. 查询6个月以前的数据,需要设为 true RecvWindow *int64 `json:"recvWindow"` //NO 赋值不能大于 60000 Timestamp *int64 `json:"timestamp"` //YES }
type SpotMarginIsolatedAccountApi ¶
type SpotMarginIsolatedAccountApi struct {
// contains filtered or unexported fields
}
func (*SpotMarginIsolatedAccountApi) Do ¶
func (api *SpotMarginIsolatedAccountApi) Do() (*MarginIsolatedAccountRes, error)
func (*SpotMarginIsolatedAccountApi) RecvWindow ¶
func (api *SpotMarginIsolatedAccountApi) RecvWindow(RecvWindow int64) *SpotMarginIsolatedAccountApi
func (*SpotMarginIsolatedAccountApi) Symbols ¶
func (api *SpotMarginIsolatedAccountApi) Symbols(Symbols string) *SpotMarginIsolatedAccountApi
func (*SpotMarginIsolatedAccountApi) Timestamp ¶
func (api *SpotMarginIsolatedAccountApi) Timestamp(Timestamp int64) *SpotMarginIsolatedAccountApi
type SpotMarginIsolatedAllPairsApi ¶
type SpotMarginIsolatedAllPairsApi struct {
// contains filtered or unexported fields
}
func (*SpotMarginIsolatedAllPairsApi) Do ¶
func (api *SpotMarginIsolatedAllPairsApi) Do() (*MarginIsolatedAllPairsRes, error)
func (*SpotMarginIsolatedAllPairsApi) RecvWindow ¶
func (api *SpotMarginIsolatedAllPairsApi) RecvWindow(RecvWindow int64) *SpotMarginIsolatedAllPairsApi
func (*SpotMarginIsolatedAllPairsApi) Timestamp ¶
func (api *SpotMarginIsolatedAllPairsApi) Timestamp(Timestamp int64) *SpotMarginIsolatedAllPairsApi
type SpotMarginIsolatedTransferApi ¶
type SpotMarginIsolatedTransferApi struct {
// contains filtered or unexported fields
}
func (*SpotMarginIsolatedTransferApi) Amount ¶
func (api *SpotMarginIsolatedTransferApi) Amount(Amount decimal.Decimal) *SpotMarginIsolatedTransferApi
func (*SpotMarginIsolatedTransferApi) Asset ¶
func (api *SpotMarginIsolatedTransferApi) Asset(Asset string) *SpotMarginIsolatedTransferApi
func (*SpotMarginIsolatedTransferApi) Do ¶
func (api *SpotMarginIsolatedTransferApi) Do() (*MarginIsolatedTransferRes, error)
func (*SpotMarginIsolatedTransferApi) RecvWindow ¶
func (api *SpotMarginIsolatedTransferApi) RecvWindow(RecvWindow int64) *SpotMarginIsolatedTransferApi
func (*SpotMarginIsolatedTransferApi) Symbol ¶
func (api *SpotMarginIsolatedTransferApi) Symbol(Symbol string) *SpotMarginIsolatedTransferApi
func (*SpotMarginIsolatedTransferApi) Timestamp ¶
func (api *SpotMarginIsolatedTransferApi) Timestamp(Timestamp int64) *SpotMarginIsolatedTransferApi
func (*SpotMarginIsolatedTransferApi) TransFrom ¶
func (api *SpotMarginIsolatedTransferApi) TransFrom(TransFrom string) *SpotMarginIsolatedTransferApi
func (*SpotMarginIsolatedTransferApi) TransTo ¶
func (api *SpotMarginIsolatedTransferApi) TransTo(TransTo string) *SpotMarginIsolatedTransferApi
type SpotMarginIsolatedTransferReq ¶
type SpotMarginIsolatedTransferReq struct { Asset *string `json:"asset"` //YES 被划转的资产, 比如, BTC Symbol *string `json:"symbol"` //YES 逐仓 symbol TransFrom *string `json:"transFrom"` //YES "SPOT", "ISOLATED_MARGIN" TransTo *string `json:"transTo"` //YES "SPOT", "ISOLATED_MARGIN" Amount *decimal.Decimal `json:"amount"` //YES 划转数量 RecvWindow *int64 `json:"recvWindow"` //NO 赋值不能大于 60000 Timestamp *int64 `json:"timestamp"` //YES }
type SpotMarginIsolatedUserDataStreamDeleteApi ¶
type SpotMarginIsolatedUserDataStreamDeleteApi struct {
// contains filtered or unexported fields
}
func (*SpotMarginIsolatedUserDataStreamDeleteApi) Do ¶
func (api *SpotMarginIsolatedUserDataStreamDeleteApi) Do() (*SpotMarginIsolatedUserDataStreamDeleteRes, error)
func (*SpotMarginIsolatedUserDataStreamDeleteApi) ListenKey ¶
func (api *SpotMarginIsolatedUserDataStreamDeleteApi) ListenKey(ListenKey string) *SpotMarginIsolatedUserDataStreamDeleteApi
func (*SpotMarginIsolatedUserDataStreamDeleteApi) Symbol ¶
func (api *SpotMarginIsolatedUserDataStreamDeleteApi) Symbol(Symbol string) *SpotMarginIsolatedUserDataStreamDeleteApi
type SpotMarginIsolatedUserDataStreamDeleteRes ¶
type SpotMarginIsolatedUserDataStreamDeleteRes struct{}
type SpotMarginIsolatedUserDataStreamPostApi ¶
type SpotMarginIsolatedUserDataStreamPostApi struct {
// contains filtered or unexported fields
}
func (*SpotMarginIsolatedUserDataStreamPostApi) Do ¶
func (api *SpotMarginIsolatedUserDataStreamPostApi) Do() (*SpotMarginIsolatedUserDataStreamPostRes, error)
func (*SpotMarginIsolatedUserDataStreamPostApi) Symbol ¶
func (api *SpotMarginIsolatedUserDataStreamPostApi) Symbol(Symbol string) *SpotMarginIsolatedUserDataStreamPostApi
type SpotMarginIsolatedUserDataStreamPostReq ¶
type SpotMarginIsolatedUserDataStreamPostReq struct {
Symbol *string `json:"symbol"` //YES
}
type SpotMarginIsolatedUserDataStreamPostRes ¶
type SpotMarginIsolatedUserDataStreamPostRes struct {
ListenKey string `json:"listenKey"`
}
type SpotMarginIsolatedUserDataStreamPutApi ¶
type SpotMarginIsolatedUserDataStreamPutApi struct {
// contains filtered or unexported fields
}
func (*SpotMarginIsolatedUserDataStreamPutApi) Do ¶
func (api *SpotMarginIsolatedUserDataStreamPutApi) Do() (*SpotMarginIsolatedUserDataStreamPutRes, error)
func (*SpotMarginIsolatedUserDataStreamPutApi) ListenKey ¶
func (api *SpotMarginIsolatedUserDataStreamPutApi) ListenKey(ListenKey string) *SpotMarginIsolatedUserDataStreamPutApi
func (*SpotMarginIsolatedUserDataStreamPutApi) Symbol ¶
func (api *SpotMarginIsolatedUserDataStreamPutApi) Symbol(Symbol string) *SpotMarginIsolatedUserDataStreamPutApi
type SpotMarginIsolatedUserDataStreamPutRes ¶
type SpotMarginIsolatedUserDataStreamPutRes struct{}
type SpotMarginLoanApi ¶
type SpotMarginLoanApi struct {
// contains filtered or unexported fields
}
func (*SpotMarginLoanApi) Amount ¶
func (api *SpotMarginLoanApi) Amount(Amount decimal.Decimal) *SpotMarginLoanApi
func (*SpotMarginLoanApi) Asset ¶
func (api *SpotMarginLoanApi) Asset(Asset string) *SpotMarginLoanApi
func (*SpotMarginLoanApi) Do ¶
func (api *SpotMarginLoanApi) Do() (*MarginLoanRes, error)
func (*SpotMarginLoanApi) IsIsolated ¶
func (api *SpotMarginLoanApi) IsIsolated(IsIsolated string) *SpotMarginLoanApi
func (*SpotMarginLoanApi) RecvWindow ¶
func (api *SpotMarginLoanApi) RecvWindow(RecvWindow int64) *SpotMarginLoanApi
func (*SpotMarginLoanApi) Symbol ¶
func (api *SpotMarginLoanApi) Symbol(Symbol string) *SpotMarginLoanApi
func (*SpotMarginLoanApi) Timestamp ¶
func (api *SpotMarginLoanApi) Timestamp(Timestamp int64) *SpotMarginLoanApi
type SpotMarginLoanReq ¶
type SpotMarginLoanReq struct { Asset *string `json:"asset"` //YES 被划转的资产, 比如, BTC IsIsolated *string `json:"isIsolated"` //NO 是否逐仓杠杆,"TRUE", "FALSE", 默认 "FALSE" Symbol *string `json:"symbol"` //NO 逐仓交易对,配合逐仓使用 Amount *decimal.Decimal `json:"amount"` //YES 划转数量 RecvWindow *int64 `json:"recvWindow"` //NO 赋值不能大于 60000 Timestamp *int64 `json:"timestamp"` //YES }
type SpotMarginMaxBorrowableApi ¶
type SpotMarginMaxBorrowableApi struct {
// contains filtered or unexported fields
}
func (*SpotMarginMaxBorrowableApi) Asset ¶
func (api *SpotMarginMaxBorrowableApi) Asset(Asset string) *SpotMarginMaxBorrowableApi
func (*SpotMarginMaxBorrowableApi) Do ¶
func (api *SpotMarginMaxBorrowableApi) Do() (*MarginMaxBorrowableRes, error)
func (*SpotMarginMaxBorrowableApi) IsolatedSymbol ¶
func (api *SpotMarginMaxBorrowableApi) IsolatedSymbol(IsolatedSymbol string) *SpotMarginMaxBorrowableApi
func (*SpotMarginMaxBorrowableApi) RecvWindow ¶
func (api *SpotMarginMaxBorrowableApi) RecvWindow(RecvWindow int64) *SpotMarginMaxBorrowableApi
func (*SpotMarginMaxBorrowableApi) Timestamp ¶
func (api *SpotMarginMaxBorrowableApi) Timestamp(Timestamp int64) *SpotMarginMaxBorrowableApi
type SpotMarginMaxTransferableApi ¶
type SpotMarginMaxTransferableApi struct {
// contains filtered or unexported fields
}
func (*SpotMarginMaxTransferableApi) Asset ¶
func (api *SpotMarginMaxTransferableApi) Asset(Asset string) *SpotMarginMaxTransferableApi
func (*SpotMarginMaxTransferableApi) Do ¶
func (api *SpotMarginMaxTransferableApi) Do() (*MarginMaxTransferableRes, error)
func (*SpotMarginMaxTransferableApi) IsolatedSymbol ¶
func (api *SpotMarginMaxTransferableApi) IsolatedSymbol(IsolatedSymbol string) *SpotMarginMaxTransferableApi
func (*SpotMarginMaxTransferableApi) RecvWindow ¶
func (api *SpotMarginMaxTransferableApi) RecvWindow(RecvWindow int64) *SpotMarginMaxTransferableApi
func (*SpotMarginMaxTransferableApi) Timestamp ¶
func (api *SpotMarginMaxTransferableApi) Timestamp(Timestamp int64) *SpotMarginMaxTransferableApi
type SpotMarginOpenOrdersApi ¶
type SpotMarginOpenOrdersApi struct {
// contains filtered or unexported fields
}
func (*SpotMarginOpenOrdersApi) Do ¶
func (api *SpotMarginOpenOrdersApi) Do() (*MarginOpenOrdersRes, error)
func (*SpotMarginOpenOrdersApi) IsIsolated ¶
func (api *SpotMarginOpenOrdersApi) IsIsolated(IsIsolated string) *SpotMarginOpenOrdersApi
func (*SpotMarginOpenOrdersApi) RecvWindow ¶
func (api *SpotMarginOpenOrdersApi) RecvWindow(RecvWindow int64) *SpotMarginOpenOrdersApi
func (*SpotMarginOpenOrdersApi) Symbol ¶
func (api *SpotMarginOpenOrdersApi) Symbol(Symbol string) *SpotMarginOpenOrdersApi
func (*SpotMarginOpenOrdersApi) Timestamp ¶
func (api *SpotMarginOpenOrdersApi) Timestamp(Timestamp int64) *SpotMarginOpenOrdersApi
type SpotMarginOpenOrdersReq ¶
type SpotMarginOrderDeleteApi ¶
type SpotMarginOrderDeleteApi struct {
// contains filtered or unexported fields
}
func (*SpotMarginOrderDeleteApi) Do ¶
func (api *SpotMarginOrderDeleteApi) Do() (*SpotMarginOrderDeleteRes, error)
func (*SpotMarginOrderDeleteApi) IsIsolated ¶
func (api *SpotMarginOrderDeleteApi) IsIsolated(IsIsolated string) *SpotMarginOrderDeleteApi
func (*SpotMarginOrderDeleteApi) NewClientOrderId ¶
func (api *SpotMarginOrderDeleteApi) NewClientOrderId(NewClientOrderId string) *SpotMarginOrderDeleteApi
func (*SpotMarginOrderDeleteApi) OrderId ¶
func (api *SpotMarginOrderDeleteApi) OrderId(OrderId int64) *SpotMarginOrderDeleteApi
func (*SpotMarginOrderDeleteApi) OrigClientOrderId ¶
func (api *SpotMarginOrderDeleteApi) OrigClientOrderId(OrigClientOrderId string) *SpotMarginOrderDeleteApi
func (*SpotMarginOrderDeleteApi) RecvWindow ¶
func (api *SpotMarginOrderDeleteApi) RecvWindow(RecvWindow int64) *SpotMarginOrderDeleteApi
func (*SpotMarginOrderDeleteApi) Symbol ¶
func (api *SpotMarginOrderDeleteApi) Symbol(Symbol string) *SpotMarginOrderDeleteApi
func (*SpotMarginOrderDeleteApi) Timestamp ¶
func (api *SpotMarginOrderDeleteApi) Timestamp(Timestamp int64) *SpotMarginOrderDeleteApi
type SpotMarginOrderDeleteReq ¶
type SpotMarginOrderDeleteReq struct { Symbol *string `json:"symbol"` //YES IsIsolated *string `json:"isIsolated"` //NO 是否逐仓杠杆,"TRUE", "FALSE", 默认 "FALSE" OrderId *int64 `json:"orderId"` //NO OrigClientOrderId *string `json:"origClientOrderId"` //NO NewClientOrderId *string `json:"newClientOrderId"` //NO 用于唯一识别此撤销订单,默认自动生成。 RecvWindow *int64 `json:"recvWindow"` //NO T赋值不能大于 60000 Timestamp *int64 `json:"timestamp"` //YES }
type SpotMarginOrderDeleteRes ¶
type SpotMarginOrderDeleteRes struct { Symbol string `json:"symbol"` // 交易对 OrderId string `json:"orderId"` // 系统的订单ID OrigClientOrderId string `json:"origClientOrderId"` // 原始的客户端订单ID ClientOrderId string `json:"clientOrderId"` // 客户自己设置的ID Price string `json:"price"` // 订单价格 OrigQty string `json:"origQty"` // 用户设置的原始订单数量 ExecutedQty string `json:"executedQty"` // 交易的订单数量 CummulativeQuoteQty string `json:"cummulativeQuoteQty"` // 累计交易的金额 Status string `json:"status"` // 订单状态 TimeInForce string `json:"timeInForce"` // 订单的时效方式 Type string `json:"type"` // 订单类型, 比如市价单,现价单等 Side string `json:"side"` // 订单方向,买还是卖 IsIsolated bool `json:"isIsolated"` // 是否是逐仓symbol交易 SelfTradePreventionMode string `json:"selfTradePreventionMode"` // 自我交易预防模式 }
type SpotMarginOrderGetApi ¶
type SpotMarginOrderGetApi struct {
// contains filtered or unexported fields
}
func (*SpotMarginOrderGetApi) Do ¶
func (api *SpotMarginOrderGetApi) Do() (*MarginOrderGetRes, error)
func (*SpotMarginOrderGetApi) IsIsolated ¶
func (api *SpotMarginOrderGetApi) IsIsolated(IsIsolated string) *SpotMarginOrderGetApi
func (*SpotMarginOrderGetApi) OrderId ¶
func (api *SpotMarginOrderGetApi) OrderId(OrderId int64) *SpotMarginOrderGetApi
func (*SpotMarginOrderGetApi) OrigClientOrderId ¶
func (api *SpotMarginOrderGetApi) OrigClientOrderId(OrigClientOrderId string) *SpotMarginOrderGetApi
func (*SpotMarginOrderGetApi) RecvWindow ¶
func (api *SpotMarginOrderGetApi) RecvWindow(RecvWindow int64) *SpotMarginOrderGetApi
func (*SpotMarginOrderGetApi) Symbol ¶
func (api *SpotMarginOrderGetApi) Symbol(Symbol string) *SpotMarginOrderGetApi
func (*SpotMarginOrderGetApi) Timestamp ¶
func (api *SpotMarginOrderGetApi) Timestamp(Timestamp int64) *SpotMarginOrderGetApi
type SpotMarginOrderGetReq ¶
type SpotMarginOrderGetReq struct { Symbol *string `json:"symbol"` //NO IsIsolated *string `json:"isIsolated"` //NO 是否逐仓杠杆,"TRUE", "FALSE", 默认 "FALSE" OrderId *int64 `json:"orderId"` //NO OrigClientOrderId *string `json:"origClientOrderId"` //NO RecvWindow *int64 `json:"recvWindow"` //NO 赋值不能大于 60000 Timestamp *int64 `json:"timestamp"` //YES }
type SpotMarginOrderPostApi ¶
type SpotMarginOrderPostApi struct {
// contains filtered or unexported fields
}
func (*SpotMarginOrderPostApi) AutoRepayAtCancel ¶
func (api *SpotMarginOrderPostApi) AutoRepayAtCancel(AutoRepayAtCancel bool) *SpotMarginOrderPostApi
func (*SpotMarginOrderPostApi) Do ¶
func (api *SpotMarginOrderPostApi) Do() (*SpotMarginOrderPostRes, error)
func (*SpotMarginOrderPostApi) IcebergQty ¶
func (api *SpotMarginOrderPostApi) IcebergQty(IcebergQty decimal.Decimal) *SpotMarginOrderPostApi
func (*SpotMarginOrderPostApi) IsIsolated ¶
func (api *SpotMarginOrderPostApi) IsIsolated(IsIsolated string) *SpotMarginOrderPostApi
func (*SpotMarginOrderPostApi) NewClientOrderId ¶
func (api *SpotMarginOrderPostApi) NewClientOrderId(NewClientOrderId string) *SpotMarginOrderPostApi
func (*SpotMarginOrderPostApi) NewOrderRespType ¶
func (api *SpotMarginOrderPostApi) NewOrderRespType(NewOrderRespType string) *SpotMarginOrderPostApi
func (*SpotMarginOrderPostApi) Price ¶
func (api *SpotMarginOrderPostApi) Price(Price decimal.Decimal) *SpotMarginOrderPostApi
func (*SpotMarginOrderPostApi) Quantity ¶
func (api *SpotMarginOrderPostApi) Quantity(Quantity decimal.Decimal) *SpotMarginOrderPostApi
func (*SpotMarginOrderPostApi) QuoteOrderQty ¶
func (api *SpotMarginOrderPostApi) QuoteOrderQty(QuoteOrderQty decimal.Decimal) *SpotMarginOrderPostApi
func (*SpotMarginOrderPostApi) RecvWindow ¶
func (api *SpotMarginOrderPostApi) RecvWindow(RecvWindow int64) *SpotMarginOrderPostApi
func (*SpotMarginOrderPostApi) SelfTradePreventionMode ¶
func (api *SpotMarginOrderPostApi) SelfTradePreventionMode(SelfTradePreventionMode string) *SpotMarginOrderPostApi
func (*SpotMarginOrderPostApi) Side ¶
func (api *SpotMarginOrderPostApi) Side(Side string) *SpotMarginOrderPostApi
func (*SpotMarginOrderPostApi) SideEffectType ¶
func (api *SpotMarginOrderPostApi) SideEffectType(SideEffectType string) *SpotMarginOrderPostApi
func (*SpotMarginOrderPostApi) StopPrice ¶
func (api *SpotMarginOrderPostApi) StopPrice(StopPrice decimal.Decimal) *SpotMarginOrderPostApi
func (*SpotMarginOrderPostApi) Symbol ¶
func (api *SpotMarginOrderPostApi) Symbol(Symbol string) *SpotMarginOrderPostApi
func (*SpotMarginOrderPostApi) TimeInForce ¶
func (api *SpotMarginOrderPostApi) TimeInForce(TimeInForce string) *SpotMarginOrderPostApi
func (*SpotMarginOrderPostApi) Timestamp ¶
func (api *SpotMarginOrderPostApi) Timestamp(Timestamp int64) *SpotMarginOrderPostApi
func (*SpotMarginOrderPostApi) Type ¶
func (api *SpotMarginOrderPostApi) Type(Type string) *SpotMarginOrderPostApi
type SpotMarginOrderPostReq ¶
type SpotMarginOrderPostReq struct { Symbol *string `json:"symbol"` //YES IsIsolated *string `json:"isIsolated"` //NO 是否逐仓杠杆,"TRUE", "FALSE", 默认 "FALSE" Side *string `json:"side"` //YES BUY SELL Type *string `json:"type"` //YES 详见枚举定义:订单类型 Quantity *decimal.Decimal `json:"quantity"` //NO QuoteOrderQty *decimal.Decimal `json:"quoteOrderQty"` //NO Price *decimal.Decimal `json:"price"` //NO StopPrice *decimal.Decimal `json:"stopPrice"` //NO 与STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, 和 TAKE_PROFIT_LIMIT 订单一起使用. NewClientOrderId *string `json:"newClientOrderId"` //NO 客户自定义的唯一订单ID。若未发送自动生成。 IcebergQty *decimal.Decimal `json:"icebergQty"` //NO 与 LIMIT, STOP_LOSS_LIMIT, 和 TAKE_PROFIT_LIMIT 一起使用创建 iceberg 订单. NewOrderRespType *string `json:"newOrderRespType"` //NO 设置响应: JSON. ACK, RESULT, 或 FULL; MARKET 和 LIMIT 订单类型默认为 FULL, 所有其他订单默认为 ACK. SideEffectType *string `json:"sideEffectType"` //NO NO_SIDE_EFFECT, MARGIN_BUY, AUTO_REPAY;默认为 NO_SIDE_EFFECT. TimeInForce *string `json:"timeInForce"` //NO GTC,IOC,FOK SelfTradePreventionMode *string `json:"selfTradePreventionMode"` //NO 允许的 ENUM 取决于交易对的配置。支持的值有 EXPIRE_TAKER,EXPIRE_MAKER,EXPIRE_BOTH,NONE AutoRepayAtCancel *bool `json:"autoRepayAtCancel"` //NO 只有在自动借款单或者自动借还单生效,true表示的是撤单后需要把订单产生的借款归还,默认为true RecvWindow *int64 `json:"recvWindow"` //NO 赋值不能大于 60000 Timestamp *int64 `json:"timestamp"` //YES }
type SpotMarginOrderPostRes ¶
type SpotMarginOrderPostRes struct { Symbol string `json:"symbol"` // 交易对 OrderId int64 `json:"orderId"` // 系统的订单ID ClientOrderId string `json:"clientOrderId"` // 客户自己设置的ID TransactTime int64 `json:"transactTime"` // 交易的时间戳 Price string `json:"price"` // 订单价格 OrigQty string `json:"origQty"` // 用户设置的原始订单数量 ExecutedQty string `json:"executedQty"` // 交易的订单数量 CummulativeQuoteQty string `json:"cummulativeQuoteQty"` // 累计交易的金额 Status string `json:"status"` // 订单状态 TimeInForce string `json:"timeInForce"` // 订单的时效方式 Type string `json:"type"` // 订单类型, 比如市价单,现价单等 Side string `json:"side"` // 订单方向,买还是卖 MarginBuyBorrowAmount string `json:"marginBuyBorrowAmount"` // 下单后没有发生借款则不返回该字段 MarginBuyBorrowAsset string `json:"marginBuyBorrowAsset"` // 下单后没有发生借款则不返回该字段 IsIsolated bool `json:"isIsolated"` // 是否是逐仓symbol交易 SelfTradePreventionMode string `json:"selfTradePreventionMode"` // 自我交易预防模式 Fills []SpotOrderFill `json:"fills"` // 订单中交易的信息 }
type SpotMarginRepayApi ¶
type SpotMarginRepayApi struct {
// contains filtered or unexported fields
}
func (*SpotMarginRepayApi) Amount ¶
func (api *SpotMarginRepayApi) Amount(Amount decimal.Decimal) *SpotMarginRepayApi
func (*SpotMarginRepayApi) Asset ¶
func (api *SpotMarginRepayApi) Asset(Asset string) *SpotMarginRepayApi
func (*SpotMarginRepayApi) Do ¶
func (api *SpotMarginRepayApi) Do() (*MarginRepayRes, error)
func (*SpotMarginRepayApi) IsIsolated ¶
func (api *SpotMarginRepayApi) IsIsolated(IsIsolated string) *SpotMarginRepayApi
func (*SpotMarginRepayApi) RecvWindow ¶
func (api *SpotMarginRepayApi) RecvWindow(RecvWindow int64) *SpotMarginRepayApi
func (*SpotMarginRepayApi) Symbol ¶
func (api *SpotMarginRepayApi) Symbol(Symbol string) *SpotMarginRepayApi
func (*SpotMarginRepayApi) Timestamp ¶
func (api *SpotMarginRepayApi) Timestamp(Timestamp int64) *SpotMarginRepayApi
type SpotMarginRepayReq ¶
type SpotMarginRepayReq struct { Asset *string `json:"asset"` //YES 被划转的资产, 比如, BTC IsIsolated *string `json:"isIsolated"` //NO 是否逐仓杠杆,"TRUE", "FALSE", 默认 "FALSE" Symbol *string `json:"symbol"` //NO 逐仓交易对,配合逐仓使用 Amount *decimal.Decimal `json:"amount"` //YES 划转数量 RecvWindow *int64 `json:"recvWindow"` //NO 赋值不能大于 60000 Timestamp *int64 `json:"timestamp"` //YES }
type SpotMarginTransferApi ¶
type SpotMarginTransferApi struct {
// contains filtered or unexported fields
}
func (*SpotMarginTransferApi) Amount ¶
func (api *SpotMarginTransferApi) Amount(Amount decimal.Decimal) *SpotMarginTransferApi
func (*SpotMarginTransferApi) Asset ¶
func (api *SpotMarginTransferApi) Asset(Asset string) *SpotMarginTransferApi
func (*SpotMarginTransferApi) Do ¶
func (api *SpotMarginTransferApi) Do() (*MarginTransferRes, error)
func (*SpotMarginTransferApi) RecvWindow ¶
func (api *SpotMarginTransferApi) RecvWindow(RecvWindow int64) *SpotMarginTransferApi
func (*SpotMarginTransferApi) Timestamp ¶
func (api *SpotMarginTransferApi) Timestamp(Timestamp int64) *SpotMarginTransferApi
func (*SpotMarginTransferApi) Type ¶
func (api *SpotMarginTransferApi) Type(Type int) *SpotMarginTransferApi
type SpotMarginTransferReq ¶
type SpotMarginUserDataStreamDeleteApi ¶
type SpotMarginUserDataStreamDeleteApi struct {
// contains filtered or unexported fields
}
func (*SpotMarginUserDataStreamDeleteApi) Do ¶
func (api *SpotMarginUserDataStreamDeleteApi) Do() (*SpotMarginUserDataStreamDeleteRes, error)
func (*SpotMarginUserDataStreamDeleteApi) ListenKey ¶
func (api *SpotMarginUserDataStreamDeleteApi) ListenKey(ListenKey string) *SpotMarginUserDataStreamDeleteApi
type SpotMarginUserDataStreamDeleteReq ¶
type SpotMarginUserDataStreamDeleteReq struct {
ListenKey *string `json:"listenKey"` //YES
}
type SpotMarginUserDataStreamDeleteRes ¶
type SpotMarginUserDataStreamDeleteRes struct{}
type SpotMarginUserDataStreamPostApi ¶
type SpotMarginUserDataStreamPostApi struct {
// contains filtered or unexported fields
}
func (*SpotMarginUserDataStreamPostApi) Do ¶
func (api *SpotMarginUserDataStreamPostApi) Do() (*SpotMarginUserDataStreamPostRes, error)
type SpotMarginUserDataStreamPostReq ¶
type SpotMarginUserDataStreamPostReq struct{}
type SpotMarginUserDataStreamPostRes ¶
type SpotMarginUserDataStreamPostRes struct {
ListenKey string `json:"listenKey"`
}
type SpotMarginUserDataStreamPutApi ¶
type SpotMarginUserDataStreamPutApi struct {
// contains filtered or unexported fields
}
func (*SpotMarginUserDataStreamPutApi) Do ¶
func (api *SpotMarginUserDataStreamPutApi) Do() (*SpotMarginUserDataStreamPutRes, error)
func (*SpotMarginUserDataStreamPutApi) ListenKey ¶
func (api *SpotMarginUserDataStreamPutApi) ListenKey(ListenKey string) *SpotMarginUserDataStreamPutApi
type SpotMarginUserDataStreamPutReq ¶
type SpotMarginUserDataStreamPutReq struct {
ListenKey *string `json:"listenKey"` //YES
}
type SpotMarginUserDataStreamPutRes ¶
type SpotMarginUserDataStreamPutRes struct{}
type SpotMyTradesApi ¶
type SpotMyTradesApi struct {
// contains filtered or unexported fields
}
func (*SpotMyTradesApi) Do ¶
func (api *SpotMyTradesApi) Do() (*SpotMyTradesRes, error)
func (*SpotMyTradesApi) EndTime ¶
func (api *SpotMyTradesApi) EndTime(EndTime int64) *SpotMyTradesApi
func (*SpotMyTradesApi) FromId ¶
func (api *SpotMyTradesApi) FromId(FromId int64) *SpotMyTradesApi
func (*SpotMyTradesApi) Limit ¶
func (api *SpotMyTradesApi) Limit(Limit int) *SpotMyTradesApi
func (*SpotMyTradesApi) OrderId ¶
func (api *SpotMyTradesApi) OrderId(OrderId int64) *SpotMyTradesApi
func (*SpotMyTradesApi) RecvWindow ¶
func (api *SpotMyTradesApi) RecvWindow(RecvWindow int64) *SpotMyTradesApi
func (*SpotMyTradesApi) StartTime ¶
func (api *SpotMyTradesApi) StartTime(StartTime int64) *SpotMyTradesApi
func (*SpotMyTradesApi) Symbol ¶
func (api *SpotMyTradesApi) Symbol(Symbol string) *SpotMyTradesApi
func (*SpotMyTradesApi) Timestamp ¶
func (api *SpotMyTradesApi) Timestamp(Timestamp int64) *SpotMyTradesApi
type SpotMyTradesReq ¶
type SpotMyTradesReq struct { Symbol *string `json:"symbol"` //YES OrderId *int64 `json:"orderId"` //NO StartTime *int64 `json:"startTime"` //NO EndTime *int64 `json:"endTime"` //NO FromId *int64 `json:"fromId"` //NO Limit *int `json:"limit"` //NO 默认 500; 最大 1000. RecvWindow *int64 `json:"recvWindow"` //NO 赋值不能超过 60000 Timestamp *int64 `json:"timestamp"` //YES }
type SpotMyTradesRes ¶
type SpotMyTradesRes []SpotMyTradesResRow
type SpotMyTradesResRow ¶
type SpotMyTradesResRow struct { Symbol string `json:"symbol"` // 交易对 Id int64 `json:"id"` // trade ID OrderId int64 `json:"orderId"` // 订单ID OrderListId int64 `json:"orderListId"` // OCO订单的ID,不然就是-1 Price string `json:"price"` // 成交价格 Qty string `json:"qty"` // 成交量 QuoteQty string `json:"quoteQty"` // 成交金额 Commission string `json:"commission"` // 交易费金额 CommissionAsset string `json:"commissionAsset"` // 交易费资产类型 Time int64 `json:"time"` // 交易时间 IsBuyer bool `json:"isBuyer"` // 是否是买家 IsMaker bool `json:"isMaker"` // 是否是挂单方 IsBestMatch bool `json:"isBestMatch"` }
type SpotOpenOrdersApi ¶
type SpotOpenOrdersApi struct {
// contains filtered or unexported fields
}
func (*SpotOpenOrdersApi) Do ¶
func (api *SpotOpenOrdersApi) Do() (*SpotOpenOrdersRes, error)
func (*SpotOpenOrdersApi) RecvWindow ¶
func (api *SpotOpenOrdersApi) RecvWindow(RecvWindow int64) *SpotOpenOrdersApi
func (*SpotOpenOrdersApi) Symbol ¶
func (api *SpotOpenOrdersApi) Symbol(Symbol string) *SpotOpenOrdersApi
func (*SpotOpenOrdersApi) Timestamp ¶
func (api *SpotOpenOrdersApi) Timestamp(Timestamp int64) *SpotOpenOrdersApi
type SpotOpenOrdersReq ¶
type SpotOpenOrdersRes ¶
type SpotOpenOrdersRes []SpotOrderOrder
type SpotOrderCancelReplaceApi ¶
type SpotOrderCancelReplaceApi struct {
// contains filtered or unexported fields
}
func (*SpotOrderCancelReplaceApi) CancelNewClientOrderId ¶
func (api *SpotOrderCancelReplaceApi) CancelNewClientOrderId(CancelNewClientOrderId string) *SpotOrderCancelReplaceApi
func (*SpotOrderCancelReplaceApi) CancelOrderId ¶
func (api *SpotOrderCancelReplaceApi) CancelOrderId(CancelOrderId int64) *SpotOrderCancelReplaceApi
func (*SpotOrderCancelReplaceApi) CancelOrigClientOrderId ¶
func (api *SpotOrderCancelReplaceApi) CancelOrigClientOrderId(CancelOrigClientOrderId string) *SpotOrderCancelReplaceApi
func (*SpotOrderCancelReplaceApi) CancelReplaceMode ¶
func (api *SpotOrderCancelReplaceApi) CancelReplaceMode(CancelReplaceMode string) *SpotOrderCancelReplaceApi
func (*SpotOrderCancelReplaceApi) CancelRestrictions ¶
func (api *SpotOrderCancelReplaceApi) CancelRestrictions(CancelRestrictions string) *SpotOrderCancelReplaceApi
func (*SpotOrderCancelReplaceApi) Do ¶
func (api *SpotOrderCancelReplaceApi) Do() (*SpotOrderCancelReplaceRes, error)
func (*SpotOrderCancelReplaceApi) IcebergQty ¶
func (api *SpotOrderCancelReplaceApi) IcebergQty(IcebergQty decimal.Decimal) *SpotOrderCancelReplaceApi
func (*SpotOrderCancelReplaceApi) NewClientOrderId ¶
func (api *SpotOrderCancelReplaceApi) NewClientOrderId(NewClientOrderId string) *SpotOrderCancelReplaceApi
func (*SpotOrderCancelReplaceApi) NewOrderRespType ¶
func (api *SpotOrderCancelReplaceApi) NewOrderRespType(NewOrderRespType string) *SpotOrderCancelReplaceApi
func (*SpotOrderCancelReplaceApi) Price ¶
func (api *SpotOrderCancelReplaceApi) Price(Price decimal.Decimal) *SpotOrderCancelReplaceApi
func (*SpotOrderCancelReplaceApi) Quantity ¶
func (api *SpotOrderCancelReplaceApi) Quantity(Quantity decimal.Decimal) *SpotOrderCancelReplaceApi
func (*SpotOrderCancelReplaceApi) QuoteOrderQty ¶
func (api *SpotOrderCancelReplaceApi) QuoteOrderQty(QuoteOrderQty decimal.Decimal) *SpotOrderCancelReplaceApi
func (*SpotOrderCancelReplaceApi) RecvWindow ¶
func (api *SpotOrderCancelReplaceApi) RecvWindow(RecvWindow int64) *SpotOrderCancelReplaceApi
func (*SpotOrderCancelReplaceApi) SelfTradePreventionMode ¶
func (api *SpotOrderCancelReplaceApi) SelfTradePreventionMode(SelfTradePreventionMode string) *SpotOrderCancelReplaceApi
func (*SpotOrderCancelReplaceApi) Side ¶
func (api *SpotOrderCancelReplaceApi) Side(Side string) *SpotOrderCancelReplaceApi
func (*SpotOrderCancelReplaceApi) StopPrice ¶
func (api *SpotOrderCancelReplaceApi) StopPrice(StopPrice decimal.Decimal) *SpotOrderCancelReplaceApi
func (*SpotOrderCancelReplaceApi) StrategyId ¶
func (api *SpotOrderCancelReplaceApi) StrategyId(StrategyId int) *SpotOrderCancelReplaceApi
func (*SpotOrderCancelReplaceApi) StrategyType ¶
func (api *SpotOrderCancelReplaceApi) StrategyType(StrategyType int) *SpotOrderCancelReplaceApi
func (*SpotOrderCancelReplaceApi) Symbol ¶
func (api *SpotOrderCancelReplaceApi) Symbol(Symbol string) *SpotOrderCancelReplaceApi
func (*SpotOrderCancelReplaceApi) TimeInForce ¶
func (api *SpotOrderCancelReplaceApi) TimeInForce(TimeInForce string) *SpotOrderCancelReplaceApi
func (*SpotOrderCancelReplaceApi) Timestamp ¶
func (api *SpotOrderCancelReplaceApi) Timestamp(Timestamp int64) *SpotOrderCancelReplaceApi
func (*SpotOrderCancelReplaceApi) TrailingDelta ¶
func (api *SpotOrderCancelReplaceApi) TrailingDelta(TrailingDelta int64) *SpotOrderCancelReplaceApi
func (*SpotOrderCancelReplaceApi) Type ¶
func (api *SpotOrderCancelReplaceApi) Type(Type string) *SpotOrderCancelReplaceApi
type SpotOrderCancelReplaceReq ¶
type SpotOrderCancelReplaceReq struct { Symbol *string `json:"symbol"` //YES Side *string `json:"side"` //YES Type *string `json:"type"` //YES CancelReplaceMode *string `json:"cancelReplaceMode"` //YES 指定类型:STOP_ON_FAILURE - 如果撤消订单失败将不会继续重新下单。 ALLOW_FAILURE - 不管撤消订单是否成功都会继续重新下单。 TimeInForce *string `json:"timeInForce,omitempty"` //NO Quantity *decimal.Decimal `json:"quantity,omitempty"` //NO QuoteOrderQty *decimal.Decimal `json:"quoteOrderQty,omitempty"` //NO Price *decimal.Decimal `json:"price,omitempty"` //NO CancelNewClientOrderId *string `json:"cancelNewClientOrderId,omitempty"` //NO 用户自定义的id,如空缺系统会自动赋值 CancelOrigClientOrderId *string `json:"cancelOrigClientOrderId,omitempty"` //NO 必须提供cancelOrigClientOrderId 或者 cancelOrderId。 如果两个参数都提供, cancelOrderId 会占优先。 CancelOrderId *int64 `json:"cancelOrderId,omitempty"` //NO 必须提供cancelOrigClientOrderId 或者 cancelOrderId。 如果两个参数都提供, cancelOrderId 会占优先。 NewClientOrderId *string `json:"newClientOrderId,omitempty"` //NO 用于辨识新订单。 StrategyId *int `json:"strategyId,omitempty"` //NO StrategyType *int `json:"strategyType,omitempty"` //NO 不能低于 1000000 StopPrice *decimal.Decimal `json:"stopPrice,omitempty"` //NO TrailingDelta *int64 `json:"trailingDelta,omitempty"` //NO IcebergQty *decimal.Decimal `json:"icebergQty,omitempty"` //NO NewOrderRespType *string `json:"newOrderRespType,omitempty"` //NO 指定响应类型: 指定响应类型 ACK, RESULT, 或者 FULL; MARKET 与 LIMIT 订单默认为FULL, 其他默认为ACK. SelfTradePreventionMode *string `json:"selfTradePreventionMode,omitempty"` //NO 允许的 ENUM 取决于交易对的配置。支持的值有 EXPIRE_TAKER,EXPIRE_MAKER,EXPIRE_BOTH,NONE。 CancelRestrictions *string `json:"cancelRestrictions,omitempty"` //NO 支持的值: ONLY_NEW - 如果订单状态为 NEW,撤销将成功。 ONLY_PARTIALLY_FILLED - 如果订单状态为 PARTIALLY_FILLED,撤销将成功。 RecvWindow *int64 `json:"recvWindow,omitempty"` //NO 不能大于 60000 Timestamp *int64 `json:"timestamp"` //YES }
symbol STRING YES side ENUM YES type ENUM YES cancelReplaceMode ENUM YES 指定类型:STOP_ON_FAILURE - 如果撤消订单失败将不会继续重新下单。 ALLOW_FAILURE - 不管撤消订单是否成功都会继续重新下单。 timeInForce ENUM NO quantity DECIMAL NO quoteOrderQty DECIMAL NO price DECIMAL NO cancelNewClientOrderId STRING NO 用户自定义的id,如空缺系统会自动赋值 cancelOrigClientOrderId STRING NO 必须提供cancelOrigClientOrderId 或者 cancelOrderId。 如果两个参数都提供, cancelOrderId 会占优先。 cancelOrderId LONG NO 必须提供cancelOrigClientOrderId 或者 cancelOrderId。 如果两个参数都提供, cancelOrderId 会占优先。 newClientOrderId STRING NO 用于辨识新订单。 strategyId INT NO strategyType INT NO 不能低于 1000000 stopPrice DECIMAL NO trailingDelta LONG NO icebergQty DECIMAL NO newOrderRespType ENUM NO 指定响应类型: 指定响应类型 ACK, RESULT, 或者 FULL; MARKET 与 LIMIT 订单默认为FULL, 其他默认为ACK. selfTradePreventionMode ENUM NO 允许的 ENUM 取决于交易对的配置。支持的值有 EXPIRE_TAKER,EXPIRE_MAKER,EXPIRE_BOTH,NONE。 cancelRestrictions ENUM NO 支持的值: ONLY_NEW - 如果订单状态为 NEW,撤销将成功。 ONLY_PARTIALLY_FILLED - 如果订单状态为 PARTIALLY_FILLED,撤销将成功。 recvWindow LONG NO 不能大于 60000 timestamp LONG YES
type SpotOrderCancelReplaceRes ¶
type SpotOrderCancelReplaceRes struct { CancelResult string `json:"cancelResult"` NewOrderResult string `json:"newOrderResult"` CancelResponse SpotOrderDeleteRes `json:"cancelResponse"` NewOrderResponse SpotOrderPostRes `json:"newOrderResponse"` }
type SpotOrderDeleteApi ¶
type SpotOrderDeleteApi struct {
// contains filtered or unexported fields
}
func (*SpotOrderDeleteApi) CancelRestrictions ¶
func (api *SpotOrderDeleteApi) CancelRestrictions(CancelRestrictions string) *SpotOrderDeleteApi
func (*SpotOrderDeleteApi) Do ¶
func (api *SpotOrderDeleteApi) Do() (*SpotOrderDeleteRes, error)
func (*SpotOrderDeleteApi) NewClientOrderId ¶
func (api *SpotOrderDeleteApi) NewClientOrderId(NewClientOrderId string) *SpotOrderDeleteApi
func (*SpotOrderDeleteApi) OrderId ¶
func (api *SpotOrderDeleteApi) OrderId(OrderId int64) *SpotOrderDeleteApi
func (*SpotOrderDeleteApi) OrigClientOrderId ¶
func (api *SpotOrderDeleteApi) OrigClientOrderId(OrigClientOrderId string) *SpotOrderDeleteApi
func (*SpotOrderDeleteApi) RecvWindow ¶
func (api *SpotOrderDeleteApi) RecvWindow(RecvWindow int64) *SpotOrderDeleteApi
func (*SpotOrderDeleteApi) Symbol ¶
func (api *SpotOrderDeleteApi) Symbol(Symbol string) *SpotOrderDeleteApi
func (*SpotOrderDeleteApi) Timestamp ¶
func (api *SpotOrderDeleteApi) Timestamp(Timestamp int64) *SpotOrderDeleteApi
type SpotOrderDeleteReq ¶
type SpotOrderDeleteReq struct { Symbol *string `json:"symbol"` //YES OrderId *int64 `json:"orderId,omitempty"` //NO OrigClientOrderId *string `json:"origClientOrderId,omitempty"` //NO NewClientOrderId *string `json:"newClientOrderId,omitempty"` //NO 用户自定义的本次撤销操作的ID(注意不是被撤销的订单的自定义ID)。如无指定会自动赋值。 CancelRestrictions *string `json:"cancelRestrictions,omitempty"` //NO 支持的值: ONLY_NEW - 如果订单状态为 NEW,订单取消将成功。 ONLY_PARTIALLY_FILLED - 如果订单状态为 PARTIALLY_FILLED,订单取消将成功。 RecvWindow *int64 `json:"recvWindow,omitempty"` //NO 赋值不得大于 60000 Timestamp *int64 `json:"timestamp"` //YES }
type SpotOrderDeleteRes ¶
type SpotOrderDeleteRes struct { Symbol string `json:"symbol"` // 交易对 OrigClientOrderId string `json:"origClientOrderId"` // 原始的客户端订单ID OrderId int64 `json:"orderId"` // 系统的订单ID OrderListId int64 `json:"orderListId"` // OCO订单ID,否则为 -1 ClientOrderId string `json:"clientOrderId"` // 客户自己设置的ID TransactTime int64 `json:"transactTime"` // 交易的时间戳 Price string `json:"price"` // 订单价格 OrigQty string `json:"origQty"` // 用户设置的原始订单数量 ExecutedQty string `json:"executedQty"` // 交易的订单数量 CummulativeQuoteQty string `json:"cummulativeQuoteQty"` // 累计交易的金额 Status string `json:"status"` // 订单状态 TimeInForce string `json:"timeInForce"` // 订单的时效方式 Type string `json:"type"` // 订单类型, 比如市价单,现价单等 Side string `json:"side"` // 订单方向,买还是卖 SelfTradePreventionMode string `json:"selfTradePreventionMode"` // 自我交易预防模式 }
type SpotOrderFill ¶
type SpotOrderGetApi ¶
type SpotOrderGetApi struct {
// contains filtered or unexported fields
}
func (*SpotOrderGetApi) Do ¶
func (api *SpotOrderGetApi) Do() (*SpotOrderGetRes, error)
func (*SpotOrderGetApi) OrderId ¶
func (api *SpotOrderGetApi) OrderId(OrderId int64) *SpotOrderGetApi
func (*SpotOrderGetApi) OrigClientOrderId ¶
func (api *SpotOrderGetApi) OrigClientOrderId(OrigClientOrderId string) *SpotOrderGetApi
func (*SpotOrderGetApi) RecvWindow ¶
func (api *SpotOrderGetApi) RecvWindow(RecvWindow int64) *SpotOrderGetApi
func (*SpotOrderGetApi) Symbol ¶
func (api *SpotOrderGetApi) Symbol(Symbol string) *SpotOrderGetApi
func (*SpotOrderGetApi) Timestamp ¶
func (api *SpotOrderGetApi) Timestamp(Timestamp int64) *SpotOrderGetApi
type SpotOrderGetReq ¶
type SpotOrderGetRes ¶
type SpotOrderGetRes SpotOrderOrder
type SpotOrderOrder ¶
type SpotOrderOrder struct { Symbol string `json:"symbol"` // 交易对 OrderId int64 `json:"orderId"` // 系统的订单ID OrderListId int64 `json:"orderListId"` // OCO订单ID,否则为 -1 ClientOrderId string `json:"clientOrderId"` // 客户自己设置的ID Price string `json:"price"` // 订单价格 OrigQty string `json:"origQty"` // 用户设置的原始订单数量 ExecutedQty string `json:"executedQty"` // 交易的订单数量 CummulativeQuoteQty string `json:"cummulativeQuoteQty"` // 累计交易的金额 Status string `json:"status"` // 订单状态 TimeInForce string `json:"timeInForce"` // 订单的时效方式 Type string `json:"type"` // 订单类型, 比如市价单,现价单等 Side string `json:"side"` // 订单方向,买还是卖 StopPrice string `json:"stopPrice"` // 触发价,对追踪止损单无效 IcebergQty string `json:"icebergQty"` // 冰山订单的数量 Time int64 `json:"time"` // 订单添加到 order book 的时间 UpdateTime int64 `json:"updateTime"` // 订单最后一次成交的时间 IsWorking bool `json:"isWorking"` // 订单是否在 order book 中被激活 WorkingTime int64 `json:"workingTime"` // 订单添加到 order book 的时间 OrigQuoteOrderQty string `json:"origQuoteOrderQty"` // 原始的报价订单数量 SelfTradePreventionMode string `json:"selfTradePreventionMode"` // 自成交防范模式 }
type SpotOrderPostApi ¶
type SpotOrderPostApi struct {
// contains filtered or unexported fields
}
func (*SpotOrderPostApi) Do ¶
func (api *SpotOrderPostApi) Do() (*SpotOrderPostRes, error)
func (*SpotOrderPostApi) IcebergQty ¶
func (api *SpotOrderPostApi) IcebergQty(IcebergQty decimal.Decimal) *SpotOrderPostApi
func (*SpotOrderPostApi) NewClientOrderId ¶
func (api *SpotOrderPostApi) NewClientOrderId(NewClientOrderId string) *SpotOrderPostApi
func (*SpotOrderPostApi) NewOrderRespType ¶
func (api *SpotOrderPostApi) NewOrderRespType(NewOrderRespType string) *SpotOrderPostApi
func (*SpotOrderPostApi) Price ¶
func (api *SpotOrderPostApi) Price(Price decimal.Decimal) *SpotOrderPostApi
func (*SpotOrderPostApi) Quantity ¶
func (api *SpotOrderPostApi) Quantity(Quantity decimal.Decimal) *SpotOrderPostApi
func (*SpotOrderPostApi) QuoteOrderQty ¶
func (api *SpotOrderPostApi) QuoteOrderQty(QuoteOrderQty decimal.Decimal) *SpotOrderPostApi
func (*SpotOrderPostApi) RecvWindow ¶
func (api *SpotOrderPostApi) RecvWindow(RecvWindow int64) *SpotOrderPostApi
func (*SpotOrderPostApi) SelfTradePreventionMode ¶
func (api *SpotOrderPostApi) SelfTradePreventionMode(SelfTradePreventionMode string) *SpotOrderPostApi
func (*SpotOrderPostApi) Side ¶
func (api *SpotOrderPostApi) Side(Side string) *SpotOrderPostApi
func (*SpotOrderPostApi) StopPrice ¶
func (api *SpotOrderPostApi) StopPrice(StopPrice decimal.Decimal) *SpotOrderPostApi
func (*SpotOrderPostApi) StrategyId ¶
func (api *SpotOrderPostApi) StrategyId(StrategyId int) *SpotOrderPostApi
func (*SpotOrderPostApi) StrategyType ¶
func (api *SpotOrderPostApi) StrategyType(StrategyType int) *SpotOrderPostApi
func (*SpotOrderPostApi) Symbol ¶
func (api *SpotOrderPostApi) Symbol(Symbol string) *SpotOrderPostApi
func (*SpotOrderPostApi) TimeInForce ¶
func (api *SpotOrderPostApi) TimeInForce(TimeInForce string) *SpotOrderPostApi
func (*SpotOrderPostApi) Timestamp ¶
func (api *SpotOrderPostApi) Timestamp(Timestamp int64) *SpotOrderPostApi
func (*SpotOrderPostApi) TrailingDelta ¶
func (api *SpotOrderPostApi) TrailingDelta(TrailingDelta int64) *SpotOrderPostApi
func (*SpotOrderPostApi) Type ¶
func (api *SpotOrderPostApi) Type(Type string) *SpotOrderPostApi
type SpotOrderPostReq ¶
type SpotOrderPostReq struct { Symbol *string `json:"symbol"` //YES Side *string `json:"side"` //YES Type *string `json:"type"` //YES TimeInForce *string `json:"timeInForce,omitempty"` //NO 详见枚举定义:有效方式 Quantity *decimal.Decimal `json:"quantity,omitempty"` //NO QuoteOrderQty *decimal.Decimal `json:"quoteOrderQty,omitempty"` //NO Price *decimal.Decimal `json:"price,omitempty"` //NO NewClientOrderId *string `json:"newClientOrderId,omitempty"` //NO 客户自定义的唯一订单ID。 如果未发送,则自动生成。 StopPrice *decimal.Decimal `json:"stopPrice,omitempty"` //NO 仅 STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT 和 TAKE_PROFIT_LIMIT 需要此参数。 TrailingDelta *int64 `json:"trailingDelta,omitempty"` //NO 用于 STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT 和 TAKE_PROFIT_LIMIT 类型的订单。更多追踪止盈止损订单细节, 请参考 追踪止盈止损(Trailing Stop)订单常见问题。 IcebergQty *decimal.Decimal `json:"icebergQty,omitempty"` //NO 仅使用 LIMIT, STOP_LOSS_LIMIT, 和 TAKE_PROFIT_LIMIT 创建新的 iceberg 订单时需要此参数。 NewOrderRespType *string `json:"newOrderRespType,omitempty"` //NO 设置响应JSON。ACK,RESULT 或 FULL;MARKET 和 LIMIT 订单类型默认为 FULL,所有其他订单默认为 ACK。 SelfTradePreventionMode *string `json:"selfTradePreventionMode,omitempty"` //NO 允许的 ENUM 取决于交易对的配置。支持的值有 EXPIRE_TAKER,EXPIRE_MAKER,EXPIRE_BOTH,NONE。 StrategyId *int `json:"strategyId,omitempty"` //NO StrategyType *int `json:"strategyType,omitempty"` //NO 不能低于 1000000 RecvWindow *int64 `json:"recvWindow,omitempty"` //NO 赋值不能大于 60000 Timestamp *int64 `json:"timestamp"` //YES }
type SpotOrderPostRes ¶
type SpotOrderPostRes struct { Symbol string `json:"symbol"` // 交易对 OrderId int64 `json:"orderId"` // 系统的订单ID OrderListId int64 `json:"orderListId"` // OCO订单ID,否则为 -1 ClientOrderId string `json:"clientOrderId"` // 客户自己设置的ID TransactTime int64 `json:"transactTime"` // 交易的时间戳 Price string `json:"price"` // 订单价格 OrigQty string `json:"origQty"` // 用户设置的原始订单数量 ExecutedQty string `json:"executedQty"` // 交易的订单数量 CummulativeQuoteQty string `json:"cummulativeQuoteQty"` // 累计交易的金额 Status string `json:"status"` // 订单状态 TimeInForce string `json:"timeInForce"` // 订单的时效方式 Type string `json:"type"` // 订单类型, 比如市价单,现价单等 Side string `json:"side"` // 订单方向,买还是卖 WorkingTime int64 `json:"workingTime"` // 订单添加到 order book 的时间 SelfTradePreventionMode string `json:"selfTradePreventionMode"` // 自我交易预防模式 Fills []SpotOrderFill `json:"fills"` // 订单中交易的信息 }
type SpotPingApi ¶
type SpotPingApi struct {
// contains filtered or unexported fields
}
func (*SpotPingApi) Do ¶
func (api *SpotPingApi) Do() (*SpotPingRes, error)
type SpotPingReq ¶
type SpotPingReq struct { }
type SpotPingRes ¶
type SpotPingRes struct { }
type SpotRestClient ¶
type SpotRestClient RestClient
func (*SpotRestClient) NewAccountApiTradingStatus ¶
func (client *SpotRestClient) NewAccountApiTradingStatus() *SpotAccountApiTradingStatusApi
现货账户接口 binance SPOT钱包接口 账户API交易状态(USER_DATA)
func (*SpotRestClient) NewAllOrders ¶
func (client *SpotRestClient) NewAllOrders() *SpotAllOrdersApi
binance SPOT allOrders rest所有订单 (USER_DATA)
func (*SpotRestClient) NewExchangeInfo ¶
func (client *SpotRestClient) NewExchangeInfo() *SpotExchangeInfoApi
binance SPOT exchangeInfo rest交易规范
func (*SpotRestClient) NewManagedSubAccountQueryTransLog ¶
func (client *SpotRestClient) NewManagedSubAccountQueryTransLog() *SpotManagedSubAccountQueryTransLogApi
binance SPOT子母账户接口 ManagedSubAccountQueryTransLog rest查询托管子账户的划转记录(适用交易团队子账户)(USER_DATA)
func (*SpotRestClient) NewOpenOrders ¶
func (client *SpotRestClient) NewOpenOrders() *SpotOpenOrdersApi
现货订单接口 binance SPOT openOrders rest当前挂单 (USER_DATA)
func (*SpotRestClient) NewPing ¶
func (client *SpotRestClient) NewPing() *SpotPingApi
通用接口 binance SPOT ping rest测试连通性 (NONE)
func (*SpotRestClient) NewServerTime ¶
func (client *SpotRestClient) NewServerTime() *SpotServerTimeApi
binance SPOT serverTime rest服务器时间 (NONE)
func (*SpotRestClient) NewSpotAccount ¶
func (client *SpotRestClient) NewSpotAccount() *SpotAccountApi
binance SPOT现货账户和交易接口 SpotAccount rest账户信息 (USER_DATA)
func (*SpotRestClient) NewSpotAggTrades ¶
func (client *SpotRestClient) NewSpotAggTrades() *SpotAggTradesApi
binance SPOT spotAggTrades rest近期成交(归集)(NONE)
func (*SpotRestClient) NewSpotAssetGetFundingAsset ¶
func (client *SpotRestClient) NewSpotAssetGetFundingAsset() *SpotAssetGetFundingAssetApi
binance SPOT spotAssetGetFundingAsset rest资金账户 (USER_DATA)
func (*SpotRestClient) NewSpotAssetTradeFee ¶
func (client *SpotRestClient) NewSpotAssetTradeFee() *SpotAssetTradeFeeApi
binance SPOT spotAssetTradeFee rest查询用户交易手续费率 (USER_DATA)
func (*SpotRestClient) NewSpotAssetTransferGet ¶
func (client *SpotRestClient) NewSpotAssetTransferGet() *SpotAssetTransferGetApi
binance SPOT spotAssetTransferGet rest查询用户万向划转历史 (USER_DATA)
func (*SpotRestClient) NewSpotAssetTransferPost ¶
func (client *SpotRestClient) NewSpotAssetTransferPost() *SpotAssetTransferPostApi
binance SPOT spotAssetTransferPost rest用户万向划转 (USER_DATA)
func (*SpotRestClient) NewSpotAvgPrice ¶
func (client *SpotRestClient) NewSpotAvgPrice() *SpotAvgPriceApi
binance SPOT spotAvgPrice rest当前平均价格 (NONE)
func (*SpotRestClient) NewSpotDepth ¶
func (client *SpotRestClient) NewSpotDepth() *SpotDepthApi
binance SPOT spotDepth rest深度信息 (NONE)
func (*SpotRestClient) NewSpotHistoricalTrades ¶
func (client *SpotRestClient) NewSpotHistoricalTrades() *SpotHistoricalTradesApi
binance SPOT spotHistoricalTrades rest历史成交 (NONE)
func (*SpotRestClient) NewSpotKlines ¶
func (client *SpotRestClient) NewSpotKlines() *SpotKlinesApi
binance SPOT spotKlines restK线数据 (NONE)
func (*SpotRestClient) NewSpotMarginAccount ¶
func (client *SpotRestClient) NewSpotMarginAccount() *SpotMarginAccountApi
binance SPOT杠杆接口 MarginAccount rest查询全仓杠杆账户详情 (USER_DATA)
func (*SpotRestClient) NewSpotMarginAllOrders ¶
func (client *SpotRestClient) NewSpotMarginAllOrders() *SpotMarginAllOrdersApi
binance SPOT杠杆接口 MarginAllOrders rest查询杠杆账户全部订单 (USER_DATA)
func (*SpotRestClient) NewSpotMarginAllPairs ¶
func (client *SpotRestClient) NewSpotMarginAllPairs() *SpotMarginAllPairsApi
杠杆账户接口 binance SPOT杠杆接口 MarginAllPairs rest获取所有全仓杠杆交易对(MARKET_DATA)
func (*SpotRestClient) NewSpotMarginInterestHistory ¶
func (client *SpotRestClient) NewSpotMarginInterestHistory() *SpotMarginInterestHistoryApi
binance SPOT杠杆接口 MarginInterestHistory rest获取杠杆账户借息历史 (USER_DATA)
func (*SpotRestClient) NewSpotMarginIsolatedAccount ¶
func (client *SpotRestClient) NewSpotMarginIsolatedAccount() *SpotMarginIsolatedAccountApi
binance SPOT杠杆接口 MarginIsolatedAccount rest查询逐仓杠杆账户详情 (USER_DATA)
func (*SpotRestClient) NewSpotMarginIsolatedAllPairs ¶
func (client *SpotRestClient) NewSpotMarginIsolatedAllPairs() *SpotMarginIsolatedAllPairsApi
binance SPOT杠杆接口 MarginIsolatedAllPairs rest获取所有逐仓杠杆交易对(MARKET_DATA)
func (*SpotRestClient) NewSpotMarginIsolatedTransfer ¶
func (client *SpotRestClient) NewSpotMarginIsolatedTransfer() *SpotMarginIsolatedTransferApi
binance SPOT杠杆接口 MarginIsolatedTransfer rest逐仓杠杆账户划转 (MARGIN)
func (*SpotRestClient) NewSpotMarginIsolatedUserDataStreamDelete ¶
func (client *SpotRestClient) NewSpotMarginIsolatedUserDataStreamDelete() *SpotMarginIsolatedUserDataStreamDeleteApi
binance SPOT ws账户推送 SpotMarginIsolatedUserDataStreamDelete rest现货杠杆逐仓关闭listenKey (USER_STREAM)
func (*SpotRestClient) NewSpotMarginIsolatedUserDataStreamPost ¶
func (client *SpotRestClient) NewSpotMarginIsolatedUserDataStreamPost() *SpotMarginIsolatedUserDataStreamPostApi
binance SPOT ws账户推送 SpotMarginIsolatedUserDataStreamPost rest现货杠杆逐仓创建一个listenKey (USER_STREAM)
func (*SpotRestClient) NewSpotMarginIsolatedUserDataStreamPut ¶
func (client *SpotRestClient) NewSpotMarginIsolatedUserDataStreamPut() *SpotMarginIsolatedUserDataStreamPutApi
binance SPOT ws账户推送 SpotMarginIsolatedUserDataStreamPut rest现货杠杆逐仓延长listenKey有效期 (USER_STREAM)
func (*SpotRestClient) NewSpotMarginLoan ¶
func (client *SpotRestClient) NewSpotMarginLoan() *SpotMarginLoanApi
binance SPOT杠杆接口 MarginLoan rest 杠杆账户借贷 (MARGIN) 支持逐仓和全仓
func (*SpotRestClient) NewSpotMarginMaxBorrowable ¶
func (client *SpotRestClient) NewSpotMarginMaxBorrowable() *SpotMarginMaxBorrowableApi
binance SPOT杠杆接口 MarginMaxBorrowable rest查询最大可借 (MARKET_DATA)
func (*SpotRestClient) NewSpotMarginMaxTransferable ¶
func (client *SpotRestClient) NewSpotMarginMaxTransferable() *SpotMarginMaxTransferableApi
binance SPOT杠杆接口 MarginMaxTransferable rest查询最大可转 (MARKET_DATA)
func (*SpotRestClient) NewSpotMarginOpenOrders ¶
func (client *SpotRestClient) NewSpotMarginOpenOrders() *SpotMarginOpenOrdersApi
binance SPOT杠杆接口 MarginOpenOrders rest查询杠杆账户挂单记录 (USER_DATA)
func (*SpotRestClient) NewSpotMarginOrderDelete ¶
func (client *SpotRestClient) NewSpotMarginOrderDelete() *SpotMarginOrderDeleteApi
binance SPOT杠杆接口 MarginOrderDelete rest撤销杠杆账户订单 (TRADE)
func (*SpotRestClient) NewSpotMarginOrderGet ¶
func (client *SpotRestClient) NewSpotMarginOrderGet() *SpotMarginOrderGetApi
binance SPOT杠杆接口 MarginOrderGet rest查询杠杆账户订单 (USER_DATA)
func (*SpotRestClient) NewSpotMarginOrderPost ¶
func (client *SpotRestClient) NewSpotMarginOrderPost() *SpotMarginOrderPostApi
binance SPOT杠杆下单接口 SpotMarginOrderPost rest 杠杆下单 (TRADE)
func (*SpotRestClient) NewSpotMarginRepay ¶
func (client *SpotRestClient) NewSpotMarginRepay() *SpotMarginRepayApi
binance SPOT杠杆接口 MarginRepay rest 杠杆账户还贷 (MARGIN) 支持逐仓和全仓
func (*SpotRestClient) NewSpotMarginTransfer ¶
func (client *SpotRestClient) NewSpotMarginTransfer() *SpotMarginTransferApi
binance SPOT杠杆接口 MarginTransfer rest全仓杠杆账户划转 (MARGIN)
func (*SpotRestClient) NewSpotMarginUserDataStreamDelete ¶
func (client *SpotRestClient) NewSpotMarginUserDataStreamDelete() *SpotMarginUserDataStreamDeleteApi
binance SPOT ws账户推送 SpotMarginUserDataStreamDelete rest现货杠杆关闭listenKey (USER_STREAM)
func (*SpotRestClient) NewSpotMarginUserDataStreamPost ¶
func (client *SpotRestClient) NewSpotMarginUserDataStreamPost() *SpotMarginUserDataStreamPostApi
binance SPOT ws账户推送 SpotMarginUserDataStreamPost rest现货杠杆创建一个listenKey (USER_STREAM)
func (*SpotRestClient) NewSpotMarginUserDataStreamPut ¶
func (client *SpotRestClient) NewSpotMarginUserDataStreamPut() *SpotMarginUserDataStreamPutApi
binance SPOT ws账户推送 SpotMarginUserDataStreamPut rest现货杠杆延长listenKey有效期 (USER_STREAM)
func (*SpotRestClient) NewSpotMyTrades ¶
func (client *SpotRestClient) NewSpotMyTrades() *SpotMyTradesApi
binance SPOT spotMyTrades rest账户成交历史 (USER_DATA)
func (*SpotRestClient) NewSpotOrderCancelReplace ¶
func (client *SpotRestClient) NewSpotOrderCancelReplace() *SpotOrderCancelReplaceApi
binance SPOT orderCancelReplace rest撤消挂单再下单 (TRADE)
func (*SpotRestClient) NewSpotOrderDelete ¶
func (client *SpotRestClient) NewSpotOrderDelete() *SpotOrderDeleteApi
binance SPOT orderDelete rest撤销订单 (TRADE)
func (*SpotRestClient) NewSpotOrderGet ¶
func (client *SpotRestClient) NewSpotOrderGet() *SpotOrderGetApi
binance SPOT orderGet rest订单查询 (USER_DATA)
func (*SpotRestClient) NewSpotOrderPost ¶
func (client *SpotRestClient) NewSpotOrderPost() *SpotOrderPostApi
binance SPOT下单接口 SpotOrderPost rest 下单 (TRADE)
func (*SpotRestClient) NewSpotSubAccountApiIpRestriction ¶
func (client *SpotRestClient) NewSpotSubAccountApiIpRestriction() *SpotSubAccountApiIpRestrictionApi
binance 查询子账户API Key IP白名单 (适用母账户) SpotSubAccountApiIpRestriction rest查询子账户API Key IP白名单 (适用母账户)
func (*SpotRestClient) NewSpotTicker ¶
func (client *SpotRestClient) NewSpotTicker() *SpotTickerApi
binance SPOT spotTicker rest滚动窗口价格变动统计
func (*SpotRestClient) NewSpotTicker24hr ¶
func (client *SpotRestClient) NewSpotTicker24hr() *SpotTicker24hrApi
binance SPOT spotTicker24hr rest24hr价格变动情况 (NONE)
func (*SpotRestClient) NewSpotTickerBookTicker ¶
func (client *SpotRestClient) NewSpotTickerBookTicker() *SpotTickerBookTickerApi
binance SPOT spotTickerBookTicker rest当前最优挂单 (NONE)
func (*SpotRestClient) NewSpotTickerPrice ¶
func (client *SpotRestClient) NewSpotTickerPrice() *SpotTickerPriceApi
行情接口 binance SPOT spotTickerPrice rest价格 (NONE)
func (*SpotRestClient) NewSpotTrades ¶
func (client *SpotRestClient) NewSpotTrades() *SpotTradesApi
binance SPOT SpotTrades rest最近成交 (NONE)
func (*SpotRestClient) NewSpotUiKlines ¶
func (client *SpotRestClient) NewSpotUiKlines() *SpotUiKlinesApi
binance SPOT spotUiKlines restUI K线数据 (NONE)
func (*SpotRestClient) NewSpotUserDataStreamDelete ¶
func (client *SpotRestClient) NewSpotUserDataStreamDelete() *SpotUserDataStreamDeleteApi
binance SPOT ws账户推送 SpotUserDataStreamDelete rest现货关闭listenKey (USER_STREAM)
func (*SpotRestClient) NewSpotUserDataStreamPost ¶
func (client *SpotRestClient) NewSpotUserDataStreamPost() *SpotUserDataStreamPostApi
binance SPOT ws账户推送 SpotUserDataStreamPost rest现货创建一个listenKey (USER_STREAM)
func (*SpotRestClient) NewSpotUserDataStreamPut ¶
func (client *SpotRestClient) NewSpotUserDataStreamPut() *SpotUserDataStreamPutApi
binance SPOT ws账户推送 SpotUserDataStreamPut rest现货延长listenKey有效期 (USER_STREAM)
func (*SpotRestClient) NewSubAccountAssets ¶
func (client *SpotRestClient) NewSubAccountAssets() *SpotSubAccountAssetsApi
binance SPOT子母账户接口 SubAccountAssets rest查询子账户资产 (适用主账户)
func (*SpotRestClient) NewSubAccountFuturesAccount ¶
func (client *SpotRestClient) NewSubAccountFuturesAccount() *SpotSubAccountFuturesAccountApi
binance SPOT子母账户接口 SubAccountAssets rest查询子账户Futures账户详情V2 (适用主账户)
func (*SpotRestClient) NewSubAccountFuturesEnable ¶
func (client *SpotRestClient) NewSubAccountFuturesEnable() *SpotSubAccountFuturesEnableApi
binance SPOT子母账户接口 SubAccountFuturesEnable rest为子账户开通Futures (适用主账户)
func (*SpotRestClient) NewSubAccountList ¶
func (client *SpotRestClient) NewSubAccountList() *SpotSubAccountListApi
子母账户接口 binance SPOT子母账户接口 SubAccountList rest查询子账户列表
func (*SpotRestClient) NewSubAccountTransferSubUserHistory ¶
func (client *SpotRestClient) NewSubAccountTransferSubUserHistory() *SpotSubAccountTransferSubUserHistoryApi
binance SPOT子母账户接口 SubAccountTransferSubUserHistory rest查询子账户划转历史 (仅适用子账户)
func (*SpotRestClient) NewSubAccountUniversalTransfer ¶
func (client *SpotRestClient) NewSubAccountUniversalTransfer() *SpotSubAccountUniversalTransferApi
binance SPOT子母账户接口 SubAccountUniversalTransfer rest子母账户万能划转
func (*SpotRestClient) NewSubAccountUniversalTransferHistory ¶
func (client *SpotRestClient) NewSubAccountUniversalTransferHistory() *SpotSubAccountUniversalTransferHistoryApi
binance SPOT子母账户接口 SubAccountUniversalTransferHistory rest查询子母账户万能划转历史查询
func (*SpotRestClient) NewSubAccountVirtualSubAccount ¶
func (client *SpotRestClient) NewSubAccountVirtualSubAccount() *SpotSubAccountVirtualSubAccountApi
binance SPOT子母账户接口 SubAccountVirtualSubAccount rest创建虚拟子账户
type SpotServerTimeApi ¶
type SpotServerTimeApi struct {
// contains filtered or unexported fields
}
func (*SpotServerTimeApi) Do ¶
func (api *SpotServerTimeApi) Do() (*SpotServerTimeRes, error)
type SpotServerTimeReq ¶
type SpotServerTimeReq struct { }
type SpotServerTimeRes ¶
type SpotServerTimeRes struct {
ServerTime int64 `json:"serverTime"`
}
type SpotSubAccountApiIpRestrictionApi ¶
type SpotSubAccountApiIpRestrictionApi struct {
// contains filtered or unexported fields
}
func (*SpotSubAccountApiIpRestrictionApi) Do ¶
func (api *SpotSubAccountApiIpRestrictionApi) Do() (*SpotSubAccountApiIpRestrictionRes, error)
func (*SpotSubAccountApiIpRestrictionApi) Email ¶
func (api *SpotSubAccountApiIpRestrictionApi) Email(Email string) *SpotSubAccountApiIpRestrictionApi
func (*SpotSubAccountApiIpRestrictionApi) RecvWindow ¶
func (api *SpotSubAccountApiIpRestrictionApi) RecvWindow(RecvWindow int64) *SpotSubAccountApiIpRestrictionApi
func (*SpotSubAccountApiIpRestrictionApi) SubAccountApiKey ¶
func (api *SpotSubAccountApiIpRestrictionApi) SubAccountApiKey(SubAccountApiKey string) *SpotSubAccountApiIpRestrictionApi
func (*SpotSubAccountApiIpRestrictionApi) Timestamp ¶
func (api *SpotSubAccountApiIpRestrictionApi) Timestamp(Timestamp int64) *SpotSubAccountApiIpRestrictionApi
type SpotSubAccountAssetsApi ¶
type SpotSubAccountAssetsApi struct {
// contains filtered or unexported fields
}
func (*SpotSubAccountAssetsApi) Do ¶
func (api *SpotSubAccountAssetsApi) Do() (*SubAccountAssetsRes, error)
func (*SpotSubAccountAssetsApi) Email ¶
func (api *SpotSubAccountAssetsApi) Email(Email string) *SpotSubAccountAssetsApi
func (*SpotSubAccountAssetsApi) RecvWindow ¶
func (api *SpotSubAccountAssetsApi) RecvWindow(RecvWindow int64) *SpotSubAccountAssetsApi
func (*SpotSubAccountAssetsApi) Timestamp ¶
func (api *SpotSubAccountAssetsApi) Timestamp(Timestamp int64) *SpotSubAccountAssetsApi
type SpotSubAccountAssetsReq ¶
type SpotSubAccountFuturesAccountApi ¶
type SpotSubAccountFuturesAccountApi struct {
// contains filtered or unexported fields
}
func (*SpotSubAccountFuturesAccountApi) Do ¶
func (api *SpotSubAccountFuturesAccountApi) Do() (*SubAccountFuturesAccountRes, error)
func (*SpotSubAccountFuturesAccountApi) Email ¶
func (api *SpotSubAccountFuturesAccountApi) Email(Email string) *SpotSubAccountFuturesAccountApi
func (*SpotSubAccountFuturesAccountApi) FuturesType ¶
func (api *SpotSubAccountFuturesAccountApi) FuturesType(FuturesType int) *SpotSubAccountFuturesAccountApi
func (*SpotSubAccountFuturesAccountApi) RecvWindow ¶
func (api *SpotSubAccountFuturesAccountApi) RecvWindow(RecvWindow int64) *SpotSubAccountFuturesAccountApi
func (*SpotSubAccountFuturesAccountApi) Timestamp ¶
func (api *SpotSubAccountFuturesAccountApi) Timestamp(Timestamp int64) *SpotSubAccountFuturesAccountApi
type SpotSubAccountFuturesEnableApi ¶
type SpotSubAccountFuturesEnableApi struct {
// contains filtered or unexported fields
}
func (*SpotSubAccountFuturesEnableApi) Do ¶
func (api *SpotSubAccountFuturesEnableApi) Do() (*SubAccountFuturesEnableRes, error)
func (*SpotSubAccountFuturesEnableApi) Email ¶
func (api *SpotSubAccountFuturesEnableApi) Email(Email string) *SpotSubAccountFuturesEnableApi
func (*SpotSubAccountFuturesEnableApi) RecvWindow ¶
func (api *SpotSubAccountFuturesEnableApi) RecvWindow(RecvWindow int64) *SpotSubAccountFuturesEnableApi
func (*SpotSubAccountFuturesEnableApi) Timestamp ¶
func (api *SpotSubAccountFuturesEnableApi) Timestamp(Timestamp int64) *SpotSubAccountFuturesEnableApi
type SpotSubAccountListApi ¶
type SpotSubAccountListApi struct {
// contains filtered or unexported fields
}
func (*SpotSubAccountListApi) Do ¶
func (api *SpotSubAccountListApi) Do() (*SubAccountListRes, error)
func (*SpotSubAccountListApi) Email ¶
func (api *SpotSubAccountListApi) Email(Email string) *SpotSubAccountListApi
func (*SpotSubAccountListApi) Isfreeze ¶
func (api *SpotSubAccountListApi) Isfreeze(Isfreeze bool) *SpotSubAccountListApi
func (*SpotSubAccountListApi) Limit ¶
func (api *SpotSubAccountListApi) Limit(Limit int) *SpotSubAccountListApi
func (*SpotSubAccountListApi) Page ¶
func (api *SpotSubAccountListApi) Page(Page int) *SpotSubAccountListApi
func (*SpotSubAccountListApi) RecvWindow ¶
func (api *SpotSubAccountListApi) RecvWindow(RecvWindow int64) *SpotSubAccountListApi
func (*SpotSubAccountListApi) Timestamp ¶
func (api *SpotSubAccountListApi) Timestamp(Timestamp int64) *SpotSubAccountListApi
type SpotSubAccountListReq ¶
type SpotSubAccountTransferSubUserHistoryApi ¶
type SpotSubAccountTransferSubUserHistoryApi struct {
// contains filtered or unexported fields
}
func (*SpotSubAccountTransferSubUserHistoryApi) Asset ¶
func (api *SpotSubAccountTransferSubUserHistoryApi) Asset(Asset string) *SpotSubAccountTransferSubUserHistoryApi
func (*SpotSubAccountTransferSubUserHistoryApi) Do ¶
func (api *SpotSubAccountTransferSubUserHistoryApi) Do() (*SpotSubAccountTransferSubUserHistoryRes, error)
func (*SpotSubAccountTransferSubUserHistoryApi) EndTime ¶
func (api *SpotSubAccountTransferSubUserHistoryApi) EndTime(EndTime int64) *SpotSubAccountTransferSubUserHistoryApi
func (*SpotSubAccountTransferSubUserHistoryApi) Limit ¶
func (api *SpotSubAccountTransferSubUserHistoryApi) Limit(Limit int64) *SpotSubAccountTransferSubUserHistoryApi
func (*SpotSubAccountTransferSubUserHistoryApi) RecvWindow ¶
func (api *SpotSubAccountTransferSubUserHistoryApi) RecvWindow(RecvWindow int64) *SpotSubAccountTransferSubUserHistoryApi
func (*SpotSubAccountTransferSubUserHistoryApi) ReturnFailHistory ¶
func (api *SpotSubAccountTransferSubUserHistoryApi) ReturnFailHistory(ReturnFailHistory bool) *SpotSubAccountTransferSubUserHistoryApi
func (*SpotSubAccountTransferSubUserHistoryApi) StartTime ¶
func (api *SpotSubAccountTransferSubUserHistoryApi) StartTime(StartTime int64) *SpotSubAccountTransferSubUserHistoryApi
func (*SpotSubAccountTransferSubUserHistoryApi) Timestamp ¶
func (api *SpotSubAccountTransferSubUserHistoryApi) Timestamp(Timestamp int64) *SpotSubAccountTransferSubUserHistoryApi
func (*SpotSubAccountTransferSubUserHistoryApi) Type ¶
func (api *SpotSubAccountTransferSubUserHistoryApi) Type(Type int64) *SpotSubAccountTransferSubUserHistoryApi
type SpotSubAccountTransferSubUserHistoryReq ¶
type SpotSubAccountTransferSubUserHistoryReq struct { Asset *string `json:"asset"` //NO 如不提供,返回所有asset 划转记录 Type *int64 `json:"type"` //NO 1: transfer in, 2: transfer out; 如不提供,返回transfer out方向划转记录 StartTime *int64 `json:"startTime"` //NO EndTime *int64 `json:"endTime"` //NO Limit *int64 `json:"limit"` //NO 默认值: 500 ReturnFailHistory *bool `json:"returnFailHistory"` //NO 默认False,返回PROCESS和SUCCESS状态的数据;如果传True返回PROCESS、SUCCESS、FAILURE状态的数据 RecvWindow *int64 `json:"recvWindow"` //NO Timestamp *int64 `json:"timestamp"` //YES }
type SpotSubAccountTransferSubUserHistoryRes ¶
type SpotSubAccountTransferSubUserHistoryRes []SpotSubAccountTransferSubUserHistoryResRow
type SpotSubAccountTransferSubUserHistoryResRow ¶
type SpotSubAccountTransferSubUserHistoryResRow struct { CounterParty string `json:"counterParty"` Email string `json:"email"` Type int64 `json:"type"` // 1 for transfer in , 2 for transfer out Asset string `json:"asset"` Qty string `json:"qty"` FromAccountType string `json:"fromAccountType"` ToAccountType string `json:"toAccountType"` Status string `json:"status"` // status: PROCESS / SUCCESS / FAILURE TranId int64 `json:"tranId"` Time int64 `json:"time"` }
type SpotSubAccountUniversalTransferApi ¶
type SpotSubAccountUniversalTransferApi struct {
// contains filtered or unexported fields
}
func (*SpotSubAccountUniversalTransferApi) Amount ¶
func (api *SpotSubAccountUniversalTransferApi) Amount(Amount decimal.Decimal) *SpotSubAccountUniversalTransferApi
func (*SpotSubAccountUniversalTransferApi) Asset ¶
func (api *SpotSubAccountUniversalTransferApi) Asset(Asset string) *SpotSubAccountUniversalTransferApi
func (*SpotSubAccountUniversalTransferApi) ClientTranId ¶
func (api *SpotSubAccountUniversalTransferApi) ClientTranId(ClientTranId string) *SpotSubAccountUniversalTransferApi
func (*SpotSubAccountUniversalTransferApi) Do ¶
func (api *SpotSubAccountUniversalTransferApi) Do() (*SubAccountUniversalTransferRes, error)
func (*SpotSubAccountUniversalTransferApi) FromAccountType ¶
func (api *SpotSubAccountUniversalTransferApi) FromAccountType(FromAccountType string) *SpotSubAccountUniversalTransferApi
func (*SpotSubAccountUniversalTransferApi) FromEmail ¶
func (api *SpotSubAccountUniversalTransferApi) FromEmail(FromEmail string) *SpotSubAccountUniversalTransferApi
func (*SpotSubAccountUniversalTransferApi) RecvWindow ¶
func (api *SpotSubAccountUniversalTransferApi) RecvWindow(RecvWindow int64) *SpotSubAccountUniversalTransferApi
func (*SpotSubAccountUniversalTransferApi) Symbol ¶
func (api *SpotSubAccountUniversalTransferApi) Symbol(Symbol string) *SpotSubAccountUniversalTransferApi
func (*SpotSubAccountUniversalTransferApi) Timestamp ¶
func (api *SpotSubAccountUniversalTransferApi) Timestamp(Timestamp int64) *SpotSubAccountUniversalTransferApi
func (*SpotSubAccountUniversalTransferApi) ToAccountType ¶
func (api *SpotSubAccountUniversalTransferApi) ToAccountType(ToAccountType string) *SpotSubAccountUniversalTransferApi
func (*SpotSubAccountUniversalTransferApi) ToEmail ¶
func (api *SpotSubAccountUniversalTransferApi) ToEmail(ToEmail string) *SpotSubAccountUniversalTransferApi
type SpotSubAccountUniversalTransferHistoryApi ¶
type SpotSubAccountUniversalTransferHistoryApi struct {
// contains filtered or unexported fields
}
func (*SpotSubAccountUniversalTransferHistoryApi) ClientTranId ¶
func (api *SpotSubAccountUniversalTransferHistoryApi) ClientTranId(ClientTranId string) *SpotSubAccountUniversalTransferHistoryApi
func (*SpotSubAccountUniversalTransferHistoryApi) Do ¶
func (api *SpotSubAccountUniversalTransferHistoryApi) Do() (*SubAccountUniversalTransferHistoryRes, error)
func (*SpotSubAccountUniversalTransferHistoryApi) EndTime ¶
func (api *SpotSubAccountUniversalTransferHistoryApi) EndTime(EndTime int64) *SpotSubAccountUniversalTransferHistoryApi
func (*SpotSubAccountUniversalTransferHistoryApi) FromEmail ¶
func (api *SpotSubAccountUniversalTransferHistoryApi) FromEmail(FromEmail string) *SpotSubAccountUniversalTransferHistoryApi
func (*SpotSubAccountUniversalTransferHistoryApi) Limit ¶
func (api *SpotSubAccountUniversalTransferHistoryApi) Limit(Limit int) *SpotSubAccountUniversalTransferHistoryApi
func (*SpotSubAccountUniversalTransferHistoryApi) Page ¶
func (api *SpotSubAccountUniversalTransferHistoryApi) Page(Page int) *SpotSubAccountUniversalTransferHistoryApi
func (*SpotSubAccountUniversalTransferHistoryApi) RecvWindow ¶
func (api *SpotSubAccountUniversalTransferHistoryApi) RecvWindow(RecvWindow int64) *SpotSubAccountUniversalTransferHistoryApi
func (*SpotSubAccountUniversalTransferHistoryApi) StartTime ¶
func (api *SpotSubAccountUniversalTransferHistoryApi) StartTime(StartTime int64) *SpotSubAccountUniversalTransferHistoryApi
func (*SpotSubAccountUniversalTransferHistoryApi) Timestamp ¶
func (api *SpotSubAccountUniversalTransferHistoryApi) Timestamp(Timestamp int64) *SpotSubAccountUniversalTransferHistoryApi
func (*SpotSubAccountUniversalTransferHistoryApi) ToEmail ¶
func (api *SpotSubAccountUniversalTransferHistoryApi) ToEmail(ToEmail string) *SpotSubAccountUniversalTransferHistoryApi
type SpotSubAccountUniversalTransferHistoryReq ¶
type SpotSubAccountUniversalTransferHistoryReq struct { FromEmail *string `json:"fromEmail"` //NO ToEmail *string `json:"toEmail"` //NO ClientTranId *string `json:"clientTranId"` //NO StartTime *int64 `json:"startTime"` //NO EndTime *int64 `json:"endTime"` //NO Page *int `json:"page"` //NO 默认 1 Limit *int `json:"limit"` //NO 默认 500, 最大 500 RecvWindow *int64 `json:"recvWindow"` Timestamp *int64 `json:"timestamp"` }
type SpotSubAccountUniversalTransferReq ¶
type SpotSubAccountUniversalTransferReq struct { FromEmail *string `json:"fromEmail"` //NO ToEmail *string `json:"toEmail"` //NO FromAccountType *string `json:"fromAccountType"` //YES "SPOT","USDT_FUTURE","COIN_FUTURE","MARGIN"(Cross),"ISOLATED_MARGIN" ToAccountType *string `json:"toAccountType"` //YES "SPOT","USDT_FUTURE","COIN_FUTURE","MARGIN"(Cross),"ISOLATED_MARGIN" ClientTranId *string `json:"clientTranId"` //NO 不可重复 Symbol *string `json:"symbol"` //NO 仅在ISOLATED_MARGIN类型下使用 Asset *string `json:"asset"` //YES Amount *decimal.Decimal `json:"amount"` //YES RecvWindow *int64 `json:"recvWindow"` Timestamp *int64 `json:"timestamp"` }
type SpotSubAccountVirtualSubAccountApi ¶
type SpotSubAccountVirtualSubAccountApi struct {
// contains filtered or unexported fields
}
func (*SpotSubAccountVirtualSubAccountApi) Do ¶
func (api *SpotSubAccountVirtualSubAccountApi) Do() (*SubAccountVirtualSubAccountRes, error)
func (*SpotSubAccountVirtualSubAccountApi) RecvWindow ¶
func (api *SpotSubAccountVirtualSubAccountApi) RecvWindow(RecvWindow int64) *SpotSubAccountVirtualSubAccountApi
func (*SpotSubAccountVirtualSubAccountApi) SubAccountString ¶
func (api *SpotSubAccountVirtualSubAccountApi) SubAccountString(SubAccountString string) *SpotSubAccountVirtualSubAccountApi
func (*SpotSubAccountVirtualSubAccountApi) Timestamp ¶
func (api *SpotSubAccountVirtualSubAccountApi) Timestamp(Timestamp int64) *SpotSubAccountVirtualSubAccountApi
type SpotTicker24hrApi ¶
type SpotTicker24hrApi struct {
// contains filtered or unexported fields
}
func (*SpotTicker24hrApi) Do ¶
func (api *SpotTicker24hrApi) Do() (*SpotTicker24hrRes, error)
func (*SpotTicker24hrApi) Symbol ¶
func (api *SpotTicker24hrApi) Symbol(Symbol string) *SpotTicker24hrApi
func (*SpotTicker24hrApi) Symbols ¶
func (api *SpotTicker24hrApi) Symbols(Symbols []string) *SpotTicker24hrApi
func (*SpotTicker24hrApi) Type ¶
func (api *SpotTicker24hrApi) Type(Type string) *SpotTicker24hrApi
type SpotTicker24hrReq ¶
type SpotTicker24hrRes ¶
type SpotTicker24hrRes []SpotTicker24hrResRow
type SpotTicker24hrResRow ¶
type SpotTicker24hrResRow struct { Symbol string `json:"symbol"` // 交易对 PriceChange string `json:"priceChange"` // 价格变动 PriceChangePercent string `json:"priceChangePercent"` // 价格变动百分比 WeightedAvgPrice string `json:"weightedAvgPrice"` // 平均价格 PrevClosePrice string `json:"prevClosePrice"` // 前一日收盘价 LastPrice string `json:"lastPrice"` // 最新成交价 LastQty string `json:"lastQty"` // 最新成交量 BidPrice string `json:"bidPrice"` // 当前最高买价 BidQty string `json:"bidQty"` // 当前最高买价对应的量 AskPrice string `json:"askPrice"` // 当前最低卖价 AskQty string `json:"askQty"` // 当前最低卖价对应的量 OpenPrice string `json:"openPrice"` // 24小时内第一次交易的价格 HighPrice string `json:"highPrice"` // 24小时内最高成交价 LowPrice string `json:"lowPrice"` // 24小时内最低成交加 Volume string `json:"volume"` // 24小时内成交量 QuoteVolume string `json:"quoteVolume"` // 24小时内成交额 OpenTime int64 `json:"openTime"` // 统计开始时间 CloseTime int64 `json:"closeTime"` // 统计结束时间 FirstId int64 `json:"firstId"` // 首笔成交id LastId int64 `json:"lastId"` // 末笔成交id Count int64 `json:"count"` // 成交笔数 }
type SpotTickerApi ¶
type SpotTickerApi struct {
// contains filtered or unexported fields
}
func (*SpotTickerApi) Do ¶
func (api *SpotTickerApi) Do() (*SpotTickerRes, error)
func (*SpotTickerApi) Symbol ¶
func (api *SpotTickerApi) Symbol(Symbol string) *SpotTickerApi
func (*SpotTickerApi) Symbols ¶
func (api *SpotTickerApi) Symbols(Symbols []string) *SpotTickerApi
func (*SpotTickerApi) Type ¶
func (api *SpotTickerApi) Type(Type string) *SpotTickerApi
func (*SpotTickerApi) WindowSize ¶
func (api *SpotTickerApi) WindowSize(WindowSize string) *SpotTickerApi
type SpotTickerBookTickerApi ¶
type SpotTickerBookTickerApi struct {
// contains filtered or unexported fields
}
func (*SpotTickerBookTickerApi) Do ¶
func (api *SpotTickerBookTickerApi) Do() (*SpotTickerBookTickerRes, error)
func (*SpotTickerBookTickerApi) Symbol ¶
func (api *SpotTickerBookTickerApi) Symbol(Symbol string) *SpotTickerBookTickerApi
func (*SpotTickerBookTickerApi) Symbols ¶
func (api *SpotTickerBookTickerApi) Symbols(Symbols []string) *SpotTickerBookTickerApi
type SpotTickerBookTickerReq ¶
type SpotTickerBookTickerRes ¶
type SpotTickerBookTickerRes []SpotTickerBookTickerResRow
type SpotTickerPriceApi ¶
type SpotTickerPriceApi struct {
// contains filtered or unexported fields
}
func (*SpotTickerPriceApi) Do ¶
func (api *SpotTickerPriceApi) Do() (*SpotTickerPriceRes, error)
func (*SpotTickerPriceApi) Symbol ¶
func (api *SpotTickerPriceApi) Symbol(Symbol string) *SpotTickerPriceApi
type SpotTickerPriceReq ¶
type SpotTickerPriceReq struct {
Symbol *string `json:"symbol"` //YES
}
type SpotTickerPriceRes ¶
type SpotTickerPriceRes []SpotTickerPriceResRow
type SpotTickerPriceResRow ¶
type SpotTickerReq ¶
type SpotTickerRes ¶
type SpotTickerRes []SpotTickerResRow
type SpotTickerResRow ¶
type SpotTickerResRow struct { Symbol string `json:"symbol"` // 交易对 PriceChange string `json:"priceChange"` // 价格变动 PriceChangePercent string `json:"priceChangePercent"` // 价格变动百分比 WeightedAvgPrice string `json:"weightedAvgPrice"` // 平均价格 OpenPrice string `json:"openPrice"` // 24小时内第一次交易的价格 HighPrice string `json:"highPrice"` // 24小时内最高成交价 LowPrice string `json:"lowPrice"` // 24小时内最低成交加 LastPrice string `json:"lastPrice"` // 最新成交价 Volume string `json:"volume"` // 24小时内成交量 QuoteVolume string `json:"quoteVolume"` // 24小时内成交额 OpenTime int64 `json:"openTime"` // 统计开始时间 CloseTime int64 `json:"closeTime"` // 统计结束时间 FirstId int64 `json:"firstId"` // 首笔成交id LastId int64 `json:"lastId"` // 末笔成交id Count int64 `json:"count"` // 成交笔数 }
type SpotTradesApi ¶
type SpotTradesApi struct {
// contains filtered or unexported fields
}
func (*SpotTradesApi) Do ¶
func (api *SpotTradesApi) Do() (*SpotTradesRes, error)
func (*SpotTradesApi) Limit ¶
func (api *SpotTradesApi) Limit(Limit int) *SpotTradesApi
func (*SpotTradesApi) Symbol ¶
func (api *SpotTradesApi) Symbol(Symbol string) *SpotTradesApi
type SpotTradesReq ¶
type SpotTradesRes ¶
type SpotTradesRes []SpotTradesResRow
type SpotTradesResRow ¶
type SpotUiKlinesApi ¶
type SpotUiKlinesApi SpotKlinesApi
func (*SpotUiKlinesApi) Do ¶
func (api *SpotUiKlinesApi) Do() (*KlinesRes, error)
func (*SpotUiKlinesApi) EndTime ¶
func (api *SpotUiKlinesApi) EndTime(EndTime int64) *SpotUiKlinesApi
func (*SpotUiKlinesApi) Interval ¶
func (api *SpotUiKlinesApi) Interval(Interval string) *SpotUiKlinesApi
func (*SpotUiKlinesApi) Limit ¶
func (api *SpotUiKlinesApi) Limit(Limit int) *SpotUiKlinesApi
func (*SpotUiKlinesApi) StartTime ¶
func (api *SpotUiKlinesApi) StartTime(StartTime int64) *SpotUiKlinesApi
func (*SpotUiKlinesApi) Symbol ¶
func (api *SpotUiKlinesApi) Symbol(Symbol string) *SpotUiKlinesApi
type SpotUserDataStreamDeleteApi ¶
type SpotUserDataStreamDeleteApi struct {
// contains filtered or unexported fields
}
func (*SpotUserDataStreamDeleteApi) Do ¶
func (api *SpotUserDataStreamDeleteApi) Do() (*SpotUserDataStreamDeleteRes, error)
func (*SpotUserDataStreamDeleteApi) ListenKey ¶
func (api *SpotUserDataStreamDeleteApi) ListenKey(ListenKey string) *SpotUserDataStreamDeleteApi
type SpotUserDataStreamDeleteReq ¶
type SpotUserDataStreamDeleteReq struct {
ListenKey *string `json:"listenKey"` //YES
}
type SpotUserDataStreamDeleteRes ¶
type SpotUserDataStreamDeleteRes struct{}
type SpotUserDataStreamPostApi ¶
type SpotUserDataStreamPostApi struct {
// contains filtered or unexported fields
}
func (*SpotUserDataStreamPostApi) Do ¶
func (api *SpotUserDataStreamPostApi) Do() (*SpotUserDataStreamPostRes, error)
type SpotUserDataStreamPostReq ¶
type SpotUserDataStreamPostReq struct{}
type SpotUserDataStreamPostRes ¶
type SpotUserDataStreamPostRes struct {
ListenKey string `json:"listenKey"`
}
type SpotUserDataStreamPutApi ¶
type SpotUserDataStreamPutApi struct {
// contains filtered or unexported fields
}
func (*SpotUserDataStreamPutApi) Do ¶
func (api *SpotUserDataStreamPutApi) Do() (*SpotUserDataStreamPutRes, error)
func (*SpotUserDataStreamPutApi) ListenKey ¶
func (api *SpotUserDataStreamPutApi) ListenKey(ListenKey string) *SpotUserDataStreamPutApi
type SpotUserDataStreamPutReq ¶
type SpotUserDataStreamPutReq struct {
ListenKey *string `json:"listenKey"` //YES
}
type SpotUserDataStreamPutRes ¶
type SpotUserDataStreamPutRes struct{}
type SpotWsStreamClient ¶
type SpotWsStreamClient struct { WsStreamClient // contains filtered or unexported fields }
func (*SpotWsStreamClient) CancelOrder ¶
func (ws *SpotWsStreamClient) CancelOrder(api *SpotOrderDeleteApi) (*WsApiResult[SpotOrderDeleteRes], error)
func (*SpotWsStreamClient) CancelReplaceOrder ¶
func (ws *SpotWsStreamClient) CancelReplaceOrder(api *SpotOrderCancelReplaceApi) (*WsApiResult[SpotOrderCancelReplaceRes], error)
func (*SpotWsStreamClient) Close ¶
func (ws *SpotWsStreamClient) Close() error
func (*SpotWsStreamClient) ConvertToAccountWs ¶
func (ws *SpotWsStreamClient) ConvertToAccountWs(apiKey string, apiSecret string, spotWsType SpotWsType, isolatedSymbol ...string) (*SpotWsStreamClient, error)
func (*SpotWsStreamClient) ConvertToWsApi ¶
func (ws *SpotWsStreamClient) ConvertToWsApi(apiKey string, apiSecret string) (*SpotWsStreamClient, error)
转换为Ws API 可以进行ws下单等操作
func (*SpotWsStreamClient) CreateOrder ¶
func (ws *SpotWsStreamClient) CreateOrder(api *SpotOrderPostApi) (*WsApiResult[SpotOrderPostRes], error)
func (*SpotWsStreamClient) CreatePayload ¶
func (ws *SpotWsStreamClient) CreatePayload() (*WsSpotPayload, error)
func (*SpotWsStreamClient) QueryOrder ¶
func (ws *SpotWsStreamClient) QueryOrder(api *SpotOrderGetApi) (*WsApiResult[SpotOrderGetRes], error)
type SpotWsType ¶
type SpotWsType int
const ( SPOT_WS_TYPE SpotWsType = iota SPOT_MARGIN_WS_TYPE SPOT_ISOLATED_MARGIN_WS_TYPE )
type SubAccountAssetsRes ¶
type SubAccountAssetsRes struct {
Balance []SpotBalance `json:"balances"`
}
type SubAccountFuturesAccountAccountResp ¶
type SubAccountFuturesAccountAccountResp struct { Email string `json:"email"` Assets []SubAccountFuturesAccountAssets `json:"assets"` CanDeposit bool `json:"canDeposit"` CanTrade bool `json:"canTrade"` CanWithdraw bool `json:"canWithdraw"` FeeTier int `json:"feeTier"` UpdateTime int64 `json:"updateTime"` MaxWithdrawAmount string `json:"maxWithdrawAmount"` TotalInitialMargin string `json:"totalInitialMargin"` TotalMaintenanceMargin string `json:"totalMaintenanceMargin"` TotalMarginBalance string `json:"totalMarginBalance"` TotalOpenOrderInitialMargin string `json:"totalOpenOrderInitialMargin"` TotalPositionInitialMargin string `json:"totalPositionInitialMargin"` TotalUnrealizedProfit string `json:"totalUnrealizedProfit"` TotalWalletBalance string `json:"totalWalletBalance"` }
type SubAccountFuturesAccountAssets ¶
type SubAccountFuturesAccountAssets struct { Asset string `json:"asset"` InitialMargin string `json:"initialMargin"` MaintenanceMargin string `json:"maintenanceMargin"` MarginBalance string `json:"marginBalance"` MaxWithdrawAmount string `json:"maxWithdrawAmount"` OpenOrderInitialMargin string `json:"openOrderInitialMargin"` PositionInitialMargin string `json:"positionInitialMargin"` UnrealizedProfit string `json:"unrealizedProfit"` WalletBalance string `json:"walletBalance"` }
type SubAccountFuturesAccountRes ¶
type SubAccountFuturesAccountRes struct { FutureAccountResp SubAccountFuturesAccountAccountResp `json:"futureAccountResp"` DeliveryAccountResp SubAccountFuturesAccountAccountResp `json:"deliveryAccountResp"` }
type SubAccountListRes ¶
type SubAccountListRes struct {
SubAccounts []SubAccountResSubAccount `json:"subAccounts"`
}
type SubAccountResSubAccount ¶
type SubAccountUniversalTransferHistoryRes ¶
type SubAccountUniversalTransferHistoryRes struct { Result []SubAccountUniversalTransferHistoryResResult `json:"result"` TotalCount int `json:"totalCount"` }
type SubAccountUniversalTransferHistoryResResult ¶
type SubAccountUniversalTransferHistoryResResult struct { TranId int64 `json:"tranId"` FromEmail string `json:"fromEmail"` ToEmail string `json:"toEmail"` Asset string `json:"asset"` Amount string `json:"amount"` CreateTimeStamp int64 `json:"createTimeStamp"` FromAccountType string `json:"fromAccountType"` ToAccountType string `json:"toAccountType"` Status string `json:"status"` ClientTranId string `json:"clientTranId"` }
type SubAccountVirtualSubAccountRes ¶
type SubAccountVirtualSubAccountRes struct {
Email string `json:"email"`
}
type SubscribeReq ¶
type SubscribeReq struct { Method string `json:"method"` Params []string `json:"params,omitempty"` Id int64 `json:"id"` }
订阅请求结构体
type SubscribeResult ¶
type SubscribeResult struct { Result []string `json:"result"` Id int64 `json:"id"` Error string `json:"error"` }
订阅结果结构体
type Subscription ¶
type Subscription[T any] struct { ID int64 //此次订阅ID Method string //订阅方法 Params SubscribeParams //订阅参数 // contains filtered or unexported fields }
数据流订阅返回标准结构体
type SwapAccountApi ¶
type SwapAccountApi struct {
// contains filtered or unexported fields
}
func (*SwapAccountApi) Do ¶
func (api *SwapAccountApi) Do() (*SwapAccountRes, error)
func (*SwapAccountApi) RecvWindow ¶
func (api *SwapAccountApi) RecvWindow(RecvWindow int64) *SwapAccountApi
func (*SwapAccountApi) Timestamp ¶
func (api *SwapAccountApi) Timestamp(Timestamp int64) *SwapAccountApi
type SwapAccountReq ¶
type SwapAccountRes ¶
type SwapAccountRes struct { Assets []struct { Asset string `json:"asset"` // 资产名 WalletBalance string `json:"walletBalance"` // 账户余额 UnrealizedProfit string `json:"unrealizedProfit"` // 全部持仓未实现盈亏 MarginBalance string `json:"marginBalance"` // 保证金余额 MaintMargin string `json:"maintMargin"` // 维持保证金 InitialMargin string `json:"initialMargin"` // 当前所需起始保证金(按最新标标记价格) PositionInitialMargin string `json:"positionInitialMargin"` // 当前所需持仓起始保证金(按最新标标记价格) OpenOrderInitialMargin string `json:"openOrderInitialMargin"` // 当前所需挂单起始保证金(按最新标标记价格) MaxWithdrawAmount string `json:"maxWithdrawAmount"` // 最大可提款金额 CrossWalletBalance string `json:"crossWalletBalance"` // 可用于全仓的账户余额 CrossUnPnl string `json:"crossUnPnl"` // 所有全仓持仓的未实现盈亏 AvailableBalance string `json:"availableBalance"` // 可用下单余额 } `json:"assets"` // 资产内容 Positions []struct { Symbol string `json:"symbol"` // 交易对 PositionAmt string `json:"positionAmt"` // 持仓数量 InitialMargin string `json:"initialMargin"` // 当前所需起始保证金(按最新标标记价格) MaintMargin string `json:"maintMargin"` // 持仓维持保证金 UnrealizedProfit string `json:"unrealizedProfit"` // 持仓未实现盈亏 PositionInitialMargin string `json:"positionInitialMargin"` // 当前所需持仓起始保证金(按最新标标记价格) OpenOrderInitialMargin string `json:"openOrderInitialMargin"` // 当前所需挂单起始保证金(按最新标标记价格) Leverage string `json:"leverage"` // 杠杆倍率 Isolated bool `json:"isolated"` // 是否是逐仓模式 PositionSide string `json:"positionSide"` // 持仓方向 EntryPrice string `json:"entryPrice"` // 平均持仓成本 UpdateTime int64 `json:"updateTime"` // 最新更新时间 MaxQty string `json:"maxQty"` // 当前杠杆下最大可开仓数(标的数量) } `json:"positions"` // 头寸 CanDeposit bool `json:"canDeposit"` // 是否可以入金 CanTrade bool `json:"canTrade"` // 是否可以交易 CanWithdraw bool `json:"canWithdraw"` // 是否可以出金 FeeTier int64 `json:"feeTier"` // 手续费等级 UpdateTime int64 `json:"updateTime"` }
type SwapAllOrdersApi ¶
type SwapAllOrdersApi struct {
// contains filtered or unexported fields
}
func (*SwapAllOrdersApi) Do ¶
func (api *SwapAllOrdersApi) Do() (*SwapAllOrdersRes, error)
func (*SwapAllOrdersApi) EndTime ¶
func (api *SwapAllOrdersApi) EndTime(EndTime int64) *SwapAllOrdersApi
func (*SwapAllOrdersApi) Limit ¶
func (api *SwapAllOrdersApi) Limit(Limit int64) *SwapAllOrdersApi
func (*SwapAllOrdersApi) OrderId ¶
func (api *SwapAllOrdersApi) OrderId(OrderId int64) *SwapAllOrdersApi
func (*SwapAllOrdersApi) RecvWindow ¶
func (api *SwapAllOrdersApi) RecvWindow(RecvWindow int64) *SwapAllOrdersApi
func (*SwapAllOrdersApi) StartTime ¶
func (api *SwapAllOrdersApi) StartTime(StartTime int64) *SwapAllOrdersApi
func (*SwapAllOrdersApi) Symbol ¶
func (api *SwapAllOrdersApi) Symbol(Symbol string) *SwapAllOrdersApi
func (*SwapAllOrdersApi) Timestamp ¶
func (api *SwapAllOrdersApi) Timestamp(Timestamp int64) *SwapAllOrdersApi
type SwapAllOrdersReq ¶
type SwapAllOrdersReq struct { Symbol *string `json:"symbol"` //YES 交易对 OrderId *int64 `json:"orderId"` //NO 只返回此orderID及之后的订单,缺省返回最近的订单 StartTime *int64 `json:"startTime"` //NO 起始时间 EndTime *int64 `json:"endTime"` //NO 结束时间 Limit *int64 `json:"limit"` //NO 返回的结果集数量 默认值:500 最大值:1000 RecvWindow *int64 `json:"recvWindow"` Timestamp *int64 `json:"timestamp"` }
type SwapAllOrdersRes ¶
type SwapAllOrdersRes []SwapOrderOrder
type SwapApi ¶
type SwapApi int
const ( //币合约账户接口 SwapAccount SwapApi = iota //账户信息 (USER_DATA) SwapPositionSideDualGet //查询持仓模式 (USER_DATA) SwapLeverageBracket //杠杆分层标准 (USER_DATA) SwapPositionSideDualPost //更改持仓模式 (TRADE) SwapLeverage //调整开仓杠杆 (TRADE) SwapMarginType //变换逐全仓模式 (TRADE) SwapPositionRisk //用户持仓风险 (USER_DATA) //币合约订单接口 SwapOpenOrders //查询当前挂单 (USER_DATA) SwapAllOrders //查询所有订单 (USER_DATA) SwapOrderPost //下单 (TRADE) SwapOrderPut //修改订单 (TRADE) SwapOrderGet //查询订单 (USER_DATA) SwapOrderDelete //撤销订单 (TRADE) SwapUserTrades //查询账户成交记录 (USER_DATA) SwapCommissionRate //GET接口 (HMAC SHA256)查询用户当前的手续费率 SwapBatchOrdersPost //批量下单 (TRADE) SwapBatchOrdersPut //批量修改订单 (TRADE) SwapBatchOrdersDelete //批量撤销订单 (TRADE) //通用接口 SwapPing //测试连接 SwapServerTime //获取服务器时间 SwapExchangeInfo //交易规则和交易对信息 //行情接口 SwapKlines //获取K线数据 SwapTickerPrice //获取交易对最新价格 SwapDepth //获取深度信息 //Ws账户推送相关 SwapListenKeyPost //生成listenKey (USER_STREAM) SwapListenKeyPut //延长listenKey有效期 (USER_STREAM) SwapListenKeyDel //关闭listenKey (USER_STREAM) )
type SwapBatchOrdersDeleteApi ¶
type SwapBatchOrdersDeleteApi struct {
// contains filtered or unexported fields
}
func (*SwapBatchOrdersDeleteApi) Do ¶
func (api *SwapBatchOrdersDeleteApi) Do() (*SwapBatchOrdersDeleteRes, error)
func (*SwapBatchOrdersDeleteApi) OrderIdList ¶
func (api *SwapBatchOrdersDeleteApi) OrderIdList(OrderIdList []int64) *SwapBatchOrdersDeleteApi
func (*SwapBatchOrdersDeleteApi) OrigClientOrderIdList ¶
func (api *SwapBatchOrdersDeleteApi) OrigClientOrderIdList(OrigClientOrderIdList []string) *SwapBatchOrdersDeleteApi
func (*SwapBatchOrdersDeleteApi) RecvWindow ¶
func (api *SwapBatchOrdersDeleteApi) RecvWindow(RecvWindow int64) *SwapBatchOrdersDeleteApi
func (*SwapBatchOrdersDeleteApi) Symbol ¶
func (api *SwapBatchOrdersDeleteApi) Symbol(Symbol string) *SwapBatchOrdersDeleteApi
func (*SwapBatchOrdersDeleteApi) Timestamp ¶
func (api *SwapBatchOrdersDeleteApi) Timestamp(Timestamp int64) *SwapBatchOrdersDeleteApi
type SwapBatchOrdersDeleteReq ¶
type SwapBatchOrdersDeleteReq struct { Symbol *string `json:"symbol"` //YES 交易对 OrderIdList *[]int64 `json:"orderIdList"` //NO 系统订单号, 最多支持10个订单 OrigClientOrderIdList *[]string `json:"origClientOrderIdList"` //NO 用户自定义的订单号, 最多支持10个订单 RecvWindow *int64 `json:"recvWindow"` //NO Timestamp *int64 `json:"timestamp"` //YES }
type SwapBatchOrdersDeleteRes ¶
type SwapBatchOrdersDeleteRes []SwapOrderDeleteRes
type SwapBatchOrdersPostApi ¶
type SwapBatchOrdersPostApi struct {
// contains filtered or unexported fields
}
func (*SwapBatchOrdersPostApi) AddOrders ¶
func (api *SwapBatchOrdersPostApi) AddOrders(orderApis ...*SwapOrderPostApi) *SwapBatchOrdersPostApi
func (*SwapBatchOrdersPostApi) Do ¶
func (api *SwapBatchOrdersPostApi) Do() (*SwapBatchOrdersPostRes, error)
func (*SwapBatchOrdersPostApi) RecvWindow ¶
func (api *SwapBatchOrdersPostApi) RecvWindow(RecvWindow int64) *SwapBatchOrdersPostApi
func (*SwapBatchOrdersPostApi) SetOrders ¶
func (api *SwapBatchOrdersPostApi) SetOrders(orderApi []*SwapOrderPostApi) *SwapBatchOrdersPostApi
func (*SwapBatchOrdersPostApi) Timestamp ¶
func (api *SwapBatchOrdersPostApi) Timestamp(Timestamp int64) *SwapBatchOrdersPostApi
type SwapBatchOrdersPostReq ¶
type SwapBatchOrdersPostReq struct { BatchOrders *[]SwapOrderPostReq `json:"batchOrders"` //YES 批量下单 最多支持5个 RecvWindow *int64 `json:"recvWindow"` //NO Timestamp *int64 `json:"timestamp"` //YES }
type SwapBatchOrdersPostRes ¶
type SwapBatchOrdersPostRes []SwapOrderPostResRow
type SwapBatchOrdersPutApi ¶
type SwapBatchOrdersPutApi struct {
// contains filtered or unexported fields
}
func (*SwapBatchOrdersPutApi) AddOrders ¶
func (api *SwapBatchOrdersPutApi) AddOrders(orderApi ...*SwapOrderPutApi) *SwapBatchOrdersPutApi
func (*SwapBatchOrdersPutApi) Do ¶
func (api *SwapBatchOrdersPutApi) Do() (*SwapBatchOrdersPutRes, error)
func (*SwapBatchOrdersPutApi) RecvWindow ¶
func (api *SwapBatchOrdersPutApi) RecvWindow(RecvWindow int64) *SwapBatchOrdersPutApi
func (*SwapBatchOrdersPutApi) SetOrders ¶
func (api *SwapBatchOrdersPutApi) SetOrders(orderApi []*SwapOrderPutApi) *SwapBatchOrdersPutApi
func (*SwapBatchOrdersPutApi) Timestamp ¶
func (api *SwapBatchOrdersPutApi) Timestamp(Timestamp int64) *SwapBatchOrdersPutApi
type SwapBatchOrdersPutReq ¶
type SwapBatchOrdersPutReq struct { BatchOrders *[]SwapOrderPutReq `json:"batchOrders"` //YES 批量下单 最多支持5个 RecvWindow *int64 `json:"recvWindow"` //NO Timestamp *int64 `json:"timestamp"` //YES }
type SwapBatchOrdersPutRes ¶
type SwapBatchOrdersPutRes []SwapBatchOrdersPutResRow
type SwapBatchOrdersPutResRow ¶
type SwapBatchOrdersPutResRow struct { BinanceErrorRes SwapOrderPutRes }
type SwapCommissionRateApi ¶
type SwapCommissionRateApi struct {
// contains filtered or unexported fields
}
func (*SwapCommissionRateApi) Do ¶
func (api *SwapCommissionRateApi) Do() (*SwapCommissionRateRes, error)
func (*SwapCommissionRateApi) RecvWindow ¶
func (api *SwapCommissionRateApi) RecvWindow(RecvWindow int64) *SwapCommissionRateApi
func (*SwapCommissionRateApi) Symbol ¶
func (api *SwapCommissionRateApi) Symbol(Symbol string) *SwapCommissionRateApi
func (*SwapCommissionRateApi) Timestamp ¶
func (api *SwapCommissionRateApi) Timestamp(Timestamp int64) *SwapCommissionRateApi
type SwapCommissionRateReq ¶
type SwapCommissionRateReq struct { Symbol *string `json:"symbol"` //YES 交易对 RecvWindow *int64 `json:"recvWindow"` //NO Timestamp *int64 `json:"timestamp"` //YES\ }
symbol STRING YES recvWindow LONG NO timestamp LONG YES
type SwapCommissionRateRes ¶
type SwapCommonPostRes ¶
type SwapDepthApi ¶
type SwapDepthApi struct {
// contains filtered or unexported fields
}
func (*SwapDepthApi) Do ¶
func (api *SwapDepthApi) Do() (*SwapDepthRes, error)
func (*SwapDepthApi) Limit ¶
func (api *SwapDepthApi) Limit(Limit int) *SwapDepthApi
func (*SwapDepthApi) Symbol ¶
func (api *SwapDepthApi) Symbol(Symbol string) *SwapDepthApi
type SwapDepthReq ¶
type SwapDepthRes ¶
type SwapDepthResMiddle ¶
type SwapDepthResMiddle struct { LastUpdateId int64 `json:"lastUpdateId"` Symbol string `json:"symbol"` // 交易对 Pair string `json:"pair"` // 标的交易对 E int64 `json:"E"` // 消息时间 T int64 `json:"T"` // 撮合时间 Bids [][]interface{} `json:"bids"` Asks [][]interface{} `json:"asks"` }
func (*SwapDepthResMiddle) ConvertToRes ¶
func (middle *SwapDepthResMiddle) ConvertToRes() *SwapDepthRes
type SwapExchangeInfoApi ¶
type SwapExchangeInfoApi struct {
// contains filtered or unexported fields
}
func (*SwapExchangeInfoApi) Do ¶
func (api *SwapExchangeInfoApi) Do() (*SwapExchangeInfoRes, error)
type SwapExchangeInfoReq ¶
type SwapExchangeInfoReq struct { }
type SwapExchangeInfoRes ¶
type SwapExchangeInfoRes struct { ExchangeFilters []map[string]interface{} `json:"exchangeFilters"` RateLimits []SwapExchangeInfoResRateLimit `json:"rateLimits"` Symbols []SwapExchangeInfoResSymbol `json:"symbols"` Timezone string `json:"timezone"` // 服务器所用的时间区域 }
type SwapExchangeInfoResSymbol ¶
type SwapExchangeInfoResSymbol struct { Filters []map[string]interface{} `json:"filters"` // 交易对限制 OrderType []string `json:"orderType"` // 订单类型 TimeInForce []string `json:"timeInForce"` // 有效方式 LiquidationFee string `json:"liquidationFee"` // 强平费率 MarketTakeBound string `json:"marketTakeBound"` // 市价吃单(相对于标记价格)允许可造成的最大价格偏离比例 Symbol string `json:"symbol"` // 交易对 Pair string `json:"pair"` // 标的交易对 ContractType string `json:"contractType"` // 合约类型 DeliveryDate int64 `json:"deliveryDate"` OnboardDate int64 `json:"onboardDate"` ContractStatus string `json:"contractStatus"` // 交易对状态 ContractSize int64 `json:"contractSize"` QuoteAsset string `json:"quoteAsset"` // 报价币种 BaseAsset string `json:"baseAsset"` // 标的物 MarginAsset string `json:"marginAsset"` // 保证金币种 PricePrecision int64 `json:"pricePrecision"` // 价格小数点位数(仅作为系统精度使用,注意同tickSize 区分) QuantityPrecision int64 `json:"quantityPrecision"` // 数量小数点位数(仅作为系统精度使用,注意同stepSize 区分) BaseAssetPrecision int64 `json:"baseAssetPrecision"` QuotePrecision int64 `json:"quotePrecision"` TriggerProtect string `json:"triggerProtect"` // 开启"priceProtect"的条件订单的触发阈值 UnderlyingType string `json:"underlyingType"` // 标的类型 UnderlyingSubType []string `json:"underlyingSubType"` // 标的物子类型 }
type SwapKlinesApi ¶
type SwapKlinesApi struct {
// contains filtered or unexported fields
}
func (*SwapKlinesApi) Do ¶
func (api *SwapKlinesApi) Do() (*KlinesRes, error)
func (*SwapKlinesApi) EndTime ¶
func (api *SwapKlinesApi) EndTime(EndTime int64) *SwapKlinesApi
func (*SwapKlinesApi) Interval ¶
func (api *SwapKlinesApi) Interval(Interval string) *SwapKlinesApi
func (*SwapKlinesApi) Limit ¶
func (api *SwapKlinesApi) Limit(Limit int) *SwapKlinesApi
func (*SwapKlinesApi) StartTime ¶
func (api *SwapKlinesApi) StartTime(StartTime int64) *SwapKlinesApi
func (*SwapKlinesApi) Symbol ¶
func (api *SwapKlinesApi) Symbol(Symbol string) *SwapKlinesApi
type SwapKlinesReq ¶
type SwapLeverageApi ¶
type SwapLeverageApi struct {
// contains filtered or unexported fields
}
func (*SwapLeverageApi) Do ¶
func (api *SwapLeverageApi) Do() (*SwapLeverageRes, error)
func (*SwapLeverageApi) Leverage ¶
func (api *SwapLeverageApi) Leverage(Leverage int64) *SwapLeverageApi
func (*SwapLeverageApi) RecvWindow ¶
func (api *SwapLeverageApi) RecvWindow(RecvWindow int64) *SwapLeverageApi
func (*SwapLeverageApi) Symbol ¶
func (api *SwapLeverageApi) Symbol(Symbol string) *SwapLeverageApi
func (*SwapLeverageApi) Timestamp ¶
func (api *SwapLeverageApi) Timestamp(Timestamp int64) *SwapLeverageApi
type SwapLeverageBracketApi ¶
type SwapLeverageBracketApi struct {
// contains filtered or unexported fields
}
func (*SwapLeverageBracketApi) Do ¶
func (api *SwapLeverageBracketApi) Do() (*SwapLeverageBracketRes, error)
func (*SwapLeverageBracketApi) RecvWindow ¶
func (api *SwapLeverageBracketApi) RecvWindow(RecvWindow int64) *SwapLeverageBracketApi
func (*SwapLeverageBracketApi) Symbol ¶
func (api *SwapLeverageBracketApi) Symbol(Symbol string) *SwapLeverageBracketApi
func (*SwapLeverageBracketApi) Timestamp ¶
func (api *SwapLeverageBracketApi) Timestamp(Timestamp int64) *SwapLeverageBracketApi
type SwapLeverageBracketReq ¶
type SwapLeverageBracketRes ¶
type SwapLeverageBracketRes []SwapLeverageBracketResResult
type SwapLeverageBracketResResult ¶
type SwapLeverageBracketResResult struct { Symbol string `json:"symbol"` // 交易对 Brackets []SwapLeverageBracketResResultBrackets `json:"brackets"` // 杠杆档位 }
type SwapLeverageBracketResResultBrackets ¶
type SwapLeverageBracketResResultBrackets struct { Bracket int64 `json:"bracket"` // 层级 InitialLeverage int64 `json:"initialLeverage"` // 该层允许的最高初始杠杆倍数 QtyCap int64 `json:"qtyCap"` // 该层对应的数量上限 QtyFloor int64 `json:"qtyFloor"` // 该层对应的数量下限 MaintMarginRatio decimal.Decimal `json:"maintMarginRatio"` // 该层对应的维持保证金率 Cum decimal.Decimal `json:"cum"` // 速算数 }
type SwapLeverageReq ¶
type SwapLeverageRes ¶
type SwapListenKeyDeleteApi ¶
type SwapListenKeyDeleteApi struct {
// contains filtered or unexported fields
}
func (*SwapListenKeyDeleteApi) Do ¶
func (api *SwapListenKeyDeleteApi) Do() (*SwapListenKeyDeleteRes, error)
type SwapListenKeyDeleteReq ¶
type SwapListenKeyDeleteReq struct{}
type SwapListenKeyDeleteRes ¶
type SwapListenKeyDeleteRes struct{}
type SwapListenKeyPostApi ¶
type SwapListenKeyPostApi struct {
// contains filtered or unexported fields
}
func (*SwapListenKeyPostApi) Do ¶
func (api *SwapListenKeyPostApi) Do() (*SwapListenKeyPostRes, error)
type SwapListenKeyPostReq ¶
type SwapListenKeyPostReq struct{}
type SwapListenKeyPostRes ¶
type SwapListenKeyPostRes struct {
ListenKey string `json:"listenKey"`
}
type SwapListenKeyPutApi ¶
type SwapListenKeyPutApi struct {
// contains filtered or unexported fields
}
func (*SwapListenKeyPutApi) Do ¶
func (api *SwapListenKeyPutApi) Do() (*SwapListenKeyPutRes, error)
type SwapListenKeyPutReq ¶
type SwapListenKeyPutReq struct{}
type SwapListenKeyPutRes ¶
type SwapListenKeyPutRes struct{}
type SwapMarginTypeApi ¶
type SwapMarginTypeApi struct {
// contains filtered or unexported fields
}
func (*SwapMarginTypeApi) Do ¶
func (api *SwapMarginTypeApi) Do() (*SwapMarginTypeRes, error)
func (*SwapMarginTypeApi) MarginType ¶
func (api *SwapMarginTypeApi) MarginType(MarginType string) *SwapMarginTypeApi
func (*SwapMarginTypeApi) RecvWindow ¶
func (api *SwapMarginTypeApi) RecvWindow(RecvWindow int64) *SwapMarginTypeApi
func (*SwapMarginTypeApi) Symbol ¶
func (api *SwapMarginTypeApi) Symbol(Symbol string) *SwapMarginTypeApi
func (*SwapMarginTypeApi) Timestamp ¶
func (api *SwapMarginTypeApi) Timestamp(Timestamp int64) *SwapMarginTypeApi
type SwapMarginTypeReq ¶
type SwapMarginTypeRes ¶
type SwapMarginTypeRes SwapCommonPostRes
type SwapOpenOrdersApi ¶
type SwapOpenOrdersApi struct {
// contains filtered or unexported fields
}
func (*SwapOpenOrdersApi) Do ¶
func (api *SwapOpenOrdersApi) Do() (*SwapOpenOrdersRes, error)
func (*SwapOpenOrdersApi) RecvWindow ¶
func (api *SwapOpenOrdersApi) RecvWindow(RecvWindow int64) *SwapOpenOrdersApi
func (*SwapOpenOrdersApi) Symbol ¶
func (api *SwapOpenOrdersApi) Symbol(Symbol string) *SwapOpenOrdersApi
func (*SwapOpenOrdersApi) Timestamp ¶
func (api *SwapOpenOrdersApi) Timestamp(Timestamp int64) *SwapOpenOrdersApi
type SwapOpenOrdersReq ¶
type SwapOpenOrdersRes ¶
type SwapOpenOrdersRes []SwapOrderOrder
type SwapOrderDeleteApi ¶
type SwapOrderDeleteApi struct {
// contains filtered or unexported fields
}
func (*SwapOrderDeleteApi) Do ¶
func (api *SwapOrderDeleteApi) Do() (*SwapOrderDeleteRes, error)
func (*SwapOrderDeleteApi) OrderId ¶
func (api *SwapOrderDeleteApi) OrderId(OrderId int64) *SwapOrderDeleteApi
func (*SwapOrderDeleteApi) OrigClientOrderId ¶
func (api *SwapOrderDeleteApi) OrigClientOrderId(OrigClientOrderId string) *SwapOrderDeleteApi
func (*SwapOrderDeleteApi) RecvWindow ¶
func (api *SwapOrderDeleteApi) RecvWindow(RecvWindow int64) *SwapOrderDeleteApi
func (*SwapOrderDeleteApi) Symbol ¶
func (api *SwapOrderDeleteApi) Symbol(Symbol string) *SwapOrderDeleteApi
func (*SwapOrderDeleteApi) Timestamp ¶
func (api *SwapOrderDeleteApi) Timestamp(Timestamp int64) *SwapOrderDeleteApi
type SwapOrderDeleteReq ¶
type SwapOrderDeleteRes ¶
type SwapOrderDeleteRes struct { BinanceErrorRes SwapOrderOrder }
type SwapOrderGetApi ¶
type SwapOrderGetApi struct {
// contains filtered or unexported fields
}
func (*SwapOrderGetApi) Do ¶
func (api *SwapOrderGetApi) Do() (*SwapOrderGetRes, error)
func (*SwapOrderGetApi) OrderId ¶
func (api *SwapOrderGetApi) OrderId(OrderId int64) *SwapOrderGetApi
func (*SwapOrderGetApi) OrigClientOrderId ¶
func (api *SwapOrderGetApi) OrigClientOrderId(OrigClientOrderId string) *SwapOrderGetApi
func (*SwapOrderGetApi) RecvWindow ¶
func (api *SwapOrderGetApi) RecvWindow(RecvWindow int64) *SwapOrderGetApi
func (*SwapOrderGetApi) Symbol ¶
func (api *SwapOrderGetApi) Symbol(Symbol string) *SwapOrderGetApi
func (*SwapOrderGetApi) Timestamp ¶
func (api *SwapOrderGetApi) Timestamp(Timestamp int64) *SwapOrderGetApi
type SwapOrderGetReq ¶
type SwapOrderGetRes ¶
type SwapOrderGetRes SwapOrderOrder
type SwapOrderOrder ¶
type SwapOrderOrder struct { AvgPrice string `json:"avgPrice"` // 平均成交价 ClientOrderId string `json:"clientOrderId"` // 用户自定义的订单号 CumQuote string `json:"cumQuote"` // 成交金额 ExecutedQty string `json:"executedQty"` // 成交量 OrderId int64 `json:"orderId"` // 系统订单号 OrigQty string `json:"origQty"` // 原始委托数量 OrigType string `json:"origType"` // 触发前订单类型 Price string `json:"price"` // 委托价格 ReduceOnly bool `json:"reduceOnly"` // 是否仅减仓 Side string `json:"side"` // 买卖方向 PositionSide string `json:"positionSide"` // 持仓方向 Status string `json:"status"` // 订单状态 StopPrice string `json:"stopPrice"` // 触发价,对`TRAILING_STOP_MARKET`无效 ClosePosition bool `json:"closePosition"` // 是否条件全平仓 Symbol string `json:"symbol"` // 交易对 Time int64 `json:"time"` // 订单时间 TimeInForce string `json:"timeInForce"` // 有效方法 Type string `json:"type"` // 订单类型 ActivatePrice string `json:"activatePrice"` // 跟踪止损激活价格, 仅`TRAILING_STOP_MARKET` 订单返回此字段 PriceRate string `json:"priceRate"` // 跟踪止损回调比例, 仅`TRAILING_STOP_MARKET` 订单返回此字段 UpdateTime int64 `json:"updateTime"` // 更新时间 WorkingType string `json:"workingType"` // 条件价格触发类型 PriceProtect bool `json:"priceProtect"` // 是否开启条件单触发保护 }
type SwapOrderPostApi ¶
type SwapOrderPostApi struct {
// contains filtered or unexported fields
}
func (*SwapOrderPostApi) ActivationPrice ¶
func (api *SwapOrderPostApi) ActivationPrice(ActivationPrice decimal.Decimal) *SwapOrderPostApi
func (*SwapOrderPostApi) CallbackRate ¶
func (api *SwapOrderPostApi) CallbackRate(CallbackRate decimal.Decimal) *SwapOrderPostApi
func (*SwapOrderPostApi) ClosePosition ¶
func (api *SwapOrderPostApi) ClosePosition(ClosePosition string) *SwapOrderPostApi
func (*SwapOrderPostApi) Do ¶
func (api *SwapOrderPostApi) Do() (*SwapOrderPostRes, error)
func (*SwapOrderPostApi) NewClientOrderId ¶
func (api *SwapOrderPostApi) NewClientOrderId(NewClientOrderId string) *SwapOrderPostApi
func (*SwapOrderPostApi) NewOrderRespType ¶
func (api *SwapOrderPostApi) NewOrderRespType(NewOrderRespType string) *SwapOrderPostApi
func (*SwapOrderPostApi) PositionSide ¶
func (api *SwapOrderPostApi) PositionSide(PositionSide string) *SwapOrderPostApi
func (*SwapOrderPostApi) Price ¶
func (api *SwapOrderPostApi) Price(Price decimal.Decimal) *SwapOrderPostApi
func (*SwapOrderPostApi) PriceProtect ¶
func (api *SwapOrderPostApi) PriceProtect(PriceProtect string) *SwapOrderPostApi
func (*SwapOrderPostApi) Quantity ¶
func (api *SwapOrderPostApi) Quantity(Quantity decimal.Decimal) *SwapOrderPostApi
func (*SwapOrderPostApi) RecvWindow ¶
func (api *SwapOrderPostApi) RecvWindow(RecvWindow int64) *SwapOrderPostApi
func (*SwapOrderPostApi) ReduceOnly ¶
func (api *SwapOrderPostApi) ReduceOnly(ReduceOnly string) *SwapOrderPostApi
func (*SwapOrderPostApi) Side ¶
func (api *SwapOrderPostApi) Side(Side string) *SwapOrderPostApi
func (*SwapOrderPostApi) StopPrice ¶
func (api *SwapOrderPostApi) StopPrice(StopPrice decimal.Decimal) *SwapOrderPostApi
func (*SwapOrderPostApi) Symbol ¶
func (api *SwapOrderPostApi) Symbol(Symbol string) *SwapOrderPostApi
func (*SwapOrderPostApi) TimeInForce ¶
func (api *SwapOrderPostApi) TimeInForce(TimeInForce string) *SwapOrderPostApi
func (*SwapOrderPostApi) Timestamp ¶
func (api *SwapOrderPostApi) Timestamp(Timestamp int64) *SwapOrderPostApi
func (*SwapOrderPostApi) Type ¶
func (api *SwapOrderPostApi) Type(Type string) *SwapOrderPostApi
func (*SwapOrderPostApi) WorkingType ¶
func (api *SwapOrderPostApi) WorkingType(WorkingType string) *SwapOrderPostApi
type SwapOrderPostReq ¶
type SwapOrderPostReq struct { Symbol *string `json:"symbol"` //Yes 交易对 Side *string `json:"side"` //Yes 买卖方向 SELL, BUY PositionSide *string `json:"positionSide,omitempty"` //No 持仓方向,单向持仓模式下非必填,默认且仅可填BOTH;在双向持仓模式下必填,且仅可选择 LONG 或 SHORT Type *string `json:"type"` //Yes 订单类型 LIMIT, MARKET, STOP, TAKE_PROFIT, STOP_MARKET, TAKE_PROFIT_MARKET, TRAILING_STOP_MARKET ReduceOnly *string `json:"reduceOnly,omitempty"` //No true, false; 非双开模式下默认false;双开模式下不接受此参数; 使用closePosition不支持此参数。 Quantity *decimal.Decimal `json:"quantity,omitempty"` //No 下单数量,使用closePosition不支持此参数。 Price *decimal.Decimal `json:"price,omitempty"` //No 委托价格 NewClientOrderId *string `json:"newClientOrderId,omitempty"` //No 用户自定义的订单号,不可以重复出现在挂单中。如空缺系统会自动赋值。必须满足正则规则 ^[\.A-Z\:/a-z0-9_-]{1,36}$ StopPrice *decimal.Decimal `json:"stopPrice,omitempty"` //No 触发价, 仅 STOP, STOP_MARKET, TAKE_PROFIT, TAKE_PROFIT_MARKET 需要此参数 ClosePosition *string `json:"closePosition,omitempty"` //No true, false;触发后全部平仓,仅支持STOP_MARKET和TAKE_PROFIT_MARKET;不与quantity合用;自带只平仓效果,不与reduceOnly 合用 ActivationPrice *decimal.Decimal `json:"activationPrice,omitempty"` //No 追踪止损激活价格,仅TRAILING_STOP_MARKET 需要此参数, 默认为下单当前市场价格(支持不同workingType) CallbackRate *decimal.Decimal `json:"callbackRate,omitempty"` //No 追踪止损回调比例,可取值范围[0.1, 5],其中 1代表1% ,仅TRAILING_STOP_MARKET 需要此参数 TimeInForce *string `json:"timeInForce,omitempty"` //No 有效方法 WorkingType *string `json:"workingType,omitempty"` //No stopPrice 触发类型: MARK_PRICE(标记价格), CONTRACT_PRICE(合约最新价). 默认 CONTRACT_PRICE PriceProtect *string `json:"priceProtect,omitempty"` //No 条件单触发保护:"TRUE","FALSE", 默认"FALSE". 仅 STOP, STOP_MARKET, TAKE_PROFIT, TAKE_PROFIT_MARKET 需要此参数 NewOrderRespType *string `json:"newOrderRespType,omitempty"` //No "ACK", "RESULT", 默认 "ACK" RecvWindow *int64 `json:"recvWindow,omitempty"` //No Timestamp *int64 `json:"timestamp,omitempty"` //Yes }
type SwapOrderPostRes ¶
type SwapOrderPostRes struct { ClientOrderId string `json:"clientOrderId"` // 用户自定义的订单号 CumQty string `json:"cumQty"` CumQuote string `json:"cumQuote"` // 成交金额 ExecutedQty string `json:"executedQty"` OrderId int64 `json:"orderId"` // 系统订单号 AvgPrice string `json:"avgPrice"` OrigQty string `json:"origQty"` // 原始委托数量 Price string `json:"price"` // 委托价格 ReduceOnly bool `json:"reduceOnly"` Side string `json:"side"` // 买卖方向 PositionSide string `json:"positionSide"` // 持仓方向 Status string `json:"status"` // 订单状态 StopPrice string `json:"stopPrice"` // 触发价,对`TRAILING_STOP_MARKET`无效 ClosePosition bool `json:"closePosition"` Symbol string `json:"symbol"` // 交易对 TimeInForce string `json:"timeInForce"` // 有效方法 Type string `json:"type"` // 订单类型 OrigType string `json:"origType"` // 触发前订单类型 }
type SwapOrderPostResRow ¶
type SwapOrderPostResRow struct { BinanceErrorRes SwapOrderPostRes }
type SwapOrderPutApi ¶
type SwapOrderPutApi struct {
// contains filtered or unexported fields
}
func (*SwapOrderPutApi) Do ¶
func (api *SwapOrderPutApi) Do() (*SwapOrderPutRes, error)
func (*SwapOrderPutApi) OrderId ¶
func (api *SwapOrderPutApi) OrderId(OrderId string) *SwapOrderPutApi
func (*SwapOrderPutApi) OrigClientOrderId ¶
func (api *SwapOrderPutApi) OrigClientOrderId(OrigClientOrderId string) *SwapOrderPutApi
func (*SwapOrderPutApi) Price ¶
func (api *SwapOrderPutApi) Price(Price decimal.Decimal) *SwapOrderPutApi
func (*SwapOrderPutApi) Quantity ¶
func (api *SwapOrderPutApi) Quantity(Quantity decimal.Decimal) *SwapOrderPutApi
func (*SwapOrderPutApi) RecvWindow ¶
func (api *SwapOrderPutApi) RecvWindow(RecvWindow int64) *SwapOrderPutApi
func (*SwapOrderPutApi) Side ¶
func (api *SwapOrderPutApi) Side(Side string) *SwapOrderPutApi
func (*SwapOrderPutApi) Symbol ¶
func (api *SwapOrderPutApi) Symbol(Symbol string) *SwapOrderPutApi
func (*SwapOrderPutApi) Timestamp ¶
func (api *SwapOrderPutApi) Timestamp(Timestamp int64) *SwapOrderPutApi
type SwapOrderPutReq ¶
type SwapOrderPutReq struct { Symbol *string `json:"symbol"` //YES 交易对 OrderId *string `json:"orderId,omitempty"` //NO 系统订单号 OrigClientOrderId *string `json:"origClientOrderId,omitempty"` //NO 用户自定义的订单号 Side *string `json:"side"` //YES 买卖方向 SELL, BUY Quantity *decimal.Decimal `json:"quantity,omitempty"` //NO 下单数量,使用closePosition不支持此参数。 Price *decimal.Decimal `json:"price,omitempty"` //NO 委托价格 RecvWindow *int64 `json:"recvWindow,omitempty"` //NO Timestamp *int64 `json:"timestamp,omitempty"` //YES }
type SwapOrderPutRes ¶
type SwapOrderPutRes SwapOrderPostRes
type SwapPingApi ¶
type SwapPingApi struct {
// contains filtered or unexported fields
}
func (*SwapPingApi) Do ¶
func (api *SwapPingApi) Do() (*SwapPingRes, error)
type SwapPingReq ¶
type SwapPingReq struct { }
type SwapPingRes ¶
type SwapPingRes struct { }
type SwapPositionRiskApi ¶
type SwapPositionRiskApi struct {
// contains filtered or unexported fields
}
func (*SwapPositionRiskApi) Do ¶
func (api *SwapPositionRiskApi) Do() (*SwapPositionRiskRes, error)
func (*SwapPositionRiskApi) MarginAsset ¶
func (api *SwapPositionRiskApi) MarginAsset(MarginAsset string) *SwapPositionRiskApi
func (*SwapPositionRiskApi) Pair ¶
func (api *SwapPositionRiskApi) Pair(Pair string) *SwapPositionRiskApi
func (*SwapPositionRiskApi) RecvWindow ¶
func (api *SwapPositionRiskApi) RecvWindow(RecvWindow int64) *SwapPositionRiskApi
func (*SwapPositionRiskApi) Timestamp ¶
func (api *SwapPositionRiskApi) Timestamp(Timestamp int64) *SwapPositionRiskApi
type SwapPositionRiskReq ¶
type SwapPositionRiskRes ¶
type SwapPositionRiskRes []SwapPositionRiskResRow
type SwapPositionRiskResRow ¶
type SwapPositionRiskResRow struct { Symbol string `json:"symbol"` // 交易对 PositionAmt string `json:"positionAmt"` // 头寸数量, 符号代表多空方向, 正数为多, 负数为空 EntryPrice string `json:"entryPrice"` // 开仓均价 BreakEvenPrice string `json:"breakEvenPrice"` // 盈亏平衡价 MarkPrice string `json:"markPrice"` // 当前标记价格 UnRealizedProfit string `json:"unRealizedProfit"` // 持仓未实现盈亏 LiquidationPrice string `json:"liquidationPrice"` // 参考强平价格 Leverage string `json:"leverage"` // 当前杠杆倍数 MaxQty string `json:"maxQty"` // 当前杠杆倍数允许的数量上限(标的数量) MarginType string `json:"marginType"` // 逐仓模式或全仓模式 IsolatedMargin string `json:"isolatedMargin"` // 逐仓保证金 IsAutoAddMargin string `json:"isAutoAddMargin"` // 是否自动追加保证金 PositionSide string `json:"positionSide"` // 持仓方向 NotionalValue string `json:"notionalValue"` // 名义价值 UpdateTime int64 `json:"updateTime"` // 最新更新时间 }
type SwapPositionSideDualGetApi ¶
type SwapPositionSideDualGetApi struct {
// contains filtered or unexported fields
}
func (*SwapPositionSideDualGetApi) Do ¶
func (api *SwapPositionSideDualGetApi) Do() (*SwapPositionSideDualGetRes, error)
func (*SwapPositionSideDualGetApi) RecvWindow ¶
func (api *SwapPositionSideDualGetApi) RecvWindow(RecvWindow int64) *SwapPositionSideDualGetApi
func (*SwapPositionSideDualGetApi) Timestamp ¶
func (api *SwapPositionSideDualGetApi) Timestamp(Timestamp int64) *SwapPositionSideDualGetApi
type SwapPositionSideDualGetRes ¶
type SwapPositionSideDualGetRes struct {
DualSidePosition bool `json:"dualSidePosition"` // "true": 双向持仓模式;"false": 单向持仓模式
}
type SwapPositionSideDualPostApi ¶
type SwapPositionSideDualPostApi struct {
// contains filtered or unexported fields
}
func (*SwapPositionSideDualPostApi) Do ¶
func (api *SwapPositionSideDualPostApi) Do() (*SwapPositionSideDualPostRes, error)
func (*SwapPositionSideDualPostApi) DualSidePosition ¶
func (api *SwapPositionSideDualPostApi) DualSidePosition(DualSidePosition string) *SwapPositionSideDualPostApi
func (*SwapPositionSideDualPostApi) RecvWindow ¶
func (api *SwapPositionSideDualPostApi) RecvWindow(RecvWindow int64) *SwapPositionSideDualPostApi
func (*SwapPositionSideDualPostApi) Timestamp ¶
func (api *SwapPositionSideDualPostApi) Timestamp(Timestamp int64) *SwapPositionSideDualPostApi
type SwapPositionSideDualPostRes ¶
type SwapPositionSideDualPostRes SwapCommonPostRes
type SwapRestClient ¶
type SwapRestClient RestClient
func (*SwapRestClient) NewAllOrders ¶
func (client *SwapRestClient) NewAllOrders() *SwapAllOrdersApi
binance SWAP SwapAllOrders rest查询所有订单 (USER_DATA)
func (*SwapRestClient) NewExchangeInfo ¶
func (client *SwapRestClient) NewExchangeInfo() *SwapExchangeInfoApi
binance SWAP SwapExchangeInfo rest交易规则和交易对信息
func (*SwapRestClient) NewOpenOrders ¶
func (client *SwapRestClient) NewOpenOrders() *SwapOpenOrdersApi
币合约订单接口 binance SWAP SwapOpenOrders rest查询当前挂单 (USER_DATA)
func (*SwapRestClient) NewPing ¶
func (client *SwapRestClient) NewPing() *SwapPingApi
通用接口 binance SWAP SwapPing rest测试连接
func (*SwapRestClient) NewServerTime ¶
func (client *SwapRestClient) NewServerTime() *SwapServerTimeApi
binance SWAP SwapServerTime rest获取服务器时间
func (*SwapRestClient) NewSwapAccount ¶
func (client *SwapRestClient) NewSwapAccount() *SwapAccountApi
币合约账户接口 binance SWAP SwapAccount rest账户信息 (USER_DATA)
func (*SwapRestClient) NewSwapBatchOrdersDelete ¶
func (client *SwapRestClient) NewSwapBatchOrdersDelete() *SwapBatchOrdersDeleteApi
binance SWAP SwapBatchOrdersDelete rest批量撤销订单 (TRADE)
func (*SwapRestClient) NewSwapBatchOrdersPost ¶
func (client *SwapRestClient) NewSwapBatchOrdersPost() *SwapBatchOrdersPostApi
binance SWAP SwapBatchOrdersPost rest批量下单 (TRADE)
func (*SwapRestClient) NewSwapBatchOrdersPut ¶
func (client *SwapRestClient) NewSwapBatchOrdersPut() *SwapBatchOrdersPutApi
binance SWAP SwapBatchOrdersPut rest批量修改订单 (TRADE)
func (*SwapRestClient) NewSwapCommissionRate ¶
func (client *SwapRestClient) NewSwapCommissionRate() *SwapCommissionRateApi
binance SWAP SwapCommissionRate rest查询用户当前的手续费率
func (*SwapRestClient) NewSwapDepth ¶
func (client *SwapRestClient) NewSwapDepth() *SwapDepthApi
binance SWAP SwapDepth rest获取深度信息
func (*SwapRestClient) NewSwapKlines ¶
func (client *SwapRestClient) NewSwapKlines() *SwapKlinesApi
行情接口 binance SWAP SwapKlines rest获取K线数据
func (*SwapRestClient) NewSwapLeverage ¶
func (client *SwapRestClient) NewSwapLeverage() *SwapLeverageApi
binance SWAP SwapLeverage rest调整开仓杠杆 (TRADE)
func (*SwapRestClient) NewSwapLeverageBracket ¶
func (client *SwapRestClient) NewSwapLeverageBracket() *SwapLeverageBracketApi
binance SWAP SwapLeverageBracket rest杠杆分层标准 (USER_DATA)
func (*SwapRestClient) NewSwapListenKeyDelete ¶
func (client *SwapRestClient) NewSwapListenKeyDelete() *SwapListenKeyDeleteApi
binance SWAP SwapListenKeyDelete rest关闭listenKey (USER_STREAM)
func (*SwapRestClient) NewSwapListenKeyPost ¶
func (client *SwapRestClient) NewSwapListenKeyPost() *SwapListenKeyPostApi
Ws账户推送相关 binance SWAP SwapListenKeyPost rest创建listenKey (USER_STREAM)
func (*SwapRestClient) NewSwapListenKeyPut ¶
func (client *SwapRestClient) NewSwapListenKeyPut() *SwapListenKeyPutApi
binance SWAP SwapListenKeyPut rest延长listenKey有效期 (USER_STREAM)
func (*SwapRestClient) NewSwapMarginType ¶
func (client *SwapRestClient) NewSwapMarginType() *SwapMarginTypeApi
binance SWAP SwapMarginType rest变换逐全仓模式 (TRADE)
func (*SwapRestClient) NewSwapOrderDelete ¶
func (client *SwapRestClient) NewSwapOrderDelete() *SwapOrderDeleteApi
binance SWAP SwapOrderDelete rest撤销订单 (TRADE)
func (*SwapRestClient) NewSwapOrderGet ¶
func (client *SwapRestClient) NewSwapOrderGet() *SwapOrderGetApi
binance SWAP SwapOrderGet rest查询订单 (USER_DATA)
func (*SwapRestClient) NewSwapOrderPost ¶
func (client *SwapRestClient) NewSwapOrderPost() *SwapOrderPostApi
binance SWAP SwapOrderPost rest下单 (TRADE)
func (*SwapRestClient) NewSwapOrderPut ¶
func (client *SwapRestClient) NewSwapOrderPut() *SwapOrderPutApi
binance SWAP SwapOrderPut rest修改订单 (TRADE)
func (*SwapRestClient) NewSwapPositionRisk ¶
func (client *SwapRestClient) NewSwapPositionRisk() *SwapPositionRiskApi
binance SWAP SwapPositionRisk rest用户持仓风险V2 (USER_DATA)
func (*SwapRestClient) NewSwapPositionSideDualGet ¶
func (client *SwapRestClient) NewSwapPositionSideDualGet() *SwapPositionSideDualGetApi
binance SWAP SwapPositionSideDualGet rest查询持仓模式 (USER_DATA)
func (*SwapRestClient) NewSwapPositionSideDualPost ¶
func (client *SwapRestClient) NewSwapPositionSideDualPost() *SwapPositionSideDualPostApi
binance SWAP SwapPositionSideDualPost rest更改持仓模式 (TRADE)
func (*SwapRestClient) NewSwapTickerPrice ¶
func (client *SwapRestClient) NewSwapTickerPrice() *SwapTickerPriceApi
binance SWAP SwapTickerPrice rest获取交易对最新价格
func (*SwapRestClient) NewSwapUserTrades ¶
func (client *SwapRestClient) NewSwapUserTrades() *SwapUserTradesApi
binance SWAP SwapUserTrades rest查询账户成交记录 (USER_DATA)
type SwapServerTimeApi ¶
type SwapServerTimeApi struct {
// contains filtered or unexported fields
}
func (*SwapServerTimeApi) Do ¶
func (api *SwapServerTimeApi) Do() (*SwapServerTimeRes, error)
type SwapServerTimeReq ¶
type SwapServerTimeReq struct { }
type SwapServerTimeRes ¶
type SwapServerTimeRes struct {
ServerTime int64 `json:"serverTime"`
}
type SwapTickerPriceApi ¶
type SwapTickerPriceApi struct {
// contains filtered or unexported fields
}
func (*SwapTickerPriceApi) Do ¶
func (api *SwapTickerPriceApi) Do() (*SwapTickerPriceRes, error)
func (*SwapTickerPriceApi) Pair ¶
func (api *SwapTickerPriceApi) Pair(Pair string) *SwapTickerPriceApi
func (*SwapTickerPriceApi) Symbol ¶
func (api *SwapTickerPriceApi) Symbol(Symbol string) *SwapTickerPriceApi
type SwapTickerPriceReq ¶
type SwapTickerPriceRes ¶
type SwapTickerPriceRes []SwapTickerPriceResRow
type SwapTickerPriceResRow ¶
type SwapUserTrade ¶
type SwapUserTrade struct { Symbol string `json:"symbol"` // 交易对 Id int64 `json:"id"` // 交易ID OrderId int64 `json:"orderId"` // 订单ID Pair string `json:"pair"` // 标的交易对 Side string `json:"side"` // 买卖方向 Price string `json:"price"` // 成交价 Qty string `json:"qty"` // 成交量(张数) RealizedPnl string `json:"realizedPnl"` // 实现盈亏 MarginAsset string `json:"marginAsset"` // 保证金币种 BaseQty string `json:"baseQty"` // 成交额(标的数量) Commission string `json:"commission"` // 手续费 CommissionAsset string `json:"commissionAsset"` // 手续费单位 Time int64 `json:"time"` // 时间 PositionSide string `json:"positionSide"` // 持仓方向 Buyer bool `json:"buyer"` // 是否是买方 Maker bool `json:"maker"` // 是否是挂单方 }
type SwapUserTradesApi ¶
type SwapUserTradesApi struct {
// contains filtered or unexported fields
}
func (*SwapUserTradesApi) Do ¶
func (api *SwapUserTradesApi) Do() (*SwapUserTradesRes, error)
func (*SwapUserTradesApi) EndTime ¶
func (api *SwapUserTradesApi) EndTime(EndTime int64) *SwapUserTradesApi
func (*SwapUserTradesApi) FromId ¶
func (api *SwapUserTradesApi) FromId(FromId int64) *SwapUserTradesApi
func (*SwapUserTradesApi) Limit ¶
func (api *SwapUserTradesApi) Limit(Limit int64) *SwapUserTradesApi
func (*SwapUserTradesApi) OrderId ¶
func (api *SwapUserTradesApi) OrderId(OrderId int64) *SwapUserTradesApi
func (*SwapUserTradesApi) Pair ¶
func (api *SwapUserTradesApi) Pair(Pair string) *SwapUserTradesApi
func (*SwapUserTradesApi) RecvWindow ¶
func (api *SwapUserTradesApi) RecvWindow(RecvWindow int64) *SwapUserTradesApi
func (*SwapUserTradesApi) StartTime ¶
func (api *SwapUserTradesApi) StartTime(StartTime int64) *SwapUserTradesApi
func (*SwapUserTradesApi) Symbol ¶
func (api *SwapUserTradesApi) Symbol(Symbol string) *SwapUserTradesApi
func (*SwapUserTradesApi) Timestamp ¶
func (api *SwapUserTradesApi) Timestamp(Timestamp int64) *SwapUserTradesApi
type SwapUserTradesReq ¶
type SwapUserTradesReq struct { Symbol *string `json:"symbol"` //NO 交易对 Pair *string `json:"pair"` //NO 标的交易对 OrderId *int64 `json:"orderId"` //NO 订单号 StartTime *int64 `json:"startTime"` //NO 起始时间 EndTime *int64 `json:"endTime"` //NO 结束时间 FromId *int64 `json:"fromId"` //NO 返回该fromId及之后的成交,缺省返回最近的成交,仅支持配合symbol使用 Limit *int64 `json:"limit"` //NO 返回的结果集数量 默认值:50 最大值:1000 RecvWindow *int64 `json:"recvWindow"` //NO Timestamp *int64 `json:"timestamp"` //YES }
type SwapUserTradesRes ¶
type SwapUserTradesRes []SwapUserTrade
type SwapWsStreamClient ¶
type SwapWsStreamClient struct { WsStreamClient // contains filtered or unexported fields }
func (*SwapWsStreamClient) Close ¶
func (ws *SwapWsStreamClient) Close() error
func (*SwapWsStreamClient) ConvertToAccountWs ¶
func (ws *SwapWsStreamClient) ConvertToAccountWs(apiKey string, apiSecret string) (*SwapWsStreamClient, error)
func (*SwapWsStreamClient) CreatePayload ¶
func (ws *SwapWsStreamClient) CreatePayload() (*WsSwapPayload, error)
type WsAggTrade ¶
type WsAggTrade struct { Timestamp int64 `json:"timestamp"` //事件时间 Symbol string `json:"symbol"` //交易对 AccountType string `json:"account_type"` //账户类型 SPOT 现货 FUTURE U合约 SWAP 币本位合约 AId int64 `gorm:"primaryKey " json:"a_id" ` // 归集交易ID Price float64 `json:"price"` //成交价 Quantity float64 `json:"quantity"` //成交量 First int64 `json:"first"` //被归集的首个交易ID Last int64 `json:"last"` //被归集的末次交易ID TradeTime int64 `json:"trade_time"` //成交时间 IsMarket bool `json:"is_market"` //买方是否做市 }
func HandleWsAggTrade ¶
func HandleWsAggTrade(apiType ApiType, data []byte) (*WsAggTrade, error)
func HandleWsAggTradeMap ¶
func HandleWsAggTradeMap(apiType ApiType, m map[string]interface{}) *WsAggTrade
func HandleWsCombinedAggTrade ¶
func HandleWsCombinedAggTrade(apiType ApiType, data []byte) (*WsAggTrade, error)
type WsApiReqExtend ¶
type WsApiResult ¶
type WsApiResult[T any] struct { Id string `json:"id"` // YES 与原来请求的ID一样 Status int `json:"status"` // YES 响应状态。请看 状态代码 Result T `json:"result"` // YES 响应内容。请求成功则显示 Error BinanceErrorRes `json:"error"` // 请求失败则显示 RateLimits []RateLimit `json:"rateLimits"` }
type WsApiResultChan ¶
type WsApiResultChanImpl ¶
type WsApiResultChanImpl struct {
// contains filtered or unexported fields
}
func (*WsApiResultChanImpl) CloseChan ¶
func (w *WsApiResultChanImpl) CloseChan() chan struct{}
func (*WsApiResultChanImpl) ErrChan ¶
func (w *WsApiResultChanImpl) ErrChan() chan error
func (*WsApiResultChanImpl) ResultChan ¶
func (w *WsApiResultChanImpl) ResultChan() chan []byte
type WsDepth ¶
type WsDepth struct { Timestamp int64 `json:"timestamp"` Level string `json:"level"` USpeed string `json:"u_speed"` AccountType string `json:"account_type"` Symbol string `json:"symbol"` UpperU int64 `json:"upper_u"` LowerU int64 `json:"lower_u"` PreU int64 `json:"pre_u"` LastUpdateID int64 `json:"last_update_id"` Bids []PriceLevel `json:"bids"` Asks []PriceLevel `json:"asks"` }
func HandleDepth ¶
type WsFutureAction ¶
type WsFutureAction struct { Reason string `json:"m"` //事件推出原因 Balance []WsFutureBalance `json:"B"` //余额信息 Position []WsFuturePosition `json:"P"` //持仓信息 }
type WsFutureBalance ¶
type WsFutureOrder ¶
type WsFutureOrder struct { Symbol string `json:"s"` //交易对 ClientOrderId string `json:"c"` //clientOrderId Side string `json:"S"` //订单方向 Type string `json:"o"` //订单类型 TimeInForce string `json:"f"` //有效方式 OrigQty string `json:"q"` //订单原始数量 Price string `json:"p"` //订单原始价格 AvgPrice string `json:"ap"` //订单平均价格 StopPrice string `json:"sp"` //止盈止损单触发价格 ExecutionType string `json:"x"` //本次事件的具体执行类型 Status string `json:"X"` //订单的当前状态 OrderId int64 `json:"i"` //orderId LastQty string `json:"l"` //订单末次成交量 ExecutedQty string `json:"z"` //订单累计已成交量 LastPrice string `json:"L"` //订单末次成交价格 FeeAsset string `json:"N"` //手续费资产类别 FeeQty string `json:"n"` //手续费数量 TradeTime int64 `json:"T"` //成交时间 TradeId int64 `json:"t"` //成交ID BuyNetValue string `json:"b"` //买单净值 SellNetValue string `json:"a"` //卖单净值 IsMaker bool `json:"m"` //该成交是作为挂单成交吗? IsReduceOnly bool `json:"R"` //是否是只减仓单 TriggerType string `json:"wt"` //触发价类型 OrigType string `json:"ot"` //原始订单类型 PositionSide string `json:"ps"` //持仓方向 IsClose bool `json:"cp"` //是否为触发平仓单; 仅在条件订单情况下会推送此字段 ActivePrice string `json:"AP"` //追踪止损激活价格, 仅在追踪止损单时会推送此字段 CallbackRate string `json:"cr"` //追踪止损回调比例, 仅在追踪止损单时会推送此字段 PriceProtect bool `json:"pP"` //是否开启条件单触发保护 RealizedProfit string `json:"rp"` //该交易实现盈亏 PreventMode string `json:"V"` //自成交防止模式 PriceMatch string `json:"pm"` //价格匹配模式 GoodTillDate int64 `json:"gtd"` //TIF为GTD的订单自动取消时间 }
type WsFuturePayload ¶
type WsFuturePayload struct { Ws *FutureWsStreamClient Id int64 AccountUpdatePayload *Payload[WsFuturePayloadAccountUpdate] OrderTradeUpdatePayload *Payload[WsFuturePayloadOrderTradeUpdate] }
func (*WsFuturePayload) Close ¶
func (payload *WsFuturePayload) Close()
type WsFuturePayloadAccountUpdate ¶
type WsFuturePayloadAccountUpdate struct { Event string `json:"e"` //事件类型 Timestamp int64 `json:"E"` //事件时间 TradeTime int64 `json:"T"` //撮合时间 Action WsFutureAction `json:"a"` // 账户更新事件 }
U本位合约余额和仓位推送
type WsFuturePayloadOrderTradeUpdate ¶
type WsFuturePayloadOrderTradeUpdate struct { Event string `json:"e"` //事件类型 Timestamp int64 `json:"E"` //事件时间 TradeTime int64 `json:"T"` //撮合时间 Order WsFutureOrder `json:"o"` //订单信息 }
U本位合约订单/交易 更新推送
type WsFuturePosition ¶
type WsFuturePosition struct { Symbol string `json:"s"` //交易对 PositionAmount string `json:"pa"` //仓位 EntryPrice string `json:"ep"` //入仓价格 BreakEvenPrice string `json:"bep"` //盈亏平衡价 CumulativeRealized string `json:"cr"` //(费前)累计实现损益 UnrealizedProfit string `json:"up"` //持仓未实现盈亏 MarginType string `json:"mt"` //保证金模式 InitialMargin string `json:"iw"` //若为逐仓,仓位保证金 PositionSide string `json:"ps"` //持仓方向 }
type WsKline ¶
type WsKline struct { Timestamp int64 `json:"timestamp"` AccountType string `json:"account_type"` //K线类型 现货:spot 币合约:swap u合约:future Symbol string `json:"symbol"` //交易对 Interval string `json:"interval"` //K线间隔 StartTime int64 `json:"start_time" gorm:"primaryKey"` //开盘时间 Open float64 `json:"open"` //开盘价 High float64 `json:"high"` //最高价 Low float64 `json:"low"` //最低价 Close float64 `json:"close"` //收盘价 Volume float64 `json:"volume"` //成交量 CloseTime int64 `json:"close_time"` //收盘时间 TransactionVolume float64 `json:"transaction_volume"` //成交额 TransactionNumber int64 `json:"transaction_number"` //成交笔数 BuyTransactionVolume float64 `json:"buy_transaction_volume"` //主动买入成交量 BuyTransactionAmount float64 `json:"buy_transaction_amount"` //主动买入成交额 Confirm bool `json:"confirm"` //这根K线是否完结 }
func HandleWsCombinedKline ¶
func HandleWsKlineMap ¶
type WsPmCAction ¶ added in v1.0.1
type WsPmCAction struct { Reason string `json:"m"` //事件推出原因 Balance []WsPmCBalance `json:"B"` //余额信息 Position []WsPmCPosition `json:"P"` //持仓信息 }
type WsPmCBalance ¶ added in v1.0.1
type WsPmCOrder ¶ added in v1.0.1
type WsPmCOrder struct { Symbol string `json:"s"` //交易对 ClientOrderId string `json:"c"` //clientOrderId Side string `json:"S"` //订单方向 Type string `json:"o"` //订单类型 TimeInForce string `json:"f"` //有效方式 OrigQty string `json:"q"` //订单原始数量 Price string `json:"p"` //订单原始价格 AvgPrice string `json:"ap"` //订单平均价格 StopPrice string `json:"sp"` //止盈止损单触发价格 ExecutionType string `json:"x"` //本次事件的具体执行类型 Status string `json:"X"` //订单的当前状态 OrderId int64 `json:"i"` //orderId LastQty string `json:"l"` //订单末次成交量 ExecutedQty string `json:"z"` //订单累计已成交量 LastPrice string `json:"L"` //订单末次成交价格 FeeAsset string `json:"N"` //手续费资产类别 FeeQty string `json:"n"` //手续费数量 TradeTime int64 `json:"T"` //成交时间 TradeId int64 `json:"t"` //成交ID BuyNetValue string `json:"b"` //买单净值 SellNetValue string `json:"a"` //卖单净值 IsMaker bool `json:"m"` //该成交是作为挂单成交吗? IsReduceOnly bool `json:"R"` //是否是只减仓单 PositionSide string `json:"ps"` //持仓方向 RealizedProfit string `json:"rp"` //该交易实现盈亏 StrategyType string `json:"st"` //策略类型 StrategyId int64 `json:"si"` //策略ID PreventMode string `json:"V"` //自成交防止模式 GoodTillDate int64 `json:"gtd"` //TIF为GTD的订单自动取消时间 }
type WsPmCPayload ¶ added in v1.0.1
type WsPmCPayload struct { Ws *PmCWsStreamClient Id int64 AccountUpdatePayload *Payload[WsPmCPayloadAccountUpdate] OrderTradeUpdatePayload *Payload[WsPmCPayloadOrderTradeUpdate] }
func (*WsPmCPayload) Close ¶ added in v1.0.1
func (payload *WsPmCPayload) Close()
type WsPmCPayloadAccountUpdate ¶ added in v1.0.1
type WsPmCPayloadAccountUpdate struct { Event string `json:"e"` //事件类型 FutureType string `json:"fs"` //合约类型 'UM' for USDS-M futures and 'CM' for COIN-M futures Timestamp int64 `json:"E"` //事件时间 TradeTime int64 `json:"T"` //撮合时间 AccountId string `json:"i"` //账户唯一识别码 accountAlias Action WsPmCAction `json:"a"` // 账户更新事件 }
统一账户币本位合约余额和仓位推送 //zsk修改
type WsPmCPayloadOrderTradeUpdate ¶ added in v1.0.1
type WsPmCPayloadOrderTradeUpdate struct { Event string `json:"e"` //事件类型 Timestamp int64 `json:"E"` //事件时间 TradeTime int64 `json:"T"` //撮合时间 FutureType string `json:"fs"` //合约类型 'UM' for USDS-M futures and 'CM' for COIN-M futures Order WsPmCOrder `json:"o"` //订单信息 }
统一账户币本位合约订单/交易 更新推送 //zsk修改
type WsPmCPosition ¶ added in v1.0.1
type WsPmCPosition struct { Symbol string `json:"s"` //交易对 PositionAmount string `json:"pa"` //仓位 EntryPrice string `json:"ep"` //入仓价格 CumulativeRealized string `json:"cr"` //(费前)累计实现损益 UnrealizedProfit string `json:"up"` //持仓未实现盈亏 PositionSide string `json:"ps"` //持仓方向 BreakEvenPrice string `json:"bep"` //盈亏平衡价 }
type WsPmMBalance ¶ added in v1.0.1
type WsPmMPayload ¶ added in v1.0.1
type WsPmMPayload struct { Ws *PmMWsStreamClient Id int64 OutboundAccountPositionPayload *Payload[WsPmMPayloadOutboundAccountPosition] BalanceUpdatePayload *Payload[WsPmMPayloadBalanceUpdate] ExecutionReportPayload *Payload[WsPmMPayloadExecutionReport] }
func (*WsPmMPayload) Close ¶ added in v1.0.1
func (payload *WsPmMPayload) Close()
type WsPmMPayloadBalanceUpdate ¶ added in v1.0.1
type WsPmMPayloadBalanceUpdate struct { Event string `json:"e"` //事件类型 Timestamp int64 `json:"E"` //事件时间 Asset string `json:"a"` //资产名称 Delta string `json:"d"` //余额变化 UpdateId int64 `json:"U"` //时间更新ID ClearTime int64 `json:"T"` //清算时间 }
现货余额更新推送
type WsPmMPayloadExecutionReport ¶ added in v1.0.1
type WsPmMPayloadExecutionReport struct { //标准字段 Event string `json:"e"` //事件类型 Timestamp int64 `json:"E"` //事件时间 Symbol string `json:"s"` //交易对 ClientOrderId string `json:"c"` //clientOrderId Side string `json:"S"` //订单方向 Type string `json:"o"` //订单类型 TimeInForce string `json:"f"` //有效方式 OrigQty string `json:"q"` //订单原始数量 Price string `json:"p"` //订单原始价格 StopPrice string `json:"P"` //止盈止损单触发价格 IcebergQty string `json:"F"` //冰山订单数量 OrderListId int64 `json:"g"` //OCO订单 OrderListId OrigClientOrderId string `json:"C"` //原始订单自定义ID(原始订单,指撤单操作的对象。撤单本身被视为另一个订单) ExecutionType string `json:"x"` //本次事件的具体执行类型 Status string `json:"X"` //订单的当前状态 RejectReason string `json:"r"` //订单被拒绝的原因 OrderId int64 `json:"i"` //orderId LastQty string `json:"l"` //订单末次成交量 ExecutedQty string `json:"z"` //订单累计已成交量 LastPrice string `json:"L"` //订单末次成交价格 FeeQty string `json:"n"` //手续费数量 FeeAsset string `json:"N"` //手续费资产类别 TradeTime int64 `json:"T"` //成交时间 TradeId int64 `json:"t"` //成交ID PreventMatchId int64 `json:"v"` //被阻止撮合交易的ID; 这仅在订单因 STP 触发而过期时可见 I int64 `json:"I"` //请忽略 IsWorking bool `json:"w"` //订单是否在订单簿上? IsMaker bool `json:"m"` //该成交是作为挂单成交吗? M bool `json:"M"` //请忽略 OrderCreateTime int64 `json:"O"` //订单创建时间 CummulativeQuoteQty string `json:"Z"` //订单累计已成交金额 LastQuoteQty string `json:"Y"` //订单末次成交金额 QuoteOrderQty string `json:"Q"` //Quote Order Quantity WorkingTime int64 `json:"W"` //订单被添加到 order book 的时间; 只有在订单在订单簿上时可见 SelfTradePrevention string `json:"V"` //SelfTradePreventionMode }
现货订单推送
type WsPmMPayloadOutboundAccountPosition ¶ added in v1.0.1
type WsPmMPayloadOutboundAccountPosition struct { Event string `json:"e"` //事件类型 Timestamp int64 `json:"E"` //事件时间 LastUpdateTime int64 `json:"u"` //账户末次更新时间戳 UpdateId int64 `json:"U"` //时间更新ID Balances []WsPmMBalance `json:"B"` //余额 }
统一账户杠杆账户更新推送 //zsk修改
type WsPmUAction ¶ added in v1.0.1
type WsPmUAction struct { Reason string `json:"m"` //事件推出原因 Balance []WsPmUBalance `json:"B"` //余额信息 Position []WsPmUPosition `json:"P"` //持仓信息 }
type WsPmUBalance ¶ added in v1.0.1
type WsPmUOrder ¶ added in v1.0.1
type WsPmUOrder struct { Symbol string `json:"s"` //交易对 ClientOrderId string `json:"c"` //clientOrderId Side string `json:"S"` //订单方向 Type string `json:"o"` //订单类型 TimeInForce string `json:"f"` //有效方式 OrigQty string `json:"q"` //订单原始数量 Price string `json:"p"` //订单原始价格 AvgPrice string `json:"ap"` //订单平均价格 StopPrice string `json:"sp"` //止盈止损单触发价格 ExecutionType string `json:"x"` //本次事件的具体执行类型 Status string `json:"X"` //订单的当前状态 OrderId int64 `json:"i"` //orderId LastQty string `json:"l"` //订单末次成交量 ExecutedQty string `json:"z"` //订单累计已成交量 LastPrice string `json:"L"` //订单末次成交价格 FeeAsset string `json:"N"` //手续费资产类别 FeeQty string `json:"n"` //手续费数量 TradeTime int64 `json:"T"` //成交时间 TradeId int64 `json:"t"` //成交ID BuyNetValue string `json:"b"` //买单净值 SellNetValue string `json:"a"` //卖单净值 IsMaker bool `json:"m"` //该成交是作为挂单成交吗? IsReduceOnly bool `json:"R"` //是否是只减仓单 PositionSide string `json:"ps"` //持仓方向 RealizedProfit string `json:"rp"` //该交易实现盈亏 StrategyType string `json:"st"` //策略类型 StrategyId int64 `json:"si"` //策略ID PreventMode string `json:"V"` //自成交防止模式 GoodTillDate int64 `json:"gtd"` //TIF为GTD的订单自动取消时间 }
type WsPmUPayload ¶ added in v1.0.1
type WsPmUPayload struct { Ws *PmUWsStreamClient Id int64 AccountUpdatePayload *Payload[WsPmUPayloadAccountUpdate] OrderTradeUpdatePayload *Payload[WsPmUPayloadOrderTradeUpdate] }
zsk修改
type WsPmUPayloadAccountUpdate ¶ added in v1.0.1
type WsPmUPayloadAccountUpdate struct { Event string `json:"e"` //事件类型 FutureType string `json:"fs"` //合约类型 'UM' for USDS-M futures and 'CM' for COIN-M futures Timestamp int64 `json:"E"` //事件时间 TradeTime int64 `json:"T"` //撮合时间 AccountId string `json:"i"` //账户唯一识别码 accountAlias Action WsPmUAction `json:"a"` // 账户更新事件 }
统一账户U本位合约余额和仓位推送 //zsk修改
type WsPmUPayloadOrderTradeUpdate ¶ added in v1.0.1
type WsPmUPayloadOrderTradeUpdate struct { Event string `json:"e"` //事件类型 Timestamp int64 `json:"E"` //事件时间 TradeTime int64 `json:"T"` //撮合时间 FutureType string `json:"fs"` //合约类型 'UM' for USDS-M futures and 'CM' for COIN-M futures Order WsPmUOrder `json:"o"` //订单信息 }
统一账户U本位合约订单/交易 更新推送 //zsk修改
type WsPmUPosition ¶ added in v1.0.1
type WsPmUPosition struct { Symbol string `json:"s"` //交易对 PositionAmount string `json:"pa"` //仓位 EntryPrice string `json:"ep"` //入仓价格 CumulativeRealized string `json:"cr"` //(费前)累计实现损益 UnrealizedProfit string `json:"up"` //持仓未实现盈亏 PositionSide string `json:"ps"` //持仓方向 BreakEvenPrice string `json:"bep"` //盈亏平衡价 }
type WsSpotBalance ¶
type WsSpotPayload ¶
type WsSpotPayload struct { Ws *SpotWsStreamClient Id int64 OutboundAccountPositionPayload *Payload[WsSpotPayloadOutboundAccountPosition] BalanceUpdatePayload *Payload[WsSpotPayloadBalanceUpdate] ExecutionReportPayload *Payload[WsSpotPayloadExecutionReport] }
func (*WsSpotPayload) Close ¶
func (payload *WsSpotPayload) Close()
type WsSpotPayloadBalanceUpdate ¶
type WsSpotPayloadBalanceUpdate struct { Event string `json:"e"` //事件类型 Timestamp int64 `json:"E"` //事件时间 Asset string `json:"a"` //资产名称 Delta string `json:"d"` //余额变化 ClearTime int64 `json:"T"` //清算时间 }
现货余额更新推送
type WsSpotPayloadExecutionReport ¶
type WsSpotPayloadExecutionReport struct { //标准字段 Event string `json:"e"` //事件类型 Timestamp int64 `json:"E"` //事件时间 Symbol string `json:"s"` //交易对 ClientOrderId string `json:"c"` //clientOrderId Side string `json:"S"` //订单方向 Type string `json:"o"` //订单类型 TimeInForce string `json:"f"` //有效方式 OrigQty string `json:"q"` //订单原始数量 Price string `json:"p"` //订单原始价格 StopPrice string `json:"P"` //止盈止损单触发价格 IcebergQty string `json:"F"` //冰山订单数量 OrderListId int64 `json:"g"` //OCO订单 OrderListId OrigClientOrderId string `json:"C"` //原始订单自定义ID(原始订单,指撤单操作的对象。撤单本身被视为另一个订单) ExecutionType string `json:"x"` //本次事件的具体执行类型 Status string `json:"X"` //订单的当前状态 RejectReason string `json:"r"` //订单被拒绝的原因 OrderId int64 `json:"i"` //orderId LastQty string `json:"l"` //订单末次成交量 ExecutedQty string `json:"z"` //订单累计已成交量 LastPrice string `json:"L"` //订单末次成交价格 FeeQty string `json:"n"` //手续费数量 FeeAsset string `json:"N"` //手续费资产类别 TradeTime int64 `json:"T"` //成交时间 TradeId int64 `json:"t"` //成交ID IsWorking bool `json:"w"` //订单是否在订单簿上? IsMaker bool `json:"m"` //该成交是作为挂单成交吗? OrderCreateTime int64 `json:"O"` //订单创建时间 CummulativeQuoteQty string `json:"Z"` //订单累计已成交金额 LastQuoteQty string `json:"Y"` //订单末次成交金额 QuoteOrderQty string `json:"Q"` //Quote Order Quantity SelfTradePrevention string `json:"V"` //SelfTradePreventionMode //特殊字段 TrailingDelta int64 `json:"d"` //只出现在追踪止损订单中。 TrailingTime int64 `json:"D"` //Trailing Time StrategyId int64 `json:"j"` //如果在请求中添加了strategyId参数,则会出现。 StrategyType int64 `json:"J"` //如果在请求中添加了strategyType参数,则会出现。 PreventMatchId int64 `json:"v"` //被阻止撮合交易的ID; 这仅在订单因 STP 触发而过期时可见 PreventedQuantity string `json:"A"` //只有在因为 STP 导致订单失效时可见。 LastPreventedQuantity string `json:"B"` //Last Prevented Quantity TradeGroupId int64 `json:"u"` //Trade Group Id CounterOrderId int64 `json:"U"` //Counter Order Id CounterSymbol string `json:"Cs"` //Counter Symbol PreventedExecutionQuantity string `json:"pl"` //Prevented Execution Quantity PreventedExecutionPrice string `json:"pL"` //Prevented Execution Price PreventedExecutionQuoteQty string `json:"pY"` //Prevented Execution Quote Qty WorkingTime int64 `json:"W"` //Working Time; 订单被添加到 order book 的时间; 只有在订单在订单簿上时可见 MatchType string `json:"b"` //Match Type AllocationId int64 `json:"a"` //Allocation ID WorkingFloor string `json:"k"` //Working Floor; 只有在订单可能有分配时可见 UsedSor bool `json:"uS"` //UsedSor; 只有在订单使用 SOR 时可见 }
现货订单推送
type WsSpotPayloadOutboundAccountPosition ¶
type WsSpotPayloadOutboundAccountPosition struct { Event string `json:"e"` //事件类型 Timestamp int64 `json:"E"` //事件时间 LastUpdateTime int64 `json:"u"` //账户末次更新时间戳 Balances []WsSpotBalance `json:"B"` //余额 }
现货账户更新推送
type WsStreamClient ¶
type WsStreamClient struct { AutoReConnectTimes int //自动重连次数 // contains filtered or unexported fields }
数据流订阅基础客户端
func (*WsStreamClient) Close ¶
func (ws *WsStreamClient) Close() error
func (*WsStreamClient) CurrentSubscribeList ¶
func (ws *WsStreamClient) CurrentSubscribeList() ([]string, error)
获取当前所有订阅
func (*WsStreamClient) GetConn ¶
func (ws *WsStreamClient) GetConn() *websocket.Conn
func (*WsStreamClient) OpenConn ¶
func (ws *WsStreamClient) OpenConn() error
func (*WsStreamClient) SubscribeAggTrade ¶
func (ws *WsStreamClient) SubscribeAggTrade(symbol string) (*Subscription[WsAggTrade], error)
订阅归集交易流 如: "BTCUSDT"
func (*WsStreamClient) SubscribeAggTradeMultiple ¶
func (ws *WsStreamClient) SubscribeAggTradeMultiple(symbols []string) (*Subscription[WsAggTrade], error)
批量订阅归集交易流 如: []string{"BTCUSDT","ETHUSDT"}
func (*WsStreamClient) SubscribeIncrementDepth ¶
func (ws *WsStreamClient) SubscribeIncrementDepth(symbol string, USpeed string) (*Subscription[WsDepth], error)
订阅增量深度 如: "BTCUSDT","100ms"
func (*WsStreamClient) SubscribeIncrementDepthMultiple ¶
func (ws *WsStreamClient) SubscribeIncrementDepthMultiple(symbols []string, USpeed string) (*Subscription[WsDepth], error)
批量订阅增量深度 如: []string{"BTCUSDT","ETHUSDT"},"100ms"
func (*WsStreamClient) SubscribeKline ¶
func (ws *WsStreamClient) SubscribeKline(symbol string, interval string) (*Subscription[WsKline], error)
订阅K线 如: "BTCUSDT","1m"
func (*WsStreamClient) SubscribeKlineMultiple ¶
func (ws *WsStreamClient) SubscribeKlineMultiple(symbols []string, intervals []string) (*Subscription[WsKline], error)
批量订阅K线 如: []string{"BTCUSDT","ETHUSDT"},[]string{"1m","5m"}
func (*WsStreamClient) SubscribeLevelDepth ¶
func (ws *WsStreamClient) SubscribeLevelDepth(symbol string, level string, USpeed string) (*Subscription[WsDepth], error)
订阅有限档深度 如: "BTCUSDT","20","100ms"
func (*WsStreamClient) SubscribeLevelDepthMultiple ¶
func (ws *WsStreamClient) SubscribeLevelDepthMultiple(symbols []string, level string, USpeed string) (*Subscription[WsDepth], error)
批量订阅有限档深度 如: []string{"BTCUSDT","ETHUSDT"},"20","100ms"
type WsStreamPath ¶
type WsStreamPath int
const ( WS_STREAM_PATH WsStreamPath = iota WS_ACCOUNT_PATH WS_SPOT_API_PATH WS_FUTURE_API_PATH )
type WsSwapAction ¶
type WsSwapAction struct { Reason string `json:"m"` //事件推出原因 Balance []WsSwapBalance `json:"B"` //余额信息 Position []WsSwapPosition `json:"P"` //持仓信息 }
type WsSwapBalance ¶
type WsSwapOrder ¶
type WsSwapOrder struct { Symbol string `json:"s"` //交易对 ClientOrderId string `json:"c"` //clientOrderId Side string `json:"S"` //订单方向 Type string `json:"o"` //订单类型 TimeInForce string `json:"f"` //有效方式 OrigQty string `json:"q"` //订单原始数量 Price string `json:"p"` //订单原始价格 AvgPrice string `json:"ap"` //订单平均价格 StopPrice string `json:"sp"` //止盈止损单触发价格 ExecutionType string `json:"x"` //本次事件的具体执行类型 Status string `json:"X"` //订单的当前状态 OrderId int64 `json:"i"` //orderId LastQty string `json:"l"` //订单末次成交量 ExecutedQty string `json:"z"` //订单累计已成交量 LastPrice string `json:"L"` //订单末次成交价格 MarginAsset string `json:"ma"` //保证金资产类型 FeeAsset string `json:"N"` //手续费资产类别 FeeQty string `json:"n"` //手续费数量 TradeTime int64 `json:"T"` //成交时间 TradeId int64 `json:"t"` //成交ID RealizedProfit string `json:"rp"` //该交易实现盈亏 BuyNetValue string `json:"b"` //买单净值 SellNetValue string `json:"a"` //卖单净值 IsMaker bool `json:"m"` //该成交是作为挂单成交吗? IsReduceOnly bool `json:"R"` //是否是只减仓单 TriggerType string `json:"wt"` //触发价类型 OrigType string `json:"ot"` //原始订单类型 PositionSide string `json:"ps"` //持仓方向 IsClose bool `json:"cp"` //是否为触发平仓单 ActivePrice string `json:"AP"` //追踪止损激活价格 CallbackRate string `json:"cr"` //追踪止损回调比例 PriceProtect bool `json:"pP"` //是否开启条件单触发保护 }
type WsSwapPayload ¶
type WsSwapPayload struct { Ws *SwapWsStreamClient Id int64 AccountUpdatePayload *Payload[WsSwapPayloadAccountUpdate] OrderTradeUpdatePayload *Payload[WsSwapPayloadOrderTradeUpdate] }
func (*WsSwapPayload) Close ¶
func (payload *WsSwapPayload) Close()
type WsSwapPayloadAccountUpdate ¶
type WsSwapPayloadAccountUpdate struct { Event string `json:"e"` //事件类型 Timestamp int64 `json:"E"` //事件时间 TradeTime int64 `json:"T"` //撮合时间 AccountAlias string `json:"i"` //账户唯一识别码 accountAlias Action WsSwapAction `json:"a"` // 账户更新事件 }
币本位合约账户更新推送
type WsSwapPayloadOrderTradeUpdate ¶
type WsSwapPayloadOrderTradeUpdate struct { Event string `json:"e"` //事件类型 Timestamp int64 `json:"E"` //事件时间 TradeTime int64 `json:"T"` //撮合时间 AccountAlias string `json:"i"` //账户唯一识别码 accountAlias Order WsSwapOrder `json:"o"` //订单信息 }
币本位合约订单/交易 更新推送
type WsSwapPosition ¶
type WsSwapPosition struct { Symbol string `json:"s"` //交易对 PositionAmount string `json:"pa"` //仓位 EntryPrice string `json:"ep"` //入仓价格 BreakEvenPrice string `json:"bep"` //盈亏平衡价 CumulativeRealized string `json:"cr"` //(费前)累计实现损益 UnrealizedProfit string `json:"up"` //持仓未实现盈亏 MarginType string `json:"mt"` //保证金模式 InitialMargin string `json:"iw"` //若为逐仓,仓位保证金 PositionSide string `json:"ps"` //持仓方向 }
Source Files ¶
- common.go
- common_req.go
- common_res.go
- common_ws.go
- constant.go
- future_api.go
- future_api_account.go
- future_api_common.go
- future_api_market.go
- future_api_order.go
- future_api_wskey.go
- future_req_account.go
- future_req_common.go
- future_req_market.go
- future_req_order.go
- future_req_wskey.go
- future_res_account.go
- future_res_common.go
- future_res_market.go
- future_res_order.go
- future_res_wskey.go
- handle.go
- handle_ws.go
- http_proxy.go
- pmc_api.go
- pmc_api_account.go
- pmc_api_order.go
- pmc_api_wskey.go
- pmc_req_account.go
- pmc_req_order.go
- pmc_req_wskey.go
- pmc_res_account.go
- pmc_res_order.go
- pmc_res_wskey.go
- pmm_api.go
- pmm_api_account.go
- pmm_api_order.go
- pmm_api_wskey.go
- pmm_req_account.go
- pmm_req_order.go
- pmm_req_wskey.go
- pmm_res_account.go
- pmm_res_order.go
- pmm_res_wskey.go
- pmu_api.go
- pmu_api_account.go
- pmu_api_order.go
- pmu_api_wskey.go
- pmu_req_account.go
- pmu_req_order.go
- pmu_req_wskey.go
- pmu_res_account.go
- pmu_res_order.go
- pmu_res_wskey.go
- spot_api.go
- spot_api_account.go
- spot_api_common.go
- spot_api_margin.go
- spot_api_market.go
- spot_api_order.go
- spot_api_subaccount.go
- spot_api_wskey.go
- spot_req_account.go
- spot_req_common.go
- spot_req_margin.go
- spot_req_market.go
- spot_req_order.go
- spot_req_subaccount.go
- spot_req_wskey.go
- spot_res_account.go
- spot_res_common.go
- spot_res_margin.go
- spot_res_market.go
- spot_res_order.go
- spot_res_subaccount.go
- spot_res_wskey.go
- swap_api.go
- swap_api_account.go
- swap_api_common.go
- swap_api_market.go
- swap_api_order.go
- swap_api_wskey.go
- swap_req_account.go
- swap_req_common.go
- swap_req_market.go
- swap_req_order.go
- swap_req_wskey.go
- swap_res_account.go
- swap_res_common.go
- swap_res_market.go
- swap_res_order.go
- swap_res_wskey.go
- ws_api_common.go
- ws_api_order.go
- ws_stream_account.go
- ws_stream_aggtrade.go
- ws_stream_common.go
- ws_stream_depth.go
- ws_stream_kline.go