model

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountAssetsRes

type AccountAssetsRes struct {
	Data []struct {
		configuration.Symbol `json:"symbol"`
		Amount               decimal.Decimal `json:"amount"`
		Available            decimal.Decimal `json:"available"`
		ConversionRate       decimal.Decimal `json:"conversionRate"`
	} `json:"data"`
	model.ResponseCommon
}

AccountAssetsRes ...

type AccountMarginRes

type AccountMarginRes struct {
	Data struct {
		ProfitLoss       decimal.Decimal `json:"profitLoss"`
		ActualProfitLoss decimal.Decimal `json:"actualProfitLoss"`
		Margin           decimal.Decimal `json:"margin"`
		AvailableAmount  decimal.Decimal `json:"availableAmount"`
	} `json:"data"`
	model.ResponseCommon
}

AccountMarginRes ...

type AccountTradingVolumeRes added in v1.9.0

type AccountTradingVolumeRes struct {
	model.ResponseCommon
	Data struct {
		JpyVolume decimal.Decimal         `json:"jpyVolume"`
		TierLevel configuration.TierLevel `json:"tierLevel"`
		Limit     []struct {
			configuration.Symbol `json:"symbol"`
			TodayLimitOpenSize   decimal.Decimal `json:"todayLimitOpenSize"`
			TakerFee             decimal.Decimal `json:"takerFee"`
			MakerFee             decimal.Decimal `json:"makerFee"`
		} `json:"limit"`
	}
}

type ActiveOrdersRes

type ActiveOrdersRes struct {
	model.ResponseCommon
	Data struct {
		model.Pagination `json:"pagination"`
		List             []struct {
			RootOrderID   int64                       `json:"rootOrderId"`
			OrderID       int64                       `json:"orderId"`
			Symbol        configuration.Symbol        `json:"symbol"`
			Side          configuration.Side          `json:"side"`
			OrderType     configuration.OrderType     `json:"orderType"`
			ExecutionType configuration.ExecutionType `json:"executionType"`
			SettleType    configuration.SettleType    `json:"settleType"`
			Size          decimal.Decimal             `json:"size"`
			ExecutedSize  decimal.Decimal             `json:"executedSize"`
			Price         decimal.Decimal             `json:"price"`
			LossCutPrice  decimal.Decimal             `json:"losscutPrice"`
			Status        configuration.OrderStatus   `json:"status"`
			TimeInForce   configuration.TimeInForce   `json:"timeInForce"`
			Timestamp     time.Time                   `json:"timestamp"`
		} `json:"list"`
	}
}

ActiveOrdersRes ...

type CancelOrderReq

type CancelOrderReq struct {
	OrderID int64 `json:"orderId"`
}

CancelOrderReq ...

type CancelOrderRes

type CancelOrderRes struct {
	model.ResponseCommon
}

CancelOrderRes ...

type ChangeLosscutPriceReq

type ChangeLosscutPriceReq struct {
	PositionID   int64           `json:"positionId"`
	LosscutPrice decimal.Decimal `json:"losscutPrice"`
}

ChangeLosscutPriceReq ...

type ChangeLosscutPriceRes

type ChangeLosscutPriceRes struct {
	model.ResponseCommon
}

ChangeLosscutPriceRes ...

type ChangeOrderReq

type ChangeOrderReq struct {
	OrderID      int64            `json:"orderId"`
	Price        decimal.Decimal  `json:"price"`
	LossCutPrice *decimal.Decimal `json:"losscutPrice,omitempty"`
}

ChangeOrderReq ...

type ChangeOrderRes

type ChangeOrderRes struct {
	model.ResponseCommon
}

ChangeOrderRes ...

type CloseBulkOrderReq

type CloseBulkOrderReq struct {
	Symbol        configuration.Symbol        `json:"symbol"`
	Side          configuration.Side          `json:"side"`
	ExecutionType configuration.ExecutionType `json:"executionType"`
	Price         *decimal.Decimal            `json:"price,omitempty"`
	Size          decimal.Decimal             `json:"size"`
}

CloseBulkOrderReq...

type CloseBulkOrderRes

type CloseBulkOrderRes struct {
	model.ResponseCommon
	Data int64 `json:"data,string"`
}

CloseBulkOrderRes ...

type CloseOrderReq

type CloseOrderReq struct {
	Symbol         configuration.Symbol        `json:"symbol"`
	Side           configuration.Side          `json:"side"`
	ExecutionType  configuration.ExecutionType `json:"executionType"`
	Price          *decimal.Decimal            `json:"price,omitempty"`
	SettlePosition []SettlePosition            `json:"settlePosition"`
}

CloseOrderReq ...

type CloseOrderRes

type CloseOrderRes struct {
	model.ResponseCommon
	Data int64 `json:"data,string"`
}

CloseOrderRes ...

type ExecutionsRes

type ExecutionsRes struct {
	Data struct {
		List []struct {
			ExecutionID              int64 `json:"executionId"`
			OrderID                  int64 `json:"orderId"`
			configuration.Symbol     `json:"symbol"`
			configuration.Side       `json:"side"`
			configuration.SettleType `json:"settleType"`
			Size                     decimal.Decimal `json:"size"`
			Price                    decimal.Decimal `json:"price"`
			LossGain                 decimal.Decimal `json:"lossGain"`
			Fee                      decimal.Decimal `json:"fee"`
			Timestamp                time.Time       `json:"timestamp"`
		} `json:"list"`
	} `json:"data"`
	model.ResponseCommon
}

ExecutionsRes ...

type LastExecutionsRes

type LastExecutionsRes struct {
	Data struct {
		List []struct {
			ExecutionID              int64 `json:"executionId"`
			OrderID                  int64 `json:"orderId"`
			configuration.Symbol     `json:"symbol"`
			configuration.Side       `json:"side"`
			configuration.SettleType `json:"settleType"`
			Size                     decimal.Decimal `json:"size"`
			Price                    decimal.Decimal `json:"price"`
			LossGain                 decimal.Decimal `json:"lossGain"`
			Fee                      decimal.Decimal `json:"fee"`
			Timestamp                time.Time       `json:"timestamp"`
		} `json:"list"`
		model.Pagination `json:"pagination"`
	} `json:"data"`
	model.ResponseCommon
}

LastExecutionsRes ...

type OpenPositionRes

type OpenPositionRes struct {
	model.ResponseCommon
	Data struct {
		model.Pagination `json:"pagination"`
		List             []struct {
			PositionID   int64                `json:"positionId"`
			Symbol       configuration.Symbol `json:"symbol"`
			Side         configuration.Side   `json:"side"`
			Size         decimal.Decimal      `json:"size"`
			OrderdSize   decimal.Decimal      `json:"orderdSize"`
			Price        decimal.Decimal      `json:"price"`
			LossGain     decimal.Decimal      `json:"lossGain"`
			Leverage     decimal.Decimal      `json:"leverage"`
			LosscutPrice decimal.Decimal      `json:"losscutPrice"`
			Timestamp    time.Time            `json:"timestamp"`
		} `json:"list"`
	}
}

OpenPositionRes ...

type OrderReq

type OrderReq struct {
	Symbol        configuration.Symbol        `json:"symbol"`
	Side          configuration.Side          `json:"side"`
	ExecutionType configuration.ExecutionType `json:"executionType"`
	Price         *decimal.Decimal            `json:"price,omitempty"`
	LossCutPrice  *decimal.Decimal            `json:"losscutPrice,omitempty"`
	Size          decimal.Decimal             `json:"size"`
}

OrderReq ...

type OrderRes

type OrderRes struct {
	model.ResponseCommon
	Data int64 `json:"data,string"`
}

OrderRes ...

type OrdersRes

type OrdersRes struct {
	Data struct {
		List []struct {
			RootOrderID                 int64 `json:"rootOrderId"`
			OrderID                     int64 `json:"orderId"`
			configuration.Symbol        `json:"symbol"`
			configuration.Side          `json:"side"`
			configuration.OrderType     `json:"orderType"`
			configuration.ExecutionType `json:"executionType"`
			configuration.SettleType    `json:"settleType"`
			Size                        decimal.Decimal           `json:"size"`
			ExecutedSize                decimal.Decimal           `json:"executedSize"`
			Price                       decimal.Decimal           `json:"price"`
			LossCutPrice                decimal.Decimal           `json:"losscutPrice"`
			Status                      configuration.OrderStatus `json:"status"`
			configuration.CancelType    `json:"cancelType"`
			configuration.TimeInForce   `json:"timeInForce"`
			Timestamp                   time.Time `json:"timestamp"`
		} `json:"list"`
	} `json:"data"`
	model.ResponseCommon
}

OrdersRes ...

type PositionSummaryRes

type PositionSummaryRes struct {
	Data struct {
		List []struct {
			configuration.Symbol `json:"symbol"`
			configuration.Side   `json:"side"`
			SumPositionQuantity  decimal.Decimal `json:"sumPositionQuantity"`
			SumOrderQuantity     decimal.Decimal `json:"sumOrderQuantity"`
			AveragePositionRate  decimal.Decimal `json:"averagePositionRate"`
			PositionLossGain     decimal.Decimal `json:"positionLossGain"`
		} `json:"list"`
	} `json:"data"`
	model.ResponseCommon
}

PositionSummaryRes ...

type SettlePosition

type SettlePosition struct {
	PositionID int64           `json:"positionId"`
	Size       decimal.Decimal `json:"size"`
}

SettlePosition ...

Jump to

Keyboard shortcuts

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