restful

package
v0.0.0-...-841ffdc Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: Apache-2.0 Imports: 14 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, clientOrderId int64)

AccountTransferAsync [General] Transfer between master and sub account and [General] Transfer between different margin accounts under the same account

func (*AccountClient) CrossGetAccountInfoAsync

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

CrossGetAccountInfoAsync [Cross] Query User's Account Information and [Cross] Query A Sub-Account's Assets Information

func (*AccountClient) CrossGetAccountPositionAsync

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

CrossGetAccountPositionAsync [Cross] Query User's Position Information and [Cross] Query A Sub-Account's Position Information

func (*AccountClient) CrossGetAssetsPositionAsync

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

CrossGetAssetsPositionAsync [Cross] Query Assets And Positions

func (*AccountClient) CrossGetPositionLimitAsync

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

CrossGetPositionLimitAsync [Cross] Query Information On Position Limit

func (*AccountClient) CrossGetSettlementRecordsAsync

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

func (*AccountClient) CrossGetSubAccountInfoListAsync

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

CrossGetSubAccountInfoListAsync [Cross]Query a Batch of Sub-Account's Assets Information

func (*AccountClient) CrossGetSubAccountListAsync

func (ac *AccountClient) CrossGetSubAccountListAsync(data chan account.GetSubAccountListResponse, marginAccount string, direct string, fromId int64)

CrossGetSubAccountListAsync [Cross] Query Assets Information Of All Sub-Accounts Under The Master Account

func (*AccountClient) CrossGetTransferLimitAsync

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

CrossGetTransferLimitAsync [Cross] Query Information On Transfer Limit

func (*AccountClient) CrossGetValidLeverRateAsync

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

CrossGetValidLeverRateAsync [Cross] Query User’s Available Leverage

func (*AccountClient) GetAccountTransHisAsync

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

GetAccountTransHisAsync [General] Query transfer records between master and sub account

func (*AccountClient) GetApiTradingStatusAsync

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

GetApiTradingStatusAsync [General] Query user's API indicator disable information

func (*AccountClient) GetBalanceValuationAsync

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

GetBalanceValuationAsync [General]Query Asset Valuation

func (*AccountClient) GetFeeAsync

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

GetFeeAsync [General] Query information on swap trading fee

func (*AccountClient) GetFinancialRecordExactAsync

func (ac *AccountClient) GetFinancialRecordExactAsync(data chan account.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 account.GetOrderLimitResponse, orderPriceType string, contractCode string, pair string, contractType string, businessType string)

GetOrderLimitAsync [General] Query swap information on order limit

func (*AccountClient) GetSwapSubAuthListAsync

func (ac *AccountClient) GetSwapSubAuthListAsync(data chan account.GetSwapSubAuthListResponse, subUID string, startTime string,
	endTime string, direct string, fromID string)

GetSwapSubAuthListAsync [General] Query sub-account transaction permissions

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)

IsolatedGetAccountInfoAsync [Isolated] Query User’s Account Information and [Isolated] Query a single sub-account's assets information

func (*AccountClient) IsolatedGetAccountPositionAsync

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

IsolatedGetAccountPositionAsync [Isolated] Query User’s Position Information and [Isolated] Query a single sub-account's assets information

func (*AccountClient) IsolatedGetAssetsPositionAsync

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

IsolatedGetAssetsPositionAsync [Isolated] Query Assets And Positions

func (*AccountClient) IsolatedGetPositionLimitAsync

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

IsolatedGetPositionLimitAsync [Isolated] Query information on position limit

func (*AccountClient) IsolatedGetSettlementRecordsAsync

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

IsolatedGetSettlementRecordsAsync [Isolated]Query Settlement Records of Users

func (*AccountClient) IsolatedGetSubAccountInfoListAsync

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

IsolatedGetSubAccountInfoListAsync [Isolated]Query a Batch of Sub-Account's Assets Information

func (*AccountClient) IsolatedGetSubAccountListResponseAsync

func (ac *AccountClient) IsolatedGetSubAccountListResponseAsync(data chan account.GetSubAccountListResponse, contractCode string, direct string, fromId int64)

IsolatedGetSubAccountListResponseAsync [Isolated] Query assets information of all sub-accounts under the master account

func (*AccountClient) IsolatedGetTransferLimitAsync

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

IsolatedGetTransferLimitAsync [Isolated] Query information on Transfer Limit

func (*AccountClient) IsolatedGetValidLeverRateAsync

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

IsolatedGetValidLeverRateAsync [Isolated] Query user’s available leverage

func (*AccountClient) SetSubAuthAsync

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

SetSubAuthAsync [General]Set a Batch of Sub-Account Trading Permissions

func (*AccountClient) SwapCrossLeverPositionLimitAsync

func (ac *AccountClient) SwapCrossLeverPositionLimitAsync(data chan account.SwapCrossLeverPositionLimitResponse,
	businessType string, contractType string, pair string, contractCode string, leverRate string)

SwapCrossLeverPositionLimitAsync [Cross]Query Users' Position Limit for All Leverages

func (*AccountClient) SwapFinancialRecordAsync

func (ac *AccountClient) SwapFinancialRecordAsync(data chan account.SwapFinancialRecordResponse, contract string,
	marAcct string, fcType string, startTime string, endTime string, direct string, fromId string)

SwapFinancialRecordAsync [General] Query account financial records(New)

func (*AccountClient) SwapFinancialRecordExactAsync

func (ac *AccountClient) SwapFinancialRecordExactAsync(data chan account.SwapFinancialRecordResponse, contract string,
	marAcct string, fcType string, startTime string, endTime string, direct string, fromId string)

SwapFinancialRecordExactAsync [General]Query account financial records via Multiple Fields(New)

func (*AccountClient) SwapLeverPositionLimitAsync

func (ac *AccountClient) SwapLeverPositionLimitAsync(data chan account.SwapLeverPositionLimitResponse, contractCode string,
	leverRate string)

SwapLeverPositionLimitAsync [Isolated]Query Users' Position Limit for All Leverages

func (*AccountClient) SwapSubPositionInfoAsync

func (ac *AccountClient) SwapSubPositionInfoAsync(data chan account.SwapSubPositionInfoResponse, contractCode string, subUid string)

SwapSubPositionInfoAsync [Isolated] Query a single sub-account's position information

type CommonClient

type CommonClient struct {
	PUrlBuilder *reqbuilder.PrivateUrlBuilder
}

func (*CommonClient) GetSwapUnifiedAccountTypeAsync

func (ac *CommonClient) GetSwapUnifiedAccountTypeAsync(data chan common.GetSwapUnifiedAccountTypeResponse)

GetSwapUnifiedAccountTypeAsync Account type query

func (*CommonClient) Init

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

func (*CommonClient) SwapSwitchAccountTypeAsync

func (ac *CommonClient) SwapSwitchAccountTypeAsync(data chan common.SwapSwitchAccountTypeResponse, accountType int)

SwapSwitchAccountTypeAsync Account Type Change

type MarketClient

type MarketClient struct {
	PUrlBuilder *reqbuilder.PublicUrlBuilder
}

func (*MarketClient) CrossGetAdjustFactorFundAsync

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

CrossGetAdjustFactorFundAsync [Cross] Query Information On Tiered Adjustment Factor

func (*MarketClient) CrossGetLadderMarginAsync

func (mc *MarketClient) CrossGetLadderMarginAsync(data chan market.GetLadderMarginResponse, contractCode string, pair string, contractType string, businessType string)

CrossGetLadderMarginAsync ([Cross]Query information on Tiered Margin)

func (*MarketClient) CrossGetTradeStateAsync

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

CrossGetTradeStateAsync ([Cross] Query Information On Trade State)

func (*MarketClient) CrossGetTransferStateAsync

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

CrossGetTransferStateAsync ([Cross] Query Information On Transfer State)

func (*MarketClient) GetBasisAsync

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

GetBasisAsync ([General] Query Basis Data)

func (*MarketClient) GetBatchFundingRateAsync

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

GetBatchFundingRateAsync ([General]Query a Batch of Funding Rate)

func (*MarketClient) GetBatchMergedAsync

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

GetBatchMergedAsync [General]Get a Batch of Market Data Overview

func (*MarketClient) GetBatchMergedV2Async

func (mc *MarketClient) GetBatchMergedV2Async(data chan market.GetBatchMergedV2Response, contractCode string, businessType string)

GetBatchMergedV2Async ([General]Get a Batch of Market Data Overview(V2))

func (*MarketClient) GetBboAsync

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

GetBboAsync [General]Get Market BBO Data

func (*MarketClient) GetContractInfoAsync

func (mc *MarketClient) GetContractInfoAsync(data chan market.GetContractInfoResponse, contractCode string, supportMarginMode string, pair string, contractType string, businessType string)

GetContractInfoAsync [General] Query Swap Info

func (*MarketClient) GetDepthAsync

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

GetDepthAsync [General] Get Market Depth

func (*MarketClient) GetEliteAccountRatioAsync

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

GetEliteAccountRatioAsync [General] Query Top Trader Sentiment Index Function-Account)

func (*MarketClient) GetElitePositionRatioAsync

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

GetElitePositionRatioAsync ([General] Query Top Trader Sentiment Index Function-Position)

func (*MarketClient) GetEstimatedRateKLineAsync

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

GetEstimatedRateKLineAsync ([General] Query Estimated Funding Rate Kline Data)

func (*MarketClient) GetEstimatedSettlementPriceAsync

func (mc *MarketClient) GetEstimatedSettlementPriceAsync(data chan market.GetEstimatedSettlementPriceResponse, contractCode string, pair string, contractType string, businessType string)

GetEstimatedSettlementPriceAsync ([General]Get the estimated settlement price)

func (*MarketClient) GetFundingRateAsync

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

GetFundingRateAsync ([General] Query funding rate)

func (*MarketClient) GetHeartbeatAsync

func (mc *MarketClient) GetHeartbeatAsync(data chan market.GetHeartbeatResponse)

GetHeartbeatAsync (Query whether the system is available)

func (*MarketClient) GetHisFundingRateAsync

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

GetHisFundingRateAsync ([General] Query historical funding rate)

func (*MarketClient) GetHisOpenInterestAsync

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

GetHisOpenInterestAsync [General] Query information on open interest

func (*MarketClient) GetHisTradeAsync

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

GetHisTradeAsync [General] Query a Batch of Trade Records of a Contract

func (*MarketClient) GetIndexAsync

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

GetIndexAsync [General] Query Swap Index Price Information

func (*MarketClient) GetInsuranceFundAsync

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

GetInsuranceFundAsync [General] Query history records of insurance fund balance

func (*MarketClient) GetKLineAsync

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

GetKLineAsync ([General] Get KLine Data)

func (*MarketClient) GetLiquidationOrdersAsync

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

func (*MarketClient) GetMarkPriceKLineAsync

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

GetMarkPriceKLineAsync [General]Get Kline Data of Mark Price

func (*MarketClient) GetMergedAsync

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

GetMergedAsync [General] Get Market Data Overview

func (*MarketClient) GetOpenInterestAsync

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

GetOpenInterestAsync [General] Get Swap Open Interest Information

func (*MarketClient) GetPremiumIndexKLineAsync

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

GetPremiumIndexKLineAsync ([General] Query Premium Index Kline Data)

func (*MarketClient) GetPriceLimitAsync

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

GetPriceLimitAsync ([General] Query Swap Price Limitation)

func (*MarketClient) GetRiskInfoAsync

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

GetRiskInfoAsync [General]Get Market BBO Data

func (*MarketClient) GetSummaryAsync

func (mc *MarketClient) GetSummaryAsync(data chan market.GetSummaryResponse)

GetSummaryAsync (Get system status)

func (*MarketClient) GetSwapLiquidationOrdersAsync

func (mc *MarketClient) GetSwapLiquidationOrdersAsync(data chan market.GetSwapLiquidationOrdersResponse, contract string,
	pair string, tradeType string, startTime string, endTime string, direct string, fromId string)

GetSwapLiquidationOrdersAsync ([General] Query Liquidation Orders(New))

func (*MarketClient) GetSwapQueryElementsAsync

func (mc *MarketClient) GetSwapQueryElementsAsync(data chan market.GetSwapQueryElementsResponse, contractCode string)

GetSwapQueryElementsAsync (Contract Elements)

func (*MarketClient) GetSwapSettlementRecordsAsync

func (mc *MarketClient) GetSwapSettlementRecordsAsync(data chan market.GetSwapSettlementRecordsResponse, contractCode string,
	startTime string, endTime string, pageIndex string, pageSize string)

GetSwapSettlementRecordsAsync ([General] Query historical settlement records of the platform interface)

func (*MarketClient) GetTimestampAsync

func (mc *MarketClient) GetTimestampAsync(data chan market.GetTimestampResponse)

GetTimestampAsync (Get current system timestamp)

func (*MarketClient) GetTradeAsync

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

GetTradeAsync [General] Query The Last Trade of a Contract

func (*MarketClient) Init

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

func (*MarketClient) IsolatedGetAdjustFactorFundAsync

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

IsolatedGetAdjustFactorFundAsync [Isolated] Query information on Tiered Adjustment Factor

func (*MarketClient) IsolatedGetApiStateAsync

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

IsolatedGetApiStateAsync ([Isolated] Query information on system status)

func (*MarketClient) IsolatedGetLadderMarginAsync

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

IsolatedGetLadderMarginAsync [Isolated]Query information on Tiered Margin

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, offset string, direction string, pair string)

CrossCancelOrderAsync ([Cross] Cancel An Order) and ([Cross] Cancel All Orders)

func (*OrderClient) CrossGetHisMatchAsync

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

func (*OrderClient) CrossGetHisMatchExactAsync

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

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, sortBy string)

func (*OrderClient) CrossGetHisOrderExactAsync

func (oc *OrderClient) CrossGetHisOrderExactAsync(data chan responseorder.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 responseorder.GetOpenOrderResponse, contractCode string,
	pageIndex int, pageSize int, sortBy string, tradeType int)

CrossGetOpenOrderAsync ([Cross] Current unfilled order acquisition)

func (*OrderClient) CrossGetOrderDetailAsync

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

CrossGetOrderDetailAsync ([Cross] Get Detail Information of order)

func (*OrderClient) CrossGetOrderInfoAsync

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

CrossGetOrderInfoAsync ([Cross] Get Information of order)

func (*OrderClient) CrossLightningCloseAsync

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

CrossLightningCloseAsync ([Cross] Place Lightning Close Position)

func (*OrderClient) CrossPlaceBatchOrderAsync

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

CrossPlaceBatchOrderAsync ([Cross] Place A Batch Of Orders)

func (*OrderClient) CrossPlaceOrderAsync

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

CrossPlaceOrderAsync ([Cross] Place An Order)

func (*OrderClient) CrossSwitchLeverRateAsync

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

CrossSwitchLeverRateAsync ([Cross] Switch Leverage)

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, offset string, direction string)

IsolatedCancelOrderAsync ([Isolated] Cancel an Order) and ([Isolated] Cancel All Orders)

func (*OrderClient) IsolatedGetHisMatchAsync

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

func (*OrderClient) IsolatedGetHisMatchExactAsync

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

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, sortBy string)

func (*OrderClient) IsolatedGetHisOrderExactAsync

func (oc *OrderClient) IsolatedGetHisOrderExactAsync(data chan responseorder.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 responseorder.GetOpenOrderResponse, contractCode string,
	pageIndex int, pageSize int, sortBy string, tradeType int)

IsolatedGetOpenOrderAsync ([Isolated] Current unfilled order acquisition)

func (*OrderClient) IsolatedGetOrderDetailAsync

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

IsolatedGetOrderDetailAsync ([Isolated] Order details acquisition)

func (*OrderClient) IsolatedGetOrderInfoAsync

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

IsolatedGetOrderInfoAsync ([Isolated] Get Information of an Order)

func (*OrderClient) IsolatedLightningCloseAsync

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

IsolatedLightningCloseAsync ([Isolated] Place Lightning Close Order)

func (*OrderClient) IsolatedPlaceBatchOrderAsync

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

IsolatedPlaceBatchOrderAsync ([Isolated] Place a Batch of Orders)

func (*OrderClient) IsolatedPlaceOrderAsync

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

IsolatedPlaceOrderAsync ([Isolated] Place an Order)

func (*OrderClient) IsolatedSwitchLeverRateAsync

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

IsolatedSwitchLeverRateAsync ([Isolated] Switch Leverage)

func (*OrderClient) LinearCancelAfterAsync

func (oc *OrderClient) LinearCancelAfterAsync(data chan responseorder.LinearCancelAfterResponse, onOff string, timeOut string)

LinearCancelAfterAsync ([General] Automatic Order Cancellation)

func (*OrderClient) SwapCrossSwitchPositionModeAsync

func (oc *OrderClient) SwapCrossSwitchPositionModeAsync(data chan responseorder.SwapSwitchPositionModeResponse, marginAccount string, positionMode string)

SwapCrossSwitchPositionModeAsync ([Cross]Switch Position Mode)

func (*OrderClient) SwapHisordersAsync

func (oc *OrderClient) SwapHisordersAsync(data chan responseorder.SwapHisordersResponse, contract string, tradeType string, startTime string,
	endTime string, direct string, fromID string, orderType string, status string)

SwapHisordersAsync ([Isolated] Get History Orders(New))

func (*OrderClient) SwapSwitchPositionModeAsync

func (oc *OrderClient) SwapSwitchPositionModeAsync(data chan responseorder.SwapSwitchPositionModeResponse, marginAccount string, positionMode string)

SwapSwitchPositionModeAsync ([Isolated]Switch Position Mode)

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)

TransferAsync ([General] Transfer margin between Spot account and USDT Margined Contracts account)

type TriggerOrderClient

type TriggerOrderClient struct {
	PUrlBuilder *reqbuilder.PrivateUrlBuilder
}

func (*TriggerOrderClient) CrossCancelOrderAsync

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

CrossCancelOrderAsync ([Cross] Cancel Trigger Order) and ([Cross] Cancel All Trigger Orders)

func (*TriggerOrderClient) CrossGetHisOrderAsync

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

CrossGetHisOrderAsync ([Cross] Query Trigger Order History)

func (*TriggerOrderClient) CrossGetOpenOrderAsync

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

CrossGetOpenOrderAsync ([Cross] Query Trigger Order Open Orders)

func (*TriggerOrderClient) CrossGetRelationTpslOrderAsync

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

CrossGetRelationTpslOrderAsync ([Cross]Query Info Of Take-profit and Stop-loss Order That Related To Position Opening Order)

func (*TriggerOrderClient) CrossGetTpslHisOrderAsync

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

CrossGetTpslHisOrderAsync ([Cross]Query Take-profit and Stop-loss History Orders)

func (*TriggerOrderClient) CrossGetTpslOpenOrderAsync

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

CrossGetTpslOpenOrderAsync ([Cross]Query Open Take-profit and Stop-loss Orders)

func (*TriggerOrderClient) CrossPlaceOrderAsync

CrossPlaceOrderAsync ([Cross] Place Trigger Order)

func (*TriggerOrderClient) CrossTpslCancelAsync

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

CrossTpslCancelAsync ([Cross]Cancel a Take-profit and Stop-loss Order) and ([Cross]Cancel all Take-profit and Stop-loss Orders)

func (*TriggerOrderClient) CrossTpslOrderAsync

CrossTpslOrderAsync ([Cross]Set a Take-profit and Stop-loss Order for an Existing Position)

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, offset string, direction string)

IsolatedCancelOrderAsync ([Isolated] Cancel Trigger Order) and ([Isolated] Cancel All Trigger Orders)

func (*TriggerOrderClient) IsolatedGetHisOrderAsync

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

IsolatedGetHisOrderAsync ([Isolated] Query Trigger Order History)

func (*TriggerOrderClient) IsolatedGetOpenOrderAsync

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

IsolatedGetOpenOrderAsync ([Isolated] Query Trigger Order Open Orders)

func (*TriggerOrderClient) IsolatedGetRelationTpslOrderAsync

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

IsolatedGetRelationTpslOrderAsync ([Isolated]Query Info Of Take-profit and Stop-loss Order That Related To Position Opening Order)

func (*TriggerOrderClient) IsolatedGetTpslHisOrderAsync

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

IsolatedGetTpslHisOrderAsync ([Isolated]Query Take-profit and Stop-loss History Orders)

func (*TriggerOrderClient) IsolatedGetTpslOpenOrderAsync

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

IsolatedGetTpslOpenOrderAsync ([Isolated]Query Open Take-profit and Stop-loss Orders)

func (*TriggerOrderClient) IsolatedPlaceOrderAsync

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

IsolatedPlaceOrderAsync ([Isolated] Place Trigger Order)

func (*TriggerOrderClient) IsolatedTpslCancelAsync

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

IsolatedTpslCancelAsync ([Isolated]Cancel a Take-profit and Stop-loss Order) and ([Isolated]Cancel all Take-profit and Stop-loss Orders)

func (*TriggerOrderClient) IsolatedTpslOrderAsync

func (toc *TriggerOrderClient) IsolatedTpslOrderAsync(data chan responsetriggerorder.TpslOrderResponse, request requesttiggerorder.TpslOrderRequest)

IsolatedTpslOrderAsync ([Isolated]Set a Take-profit and Stop-loss Order for an Existing Position)

type UnifiedAccountClient

type UnifiedAccountClient struct {
	PUrlBuilder *reqbuilder.PrivateUrlBuilder
}

func (*UnifiedAccountClient) FixPositionMarginChangeAsync

func (uac *UnifiedAccountClient) FixPositionMarginChangeAsync(data chan unifiedaccount.FixPositionMarginChangeResponse,
	amount string, asset string, contractCode string, fcType string, direction string, clientOrderId string)

FixPositionMarginChangeAsync (Adjust margin for isolated positions)

func (*UnifiedAccountClient) FixPositionMarginChangeRecordAsync

func (uac *UnifiedAccountClient) FixPositionMarginChangeRecordAsync(data chan unifiedaccount.FixPositionMarginChangeRecordResponse,
	asset string, contractCode string, startTime string, endTime string, direct string, fromId string)

FixPositionMarginChangeRecordAsync (Query the margin adjustment records of isolated positions )

func (*UnifiedAccountClient) GetLinearSwapOverviewAccountInfoAsync

func (uac *UnifiedAccountClient) GetLinearSwapOverviewAccountInfoAsync(data chan unifiedaccount.GetLinearSwapOverviewAccountInfoResponse,
	tradePartition string)

GetLinearSwapOverviewAccountInfoAsync (Deductible asset inquiry )

func (*UnifiedAccountClient) GetUnifiedAccountInfoAsync

func (uac *UnifiedAccountClient) GetUnifiedAccountInfoAsync(data chan unifiedaccount.GetUnifiedAccountInfoResponse, contractCode string)

GetUnifiedAccountInfoAsync (Query unified account assets)

func (*UnifiedAccountClient) Init

func (uac *UnifiedAccountClient) Init(accessKey string, secretKey string, host string) *UnifiedAccountClient

func (*UnifiedAccountClient) LinearSwapFeeSwitchAsync

func (uac *UnifiedAccountClient) LinearSwapFeeSwitchAsync(data chan unifiedaccount.LinearSwapFeeSwitchResponse,
	feeOption string, deductionCurrency string)

LinearSwapFeeSwitchAsync (Deductible asset inquiry )

func (*UnifiedAccountClient) SwapSwitchAccountTypeAsync

func (uac *UnifiedAccountClient) SwapSwitchAccountTypeAsync(data chan unifiedaccount.SwapSwitchAccountTypeResponse,
	accountType string)

SwapSwitchAccountTypeAsync (Account Type Change)

func (*UnifiedAccountClient) SwapUnifiedAccountTypeAsync

func (uac *UnifiedAccountClient) SwapUnifiedAccountTypeAsync(data chan unifiedaccount.SwapUnifiedAccountTypeResponse)

SwapUnifiedAccountTypeAsync (Account type query)

Directories

Path Synopsis
request
response

Jump to

Keyboard shortcuts

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