Skip to content

Commit

Permalink
Release: v1.0.16-alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
amir-the-h committed Oct 2, 2021
1 parent 7579534 commit b48e024
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 38 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ Changelog
=========
All notable changes to this project will be documented in this file.

v1.0.16-alpha
------------

### Changed

- Fixed rest api request json tag issues

v1.0.15-alpha
------------

Expand Down
38 changes: 19 additions & 19 deletions requests/rest/account/account_requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,63 +9,63 @@ type (
GetPositions struct {
InstID []string `json:"instId,omitempty"`
PosID []string `json:"posId,omitempty"`
InstType okex.InstrumentType `json:"instType,omitempty,string"`
InstType okex.InstrumentType `json:"instType,omitempty"`
}
GetAccountAndPositionRisk struct {
InstType okex.InstrumentType `json:"instType,omitempty,string"`
InstType okex.InstrumentType `json:"instType,omitempty"`
}
GetBills struct {
Ccy string `json:"ccy,omitempty"`
After int64 `json:"after,omitempty,string"`
Before int64 `json:"before,omitempty,string"`
Limit int64 `json:"limit,omitempty,string"`
InstType okex.InstrumentType `json:"instType,omitempty,string"`
MgnMode okex.MarginMode `json:"mgnMode,omitempty,string"`
CtType okex.ContractType `json:"ctType,omitempty,string"`
Type okex.BillType `json:"type,omitempty,string"`
SubType okex.BillSubType `json:"subType,omitempty,string"`
InstType okex.InstrumentType `json:"instType,omitempty"`
MgnMode okex.MarginMode `json:"mgnMode,omitempty"`
CtType okex.ContractType `json:"ctType,omitempty"`
Type okex.BillType `json:"type,omitempty"`
SubType okex.BillSubType `json:"subType,omitempty"`
}
SetPositionMode struct {
PositionMode okex.PositionType `json:"positionMode,string"`
PositionMode okex.PositionType `json:"positionMode"`
}
SetLeverage struct {
Lever int64 `json:"lever,string"`
InstID string `json:"instId,omitempty"`
Ccy string `json:"ccy,omitempty"`
MgnMode okex.MarginMode `json:"mgnMode,string"`
PosSide okex.PositionSide `json:"posSide,omitempty,string"`
MgnMode okex.MarginMode `json:"mgnMode"`
PosSide okex.PositionSide `json:"posSide,omitempty"`
}
GetMaxBuySellAmount struct {
Ccy string `json:"ccy,omitempty"`
Px float64 `json:"px,string,omitempty"`
InstID []string `json:"instId"`
TdMode okex.TradeMode `json:"tdMode,string"`
TdMode okex.TradeMode `json:"tdMode"`
}
GetMaxAvailableTradeAmount struct {
Ccy string `json:"ccy,omitempty"`
InstID string `json:"instId"`
ReduceOnly bool `json:"reduceOnly,omitempty"`
TdMode okex.TradeMode `json:"tdMode,string"`
TdMode okex.TradeMode `json:"tdMode"`
}
IncreaseDecreaseMargin struct {
InstID string `json:"instId"`
Amt float64 `json:"amt,string"`
PosSide okex.PositionSide `json:"posSide,string"`
ActionType okex.CountAction `json:"actionType,string"`
PosSide okex.PositionSide `json:"posSide"`
ActionType okex.CountAction `json:"actionType"`
}
GetLeverage struct {
InstID []string `json:"instId"`
MgnMode okex.MarginMode `json:"mgnMode,string"`
MgnMode okex.MarginMode `json:"mgnMode"`
}
GetMaxLoan struct {
InstID string `json:"instId"`
MgnCcy string `json:"mgnCcy,omitempty"`
MgnMode okex.MarginMode `json:"mgnMode,string"`
MgnMode okex.MarginMode `json:"mgnMode"`
}
GetFeeRates struct {
InstID string `json:"instId,omitempty"`
Uly string `json:"uly,omitempty"`
Category okex.FeeCategory `json:"category,omitempty,string"`
Category okex.FeeCategory `json:"category,omitempty"`
InstType okex.InstrumentType `json:"instType"`
}
GetInterestAccrued struct {
Expand All @@ -74,9 +74,9 @@ type (
After int64 `json:"after,omitempty,string"`
Before int64 `json:"before,omitempty,string"`
Limit int64 `json:"limit,omitempty,string"`
MgnMode okex.MarginMode `json:"mgnMode,omitempty,string"`
MgnMode okex.MarginMode `json:"mgnMode,omitempty"`
}
SetGreeks struct {
GreeksType okex.GreekType `json:"greeksType,string"`
GreeksType okex.GreekType `json:"greeksType"`
}
)
10 changes: 5 additions & 5 deletions requests/rest/market/market_requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "github.com/amir-the-h/okex"
type (
GetTickers struct {
Uly string `json:"uly,omitempty"`
InstType okex.InstrumentType `json:"instType,string"`
InstType okex.InstrumentType `json:"instType"`
}
GetIndexTickers struct {
InstID string `json:"instId,omitempty"`
Expand All @@ -17,10 +17,10 @@ type (
}
GetCandlesticks struct {
InstID string `json:"instId"`
After int64 `json:"after,omitempty,string"`
Before int64 `json:"before,omitempty,string"`
Limit int64 `json:"limit,omitempty,string"`
Bar okex.BarSize `json:"bar,omitempty,string"`
After int64 `json:"after,omitempty"`
Before int64 `json:"before,omitempty"`
Limit int64 `json:"limit,omitempty"`
Bar okex.BarSize `json:"bar,omitempty"`
}
GetTrades struct {
InstID string `json:"instId"`
Expand Down
22 changes: 11 additions & 11 deletions requests/rest/public/public_requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ type (
GetInstruments struct {
Uly string `json:"uly,omitempty"`
InstID string `json:"instId,omitempty"`
InstType okex.InstrumentType `json:"instType,string"`
InstType okex.InstrumentType `json:"instType"`
}
GetDeliveryExerciseHistory struct {
Uly string `json:"uly"`
After int64 `json:"after,omitempty,string"`
Before int64 `json:"before,omitempty,string"`
Limit int64 `json:"limit,omitempty,string"`
InstType okex.InstrumentType `json:"instType,string"`
InstType okex.InstrumentType `json:"instType"`
}
GetOpenInterest struct {
Uly string `json:"uly,omitempty"`
InstID string `json:"instId,omitempty"`
InstType okex.InstrumentType `json:"instType,string"`
InstType okex.InstrumentType `json:"instType"`
}
GetFundingRate struct {
InstID string `json:"instId"`
Expand Down Expand Up @@ -46,25 +46,25 @@ type (
After int64 `json:"after,omitempty,string"`
Before int64 `json:"before,omitempty,string"`
Limit int64 `json:"limit,omitempty,string"`
InstType okex.InstrumentType `json:"instType,string"`
MgnMode okex.MarginMode `json:"mgnMode,string,omitempty"`
Alias okex.AliasType `json:"alias,string,omitempty"`
State okex.OrderState `json:"state,string,omitempty"`
InstType okex.InstrumentType `json:"instType"`
MgnMode okex.MarginMode `json:"mgnMode,omitempty"`
Alias okex.AliasType `json:"alias,omitempty"`
State okex.OrderState `json:"state,omitempty"`
}
GetMarkPrice struct {
InstID string `json:"instId,omitempty"`
Uly string `json:"uly,omitempty"`
InstType okex.InstrumentType `json:"instType,string"`
InstType okex.InstrumentType `json:"instType"`
}
GetPositionTiers struct {
InstID string `json:"instId,omitempty"`
Uly string `json:"uly,omitempty"`
InstType okex.InstrumentType `json:"instType,string"`
TdMode okex.TradeMode `json:"tdMode,string"`
InstType okex.InstrumentType `json:"instType"`
TdMode okex.TradeMode `json:"tdMode"`
Tier okex.JSONInt64 `json:"tier,omitempty"`
}
GetUnderlying struct {
InstType okex.InstrumentType `json:"instType,string"`
InstType okex.InstrumentType `json:"instType"`
}
Status struct {
State string `json:"state,omitempty"`
Expand Down
4 changes: 2 additions & 2 deletions requests/rest/subaccount/subaccount_requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type (
Label string `json:"label"`
Passphrase string `json:"Passphrase"`
IP []string `json:"ip,omitempty"`
Perm okex.APIKeyAccess `json:"perm,string,omitempty"`
Perm okex.APIKeyAccess `json:"perm,omitempty"`
}
QueryAPIKey struct {
APIKey string `json:"apiKey"`
Expand All @@ -36,7 +36,7 @@ type (
After int64 `json:"after,omitempty,string"`
Before int64 `json:"before,omitempty,string"`
Limit int64 `json:"limit,omitempty,string"`
Type okex.TransferType `json:"type,string,omitempty"`
Type okex.TransferType `json:"type,omitempty"`
}
ManageTransfers struct {
Ccy string `json:"ccy"`
Expand Down
2 changes: 1 addition & 1 deletion requests/rest/trade/trade_requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type (
ReqID string `json:"reqId,omitempty"`
NewSz float64 `json:"newSz,omitempty,string"`
NewPx float64 `json:"newPx,omitempty,string"`
CxlOnFail bool `json:"cxlOnFail,string,omitempty"`
CxlOnFail bool `json:"cxlOnFail,omitempty"`
}
ClosePosition struct {
InstID string `json:"instId"`
Expand Down

0 comments on commit b48e024

Please sign in to comment.