api

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountClient

type AccountClient struct {
	PUrlBuilder *reqbuilder.PrivateUrlBuilder
}

func (*AccountClient) AccountTransferAsync

func (ac *AccountClient) AccountTransferAsync(data chan response.AccountTransferResponse, asset string, fromMarginAccount string, toMarginAccount string, amount float64,
	subUid int64, fcType string)

func (*AccountClient) CrossGetAccountInfoAsync

func (ac *AccountClient) CrossGetAccountInfoAsync(data chan response.GetAccountInfoResponse, marginAccount string, subUid int64)

func (*AccountClient) CrossGetAccountPositionAsync

func (ac *AccountClient) CrossGetAccountPositionAsync(data chan response.GetAccountPositionResponse, contractCode string, subUid int64)

func (*AccountClient) CrossGetAssetsPositionAsync

func (ac *AccountClient) CrossGetAssetsPositionAsync(data chan response.GetAssetsPositionResponseSingle, marginAccount string)

func (*AccountClient) CrossGetPositionLimitAsync

func (ac *AccountClient) CrossGetPositionLimitAsync(data chan response.GetPositionLimitResponse, contractCode string)

func (*AccountClient) CrossGetSettlementRecordsAsync

func (ac *AccountClient) CrossGetSettlementRecordsAsync(data chan response.CrossGetSettlementRecordsResponse, marginAccount string,
	startTime int64, endTime int64, pageIndex int, pageSize int)

func (*AccountClient) CrossGetSubAccountInfoListAsync

func (ac *AccountClient) CrossGetSubAccountInfoListAsync(data chan response.GetSubAccountInfoListResponse,
	marginAccount string, pageIndex int, pageSize int)

func (*AccountClient) CrossGetSubAccountListAsync

func (ac *AccountClient) CrossGetSubAccountListAsync(data chan response.GetSubAccountListResponse, marginAccount string)

func (*AccountClient) CrossGetTransferLimitAsync

func (ac *AccountClient) CrossGetTransferLimitAsync(data chan response.GetTransferLimitResponse, marginAccount string)

func (*AccountClient) CrossGetValidLeverRateAsync

func (ac *AccountClient) CrossGetValidLeverRateAsync(data chan response.GetValidLeverRateResponse, contractCode string)

func (*AccountClient) GetAccountTransHisAsync

func (ac *AccountClient) GetAccountTransHisAsync(data chan response.GetAccountTransHisResponse, marginAccount string,
	beMasterSub bool, fcType string, createDate int, pageIndex int, pageSize int)

func (*AccountClient) GetApiTradingStatusAsync

func (ac *AccountClient) GetApiTradingStatusAsync(data chan response.GetApiTradingStatusResponse, contractCode string)

func (*AccountClient) GetBalanceValuationAsync

func (ac *AccountClient) GetBalanceValuationAsync(data chan response.GetBalanceValuationResponse, valuationAsset string)

func (*AccountClient) GetFeeAsync

func (ac *AccountClient) GetFeeAsync(data chan response.GetFeeResponse, contractCode string)

func (*AccountClient) GetFinancialRecordExactAsync

func (ac *AccountClient) GetFinancialRecordExactAsync(data chan response.GetFinancialRecordExactResponse, marginAccount string,
	contractCode string, fcType string, startTime int64, endTime int64, fromId int64, size int, direct string)

func (*AccountClient) GetOrderLimitAsync

func (ac *AccountClient) GetOrderLimitAsync(data chan response.GetOrderLimitResponse, orderPriceType string, contractCode string)

func (*AccountClient) Init

func (ac *AccountClient) Init(accessKey string, secretKey string, host string) *AccountClient

func (*AccountClient) IsolatedGetAccountInfoAsync

func (ac *AccountClient) IsolatedGetAccountInfoAsync(data chan response.GetAccountInfoResponse, contractCode string, subUid int64)

func (*AccountClient) IsolatedGetAccountPositionAsync

func (ac *AccountClient) IsolatedGetAccountPositionAsync(data chan response.GetAccountPositionResponse, contractCode string, subUid int64)

func (*AccountClient) IsolatedGetAssetsPositionAsync

func (ac *AccountClient) IsolatedGetAssetsPositionAsync(data chan response.GetAssetsPositionResponse, contractCode string)

func (*AccountClient) IsolatedGetPositionLimitAsync

func (ac *AccountClient) IsolatedGetPositionLimitAsync(data chan response.GetPositionLimitResponse, contractCode string)

func (*AccountClient) IsolatedGetSettlementRecordsAsync

func (ac *AccountClient) IsolatedGetSettlementRecordsAsync(data chan response.IsolatedGetSettlementRecordsResponse, contractCode string,
	startTime int64, endTime int64, pageIndex int, pageSize int)

func (*AccountClient) IsolatedGetSubAccountInfoListAsync

func (ac *AccountClient) IsolatedGetSubAccountInfoListAsync(data chan response.GetSubAccountInfoListResponse,
	contractCode string, pageIndex int, pageSize int)

func (*AccountClient) IsolatedGetSubAccountListResponseAsync

func (ac *AccountClient) IsolatedGetSubAccountListResponseAsync(data chan response.GetSubAccountListResponse, contractCode string)

func (*AccountClient) IsolatedGetTransferLimitAsync

func (ac *AccountClient) IsolatedGetTransferLimitAsync(data chan response.GetTransferLimitResponse, contractCode string)

func (*AccountClient) IsolatedGetValidLeverRateAsync

func (ac *AccountClient) IsolatedGetValidLeverRateAsync(data chan response.GetValidLeverRateResponse, contractCode string)

func (*AccountClient) SetSubAuthAsync

func (ac *AccountClient) SetSubAuthAsync(data chan response.SetSubAuthResponse, subUid string, subAuth int)

type MarketClient

type MarketClient struct {
	PUrlBuilder *reqbuilder.PublicUrlBuilder
}

func (*MarketClient) CrossGetAdjustFactorFundAsync

func (mc *MarketClient) CrossGetAdjustFactorFundAsync(data chan response.GetAdjustFactorFundResponse, contractCode string)

func (*MarketClient) CrossGetLadderMarginAsync

func (mc *MarketClient) CrossGetLadderMarginAsync(data chan response.GetLadderMarginResponse, contractCode string)

func (*MarketClient) CrossGetTradeStateAsync

func (mc *MarketClient) CrossGetTradeStateAsync(data chan response.GetTradeStateResponse, contractCode string)

func (*MarketClient) CrossGetTransferStateAsync

func (mc *MarketClient) CrossGetTransferStateAsync(data chan response.GetTransferStateResponse, marginAccount string)

func (*MarketClient) GetBasisAsync

func (mc *MarketClient) GetBasisAsync(data chan response.GetBasisResponse, contractCode string, period string, size int, basisPriceType string)

func (*MarketClient) GetBatchFundingRateAsync

func (mc *MarketClient) GetBatchFundingRateAsync(data chan response.GetBatchFundingRateResponse, contractCode string)

func (*MarketClient) GetBatchMergedAsync

func (mc *MarketClient) GetBatchMergedAsync(data chan response.GetBatchMergedResponse, contractCode string)

func (*MarketClient) GetBboAsync

func (mc *MarketClient) GetBboAsync(data chan response.GetBboResponse, contractCode string)

func (*MarketClient) GetContractInfoAsync

func (mc *MarketClient) GetContractInfoAsync(data chan response.GetContractInfoResponse, contractCode string)

func (*MarketClient) GetDepthAsync

func (mc *MarketClient) GetDepthAsync(data chan response.GetDepthResponse, contractCode string, fcType string)

func (*MarketClient) GetEliteAccountRatioAsync

func (mc *MarketClient) GetEliteAccountRatioAsync(data chan response.GetEliteRatioResponse, contractCode string, period string)

func (*MarketClient) GetElitePositionRatioAsync

func (mc *MarketClient) GetElitePositionRatioAsync(data chan response.GetEliteRatioResponse, contractCode string, period string)

func (*MarketClient) GetEstimatedRateKLineAsync

func (mc *MarketClient) GetEstimatedRateKLineAsync(data chan response.GetStrKLineResponse, contractCode string, period string, size int)

func (*MarketClient) GetEstimatedSettlementPriceAsync

func (mc *MarketClient) GetEstimatedSettlementPriceAsync(data chan response.GetEstimatedSettlementPriceResponse, contractCode string)

func (*MarketClient) GetFundingRateAsync

func (mc *MarketClient) GetFundingRateAsync(data chan response.GetFundingRateResponse, contractCode string)

func (*MarketClient) GetHisFundingRateAsync

func (mc *MarketClient) GetHisFundingRateAsync(data chan response.GetHisFundingRateResponse, contractCode string, pageIndex int, pageSize int)

func (*MarketClient) GetHisOpenInterestAsync

func (mc *MarketClient) GetHisOpenInterestAsync(data chan response.GetHisOpenInterestResponse, contractCode string, period string, amountType int, size int)

func (*MarketClient) GetHisTradeAsync

func (mc *MarketClient) GetHisTradeAsync(data chan response.GetHisTradeResponse, contractCode string, size int)

func (*MarketClient) GetIndexAsync

func (mc *MarketClient) GetIndexAsync(data chan response.GetIndexResponse, contractCode string)

func (*MarketClient) GetInsuranceFundAsync

func (mc *MarketClient) GetInsuranceFundAsync(data chan response.GetInsuranceFundResponse, contractCode string, pageIndex int, pageSize int)

func (*MarketClient) GetKLineAsync

func (mc *MarketClient) GetKLineAsync(data chan response.GetKLineResponse, contractCode string, period string, size int, from int, to int)

func (*MarketClient) GetLiquidationOrdersAsync

func (mc *MarketClient) GetLiquidationOrdersAsync(data chan response.GetLiquidationOrdersResponse, contractCode string, tradeType int, createDate int,
	pageIndex int, pageSize int)

func (*MarketClient) GetMarkPriceKLineAsync

func (mc *MarketClient) GetMarkPriceKLineAsync(data chan response.GetStrKLineResponse, contractCode string, period string, size int)

func (*MarketClient) GetMergedAsync

func (mc *MarketClient) GetMergedAsync(data chan response.GetMergedResponse, contractCode string)

func (*MarketClient) GetOpenInterestAsync

func (mc *MarketClient) GetOpenInterestAsync(data chan response.GetOpenInterestResponse, contractCode string)

func (*MarketClient) GetPremiumIndexKLineAsync

func (mc *MarketClient) GetPremiumIndexKLineAsync(data chan response.GetStrKLineResponse, contractCode string, period string, size int)

func (*MarketClient) GetPriceLimitAsync

func (mc *MarketClient) GetPriceLimitAsync(data chan response.GetPriceLimitResponse, contractCode string)

func (*MarketClient) GetRiskInfoAsync

func (mc *MarketClient) GetRiskInfoAsync(data chan response.GetRiskInfoResponse, contractCode string)

func (*MarketClient) GetTradeAsync

func (mc *MarketClient) GetTradeAsync(data chan response.GetTradeResponse, contractCode string)

func (*MarketClient) Init

func (mc *MarketClient) Init(host string) *MarketClient

func (*MarketClient) IsolatedGetAdjustFactorFundAsync

func (mc *MarketClient) IsolatedGetAdjustFactorFundAsync(data chan response.GetAdjustFactorFundResponse, contractCode string)

func (*MarketClient) IsolatedGetApiStateAsync

func (mc *MarketClient) IsolatedGetApiStateAsync(data chan response.GetApiStateResponse, contractCode string)

func (*MarketClient) IsolatedGetLadderMarginAsync

func (mc *MarketClient) IsolatedGetLadderMarginAsync(data chan response.GetLadderMarginResponse, contractCode string)

type OrderClient

type OrderClient struct {
	PUrlBuilder *reqbuilder.PrivateUrlBuilder
}

func (*OrderClient) CrossCancelOrderAsync

func (oc *OrderClient) CrossCancelOrderAsync(data chan response.CancelOrderResponse, contractCode string,
	orderId string, clientOrderId string, offset string, direction string)

func (*OrderClient) CrossGetHisMatchAsync

func (oc *OrderClient) CrossGetHisMatchAsync(data chan response.GetHisMatchResponse, contractCode string, tradeType int, createDate int,
	pageIndex int, pageSize int)

func (*OrderClient) CrossGetHisMatchExactAsync

func (oc *OrderClient) CrossGetHisMatchExactAsync(data chan response.GetHisMatchExactResponse, contractCode string,
	tradeType int, startTime int64, endTime int64, fromId int64, size int, direct string)

func (*OrderClient) CrossGetHisOrderAsync

func (oc *OrderClient) CrossGetHisOrderAsync(data chan response.GetHisOrderResponse, contractCode string, tradeType int, fcType int, status string,
	createDate int, pageIndex int, pageSize int, sortBy string)

func (*OrderClient) CrossGetHisOrderExactAsync

func (oc *OrderClient) CrossGetHisOrderExactAsync(data chan response.GetHisOrderExactResponse, contractCode string,
	tradeType int, fcType int, status string, orderPriceType string, startTime int64, endTime int64,
	fromId int64, size int, direct string)

func (*OrderClient) CrossGetOpenOrderAsync

func (oc *OrderClient) CrossGetOpenOrderAsync(data chan response.GetOpenOrderResponse, contractCode string,
	pageIndex int, pageSize int, sortBy string, tradeType int)

func (*OrderClient) CrossGetOrderDetailAsync

func (oc *OrderClient) CrossGetOrderDetailAsync(data chan response.GetOrderDetailResponse, contractCode string, orderId int64, createdAt int64,
	orderType int, pageIndex int, pageSize int)

func (*OrderClient) CrossGetOrderInfoAsync

func (oc *OrderClient) CrossGetOrderInfoAsync(data chan response.GetOrderInfoResponse, contractCode string, orderId string, clientOrderId string)

func (*OrderClient) CrossLightningCloseAsync

func (oc *OrderClient) CrossLightningCloseAsync(data chan response.LightningCloseResponse, contractCode string, volume int, direction string,
	clientOrderId int64, orderPriceType string)

func (*OrderClient) CrossPlaceBatchOrderAsync

func (oc *OrderClient) CrossPlaceBatchOrderAsync(data chan response.PlaceBatchOrderResponse, requests request.BatchPlaceOrderRequest)

func (*OrderClient) CrossPlaceOrderAsync

func (oc *OrderClient) CrossPlaceOrderAsync(data chan response.PlaceOrderResponse, request request.PlaceOrderRequest)

func (*OrderClient) CrossSwitchLeverRateAsync

func (oc *OrderClient) CrossSwitchLeverRateAsync(data chan response.SwitchLeverRateResponse, contractCode string, leverRate int)

func (*OrderClient) CrossTpslOrderAsync

func (oc *OrderClient) CrossTpslOrderAsync(data chan response.TpslOrderResponse, request request.TriggerOrderTpslOrderRequest)

func (*OrderClient) Init

func (oc *OrderClient) Init(accessKey string, secretKey string, host string) *OrderClient

func (*OrderClient) IsolatedCancelOrderAsync

func (oc *OrderClient) IsolatedCancelOrderAsync(data chan response.CancelOrderResponse, contractCode string,
	orderId string, clientOrderId string, offset string, direction string)

func (*OrderClient) IsolatedGetHisMatchAsync

func (oc *OrderClient) IsolatedGetHisMatchAsync(data chan response.GetHisMatchResponse, contractCode string, tradeType int, createDate int,
	pageIndex int, pageSize int)

func (*OrderClient) IsolatedGetHisMatchExactAsync

func (oc *OrderClient) IsolatedGetHisMatchExactAsync(data chan response.GetHisMatchExactResponse, contractCode string,
	tradeType int, startTime int64, endTime int64, fromId int64, size int, direct string)

func (*OrderClient) IsolatedGetHisOrderAsync

func (oc *OrderClient) IsolatedGetHisOrderAsync(data chan response.GetHisOrderResponse, contractCode string, tradeType int, fcType int, status string,
	createDate int, pageIndex int, pageSize int, sortBy string)

func (*OrderClient) IsolatedGetHisOrderExactAsync

func (oc *OrderClient) IsolatedGetHisOrderExactAsync(data chan response.GetHisOrderExactResponse, contractCode string,
	tradeType int, fcType int, status string, orderPriceType string, startTime int64, endTime int64,
	fromId int64, size int, direct string)

func (*OrderClient) IsolatedGetOpenOrderAsync

func (oc *OrderClient) IsolatedGetOpenOrderAsync(data chan response.GetOpenOrderResponse, contractCode string,
	pageIndex int, pageSize int, sortBy string, tradeType int)

func (*OrderClient) IsolatedGetOrderDetailAsync

func (oc *OrderClient) IsolatedGetOrderDetailAsync(data chan response.GetOrderDetailResponse, contractCode string, orderId int64, createdAt int64,
	orderType int, pageIndex int, pageSize int)

func (*OrderClient) IsolatedGetOrderInfoAsync

func (oc *OrderClient) IsolatedGetOrderInfoAsync(data chan response.GetOrderInfoResponse, contractCode string,
	orderId string, clientOrderId string)

func (*OrderClient) IsolatedLightningCloseAsync

func (oc *OrderClient) IsolatedLightningCloseAsync(data chan response.LightningCloseResponse, contractCode string, volume int, direction string,
	clientOrderId int64, orderPriceType string)

func (*OrderClient) IsolatedPlaceBatchOrderAsync

func (oc *OrderClient) IsolatedPlaceBatchOrderAsync(data chan response.PlaceBatchOrderResponse, requests request.BatchPlaceOrderRequest)

func (*OrderClient) IsolatedPlaceOrderAsync

func (oc *OrderClient) IsolatedPlaceOrderAsync(data chan response.PlaceOrderResponse, request request.PlaceOrderRequest)

func (*OrderClient) IsolatedSwitchLeverRateAsync

func (oc *OrderClient) IsolatedSwitchLeverRateAsync(data chan response.SwitchLeverRateResponse, contractCode string, leverRate int)

func (*OrderClient) IsolatedTpslOrderAsync

func (oc *OrderClient) IsolatedTpslOrderAsync(data chan response.TpslOrderResponse, request request.TriggerOrderTpslOrderRequest)

type TransferClient

type TransferClient struct {
	PUrlBuilder *reqbuilder.PrivateUrlBuilder
}

func (*TransferClient) Init

func (tc *TransferClient) Init(accessKey string, secretKey string, host string) *TransferClient

func (*TransferClient) TransferAsync

func (tc *TransferClient) TransferAsync(data chan response.TransferResponse, from string, to string, amount float32, marginAccount string, currency string)

type TriggerOrderClient

type TriggerOrderClient struct {
	PUrlBuilder *reqbuilder.PrivateUrlBuilder
}

func (*TriggerOrderClient) CrossCancelOrderAsync

func (toc *TriggerOrderClient) CrossCancelOrderAsync(data chan response.CancelOrderResponse,
	contractCode string, orderId string, offset string, direction string)

func (*TriggerOrderClient) CrossGetHisOrderAsync

func (toc *TriggerOrderClient) CrossGetHisOrderAsync(data chan response.GetHisOrderResponse, contractCode string, tradeType int, status string, createDate int,
	pageIndex int, pageSize int, sortBy string)

func (*TriggerOrderClient) CrossGetOpenOrderAsync

func (toc *TriggerOrderClient) CrossGetOpenOrderAsync(data chan response.GetOpenOrderResponse,
	contractCode string, pageIndex int, pageSize int, tradeType int)

func (*TriggerOrderClient) CrossGetRelationTpslOrderAsync

func (toc *TriggerOrderClient) CrossGetRelationTpslOrderAsync(data chan response.GetRelationTpslOrderResponse,
	contractCode string, orderId int)

func (*TriggerOrderClient) CrossGetTpslHisOrderAsync

func (toc *TriggerOrderClient) CrossGetTpslHisOrderAsync(data chan response.GetHisOrderResponse,
	contractCode string, status string, createDate int, pageIndex int, pageSize int, sortBy string)

func (*TriggerOrderClient) CrossGetTpslOpenOrderAsync

func (toc *TriggerOrderClient) CrossGetTpslOpenOrderAsync(data chan response.GetOpenOrderResponse,
	contractCode string, pageIndex int, pageSize int, tradeType int)

func (*TriggerOrderClient) CrossPlaceOrderAsync

func (toc *TriggerOrderClient) CrossPlaceOrderAsync(data chan response.PlaceOrderResponse, request request.TriggerOrderPlaceOrderRequest)

func (*TriggerOrderClient) CrossTpslCancelAsync

func (toc *TriggerOrderClient) CrossTpslCancelAsync(data chan response.CancelOrderResponse,
	contractCode string, orderId string, direction string)

func (*TriggerOrderClient) Init

func (toc *TriggerOrderClient) Init(accessKey string, secretKey string, host string) *TriggerOrderClient

func (*TriggerOrderClient) IsolatedCancelOrderAsync

func (toc *TriggerOrderClient) IsolatedCancelOrderAsync(data chan response.CancelOrderResponse,
	contractCode string, orderId string, offset string, direction string)

func (*TriggerOrderClient) IsolatedGetHisOrderAsync

func (toc *TriggerOrderClient) IsolatedGetHisOrderAsync(data chan response.GetHisOrderResponse, contractCode string, tradeType int, status string, createDate int,
	pageIndex int, pageSize int, sortBy string)

func (*TriggerOrderClient) IsolatedGetOpenOrderAsync

func (toc *TriggerOrderClient) IsolatedGetOpenOrderAsync(data chan response.GetOpenOrderResponse,
	contractCode string, pageIndex int, pageSize int, tradeType int)

func (*TriggerOrderClient) IsolatedGetRelationTpslOrderAsync

func (toc *TriggerOrderClient) IsolatedGetRelationTpslOrderAsync(data chan response.GetRelationTpslOrderResponse,
	contractCode string, orderId int)

func (*TriggerOrderClient) IsolatedGetTpslHisOrderAsync

func (toc *TriggerOrderClient) IsolatedGetTpslHisOrderAsync(data chan response.GetHisOrderResponse,
	contractCode string, status string, createDate int, pageIndex int, pageSize int, sortBy string)

func (*TriggerOrderClient) IsolatedGetTpslOpenOrderAsync

func (toc *TriggerOrderClient) IsolatedGetTpslOpenOrderAsync(data chan response.GetOpenOrderResponse,
	contractCode string, pageIndex int, pageSize int, tradeType int)

func (*TriggerOrderClient) IsolatedPlaceOrderAsync

func (toc *TriggerOrderClient) IsolatedPlaceOrderAsync(data chan response.PlaceOrderResponse, request request.TriggerOrderPlaceOrderRequest)

func (*TriggerOrderClient) IsolatedTpslCancelAsync

func (toc *TriggerOrderClient) IsolatedTpslCancelAsync(data chan response.CancelOrderResponse,
	contractCode string, orderId string, direction string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL