Commit Graph

2211 Commits

Author SHA1 Message Date
Gareth Kirwan
ade3ac5c59 Config: OrderManager upgrade (#1737)
* Config: Allow missing Versions

This allows easier development of non-stacked version upgrades.
Though the PRs still need to be merged sequentially, or renumbered right
before merging

* Config: Move OrderManager upgrade to Version management
2025-03-19 16:11:28 +11:00
Adrian Gallagher
f5faca2eb2 linter: Enable gofumpt and run against codebase (#1848)
* linter: Enable gofumpt and run against codebase

* Address shazbert's nits

* gofumpt: Fix issues after rebase
2025-03-18 10:23:16 +11:00
Gareth Kirwan
748ed71455 Huobi: Fix TestPairFromContractExpiryCode NW contract failure (#1809)
Looks like "Within 2 weeks" fails on 22nd November during leap years.
On 2025-02-21 we saw NW come up with 2025-03-07 for a few hours,
and I'm guessing it's because they use local time.
Added 1 day leeway to account for that timezone difference.
2025-03-18 09:45:24 +11:00
Gareth Kirwan
16d2d9f35a Config: AssetEnabled upgrade (#1735)
* Config: Move assetEnabled upgrade to Version management

* Assets: Do not error on asset not enabled, or disabled

This became more messy with Disabling something that's defaulted to
disabled.
Taking an idealogical stance against erroring that what you want to have
done is already done.

* CurrencyManager: Set AssetEnabled when StorePairs(enabled)

* RPCServer: Fix tests expecting StoreAssetPairFormat to enable the asset

Also assertifies

* Bitfinex: Fix tests for MarginFunding subs

* GCTWrapper: Improve TestMain clarity

* BTSE: Add futures to testconfig

* Exchanges: Rename StoreAssetPairStore

Previously we were calling it "Format", but accepting everything from
the PairStore.
We were also defaulting to turning the Asset on.

Now callers need to get their AssetEnabled set as they want it, so
there's no magic

This change also moves responsibility for error wrapping outside to the
caller.

* Config: AssetEnabled upgrade should respect assetTypes

Previously we ignored the field and just turned on everything.
I think that was because we couldn't get at the old value.
In either case, we have the option to do better, and respect the
assetEnabled value

* Config: Improve exchange config version upgrade error messages
2025-03-17 21:47:37 +11:00
dependabot[bot]
2a11c94dc4 build(deps): Bump github.com/spf13/viper from 1.19.0 to 1.20.0 (#1849)
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.19.0 to 1.20.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.19.0...v1.20.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/viper
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-17 21:35:58 +11:00
Bea
3d212b6279 Okx: Fix sending trades to the websocket DataHandler (#1833)
* Send trades down the DataHandler, add test

* Send the trades down to the DataHandler

Update the test to process trades for each asset type
Add raw trade data from OKX
Update the timestamp in the method

* Replace pair repetition with p var

* Update the test, remove repetition

* Rename trade var in the test

* Fix nits and slice sorting

* Compare trades

* Fix nits
2025-03-17 10:07:28 +11:00
Jun
e544e99c48 binance: use types.Time instead of time.Time (#1828)
* binance: use types.Time instead of time.Time

Signed-off-by: Ye Sijun <junnplus@gmail.com>

* binance: remove type_convert.go

Signed-off-by: Ye Sijun <junnplus@gmail.com>

---------

Signed-off-by: Ye Sijun <junnplus@gmail.com>
2025-03-13 13:59:26 +11:00
Jun
4474278053 exchanges/account: add UpdatedAt field to Balance and ProtectedBalance (#1827)
* add updatedAt for account balance

Signed-off-by: Ye Sijun <junnplus@gmail.com>

* add nil pointer test for load

Signed-off-by: Ye Sijun <junnplus@gmail.com>

* account: set default updatedAt to balance for Update

Signed-off-by: Ye Sijun <junnplus@gmail.com>

* engine: add UpdatedAt for account info

Signed-off-by: Ye Sijun <junnplus@gmail.com>

* account: force updatedAt for load balance

Signed-off-by: Ye Sijun <junnplus@gmail.com>

* minor change for test

Signed-off-by: Ye Sijun <junnplus@gmail.com>

---------

Signed-off-by: Ye Sijun <junnplus@gmail.com>
2025-03-13 13:57:14 +11:00
yuhangcangqian
138419e7a8 refactor: use t.TempDir() instead of os.MkdirTemp (#1832)
Signed-off-by: yuhangcangqian <cuibuwei@qq.com>
2025-03-13 10:21:56 +11:00
Jun
5c21e974ee okx: Move WsResponseMultiplexer to SetDefaults (#1829)
Signed-off-by: Ye Sijun <junnplus@gmail.com>
2025-03-11 13:37:17 +11:00
dependabot[bot]
568ed3021e build(deps): Bump google.golang.org/grpc from 1.70.0 to 1.71.0 (#1837)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.70.0 to 1.71.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.70.0...v1.71.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-11 11:52:38 +11:00
dependabot[bot]
0b3adadefc build(deps): Bump github.com/grpc-ecosystem/grpc-gateway/v2 (#1840)
Bumps [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway) from 2.26.1 to 2.26.3.
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.26.1...v2.26.3)

---
updated-dependencies:
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-11 11:04:58 +11:00
dependabot[bot]
b396ff5f71 build(deps): Bump golang.org/x/time from 0.10.0 to 0.11.0 (#1843)
Bumps [golang.org/x/time](https://github.com/golang/time) from 0.10.0 to 0.11.0.
- [Commits](https://github.com/golang/time/compare/v0.10.0...v0.11.0)

---
updated-dependencies:
- dependency-name: golang.org/x/time
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-11 10:27:38 +11:00
Bea
72a94a4b6c Huobi: Fix sending trades to the websocket DataHandler (#1817)
* Send trades down the DataHandler

* Send individual trades down the DataHandler

Update the test to send the multiple trades
Remove the ID setting to 0 in the test
Iterate through the trades to send them down individually
Rename the test to match the method

* Fix the timestamp conversion

* Fix the wording

* Update the expected data format

* Update the test name and description

* Fix error case
2025-03-11 10:21:28 +11:00
dependabot[bot]
8c29dd9f28 build(deps): Bump github.com/urfave/cli/v2 from 2.27.5 to 2.27.6 (#1839)
Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.27.5 to 2.27.6.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/urfave/cli/compare/v2.27.5...v2.27.6)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-10 16:36:50 +11:00
Adrian Gallagher
d64d56f77c build/ci: Update Go to v1.24, golangci-lint to v1.64.6 and fix issues (#1804)
* build/ci: Update Go to v1.24, golangci-lint to v1.64.5 and fix issues

* Address shazbert's nitters

* linter/config: Fix new linter issue and use versionSize const

* Address gk's nitters and fix additional linter issue after rebase

* Address glorious nits

* staticcheck: Fix additional linter issues after upgrading to Go 1.24.1 and golangci-lint v1.64.6

Also addresses nits

* Improve testing, assertify usage and use common.ErrParsingWSField

* TestCreateNewStrategy: Replace must > should wording
2025-03-10 16:33:55 +11:00
dependabot[bot]
c086e281cf build(deps): Bump github.com/bytedance/sonic from 1.12.9 to 1.13.1 (#1838)
Bumps [github.com/bytedance/sonic](https://github.com/bytedance/sonic) from 1.12.9 to 1.13.1.
- [Release notes](https://github.com/bytedance/sonic/releases)
- [Commits](https://github.com/bytedance/sonic/compare/v1.12.9...v1.13.1)

---
updated-dependencies:
- dependency-name: github.com/bytedance/sonic
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-10 14:58:24 +11:00
dependabot[bot]
870206dde3 build(deps): Bump golang.org/x/net from 0.35.0 to 0.37.0 (#1842)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.35.0 to 0.37.0.
- [Commits](https://github.com/golang/net/compare/v0.35.0...v0.37.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-10 14:41:46 +11:00
Scott
6ee26a7da1 exchanges/margin: Fix marshalling issue (#1812)
* Fixes issue with marshalling margin types

* Update exchanges/order/order_test.go

Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com>

* Update exchanges/margin/margin.go

Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com>

* Update exchanges/order/order_test.go

Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com>

* Update test name

---------

Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com>
2025-03-06 15:17:05 +11:00
Jun
7a6d6cc002 trade: remove exchangeName for AddTradesToBuffer (#1820)
Signed-off-by: Ye Sijun <junnplus@gmail.com>
2025-03-06 12:50:03 +11:00
Gareth Kirwan
9fcaa9130b Config: Tighten config version handling as uint16 (#1825)
* Config: Tighten config version handling as uint16

This constrains the versions to uint16 and improves error handling.
LatestVersion becomes literally that.
Fixes handling for negative or overflowing versions in config

* Config: Rename LatestVersion to UseLatestVersion
2025-03-06 12:12:57 +11:00
Gareth Kirwan
d069ff2bf4 Subscriptions: Fix no enabled pairs for one asset (#1792)
If one asset is enabled but has no enabled pairs, we should ignore that
asset, even for non-pair related subscriptions.
That matches the existing code, but wasn't happening in the context of
asset.All subscriptions with just one asset in this state.
If a user wanted to have non-pair subscriptions, they should use
asset.Empty. Would expect other breakages with no pairs enabled, too.

Note: No enabled pairs for an enabled asset is a transient issue which
can occur due to enableOnePair racing against no available pairs. The
second run, available pairs would be populated and enableOnePair would
work. This situation could persist due to running with --dry or
containerised, though.

Fixes:
`
Okx websocket: subscription failure, myOrders all : subscription template did not generate the expected number of pair records for spread: Got 1;
Expected 0
`

Relates to #1420
2025-03-06 12:08:08 +11:00
cangqiaoyuzhuo
0796e44063 Poloniex: Fix GetChartData error return value (#1819)
Signed-off-by: cangqiaoyuzhuo <850072022@qq.com>
2025-03-06 11:20:56 +11:00
Jun
8f63b0b07c bybit: support categorised channel (#1823)
* bybit: support categorised channel

Signed-off-by: Ye Sijun <junnplus@gmail.com>

* remove comment for private func

Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com>

---------

Signed-off-by: Ye Sijun <junnplus@gmail.com>
Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com>
2025-03-06 11:15:22 +11:00
Bea
7fa2592e31 Kraken: Fix sending trades to the websocket DataHandler (#1813)
* Send trades down the DataHandler

When the tradeFeed is enabled, send the trades down the DataHandler
Add TestWSProcessTrades

* Update assertions

* Add check against null references in slices

* Add an error for ws parsing field to common

* Update kraken websocket ProcessTrades

Send individual trades down the DataHandler
Send multiple trades in test
Test error if the trade length is too short
Nits

* Fix nits
2025-03-04 17:06:07 +11:00
dependabot[bot]
3d2455b5fb build(deps): Bump golang.org/x/crypto from 0.34.0 to 0.35.0 (#1821)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.34.0 to 0.35.0.
- [Commits](https://github.com/golang/crypto/compare/v0.34.0...v0.35.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-03 17:19:11 +11:00
dependabot[bot]
e632939836 build(deps): Bump github.com/bytedance/sonic from 1.12.7 to 1.12.9 (#1815)
Bumps [github.com/bytedance/sonic](https://github.com/bytedance/sonic) from 1.12.7 to 1.12.9.
- [Release notes](https://github.com/bytedance/sonic/releases)
- [Commits](https://github.com/bytedance/sonic/compare/v1.12.7...v1.12.9)

---
updated-dependencies:
- dependency-name: github.com/bytedance/sonic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-24 17:03:22 +11:00
dependabot[bot]
17e26b532f build(deps): Bump golang.org/x/crypto from 0.33.0 to 0.34.0 (#1814)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.33.0 to 0.34.0.
- [Commits](https://github.com/golang/crypto/compare/v0.33.0...v0.34.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-24 17:01:38 +11:00
Ryan O'Hara-Reid
3a80cd2871 stream: force subscription store check as stop gap for wrapper side implementation (#1717)
* Add check for subscription store insertion and validation with tests

* bybit: fix subscriptions

* deribit: fix subscriptions

* linter: fix

* glorious/nits: add test for updateChannelSubscriptions RM GetChannelDifference method as its only used locally and Diff method can be accessed directly

* glorious/nits: add to store in the loop; add correct formatting to template for edge case perps with settlement

* spelling: fix

* glorious/nit: silly billy

* gk: nits

* gk/nits: split PartitionByPresence into Contained and Missing

* gk/nits: formatPerpetualPairWithSettlement -> formatChannelPair

* stream/websocket: stop full websocket disconnect on Connect when encountering subscription specific error paths

* stream/websocket: rm nil assignment

* glorious: nits

* gk: niterinos

* Update exchanges/stream/websocket_test.go

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

* Update exchanges/stream/websocket_test.go

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

* Update exchanges/stream/websocket_test.go

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

* thrasher: nits

---------

Co-authored-by: shazbert <ryan.oharareid@thrasher.io>
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
2025-02-24 15:25:49 +11:00
Adrian Gallagher
ef0f398455 exchanges/btse: Handle TRUMPSOL in MarketPair.Pair and add test coverage (#1808)
* exchanges/btse: Handle TRUMPSOL in MarketPair.Pair and add test coverage

* BTSE: Update test table

* nits: Make slight adjustments to test table
2025-02-24 14:26:11 +11:00
Adrian Gallagher
744ee7c099 CI, sonic: Replace backend-arm64 docker build with native GHA runner, disable sonic for arm64 (#1794)
* CI: Replace docker amd64 with native runner, switch Docker test arch to amd64

* tests: Remove spaces and new lines from test JSON timestamp fields

* builds: Disable sonic for arm64 due to OKX unmarshal issue

* nits: Improve Dockerfile comment and fix build tag
2025-02-24 12:38:12 +11:00
Ryan O'Hara-Reid
636adb8822 orderbook: Add methods for extracting associated details from depth (#1783)
* orderbook: return identification details from depth

* Add methods, drop error as you cannot deploy without it anyway, add tests

* Update exchanges/orderbook/depth_test.go

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

* linter: fix

* gk: nits

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
2025-02-20 16:10:07 +11:00
Ryan O'Hara-Reid
e99adca86f encoding/json: Add custom JSON package with build tag support for Sonic (#1623)
* tag optional sonic and allow full library conversion

* Add workflow and disallow arm and darwin usage

* Add basic hotswap benchmark

* linter: fix

* use bash

* linter: fix?

* Fix whoopsie, add to make file, also add mention in features list.

* test enforcement

* actually read documentation see if this works

* linter: fix

* linter: fix

* sonic: bump tagged version

* encoding/json: drop build tag arch and os filters

* encoding/json: consolidate tests

* encoding/json: log build tag usage

* rm superfluous builds

* glorious/nits: add template change and regen docs

* glorious/nits: update commentary on nolint directive

* glorious/nits: rm init func and log results in main.go

* Test to actually pull flag in

* linter: fix

* thrasher: nits

* gk: nits 4 goflags goooooooooo!

* gk: nits rn

* make sonic default json implementation

* screen 386

* linter: fix

* Add commentary

* glorious: nits Makefile not working

* gk: nits

* gk: nits whoops

* whoopsirino

* mention 32bit systems won't be sonic

* gk: super-duper nit of extremes

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
2025-02-20 16:05:55 +11:00
Gareth Kirwan
3748c97b12 Config: Fix config version downgrade (#1770)
* Config: Rename DecryptConfigFile to DecryptConfigData

Because this isn't really a file, it's a byte slice

* Config: Rename EncryptConfigFile to EncryptConfigData

Because it's not actually a file

* Config: Fix config version downgrade

Fixes #1769
2025-02-20 09:27:52 +11:00
Gareth Kirwan
dc2d7770fb Huobi: V2 subscription support (#1703)
* Huobi: assertify tests

* Testing: Add FixtureToDataHandlerWithErrors

* Huobi: Add V2 websocket support

* Huobi: Fix tests racing on updatePairsOnce

* Huobi: Remove unnecessary funnelData

* Huobi: Clarify V1/V2 pings

* Huobi: Switch to types.Time

* Huobi: Disable websocket Futures and CoinMarginedFutures support

* Huobi: Fix test failures on futureContracts

Per-instance future codes not getting cached causin occassional fails

* Huobi: Fix idiosyncratic naming using TestWs instead of TestWS

* Huobi: Run WS tests in parallel
2025-02-19 16:42:25 +11:00
Ryan O'Hara-Reid
08e015a125 exchanges/wrappers: Refactor fetch orderbook/ticker/account info funcs (#1440)
* acrost: Pull thread, examine

* fix tests

* linter

* fix_linter

* revert rm ctx param to limit breakages when merging usptream

* linter fix

* Add in priority update grouping so that tests pass

* Update cmd/exchange_wrapper_standards/exchange_wrapper_standards_test.go

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

* glorious nits

* fixed spelling

* whoopsie

* aanother whoops

* glorious: NITTERS!

* glorious: further nitters

* srry linter gods

* glorious: nits continued

* sub test p ara lel

* drop main t.Parallel

* fix whoops

* wrappertests: use context with cancel (test)

* linter: fix

* ensure primary execution

* kucoin test fix

* revert standards test changes and bypass non critical errors

* rm single override

* wrap exported error for accounts

* thrasher: nits ch name

* gk: nits

* gk: nits FetchTickerCached -> GetCachedTicker

* gk: nits rn FetchOrderbookCached -> GetCachedOrderbook

* gk: nits rn FetchAccountInfoCached -> GetCachedAccountInfo

* linter: fix

* gk: nits

* thrasher: nitters 1

* thrasher: nitters tmpls

* gk: nitter

---------

Co-authored-by: shazbert <ryan.oharareid@thrasher.io>
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
2025-02-19 10:47:10 +11:00
dependabot[bot]
2fc7e8e3e3 build(deps): Bump golang.org/x/net from 0.34.0 to 0.35.0 (#1806)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.34.0 to 0.35.0.
- [Commits](https://github.com/golang/net/compare/v0.34.0...v0.35.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-18 10:00:17 +11:00
Gareth Kirwan
5463e359bc Bitfinex: Fix websocket trade processing (#1754)
* Bitfinex: Fix WS trade processing

* Add handling for funding trades

Fixes #1746

* Linter: Disable shadow linting for err

It's been a year, and I'm still getting caught out by govet demanding I
don't shadow a var I was deliberately shadowing.
Made worse by an increase in clashes with stylecheck when they both want
opposite things on the same line.

* Bitfinex: Move websocket constants to websocket file

* Bitfinex: Rename channel consts

* Bitfinex: Send individual WS trades down the DataHandler
2025-02-17 13:20:14 +11:00
dependabot[bot]
8fad985669 build(deps): Bump golang.org/x/time from 0.9.0 to 0.10.0 (#1796)
Bumps [golang.org/x/time](https://github.com/golang/time) from 0.9.0 to 0.10.0.
- [Commits](https://github.com/golang/time/compare/v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: golang.org/x/time
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-10 17:26:10 +11:00
dependabot[bot]
abd1d746df build(deps): Bump golang.org/x/crypto from 0.32.0 to 0.33.0 (#1800)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.32.0 to 0.33.0.
- [Commits](https://github.com/golang/crypto/compare/v0.32.0...v0.33.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-10 17:12:59 +11:00
dependabot[bot]
f181bc8344 build(deps): Bump github.com/grpc-ecosystem/grpc-gateway/v2 (#1798)
Bumps [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway) from 2.26.0 to 2.26.1.
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.26.0...v2.26.1)

---
updated-dependencies:
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-10 17:01:19 +11:00
Ryan O'Hara-Reid
6613c56738 stream/buffer: remove time.ticker publish limiter for websocket orderbook updates (#1681)
* stream/buffer: remove publish period for for signalling change through data handler

* Add config upgrade and downgrade

* linter: fix

* GK: nits

* Update config/versions/v3.go

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

* Update config/versions/v3.go

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

* Update config/versions/v3.go

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

* Update config/versions/v3.go

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

* Update config/versions/v3.go

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

* config: fix up commited suggestion

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
2025-02-10 16:15:33 +11:00
Ryan O'Hara-Reid
45652564f4 orderbook: fix fields not being retrieved when getting orderbook.Base (#1793)
* orderbook: fix fields not being retrieved

* glorious: nits

---------

Co-authored-by: shazbert <ryan.oharareid@thrasher.io>
2025-02-10 13:54:02 +11:00
Samuael A.
5c892307c7 exchanges: Okx Update (#1420)
* update acccount ratelimits and added missing endpoints

* completed mapping missing trade accoung REST endpoints and Rate Limit

* added orderbook trading missing REST endpoints

* Added few missing endpoints and unit tests

* Completed grid trading and signal bot trading with unit tests

* Added Recurring Buy endpoints and corresponding unit tests

* Added copy trading endpoints and unit tests

* added newly added block trading and spread endpoints

* completed mapping spread endpoints

* Added new endpoints and unit tests

* Added round 1: Okx types and converts update.

* Update endpoints handling and types update

* Removed constants, updated unit tests, and updated endpoint methods

* Slight endpoint and unit test update

* Added spread and other websocket endpoints and update

* completed Spread WS Orderbook handler

* Added missing spread channels and handlers

* Adding Bussinss websocket and missing subscriptions, update unit tests, and endpoints

* Added spread endpoints to wrapper and unit tests update

* Added missing websocket subscriptions and copy trading endpoints

* Added missing endpoints and re-organize business websocket handlers

* Docs update

* Endpoints code updates

* types, unit test and endpoints update

* Minor unit tests update

* spelling fix

* fix unit test issues

* Updating unit tests error handling

* Updating unit tests error handling

* Unit tests assertion handling update

* Unit tests update

* Resolve linter issues

* linter issues fix

* Orderbook unit test error fix

* Minor fixes

* Change on test handling and types

* Updating unit tests and cleanups

* Fix unit test issues

* Add ratelimit test and update unit tests and methods

* Update method parameters and error declarations

* Added lending endpoints, unit tests, and update endpoint methods and error declarations

* Update ratelimiters, add missing lending and trading endpoints and unit tests

* Update websocket authentication and subscription handling

* Minor update to unit test and types

* Types, error handling, and other minor updates

* Update unit tests and endpoint functions

* error declarations update and unit tests

* Overall update on unit endpoint, unit tests, and types

* Adding review fixes

* Update on endpoints, order types, and unit tests

* Update unit tests and endpoint functions

* Update on endpoint and update missing parameters

* Implemented and tested newly added trading endpoints

* endpoints update and unit tests

* Update missing endpoints and update overall code

* added and testing funding and fiat related endpoints

* Update on convert and fiat related endpoints

* linter fix, types, endpoints, and unit tests update

* linter issues fix

* revert changes on tempos

* Fix Panic and update websocket auth calls handling

* config linter issue fix

* Fix panic issues and update unit tests

* Fix race condition, TestAllExchangeWrappers unit test issues

* Fix withdrawal manager test issue

* Rename ClosePositionForContractrID --> ClosePositionForContractID

* Rename ClosePositionForContractrID --> ClosePositionForContractID

* Fix error

* endpoints update and fix unit test issues

* added unit tests, updated comments, and code sections

* revert change in defaultSubscriptions

* few types comments update

* Minor changes

* remove lending endpoints

* rm mistakenly added code

* fix unit test

* minor unit test fix

* Adding offline error tests, update endpoints function, config update

* Update unit test coverage for offline error handliing

* Updating wrapper algo order coverage, endpoint calls, and unit tests

* Updating wrapper trade functions to accomodate algo orders

* update wrapper unit tests

* Fix wrapper order functions offline errors handling

* Tested and updated wrapper order functions

* Address review comments

* update order unit tests, and okx endpoint functions

* finalize affected order, endpoint, and margin endpoints

* Slight change on margin unit test

* fix margin unit test issues

* Minor change on unit test

* updates on contract settlement and future contract wrapper function

* add test coverage for contract functions and minor fix on wrapper

* Overall update and unit testing

* codespell, unit tests, type declaration and naming, and code-structure updates

* margin types value and validation function fix

* Update tests and helper funcs

* Improve test coverage

* helper functions and unit tests update

* Fix margin unit test

* Minor review updates

* minor fix on if statement

* Update helper functions

* error handling and functions naming update

* update comment

* minor error return fixes

* minor unit test fix

* Minor fix on spread websocket orders handling

* codespell fix

* skip orderbook depth with incomplete price

* skip orderbook depth with incomplete price
2025-02-10 10:44:48 +11:00
Gareth Kirwan
e6d456162a Codespell: Fix failures with v2.4.0 (#1790)
* Codespell: Fix new violations in 2.4.0

* Codespell: Move currency ignoring to regex

* Codespell: Add vendor to ignored files

* Codespell: Remove github action params duplicated from .codespellrc

.codespellrc already exists in the project

* Codespell: Remove unused freez from ignore words
2025-01-31 13:46:43 +11:00
dependabot[bot]
070f17cab8 build(deps): Bump github.com/grpc-ecosystem/grpc-gateway/v2 (#1788)
Bumps [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway) from 2.25.1 to 2.26.0.
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.25.1...v2.26.0)

---
updated-dependencies:
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-28 15:04:15 +11:00
dependabot[bot]
42f8ff2c0b build(deps): Bump google.golang.org/protobuf from 1.36.3 to 1.36.4 (#1787)
Bumps google.golang.org/protobuf from 1.36.3 to 1.36.4.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-28 14:55:52 +11:00
dependabot[bot]
6a7efb8329 build(deps): Bump google.golang.org/grpc from 1.69.4 to 1.70.0 (#1789)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.69.4 to 1.70.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.69.4...v1.70.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-28 14:44:20 +11:00
Bea
63f49860ed Binance: Add order side to trade data (#1782)
* Add the initiating side to Binance trades

* Update TradeStream type, move trades declaraction

* Make side declaration in Binance trades consistent
2025-01-24 10:39:41 +11:00
dependabot[bot]
f0c785de89 build(deps): Bump bufbuild/buf-setup-action from 1.49.0 to 1.50.0 (#1781)
Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.49.0 to 1.50.0.
- [Release notes](https://github.com/bufbuild/buf-setup-action/releases)
- [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.49.0...v1.50.0)

---
updated-dependencies:
- dependency-name: bufbuild/buf-setup-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-20 17:07:24 +11:00