1075 Commits

Author SHA1 Message Date
Gareth Kirwan
66a3ff021e Gemini: Add subscription configuration (#1625)
* Gemini: Upgrade test config

* Gemini: Add subscription configuration

* Gemini: Fix negative waitgroup on shutdown

Fixes #1738
2024-12-06 13:13:32 +11:00
Gareth Kirwan
0c4b070ebc BTCMarkets: Add subscription configuration (#1624)
* Subscription: Add List.GroupByPairs

* BTCMarkets: Add subscription conf

* BTCMarkets: Upgrade test config
2024-12-05 14:50:10 +11:00
Gareth Kirwan
6b79e4c0b4 Bithumb: Add subscription configuration (#1618) 2024-12-05 12:02:23 +11:00
Scott
291b7b58ea exchanges/Bybit: Fix UpdateOrderExecutionLimits (#1731)
* potentially resolved

* fixes bug with symbol formatting

* fixing lints

* actually uses nextPageCursor

* refactor transforming symbols, add test

* shazbert1000
2024-12-03 10:12:39 +11:00
Ryan O'Hara-Reid
a0d82f2a7d common/math: Add math.Abs to PercentageDifference calculation (#1617)
* fix bug and add decimal calc

* pew pew

* Update common/math/math.go

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

* glorious: nits

* nits: plus change name convention

* gk: nits and splits

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
2024-11-27 10:27:15 +11:00
dependabot[bot]
0fb27542fe build(deps): Bump github.com/stretchr/testify from 1.9.0 to 1.10.0 (#1727)
* build(deps): Bump github.com/stretchr/testify from 1.9.0 to 1.10.0

Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.9.0...v1.10.0)

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

Signed-off-by: dependabot[bot] <support@github.com>

* subscription: Fix assert.NotSame param usage

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
2024-11-26 11:19:49 +11:00
Ryan O'Hara-Reid
3c73d973f6 order: Add Side type MarshalJSON method (#1726)
* Add side MarshalJSON

* glorious: nits

* more removal

* Update exchanges/order/order_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: Adrian Gallagher <adrian.gallagher@thrasher.io>
2024-11-26 11:19:13 +11:00
Ryan O'Hara-Reid
3b2b15e256 gateio: Fix futures subscription generation (#1725)
* gateio/websocket: fix futures filtering when generating subscriptions

* rework test

* gk: nits

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
2024-11-25 17:49:19 +11:00
Gareth Kirwan
fa9549d142 Assets: Fix LinearContracts support (#1724)
* Assets: Fix LinearContracts support

* Assets: Fix False positives with IsValid

supportedFlag&a is true for every even number, making the test pretty
close to meaningless.

[This
fix](5b33bc5324)
was a viable fix maintaining bit shifted iota, but there's no benefit to
it at all.

Simplifying.
2024-11-25 15:35:25 +11:00
Ryan O'Hara-Reid
4bbaf75d34 currency: Fix edge case in NewCode where all string characters are digits (#1593)
* add fixes and test

* glorious: nits, privatise upper case field, add item field for case sensitivity for format checks, rm dead code.

* fix potential panic

* gk/glorious: nits

* gk: nits and other things

* improve commentary lol

* glorious+gk: nits and improvements (with no sillyness this time)

* Update currency/pairs.go

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

* thrasher: nitssssss

* linter: fix

* bye bye silly boy

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
2024-11-25 14:51:35 +11:00
Ryan O'Hara-Reid
1fab9c72d2 gateio: Remove listOfAssetsCurrencyPairEnabledFor method and optimise websocket asset processing (#1723)
* remove listOfAssetsCurrencyPairEnabledFor and optimise paths

* add helper method and further optimise

* glorious: nits thanksssss!

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
2024-11-20 16:15:38 +11:00
Scott
85ecd0d4b8 Binance: update orderbook and ticker rate limits (#1697)
* updates some rate limits

* WOAH FRIDAY FAILURES

* remove secret code, DONT LOOK

* types.Number, rv ob num, fr changes

* ever so slight neaten

* Remove FundingRateInfo for CMF only

* revert to using the funding rate intervals
2024-11-13 15:32:08 +11:00
Gareth Kirwan
8f9ebcb521 BTSE: Add subscription configuration (#1616)
* BTSE: Add subscription configuration

* BTSE: Upgrade test config
2024-11-12 14:29:58 +11:00
Gareth Kirwan
0c0ae7bcaa Okx: Add subscription configuration (#1605) 2024-11-12 13:15:02 +11:00
Gareth Kirwan
fb0fd2e514 Huobi: Fix GetAvailableTransferChains returning unavailable chains (#1709) 2024-11-11 16:18:27 +11:00
Gareth Kirwan
56fa304e19 Huobi: Fix invalid contract type error when autoUpdatePairs is false (#1707)
We were relying on autoUpdatePairs to fetch contract types before we
need them. If the user disables it in config, we'll get them upfront.
2024-11-11 15:12:18 +11:00
Ryan O'Hara-Reid
4de4e3dc14 stream/buffer: Improve orderbook verification conditions and fix TestUpdateByIDAndAction test (#1682)
* don't need to verify if checksum available; don't retroactively verify snapshots

* glorious: nits + allow checksum/validation to be done on updateByIDAndAction

* possible slice manipulation issue fix for test

* thrasher: nit

* this should fix it now

* for subsystem usage disallow deploying a book twice

* reverts strict policy using deploy, it's used in a bunch of tests I don't want to touch just yet, left a note

* rm unused variable

* glorious: nits

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
2024-11-11 14:46:14 +11:00
Gareth Kirwan
a2a7fed273 Huobi: Add subscription configuration (#1604)
* Huobi: Update test config format

* Huobi: Add subscription configuration

* Huobi: Add subscription documentation

* Huobi: Clarify OB sub Levels usage

* Huobi: Enable websocket for tests

* Subscriptions: Rename ErrPrivateChannelName

Rename ErrPrivateChannelName to ErrUseConstChannelName
2024-11-11 14:19:25 +11:00
Ryan O'Hara-Reid
d4c4bf1bcd bybit: Add OrderbookLastUpdated field and ensure timestamp usage is correct (#1680)
* bybit: Add time field for orderbook and handle correct timings

* use UpdateID as this is the localised ID for this pair, rm check result.UpdateID == 1 just use snapshot

* general quick fixes across from #1672 which can be used straight away

* fix test

* glorious: nits

* thrasher: nits

* thrasher: nits thanks @thrasher-

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
2024-11-08 15:35:18 +11:00
Adrian Gallagher
d172f3dfe1 gateio: Update contract settlement currencies (#1702)
* gateio: Update contract settlement currencies

* GateIO: Fix TestGetSettlementFromCurrency race
2024-11-08 10:11:13 +11:00
Adrian Gallagher
69bb645fc2 docs: Migrate development tracking from Trello to GitHub Projects (#1696)
* docs: Migrate development tracking from Trello to GitHub Projects

* docs: Replace non-template based references and correct templates
2024-11-08 10:10:49 +11:00
Gareth Kirwan
199d30d442 Bybit: Add subscription configuration for spot (#1601)
* Bybit: Subscription configuration for spot

* Bybit: Enable candles ws sub by default

* Orderbook: Use a RW mutex for depth

* Orderbook: Fix race on depth.VerifyOrderbook

Despite being protected by an ob level mutex, this needed to privatise
and protect the option var.
2024-11-05 16:05:38 +11:00
Gareth Kirwan
4d36ea4943 Bitmex: Fix handling index records in WS trade stream (#1685)
Fixes handling for Size == 0 index records sent to trade stream

fixes #1684
2024-10-25 19:57:34 +11:00
Gareth Kirwan
4c7c0bc533 Subscriptions: Relax subscription validation for non-existent pairs (#1635)
The subscription pairs do not need to be validated as enabled or
available. The check was just belt-and-braces and didn't have a specific
use-case in mind.

Coinbase has a use-case for wanting to subscribe to BTC-USD when it's
not enabled.

Moreover, it shouldn't be our job to check this. You want a sub expanded
with these pairs? Fine. Done. If it doesn't work, you can work out why
2024-10-23 15:34:01 +11:00
Gareth Kirwan
4fc1bf0ad1 Kucoin: Abstract a subscriptionNames for assets solution (#1669) 2024-10-23 12:05:47 +11:00
Gareth Kirwan
2232340d49 Bitmex: Subscription templating (#1586)
* Exchanges: Allow empty batches in ParallelChanOp

In keeping with both common.Batch and "It's not my responsibility",
ParallelChanOp should just do nothing when given an empty list (and
implicitly an empty batch size.
Whatever it's going to do, it'll delegate to common.Batch,
and this allows us to just inline calls:
```
	return common.AppendError(
		b.ParallelChanOp(subs.Public(), func(l subscription.List) error { return b.manageSubs(wsSubscribeMethod, l, wsPublicStream) }, len(subs)),
		b.ParallelChanOp(subs.Private(), func(l subscription.List) error { return b.manageSubs(wsSubscribeMethod, l, wsPrivateStream) }, len(subs)),
	)
```

* Bitmex: Test config updates

* Bitmex: Sub Templating

* Bitmex: Enable websocket for tests

* Bitmex: Handle subscription errors

This switches to multiplexing so that we know which errors belong to
which stream, particularly for the auth attempt

* Bitmex: Fix ws order side err going to data stream

Shouldn't fall into classification error if it's actually a parsing
error
2024-10-22 17:21:35 +11:00
Ryan O'Hara-Reid
bd2cc9d7bb gateio: Small update on fields and subscriptions (#1658)
* Cherry_pickable

* gateio/websocket: use millisecond time for more accurate push time

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
2024-10-21 17:05:26 +11:00
Gareth Kirwan
ba77c9946d Bitfinex: Add subscription configuration and templating (#1597)
* Bitfinex: Correct comment about R0 OB

* Bitfinex: Test config updates

* Bitfinex: Add missing assets to configtest

* Bitfinex: Rename GenerateDefaultSubscriptions

* Bitfinex: Add Subscription configuration

* Subscriptions: Document panic in templates
2024-10-18 09:23:15 +11:00
Ryan O'Hara-Reid
9645b7b6e7 huobi: Swap ticker amount and volume values (#1679)
Co-authored-by: shazbert <ryan.oharareid@thrasher.io>
2024-10-15 10:13:29 +11:00
Romano
632d4175ce Bybit: Add CryptoChain field to GetWithdrawalsHistory wrapper (#1675) 2024-10-15 10:02:43 +11:00
Ryan O'Hara-Reid
ac731ce283 websocket/gateio: Support multi connection management and integrate with GateIO (#1580)
* gateio: Add multi asset websocket support WIP.

* meow

* Add tests and shenanigans

* integrate flushing and for enabling/disabling pairs from rpc shenanigans

* some changes

* linter: fixes strikes again.

* Change name ConnectionAssociation -> ConnectionCandidate for better clarity on purpose. Change connections map to point to candidate to track subscriptions for future dynamic connections holder and drop struct ConnectionDetails.

* Add subscription tests (state functional)

* glorious:nits + proxy handling

* Spelling

* linter: fixerino

* instead of nil, dont do nil.

* clean up nils

* cya nils

* don't need to set URL or check if its running

* stop ping handler routine leak

* * Fix bug where reader routine on error that is not a disconnection error but websocket frame error or anything really makes the reader routine return and then connection never cycles and the buffer gets filled.
* Handle reconnection via an errors.Is check which is simpler and in that scope allow for quick disconnect reconnect without waiting for connection cycle.
* Dial now uses code from DialContext but just calls context.Background()
* Don't allow reader to return on parse binary response error. Just output error and return a non nil response

* Allow rollback on connect on any error across all connections

* fix shadow jutsu

* glorious/gk: nitters - adds in ws mock server

* linter: fix

* fix deadlock on connection as the previous channel had no reader and would hang connection reader for eternity.

* gk: nits

* Leak issue and edge case

* gk: nits

* gk: drain brain

* glorious: nits

* Update exchanges/stream/websocket.go

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

* glorious: nits

* add tests

* linter: fix

* After merge

* Add error connection info

* Fix edge case where it does not reconnect made by an already closed connection

* stream coverage

* glorious: nits

* glorious: nits removed asset error handling in stream package

* linter: fix

* rm block

* Add basic readme

* fix asset enabled flush cycle for multi connection

* spella: fix

* linter: fix

* Add glorious suggestions, fix some race thing

* reinstate name before any routine gets spawned

* stop on error in mock tests

* glorious: nits

* glorious: nits found in CI build

* Add test for drain, bumped wait times as there seems to be something happening on macos CI builds, used context.WithTimeout because its instant.

* mutex across shutdown and connect for protection

* lint: fix

* test time withoffset, reinstate stop

* fix whoops

* const trafficCheckInterval; rm testmain

* y

* fix lint

* bump time check window

* stream: fix intermittant test failures while testing routines and remove code that is not needed.

* spells

* cant do what I did

* protect race due to routine.

* update testURL

* use mock websocket connection instead of test URL's

* linter: fix

* remove url because its throwing errors on CI builds

* connections drop all the time, don't need to worry about not being able to echo back ws data as it can be easily reviewed _test file side.

* remove another superfluous url thats not really set up for this

* spawn overwatch routine when there is no errors, inline checker instead of waiting for a time period, add sleep inline with echo handler as this is really quick and wanted to ensure that latency is handing correctly

* linter: fixerino uperino

* glorious: panix

* linter: things

* whoops

* defer lock and use functions that don't require locking in SetProxyAddress

* lint: fix

* thrasher: nits

---------

Co-authored-by: shazbert <ryan.oharareid@thrasher.io>
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
2024-10-10 15:09:52 +11:00
Gareth Kirwan
c2dfb37efd Subscriptions: Add List.Public, List.Enabled and List.Private (#1629) 2024-10-10 14:48:16 +11:00
Gareth Kirwan
33e82c170f Kraken: Subscription improvements (#1587)
* Convert: Fix TimeFromUnixTimestampDecimal using local

All parsed times should be in UTC

* Subscriptions: Add IgnoringAssetsKey

* Tests: Pass tb to curried WS handlers

* Websocket: Make ErrNoMessageListener a public error

* Kraken: Fix URLMap ignored for websocket URLs

* Kraken: Move SeedAssets from Setup to Bootstrap

Having SeedAssets in Setup is cruel and unusual because it calls the
API. Most other interactive data seeding happens in Bootstrap.

This made it so that fixing and creating unit tests for Kraken was
painfully slow, particularly on flaky internet.

* Kraken: Remove convert test

Duplicate of convert_test.go TestTimeFromUnixTimestampDecimal

* Kraken: Test config upgrades

* Kraken: Sub Channel improvements

* Use Websocket subscriptionChannels instead of local slice
* Remove ChannelID - Deprecated in docs
* Simplify ping handlers and hardcodes message
* Add Depth as configurable orderbook channel param
* Simplify auth/non-auth channel updates
* Add configurable Book depth
* Add configurable Candle timeframes

Kraken: Simplify all WS handlers with reqId

* Kraken: Subscription templating

* Generate N+ subs for pairs
If we generate one sub for all pairs, but then fan it out in the
responses, we end up with a mis-match between the sub store and
GenerateSubs, and when we do FlushChannels it will try to resub
everything again.

* Kraken: Rename channelName var throughout

Avoid shadowing func of same name

* Kraken: Add TestEnforceStandardChannelNames

* Websocket: Fix Resubscribe erroring Duplicate
2024-10-08 10:34:10 +11:00
Adrian Gallagher
66497cef89 Huobi: Remove suspended API endpoints (#1660) 2024-10-03 10:53:01 +10:00
Adrian Gallagher
1e60493f5d Kraken: Fix TestGetFuturesOrderbook and consolidate test pairs (#1659)
* Kraken: Fix TestGetFuturesOrderbook and consolidate test pairs

* Update exchanges/kraken/kraken_test.go

Co-authored-by: Ryan O'Hara-Reid <oharareid.ryan@gmail.com>

* Kraken: Rename spotTestSpair to spotTestPair

---------

Co-authored-by: Ryan O'Hara-Reid <oharareid.ryan@gmail.com>
2024-10-01 16:28:18 +10:00
Gareth Kirwan
3dd7838a60 Huobi: Fix intermittent UpdateTickers failure on expiry (#1655)
* Huobi: Return all errors from UpdateTickers

* Huobi: Add contract type cache for expiry codes
2024-10-01 15:00:20 +10:00
Ryan O'Hara-Reid
d31fa3ff3d types: Add Time type from Gateio and share across codebase (#1648)
* consolidate type to types package and share across code base

* rm convert type and convert codebase

* rm irrelavant test cases

* Fix tests

* glorious nits

* Update exchanges/gateio/gateio_types.go

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

* thrasher: nits

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
2024-10-01 10:46:55 +10:00
Gareth Kirwan
bfd499f0c9 GateIO: Add websocket subscription configuration (#1599)
* GateIO: Switch TestMain to using testexch.Setup

* GateIO: Test config updates

* GateIO: Privatise and rename genSubs

* GateIO: Subscription configuration
2024-10-01 09:39:24 +10:00
Gareth Kirwan
c96c0b0c8e Binance: Fix occassional race failure on TestWsOrderExecutionReport (#1652)
* Binance: Fix occassional race failure on TestWsOrderExecutionReport

Fixes:
```
binance_test.go:2608: expected type order.Detail, found *orderbook.Depth
```

* fixup! Binance: Fix occassional race failure on TestWsOrderExecutionReport
2024-09-19 12:25:19 +10:00
Adrian Gallagher
3ebd2daf5c CoinbasePro: Skip specific tests due to API deprecation (#1649)
* CoinbasePro: Skip tests due to API deprecation

* CoinbasePro: Skip more tests
2024-09-16 14:05:13 +10:00
Samuael A.
d94b8af3e1 exchanges: Kucoin Update (#1438)
* types and orderbook handling fix

* Minor types and endpoints update

* Minor fixes on Kucoin

* Add benchmarking test

* Unit tests update and minor endpoints update

* Adding updates and newly added endpoints

* Add and correct funding, withdrawal, and deposit endpoints

* linter and codespell fix

* Adding and correcting spot trading endpoints

* Completed Spot HF endpoints

* Minor fix

* Added OCO and Margin HF trade and other endpoints

* Adding missing endpoints

* Updating Isolated margin, margin v3, and v3market lending endpoints

* minor codespell fix

* Completed adding and fixing futures endpoints

* wrapper update and fix unit tests

* Updating endpoint ratelimits

* Complete ratelimiter setup and endpoint functions update

* Unit test configuration and update

* fix linter issue

* Added a ratelimiter test and heavy update on unit tests

* Adding websocket update based on ChangeLog

* Added newly added Earn General, Kucoin Earn and Staking endpoints

* Added VIP lending endpoints

* Minor linter and endpoints fix

* Added unit tests, publicised functions, and minor updates

* Update on wrapper funcs, unit tests, and other methods

* Enexport exchange specific websocket methods

* remove deprecated topic

* Update wrapper based on Type, add and fix unit tests

* Added a margin configuration endpoint and unit test

* Update methods, types, and unit tests

* Update error declaration and handling unit tests

* Update method parameters and error handling

* Updating unit tests and error handling

* Update methods arguments, added and update unit tests

* Fix unit tests and wrapper methods

* Resolving unit test issues and fix faulty endpoints

* Fix on unit tests and working on passphrase errors

* Minor fixed on websocket and endpoint url

* comment and wrapper filters issue fix

* Unit tests and other minor updates

* Update wrapper functions, endpoint methods, and unit tests

* change require to change on two unit tests

* Update unit tests, types, and endpoints

* Refine and update wrapper tempo for minor adjustments

* Remove code that enabled logging

* Update wrapper functions, missing endpoints, response and parameter values, and unit tests

* removed High-frequency orders from wrapper functions, and updated unit tests and types

* Added missing fields and minor update on wrapper

* Update types

* Update tests and websocket channels

* Update unit tests and methods error returns
2024-09-13 19:52:39 +10:00
Ryan O'Hara-Reid
b461c32a5e stream/okx: allow rate limit definitions to be used by the stream package (#1641)
* stream: rate limiter definitions

* Update exchanges/request/request_test.go

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

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
2024-09-13 13:56:46 +10:00
Adrian Gallagher
b8e836d74f common: Replace StringDataCompare with slices.Contains and cleanup string funcs (#1631)
* common: Replace StringDataCompare with slices.Contains and cleanup string funcs

* common/docs: Update SliceDifference and remove outdated steps from ADD_NEW_EXCHANGE.md

* common: Improve SliceDifference
2024-09-13 10:43:20 +10:00
Ryan O'Hara-Reid
22cb0eb9b9 stream: Add verbosity to outbound requests that also returns responses (#1640)
* Add verbosity

* Update exchanges/stream/websocket_connection.go

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

* glorious: nits

* Update exchanges/stream/websocket_test.go

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

* Update exchanges/stream/websocket_connection.go

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

* reduce double log on ultimate verbose

* glorious: extra

* Update exchanges/stream/websocket_connection.go

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

* nits for sauron

---------

Co-authored-by: shazbert <ryan.oharareid@thrasher.io>
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
2024-09-12 15:37:54 +10:00
Ryan O'Hara-Reid
46f3080737 gateio: fix and optimise time parsing (#1647)
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
2024-09-12 13:21:31 +10:00
Ryan O'Hara-Reid
cb6b3421a7 exchanges/websocket: update websocket rate limiting to use requester rate limiting functionality (#1578)
* exchanges/websocket: update websocket rate limiting to use requester rate limiting functionality.

* glorious: nits

* rm unsused

* updoo

* glorious: purgerino

* reduce duplicate code

* thrasher: engrish

---------

Co-authored-by: shazbert <ryan.oharareid@thrasher.io>
2024-09-02 16:43:05 +10:00
Adrian Gallagher
15e0eedc8b tests: Fix various issues (#1634)
* GateIO: Align struct for int64 usage

* CI/build: Skip specific tests when run under Docker

* slippage: Fix TestRandomSlippage intermittent issue
2024-08-27 12:54:11 +10:00
Adrian Gallagher
74f4df6348 okcoin: Remove exchange implementation (#1626)
* okcoin: Remove exchange implementation

* exchanges/order: Rid TradeMode from Submit type
2024-08-24 12:19:04 +10:00
Ryan O'Hara-Reid
1cabba73b9 common/gateio/stream: add thread-safe counter and overide default GenerateMessageID with connection specific implementation (#1615)
* add counter and update gateio

* Update exchanges/gateio/gateio.go

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

* thrasher: nits

* add test case

* linter: fix

* revert change

* thrasher nits

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
2024-08-24 12:18:20 +10:00
Ryan O'Hara-Reid
17c2ef2ec7 stream/match: Reduce complexity and limit locking when match occurs (#1581)
* stream match update

* update tests

* linter: fix

* glorious: nits + handle context cancellations

* glorious: whooops

* Websocket: Add SendMessageReturnResponses

* whooooooopsie

* gk: nitssssss

* Update exchanges/stream/stream_match.go

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

* Update exchanges/stream/stream_match_test.go

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

* linter: appease the linter gods

* glorious: nits

* glorious: nits

* Update exchanges/stream/stream_match_test.go

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

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com>
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
2024-08-19 10:35:46 +10:00