gateio/kucoin: assortment of fixes (#1404)

* gateio: fix unmarshal bug and update fields

* gateio: fix wrapper function function, add helper methods

* update order types and add kucoin wrapper fix

* currency pairs

* Add tests

* gateio; inspect error and continue for no funds in account, kucoin: fetch all settlement amounts

* futures: order fixit

* finish off gateio updates for market orders

* cute line

* Update exchanges/kucoin/kucoin_wrapper.go

Co-authored-by: Scott <gloriousCode@users.noreply.github.com>

* Update exchanges/kucoin/kucoin_wrapper.go

Co-authored-by: Scott <gloriousCode@users.noreply.github.com>

* Update exchanges/gateio/gateio.go

Co-authored-by: Scott <gloriousCode@users.noreply.github.com>

* Update exchanges/gateio/gateio_wrapper.go

Co-authored-by: Scott <gloriousCode@users.noreply.github.com>

* Update exchanges/gateio/gateio_wrapper.go

Co-authored-by: Scott <gloriousCode@users.noreply.github.com>

* glorious: nits

* glorious: nits - filter by pair match and fix bug where the endpoint returns details instead of message

* Add fix for leverage check (non-merge) my ip has been blocked from gateio still... scammmmmmmm

* glorious: nitters

* Update exchanges/gateio/gateio_test.go

Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>

* Update exchanges/gateio/gateio_test.go

Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>

* Update exchanges/gateio/gateio_test.go

Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
This commit is contained in:
Ryan O'Hara-Reid
2024-03-06 13:06:13 +11:00
committed by GitHub
parent 64dbfd6e4f
commit 6ccb0e0c2f
11 changed files with 558 additions and 245 deletions

View File

@@ -101,17 +101,18 @@ type SubmitResponse struct {
Pair currency.Pair
AssetType asset.Item
ImmediateOrCancel bool
FillOrKill bool
PostOnly bool
ReduceOnly bool
Leverage float64
Price float64
Amount float64
QuoteAmount float64
TriggerPrice float64
ClientID string
ClientOrderID string
ImmediateOrCancel bool
FillOrKill bool
PostOnly bool
ReduceOnly bool
Leverage float64
Price float64
AverageExecutedPrice float64
Amount float64
QuoteAmount float64
TriggerPrice float64
ClientID string
ClientOrderID string
LastUpdated time.Time
Date time.Time
@@ -222,6 +223,7 @@ type Detail struct {
Pair currency.Pair
MarginType margin.Type
Trades []TradeHistory
SettlementCurrency currency.Code
}
// Filter contains all properties an order can be filtered for