restful

package
v0.0.0-...-fc61210 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 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) GetAccountAssetsAsync

func (ac *AccountClient) GetAccountAssetsAsync(data chan account.GetAccountAssetsResponse, contractCode string, subUid int64)

func (*AccountClient) GetAccountPositionAsync

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

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) GetAllSubAssetsAsync

func (ac *AccountClient) GetAllSubAssetsAsync(data chan account.GetAllSubAssetsResponse, contractCode string)

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) GetPositionLimitAsync

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

func (*AccountClient) GetTransferLimitAsync

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

func (*AccountClient) GetValidLeverRateAsync

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

func (*AccountClient) Init

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

type MarketClient

type MarketClient struct {
	PUrlBuilder *reqbuilder.PublicUrlBuilder
}

func (*MarketClient) GetAdjustFactorFundAsync

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

func (*MarketClient) GetApiStatusAsync

func (mc *MarketClient) GetApiStatusAsync(data chan market.GetApiStatusResponse, contractCode 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

type OrderClient

type OrderClient struct {
	PUrlBuilder *reqbuilder.PrivateUrlBuilder
}

func (*OrderClient) CancelOrderAsync

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

func (*OrderClient) GetHisMatchAsync

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

func (*OrderClient) GetHisOrderAsync

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

func (*OrderClient) GetOpenOrderAsync

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

func (*OrderClient) GetOrderDetailAsync

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

func (*OrderClient) GetOrderInfoAsync

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

func (*OrderClient) Init

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

func (*OrderClient) LightningCloseAsync

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

func (*OrderClient) PlaceBatchOrderAsync

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

func (*OrderClient) PlaceOrderAsync

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

func (*OrderClient) SwitchLeverRateAsync

func (oc *OrderClient) SwitchLeverRateAsync(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) CancelOrderAsync

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

func (*TriggerOrderClient) GetHisOrderAsync

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

func (*TriggerOrderClient) GetOpenOrderAsync

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

func (*TriggerOrderClient) Init

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

func (*TriggerOrderClient) PlaceOrderAsync

Directories

Path Synopsis
request
response

Jump to

Keyboard shortcuts

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