Commit Graph

1834 Commits

Author SHA1 Message Date
dependabot[bot]
2b504c86bb build(deps): bump github.com/stretchr/testify from 1.8.3 to 1.8.4 (#1343)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.3 to 1.8.4.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.3...v1.8.4)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  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>
2023-09-11 16:43:09 +10:00
dependabot[bot]
e6910421dd build(deps): bump actions/checkout from 3 to 4 (#1340)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-11 16:40:53 +10:00
Martin
bc26c53c32 backtester: Fix ensureOrderFitsWithinHLV (#1338)
Co-authored-by: xiaoniu <yang.ruoqi@outlook.com>
2023-09-11 16:38:19 +10:00
dependabot[bot]
c9040a862c build(deps): bump github.com/grpc-ecosystem/grpc-gateway/v2 (#1341)
Bumps [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway) from 2.17.1 to 2.18.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.17.1...v2.18.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>
2023-09-11 16:37:27 +10:00
Gareth Kirwan
51f73300bb Bitfinex: Improve websocket type assertion checks for order processing (#1292)
* Bitfinex: Error if ws data id/cid is not a float64

* Bitfinex: Add annotation to WS id/cid assest errs
2023-09-07 15:43:38 +10:00
Ryan O'Hara-Reid
ad9de19d47 orderbook: Check assignment of time values and reject if not set (#1318)
* orderbook: Check assignment of time values and reject if not set.

* linter: fix

* buffer: additional linter winter fixter

* Implement through pending exchanges

* finished push

* linty: minty

* gomod: tidy

* thrasher: nits

* glorious: nits

* orderbook: purge type now in favour of external call allocation

* orderbook: push last param

* orderbook: only 1 unlock call is needed

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
2023-09-07 11:00:16 +10:00
Gareth Kirwan
20143886ca Kraken: Fix WS Auth endpoints not re-enabled (#1334)
When Kraken has a disconnect or failure that sets SetCanUseAuthenticatedEndpoints(false),
it's never re-enabled when the websocket is reconnected
That means all subsequent requests would fall back to rest
2023-09-07 10:59:30 +10:00
Gareth Kirwan
253b9a5049 Kraken: Fix websocket order updates (#1327)
* Kraken: Fix error on WS update without status

* Kraken: Fix parsing of WS updates without Desc

* Kraken: Fix WS market order handling

* Kraken: Fix tests in parallel using DataHandler

* WebsocketManager: Fix order summary printing

* Kraken: Fix parallel tests race with DataHandler

* Kraken: Issue a classification err on asset 404

* Kraken: Switch to testify and close fixture
2023-09-05 13:22:34 +10:00
dependabot[bot]
052327343e build(deps): bump golang.org/x/text from 0.12.0 to 0.13.0 (#1332)
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.12.0 to 0.13.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.12.0...v0.13.0)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  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>
2023-09-05 09:00:26 +10:00
Adrian Gallagher
578dd0bafe Binance: Add crypto/flexible loan endpoints (#1331)
* Binance: Add crypto/flexible loan endpoints

* Address nitters

* Address shazbert's nitters
2023-09-01 16:46:53 +10:00
Gareth Kirwan
6ab4c27d1c Bitfinex: Refactor websocket wsUpdate handling and various improvements (#1317)
* Bitfinex: Fix cancel/update order WS ack not seen

Fixes #1288

* Bitfinex: Fix ws Unsubscribe and Resubscribe

Unsubscribe needed to use the channel id.
Resubscribe needs to have the original subscription params.

* Bitfinex: Fix ws Trades Fees on te

The ws channel for authenticated Trades sends two types of update:
* te, Trade Executed
* tu, Trade Execution Update

Only the second one contains fee information.
[See the docs](https://docs.bitfinex.com/reference/ws-auth-trades)

This commit fixes:
`exchange Bitfinex websocket error - unable to type assert trade fee`
after an executed market trade on the te update

* Bitfinex: Fix error on ws auth ok

This fixes:
`Bitfinex Could not find an existing channel subscription: account Pair:
ChannelID: 0`
It's not clear from history why we'd want to store a reference to the
ubiquitous 0 channel like this, but it's definitely wrong, and anything
that attempts to get channel information about 0 chan needs to be fixed
anyway.

* Bitfinex: Refactor wsUpdate handling

This commit doesn't break out all the sub-updater, but attempts to do
something about the unmanagable size of ws update handling

* Binfinex: Fix linter issue on chanId casing

* Bitfinex: Fix linter outdent complaint

* Bitfinex: Fix linter issues on test

* Bitfinex: Fix TestWsTradingPairSnapshot chan lookup

* Bitfinex: Remove unnecessary WsAddSubs in test

* Bitfinex: Fix TestWsSubscribedResponse chan

* Bitfinex: Throw a specific error for bad event

* Bitfinex: WS Type assertions for positionSnapshots

* Bitfinex: tradeUpdate type assertion

* Bitfinex: Reinstate default subscriptions

* Bitfinex: Assert chan assetType is the same

* Bitfinex: Lowercase error string

* Bitfinex: Refactor WS eventType/chanId handling

* Bitfinex: Fix linter issues

* Bitfinex: Fix delimiter for pairs with more than 6 chars

* Bitfinex: Fix WS handling of subscribed symbols

This simplifies the handling of subscription symbols.
Now that we know the channel up front from handling the subscribed
response we can limit the parsing forms needed

* Bitfinex: Placate the linter

* Bitfinex: Disable margin assets for WS

Margin WS Currently not fully implemented and causes subscription collisions with spot

* Bitfinex: Fix parsing of 4 part funding keys

This improves overall handling and errors on a few current assumptions
about key structure

* Bitfinex: Linter fixes

* Bitfinex: Remove key parsing from assetPairFromSymbol

* Bitfinex: Use native error wrapping

* Bitfinex: Skip disabled assets in default ws subs
2023-09-01 16:46:00 +10:00
Gareth Kirwan
9a0f261211 Orderbook: Add GetDepth to Base (#1328)
* Orderbook: Add GetDepth to Base

Base.GetDepth returns the concrete book of which Base is a copy
This is probably useful for immutably monitoring orderbook health and state
whereas FetchOrderbook would trigger a refresh.

* Orderbook: Reword GetDepth comment

* Orderbook: Add test for Base.GetDepth
2023-08-29 15:49:24 +10:00
Scott
d3102a08dc egnine/sync-manager: add config support (#1326)
* allows sync manager customisation for values and logs

* config-example add

* who doesnt like more coverage?

* ensures you can actually disable it via config el oh el

* less ifs, better control

* fix verbose

* sync trades default false

* fix summary being printed when not enabled

* fixes config checker and output

* nits

* I can put this behind me now

* Fixed logCaSiNg

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

* combines if statements

---------

Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
2023-08-29 15:48:41 +10:00
dependabot[bot]
04320f7aee build(deps): bump github.com/grpc-ecosystem/grpc-gateway/v2 (#1330)
Bumps [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway) from 2.16.2 to 2.17.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.16.2...v2.17.1)

---
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>
2023-08-29 09:23:43 +10:00
Gareth Kirwan
ec312ca0d3 Bitstamp: Add websocket heartbeat (#1329)
This prevents the frequent (5x / hour) disconn/reconns we're seeing with a
10s or even 20s traffic timeout.
I'd like to base the interval on the traffic timeout / 2, but that's
non-trivial right now, and 8s isn't an excessive default
2023-08-29 09:22:50 +10:00
Ryan O'Hara-Reid
c5240153f9 orderbook: Add GetTranches and GetPair methods to Depth type (#1324)
* orderbook: Add GetTranches and GetPair methods to Depth type (cherry-pick)

* glorious: nits

* linter: fix

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
2023-08-22 13:29:17 +10:00
Samuael A
9c83231696 exchanges: Update OKCoin V5 exchange support (#1206)
* starting public endpoints

* Adding public endpoints

* added public spot market endpoints

* websocket subscriptions updates

* websocket push data handlers completing

* linter fix

* Added funding private endpoints

* Adding authenticated account endpoints

* Added fiat and OTC-RFQ authenticated endpoints

* trading authenticated endpoints

* completing trade endpoints and add public wrapper endpoints

* Authenticated wrapper functions and corresponding unit test

* Adding authenticated websocket endpoint and fixing wrapper functions

* Documentation and exchange websocket update

* update websocket orderbook checksum handling

* linter issues fix and unit test update

* remove invalid orderbook endpoint and unit test

* Documentation, handlers, and model types update

* minot fix

* Minor fixes

* Updating unit tests and added missing endpoints

* Add missing credential check

* Minor unit test fixes

* fix minor linter issue

* add snaphot test unit test

* Fix on update checksum and documentation update

* update exchange, add UpdateOrderExecutionLimits, and update documentation

* Minor fix on tickers fetching

* Minor websocket fix and smaill unit tests

* Minor websocket and naming fixes

* uncomment default channels

* Fix type and unit test issues

* websocket channels and data handling update

* Update Advanced-Algo websocket handling and minor fixes

* documentation and minor code fixes

* Fix name changes

* documentation contribution update

* intervalToString method update

* fix exchange_wrapper_standard tests

* Fix minor issues based on exchange_wrapper_standards_test

* Fix wrapper extended candlestick check

* websocket orders fetching error check method update

* Exchange name check and change

* docs: Add missing contributors

---------

Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
2023-08-22 09:44:39 +10:00
Ryan O'Hara-Reid
a440fab4f3 stream/buffer: Reduces map lookups by using key struct (#1309)
* stream/buffer: Adds key map optimisation (cherry-pick)

* stream/buffer: Add buffer to DataHandler intermediary. Add field InitialUpdate bool to toggle when first update is seen for initial sync.

* whoops

* buffer: Add difference benchmarks for reference

* glorious: nits (reverting out of context changes)

* RM unused error that will be used later

* purge: benchmark

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
2023-08-21 16:28:38 +10:00
dependabot[bot]
f8024e1ee7 build(deps): bump bufbuild/buf-setup-action from 1.26.0 to 1.26.1 (#1325)
Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.26.0 to 1.26.1.
- [Release notes](https://github.com/bufbuild/buf-setup-action/releases)
- [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.26.0...v1.26.1)

---
updated-dependencies:
- dependency-name: bufbuild/buf-setup-action
  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>
2023-08-21 15:49:38 +10:00
Scott
c7b3ace78c testing: bybit references, bybit mock testing, pair formatting, standards improvement (#1322)
* fixes tests

* pair formats and extra fixes

* quick change before shazbert sees

* sneaky lint

* adds bybit mock testing and fixes test

* whoops

* error response instead

* classic forgetting to lint

* bybit live test no longer auto-records results

* ty thrasher- Update exchanges/bybit/bybit_wrapper.go

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

---------

Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
2023-08-21 14:48:56 +10:00
Gareth Kirwan
577817c46e bitfinex,okx: Fix websocket orderbook LastUpdated timestamps (#1315)
* Bitfinex: Fix WS orderbook LastUpdate empty

* Okx: Fix WS Orderbook LastUpdated unset by updates
2023-08-15 15:01:05 +10:00
Gareth Kirwan
4cfa6c4396 Bitstamp: Fix websocket orderbook snapshot blanking LastUpdate (#1319)
* Bitstamp: Fix orderbook snapshot blanking LastUpdate

Drive-By: Remove:
`Bitstamp BTC/USDT spot orderbook has zero bid price, filtering.`
It's unactionable and happens every snapshot right now

* Bitstamp: Use ob timestamps for LastUpdate

Obviously.
2023-08-15 14:22:40 +10:00
dependabot[bot]
8fc4ca9b11 build(deps): bump bufbuild/buf-setup-action from 1.25.1 to 1.26.0 (#1321)
Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.25.1 to 1.26.0.
- [Release notes](https://github.com/bufbuild/buf-setup-action/releases)
- [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.25.1...v1.26.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>
2023-08-15 10:58:17 +10:00
Adrian Gallagher
b25037dabc CI: Bump Go and golangci-lint versions (#1313) 2023-08-11 14:06:56 +10:00
Bea
26692669c6 exchanges/order: Improve order side handling in SubmitOrder (#1299)
* SubmitOrder- order.Buy replaced with IsLong

Progresses #1270

* Btcmarkets: order.Buy and order.Sell changed to order.Bid and order.Ask

* Bithumb: SubmitOrder- order.Buy replaced with IsLong

Progresses #1270

* Binanceus: SubmitOrder- order.Buy replaced with IsLong

Progresses #1720

* Bistamp: SubmitOrder- order.Buy replaced with IsLong

Progresses #1270

* Bitfinex: Changed order Side to IsLong

* Binance:switch added to SubmitOrder

* Binance: Replaced Buy and Sell in SubmitOrder with IsLong and IsShort

* Binance:SubmitOrder if statement for order side simplified
2023-08-11 14:05:43 +10:00
Romano
555bb76f4d exchanges/fill: Add test coverage (#1223)
* Fill go test

* Add return error into Update function

* Update exchanges/fill/fill_test.go

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

* GateIO: Fix websocket trade tests

* GateIO: More test coverage

* GateIO: Options tests

* GateIO: Fix woopsies

* Address nits

* GateIO: Fix nitters

---------

Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
2023-08-10 12:33:42 +10:00
Bea
067fae0e00 engine/sync_manager: Rename Update to WebsocketUpdate (#1300)
* sync_manager: Update replaced with WebsocketUpdate

* sync_manager: replaced TestSyncManagerUpdate with TestSyncManagerWebsocketUpdate

* Update engine/sync_manager.go

---------

Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
2023-08-07 16:40:09 +10:00
dependabot[bot]
4200447118 build(deps): bump bufbuild/buf-setup-action from 1.25.0 to 1.25.1 (#1304)
Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.25.0 to 1.25.1.
- [Release notes](https://github.com/bufbuild/buf-setup-action/releases)
- [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.25.0...v1.25.1)

---
updated-dependencies:
- dependency-name: bufbuild/buf-setup-action
  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>
2023-08-07 16:09:49 +10:00
dependabot[bot]
70358501c1 build(deps): bump golang.org/x/net from 0.12.0 to 0.14.0 (#1305)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.12.0 to 0.14.0.
- [Commits](https://github.com/golang/net/compare/v0.12.0...v0.14.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>
2023-08-07 16:08:40 +10:00
Ryan O'Hara-Reid
43a8044b44 gateio: websocket updates (#1282)
* gateio: websocket updates

* Update exchanges/gateio/gateio_websocket.go

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

* glorious: nits

* revert that trick

* glorious:nits

* Update exchanges/gateio/gateio_ws_futures.go

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

* Update exchanges/gateio/gateio_ws_futures.go

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

* Update exchanges/gateio/gateio_websocket.go

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

* Update exchanges/gateio/gateio_websocket.go

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

* Update exchanges/gateio/gateio_ws_option.go

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

* Update exchanges/gateio/gateio_ws_option.go

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

* Update exchanges/gateio/gateio_websocket.go

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

* Update exchanges/gateio/gateio_websocket.go

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

* thrasher-nits

* Update exchanges/gateio/gateio_ws_futures.go

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

* Update exchanges/gateio/gateio_ws_futures.go

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

* thrasher: nits rides again chapter 2 volume 1

* rm unmarshaljson method for orderbook

* use gateio time where it can and update tests

* math.trunc and lower time frame on big books

* :eagle

---------

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>
2023-08-04 17:39:38 +10:00
Gareth Kirwan
1f786f01f5 Bitfinex: Fix websocket new/modify order fields (#1280)
* Bitfinex: Fix ws new/modify Order Fields

Fixes Type, Amount and Symbol for new order, and IsShort for modify
order

* Bitfinex: Fix ws order type for margin

Also unifies the pair symbol method to standardised fixCasing

* Fix lint warning on shadow err

* Bitfinex: Remove CustomID duplication for ws
2023-08-04 15:49:03 +10:00
Gareth Kirwan
d262166424 Bitstamp: Fix subscription_succeeded not handled (#1298) 2023-08-04 13:01:37 +10:00
Adrian Gallagher
74bf13fc42 Kraken: Set AssetType in GetActiveOrders, CancelOrder and GetOrderInfo wrappers (#1287)
* Kraken: Fix GetActiveOrders AssetType and CancelOrder wrappers

AssetType wasn't set when calling GetActiveOrders and no default case handling was in CancelOrder

* Kraken: Add basic CancelOrder wrapper asset coverage

* Kraken: Add AssetType to GetOrderInfo

* Kraken: Add order status for open orders
2023-08-01 13:06:17 +10:00
dependabot[bot]
e6860ad1c9 build(deps): bump github.com/grpc-ecosystem/grpc-gateway/v2 (#1290)
Bumps [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway) from 2.16.0 to 2.16.2.
- [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.16.0...v2.16.2)

---
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>
2023-07-31 18:31:14 +10:00
Gareth Kirwan
a207d6ecf3 Order: Fix AmountStepIncrementSize conforms check (#1286)
Was using max instead of min, and using either should be redundant
anyway
2023-07-31 18:29:17 +10:00
Ryan O'Hara-Reid
a0bc2c0cf3 gateio: Implement UpdateOrderExecutionLimits for spot instruments (#1281)
* gateio: limits (cherry-pick)

* clean

* linter: fix

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
2023-07-31 18:17:58 +10:00
Bea
0cae2ad804 Bitfinex: Implement UpdateOrderExecutionLimits and tests (#1269)
* Bitfinex: Order Execution Limits and Testing

* Bitfinex: added proposed changes

* Bitfinex: lint fixes- removed the unnecessary whitespace and replaced the value with indexing

* Bitfinex: Moved data len check before the string conversion, moved the error for the array conversion before the info len check

* Bitfinex: Change GetSiteInfoConfigData to return slice, add tests

* Bitfinex: Fixed lint issue by preallocating pairs
2023-07-31 17:56:45 +10:00
Bea
123ec8c73d Bitstamp: Implement UpdateOrderExecutionLimits and testing (#1264)
* Bitstamp: OrderExecutionLimits and testing

* Bitstamp: Fix FetchTradablePairs Loading Limits

* Bitstamp: Limit for the step increment added, type convert replaced with regular expression

* Update exchanges/bitstamp/bitstamp_type_convert.go

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

* Bitstamp: Changed MinimumBaseAmount to MinimumQuoteAmount

* Bitstamp: changed riceStepIncrementSize and AmountStepIncrementSize to math.Pow(-value)

---------

Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com>
2023-07-28 15:43:32 +10:00
Gareth Kirwan
1e96453e2a Kraken: Fix websocket new order pair symbol format (#1283) 2023-07-28 14:53:28 +10:00
Gareth Kirwan
5d5f88c82a Orders: Fix Pending status not parsed (#1284) 2023-07-28 13:16:33 +10:00
Gareth Kirwan
c5a1a88292 Kraken: Fix websocket open orders orderType parsing (#1285) 2023-07-28 13:16:11 +10:00
Ryan O'Hara-Reid
4dd3008fd4 Kraken: fix websocket orderbook processing (#1279)
* kraken: fix websocket orderbook processing

* kraken: clean

* glorious: nits also add todo

* more: add required checksum to TODO for future, move variable to top

* glorious: get mad

* orderbook: fix retrieve issue

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
2023-07-26 16:35:43 +10:00
Scott
471f4f21c4 Binance,OKx: Implement fetching funding rates (#1239)
* adds basic groundwork for rates on binance

* more into rates on binance

* rm redudant redundancy, add payments

* mini commit before merging with testnet ability branch

* changes function signature and fixes resulting build

* gets billing data too

* funding rates package, features use, testnet reimpl

* new endpoint, refinements and tests

* cli fix, rpc impl, testing, payments

* fixups from looking at code

* typo fix

* niteroos

* merge fixes

* adds test, fixes cli issues

* woah nelly
2023-07-26 14:25:43 +10:00
dependabot[bot]
2ad9304045 build(deps): bump bufbuild/buf-setup-action from 1.24.0 to 1.25.0 (#1278)
Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.24.0 to 1.25.0.
- [Release notes](https://github.com/bufbuild/buf-setup-action/releases)
- [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.24.0...v1.25.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>
2023-07-24 15:27:54 +10:00
Bea
0522a54681 Kraken: Load order execution limits for tradable pairs (#1255)
* Kraken: Load asset limits for pairs

* Kraken: Add test for spot order limit loading

* Kraken: move Limits to UpdateExecutionLimits

* Kraken: Whitespace fixed

* Kraken: added ErrNotYetImplemented for the futures

* Kraken: Fix FetchTradablePairs Loading Limits

* Kraken: changed the error to match the Go 1.13 error package

---------

Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com>
2023-07-24 13:42:49 +10:00
Ryan O'Hara-Reid
b797934854 bitfinex: fix websocket subscribing issue caused by formatting (#1276)
* bitfinex: fix subscribing issue caused by formatting

* glorious: nits

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
2023-07-24 13:26:50 +10:00
TaltaM
f48993dfdc [gRPC] Add stream authentication to gRPC server (#1273) 2023-07-20 09:25:34 +10:00
Gareth Kirwan
69d0f1d9a7 Kraken: Fix Balances reporting 0 free (#1267)
* Kraken: Fix Balances reporting 0 Free

This switches to BalancesEx(tended) to get Held assets so we can
construct a Total, Held and Free.
Without this fix we get 0 balance from GetFree()
Haven't added tests because no construct for mocks and it's private
data. Considering adding mocks a bridge to far for this fix.

* Kraken: Simplify GetBalance
2023-07-18 15:22:51 +10:00
Gareth Kirwan
4a8eedf3f7 Bitstamp: Fix USDT balance not loading (#1265)
* Bitstamp: Fix USDT balance not loading

* Bitstamp: Fix GetBalance losing Fees
2023-07-18 13:44:30 +10:00
dependabot[bot]
d5c9a14442 build(deps): bump bufbuild/buf-setup-action from 1.23.1 to 1.24.0 (#1272)
Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.23.1 to 1.24.0.
- [Release notes](https://github.com/bufbuild/buf-setup-action/releases)
- [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.23.1...v1.24.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>
2023-07-17 16:03:39 +10:00