From 01f09eac05faa19dd3bb2a57b85420c8dff588c9 Mon Sep 17 00:00:00 2001 From: Amir Date: Mon, 27 Mar 2023 15:20:32 +0300 Subject: [PATCH] Release: v1.1.1-alpha --- CHANGELOG.md | 8 ++++++++ README.md | 2 +- definitions.go | 8 ++++---- models/funding/funding_models.go | 2 +- models/trade/trade_models.go | 14 +++++++------- 5 files changed, 21 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ece8a6..29dea9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ Changelog ========= All notable changes to this project will be documented in this file. +v1.1.1-alpha +------------- + +### Changed + +- Fixed all float64 that were mapped to int64 +- Changed destination constants values to start from iota + v1.1.0-alpha ------------- diff --git a/README.md b/README.md index 61efd66..c8b17b3 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Installation ----------------- ```bash -go get github.com/amir-the-h/okex@v1.1.0-alpha +go get github.com/amir-the-h/okex@v1.1.1-alpha ``` Usage diff --git a/definitions.go b/definitions.go index d8e3b2a..cb5b721 100644 --- a/definitions.go +++ b/definitions.go @@ -58,6 +58,10 @@ type ( ) const ( + NormalServer Destination = iota + AwsServer + DemoServer + RestURL = BaseURL("https://www.okx.com") PublicWsURL = BaseURL("wss://ws.okx.com:8443/ws/v5/public") PrivateWsURL = BaseURL("wss://ws.okx.com:8443/ws/v5/private") @@ -70,10 +74,6 @@ const ( DemoPublicWsURL = BaseURL("wss://wspap.okx.com:8443/ws/v5/public?brokerId=9999") DemoPrivateWsURL = BaseURL("wss://wspap.okx.com:8443/ws/v5/private?brokerId=9999") - NormalServer = Destination(iota + 1) - AwsServer = NormalServer + 1 - DemoServer = AwsServer + 1 - SpotInstrument = InstrumentType("SPOT") MarginInstrument = InstrumentType("MARGIN") SwapInstrument = InstrumentType("SWAP") diff --git a/models/funding/funding_models.go b/models/funding/funding_models.go index 21b1407..6ffb7ed 100644 --- a/models/funding/funding_models.go +++ b/models/funding/funding_models.go @@ -74,7 +74,7 @@ type ( PmtID string `json:"pmtId,omitempty"` Memo string `json:"memo,omitempty"` Amt okex.JSONFloat64 `json:"amt"` - Fee okex.JSONInt64 `json:"fee"` + Fee okex.JSONFloat64 `json:"fee"` WdID okex.JSONInt64 `json:"wdId"` State okex.WithdrawalState `json:"state,string"` TS okex.JSONTime `json:"ts"` diff --git a/models/trade/trade_models.go b/models/trade/trade_models.go index 7814e04..7a22959 100644 --- a/models/trade/trade_models.go +++ b/models/trade/trade_models.go @@ -40,11 +40,11 @@ type ( FeeCcy string `json:"feeCcy"` RebateCcy string `json:"rebateCcy"` Px okex.JSONFloat64 `json:"px"` - Sz okex.JSONInt64 `json:"sz"` + Sz okex.JSONFloat64 `json:"sz"` Pnl okex.JSONFloat64 `json:"pnl"` - AccFillSz okex.JSONInt64 `json:"accFillSz"` + AccFillSz okex.JSONFloat64 `json:"accFillSz"` FillPx okex.JSONFloat64 `json:"fillPx"` - FillSz okex.JSONInt64 `json:"fillSz"` + FillSz okex.JSONFloat64 `json:"fillSz"` FillTime okex.JSONFloat64 `json:"fillTime"` AvgPx okex.JSONFloat64 `json:"avgPx"` Lever okex.JSONFloat64 `json:"lever"` @@ -107,14 +107,14 @@ type ( PxVar okex.JSONFloat64 `json:"pxVar"` PxSpread okex.JSONFloat64 `json:"pxSpread"` PxLimit okex.JSONFloat64 `json:"pxLimit"` - Sz okex.JSONInt64 `json:"sz"` - SzLimit okex.JSONInt64 `json:"szLimit"` + Sz okex.JSONFloat64 `json:"sz"` + SzLimit okex.JSONFloat64 `json:"szLimit"` ActualSz okex.JSONFloat64 `json:"actualSz"` ActualPx okex.JSONFloat64 `json:"actualPx"` Pnl okex.JSONFloat64 `json:"pnl"` - AccFillSz okex.JSONInt64 `json:"accFillSz"` + AccFillSz okex.JSONFloat64 `json:"accFillSz"` FillPx okex.JSONFloat64 `json:"fillPx"` - FillSz okex.JSONInt64 `json:"fillSz"` + FillSz okex.JSONFloat64 `json:"fillSz"` FillTime okex.JSONFloat64 `json:"fillTime"` AvgPx okex.JSONFloat64 `json:"avgPx"` Lever okex.JSONFloat64 `json:"lever"`