restful

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2020 License: Apache-2.0 Imports: 12 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 account.AccountTransferResponse, asset string, fromMarginAccount string, toMarginAccount string, amount float64,
	subUid int64, fcType string)

func (*AccountClient) CrossGetAccountInfoAsync

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

func (*AccountClient) CrossGetAccountListAsync

func (ac *AccountClient) CrossGetAccountListAsync(data chan account.GetSubAccountListResponse, marginAccount string)

func (*AccountClient) CrossGetAccountPositionAsync

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

func (*AccountClient) CrossGetAssetsPositionAsync

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

func (*AccountClient) CrossGetPositionLimitAsync

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

func (*AccountClient) CrossGetTransferLimitAsync

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

func (*AccountClient) CrossGetValidLeverRateAsync

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

func (*AccountClient) GetAccountTransHisAsync

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

func (*AccountClient) GetApiTradingStatusAsync

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

func (*AccountClient) GetFeeAsync

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

func (*AccountClient) GetOrderLimitAsync

func (ac *AccountClient) GetOrderLimitAsync(data chan account.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 account.GetAccountInfoResponse, contractCode string, subUid int64)

func (*AccountClient) IsolatedGetAccountListAsync

func (ac *AccountClient) IsolatedGetAccountListAsync(data chan account.GetSubAccountListResponse, contractCode string)

func (*AccountClient) IsolatedGetAccountPositionAsync

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

func (*AccountClient) IsolatedGetAssetsPositionAsync

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

func (*AccountClient) IsolatedGetPositionLimitAsync

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

func (*AccountClient) IsolatedGetTransferLimitAsync

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

func (*AccountClient) IsolatedGetValidLeverRateAsync

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

type MarketClient

type MarketClient struct {
	PUrlBuilder *reqbuilder.PublicUrlBuilder
}

func (*MarketClient) CrossGetAdjustFactorFundAsync

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

func (*MarketClient) CrossGetTradeStateAsync

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

func (*MarketClient) CrossGetTransferStateAsync

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

func (*MarketClient) GetBasisAsync

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

func (*MarketClient) GetContractInfoAsync

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

func (*MarketClient) GetDepthAsync

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

func (*MarketClient) GetEliteAccountRatioAsync

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

func (*MarketClient) GetElitePositionRatioAsync

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

func (*MarketClient) GetEstimatedRateKLineAsync

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

func (*MarketClient) GetFundingRateAsync

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

func (*MarketClient) GetHisFundingRateAsync

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

func (*MarketClient) GetHisOpenInterestAsync

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

func (*MarketClient) GetHisTradeAsync

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

func (*MarketClient) GetIndexAsync

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

func (*MarketClient) GetInsuranceFundAsync

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

func (*MarketClient) GetKLineAsync

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

func (*MarketClient) GetLiquidationOrdersAsync

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

func (*MarketClient) GetMergedAsync

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

func (*MarketClient) GetOpenInterestAsync

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

func (*MarketClient) GetPremiumIndexKLineAsync

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

func (*MarketClient) GetPriceLimitAsync

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

func (*MarketClient) GetRiskInfoAsync

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

func (*MarketClient) GetTradeAsync

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

func (*MarketClient) Init

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

func (*MarketClient) IsolatedGetAdjustFactorFundAsync

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

func (*MarketClient) IsolatedGetApiStateAsync

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

type OrderClient

type OrderClient struct {
	PUrlBuilder *reqbuilder.PrivateUrlBuilder
}

func (*OrderClient) CrossCancelOrderAsync

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

func (*OrderClient) CrossGetHisMatchAsync

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

func (*OrderClient) CrossGetHisOrderAsync

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

func (*OrderClient) CrossGetOpenOrderAsync

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

func (*OrderClient) CrossGetOrderDetailAsync

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

func (*OrderClient) CrossGetOrderInfoAsync

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

func (*OrderClient) CrossLightningCloseAsync

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

func (*OrderClient) CrossPlaceBatchOrderAsync

func (oc *OrderClient) CrossPlaceBatchOrderAsync(data chan responseorder.PlaceBatchOrderResponse, requests requestorder.BatchPlaceOrderRequest)

func (*OrderClient) CrossPlaceOrderAsync

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

func (*OrderClient) CrossSwitchLeverRateAsync

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

func (*OrderClient) Init

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

func (*OrderClient) IsolatedCancelOrderAsync

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

func (*OrderClient) IsolatedGetHisMatchAsync

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

func (*OrderClient) IsolatedGetHisOrderAsync

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

func (*OrderClient) IsolatedGetOpenOrderAsync

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

func (*OrderClient) IsolatedGetOrderDetailAsync

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

func (*OrderClient) IsolatedGetOrderInfoAsync

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

func (*OrderClient) IsolatedLightningCloseAsync

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

func (*OrderClient) IsolatedPlaceBatchOrderAsync

func (oc *OrderClient) IsolatedPlaceBatchOrderAsync(data chan responseorder.PlaceBatchOrderResponse, requests requestorder.BatchPlaceOrderRequest)

func (*OrderClient) IsolatedPlaceOrderAsync

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

func (*OrderClient) IsolatedSwitchLeverRateAsync

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

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 transfer.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 responsetriggerorder.CancelOrderResponse, contractCode string, orderId string)

func (*TriggerOrderClient) CrossGetHisOrderAsync

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

func (*TriggerOrderClient) CrossGetOpenOrderAsync

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

func (*TriggerOrderClient) CrossPlaceOrderAsync

func (*TriggerOrderClient) Init

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

func (*TriggerOrderClient) IsolatedCancelOrderAsync

func (toc *TriggerOrderClient) IsolatedCancelOrderAsync(data chan responsetriggerorder.CancelOrderResponse, contractCode string, orderId string)

func (*TriggerOrderClient) IsolatedGetHisOrderAsync

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

func (*TriggerOrderClient) IsolatedGetOpenOrderAsync

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

func (*TriggerOrderClient) IsolatedPlaceOrderAsync

func (toc *TriggerOrderClient) IsolatedPlaceOrderAsync(data chan responsetriggerorder.PlaceOrderResponse, request requesttiggerorder.PlaceOrderRequest)

Directories

Path Synopsis
request
response

Jump to

Keyboard shortcuts

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